#11 - Fixed skinning bug.

Fixed a huge skinning bug, along with adding a few new features (Infobox
tries to find a .wav file to play when it starts up. If there isn't any,
it doesn't play a sound.)
This commit is contained in:
TheUltimateHacker 2015-03-16 11:52:50 -04:00
parent afbd2926d0
commit dbdc3f9183
4 changed files with 87 additions and 86 deletions

View file

@ -1,4 +1,4 @@
Public Class Helper Module Helper
Dim path As String = ShiftOSDesktop.ShiftOSPath Dim path As String = ShiftOSDesktop.ShiftOSPath
Public Sub addCP(points As Integer) 'Add some CP Public Sub addCP(points As Integer) 'Add some CP
ShiftOSDesktop.codepoints = ShiftOSDesktop.codepoints + points ShiftOSDesktop.codepoints = ShiftOSDesktop.codepoints + points
@ -13,4 +13,4 @@
Public Sub playSound(path As String, playMode As AudioPlayMode) Public Sub playSound(path As String, playMode As AudioPlayMode)
My.Computer.Audio.Play(path, playMode) My.Computer.Audio.Play(path, playMode)
End Sub End Sub
End Class End Module

View file

@ -1157,11 +1157,15 @@ Public Class Skin_Loader
Private Sub btnapplyskin_Click(sender As Object, e As EventArgs) Handles btnapplyskin.Click Private Sub btnapplyskin_Click(sender As Object, e As EventArgs) Handles btnapplyskin.Click
If skinloaded = True Then If skinloaded = True Then
If loadingsknversion = "2.0 disposal-free skinning" Then If loadingsknversion = "2.0 disposal-free skinning" Then
If Directory.Exists(ShiftOSPath + "Shiftum42\Skins\Loaded") Then My.Computer.FileSystem.DeleteDirectory(ShiftOSPath + "Shiftum42\Skins\Loaded", FileIO.DeleteDirectoryOption.DeleteAllContents) If Directory.Exists(Paths.loadedskin) Then My.Computer.FileSystem.DeleteDirectory(Paths.loadedskin, FileIO.DeleteDirectoryOption.DeleteAllContents)
Directory.CreateDirectory(ShiftOSPath + "Shiftum42\Skins\Loaded") Directory.CreateDirectory(ShiftOSPath + "Shiftum42\Skins\Loaded")
My.Computer.FileSystem.CopyDirectory(ShiftOSPath + "Shiftum42\Skins\Preview", ShiftOSPath + "Shiftum42\Skins\Loaded") My.Computer.FileSystem.CopyDirectory(ShiftOSPath + "Shiftum42\Skins\Preview", ShiftOSPath + "Shiftum42\Skins\Loaded")
Skins.loadimages() Skins.loadimages()
skinloaded = False skinloaded = False
Else Else
apply1_0skin() apply1_0skin()
skinloaded = False skinloaded = False

View file

@ -1,4 +1,6 @@
Public Class infobox Imports ShiftOS.Helper
Imports ShiftOS.Paths
Public Class infobox
Public rolldownsize As Integer Public rolldownsize As Integer
Public oldbordersize As Integer Public oldbordersize As Integer
Public oldtitlebarheight As Integer Public oldtitlebarheight As Integer
@ -32,6 +34,11 @@
ShiftOSDesktop.setuppanelbuttons() ShiftOSDesktop.setuppanelbuttons()
ShiftOSDesktop.setpanelbuttonappearnce(ShiftOSDesktop.pnlpanelbuttoninfobox, ShiftOSDesktop.tbinfoboxicon, ShiftOSDesktop.tbinfoboxtext, True) 'modify to proper name ShiftOSDesktop.setpanelbuttonappearnce(ShiftOSDesktop.pnlpanelbuttoninfobox, ShiftOSDesktop.tbinfoboxicon, ShiftOSDesktop.tbinfoboxtext, True) 'modify to proper name
ShiftOSDesktop.programsopen = ShiftOSDesktop.programsopen + 1 ShiftOSDesktop.programsopen = ShiftOSDesktop.programsopen + 1
Try
playSound(sounddir & "infobox.wav", AudioPlayMode.Background)
Catch
End Try
End Sub End Sub
Public Sub setupall() Public Sub setupall()

View file

@ -184,119 +184,119 @@ Module Skins
' LOAD SKIN FROM SKN FILE ' LOAD SKIN FROM SKN FILE
Public Sub loadsknfile(ByVal filepath As String) Public Sub loadsknfile(ByVal filepath As String)
If Directory.Exists(savepath + "Shiftum42\Skins\Loaded\") Then My.Computer.FileSystem.DeleteDirectory(savepath + "Shiftum42\Skins\Loaded", FileIO.DeleteDirectoryOption.DeleteAllContents) If Directory.Exists(loadedskin) Then My.Computer.FileSystem.DeleteDirectory(savepath + "Shiftum42\Skins\Loaded", FileIO.DeleteDirectoryOption.DeleteAllContents)
Directory.CreateDirectory(savepath + "Shiftum42\Skins\Loaded") Directory.CreateDirectory(savepath + "Shiftum42\Skins\Loaded")
System.IO.Compression.ZipFile.ExtractToDirectory(filepath, savepath + "Shiftum42\Skins\Loaded") System.IO.Compression.ZipFile.ExtractToDirectory(filepath, savepath + "Shiftum42\Skins\Loaded")
loadimages() loadimages()
End Sub End Sub
' LOAD SKIN FROM SAVE FOLDER ' LOAD SKIN FROM SAVE FOLDER
Public Sub loadimages() Public Sub loadimages()
If File.Exists(savepath + "Shiftum42\Skins\Loaded\userbar") Then If File.Exists(loadedskin & "userbar") Then
userNamePanelBackground = GetImage(savepath + "Shiftum42\Skins\Loaded\userbar") userNamePanelBackground = GetImage(loadedskin & "userbar")
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\powerbar") Then If File.Exists(loadedskin & "powerbar") Then
powerPanelBackgroundImage = GetImage(savepath + "Shiftum42\Skins\Loaded\powerbar") powerPanelBackgroundImage = GetImage(loadedskin & "powerbar")
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\titlebar") Then If File.Exists(loadedskin & "titlebar") Then
titlebar = GetImage(savepath + "Shiftum42\Skins\Loaded\titlebar") titlebar = GetImage(loadedskin & "titlebar")
Else : titlebar = Nothing Else : titlebar = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\borderleft") Then If File.Exists(loadedskin & "borderleft") Then
borderleft = GetImage(savepath + "Shiftum42\Skins\Loaded\borderleft") borderleft = GetImage(loadedskin & "borderleft")
Else : borderleft = Nothing Else : borderleft = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\borderright") Then If File.Exists(loadedskin & "borderright") Then
borderright = GetImage(savepath + "Shiftum42\Skins\Loaded\borderright".Clone) borderright = GetImage(loadedskin & "borderright".Clone)
Else : borderright = Nothing Else : borderright = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\borderbottom") Then If File.Exists(loadedskin & "borderbottom") Then
borderbottom = GetImage(savepath + "Shiftum42\Skins\Loaded\borderbottom".Clone) borderbottom = GetImage(loadedskin & "borderbottom".Clone)
Else : borderbottom = Nothing Else : borderbottom = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\closebtn") Then If File.Exists(loadedskin & "closebtn") Then
closebtn = GetImage(savepath + "Shiftum42\Skins\Loaded\closebtn".Clone) closebtn = GetImage(loadedskin & "closebtn".Clone)
Else : closebtn = Nothing Else : closebtn = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\closebtnhover") Then If File.Exists(loadedskin & "closebtnhover") Then
closebtnhover = GetImage(savepath + "Shiftum42\Skins\Loaded\closebtnhover".Clone) closebtnhover = GetImage(loadedskin & "closebtnhover".Clone)
Else : closebtnhover = Nothing Else : closebtnhover = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\closebtnclick") Then If File.Exists(loadedskin & "closebtnclick") Then
closebtnclick = GetImage(savepath + "Shiftum42\Skins\Loaded\closebtnclick".Clone) closebtnclick = GetImage(loadedskin & "closebtnclick".Clone)
Else : closebtnclick = Nothing Else : closebtnclick = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\rollbtn") Then If File.Exists(loadedskin & "rollbtn") Then
rollbtn = GetImage(savepath + "Shiftum42\Skins\Loaded\rollbtn".Clone) rollbtn = GetImage(loadedskin & "rollbtn".Clone)
Else : rollbtn = Nothing Else : rollbtn = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\rollbtnhover") Then If File.Exists(loadedskin & "rollbtnhover") Then
rollbtnhover = GetImage(savepath + "Shiftum42\Skins\Loaded\rollbtnhover".Clone) rollbtnhover = GetImage(loadedskin & "rollbtnhover".Clone)
Else : rollbtnhover = Nothing Else : rollbtnhover = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\rollbtnclick") Then If File.Exists(loadedskin & "rollbtnclick") Then
rollbtnclick = GetImage(savepath + "Shiftum42\Skins\Loaded\rollbtnclick".Clone) rollbtnclick = GetImage(loadedskin & "rollbtnclick".Clone)
Else : rollbtnclick = Nothing Else : rollbtnclick = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\minbtn") Then If File.Exists(loadedskin & "minbtn") Then
minbtn = GetImage(savepath + "Shiftum42\Skins\Loaded\minbtn".Clone) minbtn = GetImage(loadedskin & "minbtn".Clone)
Else : minbtn = Nothing Else : minbtn = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\minbtnhover") Then If File.Exists(loadedskin & "minbtnhover") Then
minbtnhover = GetImage(savepath + "Shiftum42\Skins\Loaded\minbtnhover".Clone) minbtnhover = GetImage(loadedskin & "minbtnhover".Clone)
Else : minbtnhover = Nothing Else : minbtnhover = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\minbtnclick") Then If File.Exists(loadedskin & "minbtnclick") Then
minbtnclick = GetImage(savepath + "Shiftum42\Skins\Loaded\minbtnclick".Clone) minbtnclick = GetImage(loadedskin & "minbtnclick".Clone)
Else : minbtnclick = Nothing Else : minbtnclick = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\rightcorner") Then If File.Exists(loadedskin & "rightcorner") Then
rightcorner = GetImage(savepath + "Shiftum42\Skins\Loaded\rightcorner".Clone) rightcorner = GetImage(loadedskin & "rightcorner".Clone)
Else : rightcorner = Nothing Else : rightcorner = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\leftcorner") Then If File.Exists(loadedskin & "leftcorner") Then
leftcorner = GetImage(savepath + "Shiftum42\Skins\Loaded\leftcorner".Clone) leftcorner = GetImage(loadedskin & "leftcorner".Clone)
Else : leftcorner = Nothing Else : leftcorner = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\desktoppanel") Then If File.Exists(loadedskin & "desktoppanel") Then
desktoppanel = GetImage(savepath + "Shiftum42\Skins\Loaded\desktoppanel".Clone) desktoppanel = GetImage(loadedskin & "desktoppanel".Clone)
Else : desktoppanel = Nothing Else : desktoppanel = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\desktopbackground") Then If File.Exists(loadedskin & "desktopbackground") Then
desktopbackground = GetImage(savepath + "Shiftum42\Skins\Loaded\desktopbackground".Clone) desktopbackground = GetImage(loadedskin & "desktopbackground".Clone)
Else : desktopbackground = Nothing Else : desktopbackground = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\panelbutton") Then If File.Exists(loadedskin & "panelbutton") Then
panelbutton = GetImage(savepath + "Shiftum42\Skins\Loaded\panelbutton".Clone) panelbutton = GetImage(loadedskin & "panelbutton".Clone)
Else : panelbutton = Nothing Else : panelbutton = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\applaunchermouseover") Then If File.Exists(loadedskin & "applaunchermouseover") Then
applaunchermouseover = GetImage(savepath + "Shiftum42\Skins\Loaded\applaunchermouseover".Clone) applaunchermouseover = GetImage(loadedskin & "applaunchermouseover".Clone)
Else : applaunchermouseover = Nothing Else : applaunchermouseover = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\applauncher") Then If File.Exists(loadedskin & "applauncher") Then
applauncher = GetImage(savepath + "Shiftum42\Skins\Loaded\applauncher".Clone) applauncher = GetImage(loadedskin & "applauncher".Clone)
Else : applauncher = Nothing Else : applauncher = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\applauncherclick") Then If File.Exists(loadedskin & "applauncherclick") Then
applauncherclick = GetImage(savepath + "Shiftum42\Skins\Loaded\applauncherclick".Clone) applauncherclick = GetImage(loadedskin & "applauncherclick".Clone)
Else : applauncherclick = Nothing Else : applauncherclick = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\panelclock") Then If File.Exists(loadedskin & "panelclock") Then
panelclock = GetImage(savepath + "Shiftum42\Skins\Loaded\panelclock".Clone) panelclock = GetImage(loadedskin & "panelclock".Clone)
Else : panelclock = Nothing Else : panelclock = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\bottomleftcorner") Then If File.Exists(loadedskin & "bottomleftcorner") Then
bottomleftcorner = GetImage(savepath + "Shiftum42\Skins\Loaded\bottomleftcorner".Clone) bottomleftcorner = GetImage(loadedskin & "bottomleftcorner".Clone)
Else : bottomleftcorner = Nothing Else : bottomleftcorner = Nothing
End If End If
If File.Exists(savepath + "Shiftum42\Skins\Loaded\bottomrightcorner") Then If File.Exists(loadedskin & "bottomrightcorner") Then
bottomrightcorner = GetImage(savepath + "Shiftum42\Skins\Loaded\bottomrightcorner".Clone) bottomrightcorner = GetImage(loadedskin & "bottomrightcorner".Clone)
Else : bottomrightcorner = Nothing Else : bottomrightcorner = Nothing
End If End If
'load settings 'load settings
Dim loaddata(200) As String Dim loaddata(200) As String
If File.Exists(savepath + "Shiftum42\Skins\Loaded\data.dat") Then If File.Exists(loadedskin & "data.dat") Then
Dim sr As StreamReader = New StreamReader(savepath + "Shiftum42\Skins\Loaded\data.dat") Dim sr As StreamReader = New StreamReader(loadedskin & "data.dat")
For i As Integer = 0 To 200 Step 1 For i As Integer = 0 To 200 Step 1
loaddata(i) = sr.ReadLine loaddata(i) = sr.ReadLine
@ -414,32 +414,22 @@ Module Skins
If loaddata(111) = "" Or loaddata(111) = "End of skin data" Then loaddata(111) = icontextcolor.ToArgb Else icontextcolor = Color.FromArgb(loaddata(111)) If loaddata(111) = "" Or loaddata(111) = "End of skin data" Then loaddata(111) = icontextcolor.ToArgb Else icontextcolor = Color.FromArgb(loaddata(111))
If loaddata(112) = "" Or loaddata(112) = "End of skin data" Then loaddata(112) = showicons Else showicons = loaddata(112) If loaddata(112) = "" Or loaddata(112) = "End of skin data" Then loaddata(112) = showicons Else showicons = loaddata(112)
If loaddata(113) = "" Or loaddata(113) = "End of skin data" Then loaddata(113) = iconview1 Else iconview1 = loaddata(113) If loaddata(113) = "" Or loaddata(113) = "End of skin data" Then loaddata(113) = iconview1 Else iconview1 = loaddata(113)
If loaddata(114) = "" Then topBarHeight = 50 Else topBarHeight = loaddata(114) Try
If loaddata(114) = "" Then topBarHeight = 50 Else topBarHeight = loaddata(114)
Catch ex As Exception
topBarHeight = 50
infobox.showinfo("Error - Bad Skin File", "It appears that there was an error loading parts of this skin. The unloadable data has been reset to default values.")
End Try
If loaddata(115) = "" Then bottomBarHeight = 50 Else bottomBarHeight = loaddata(115) If loaddata(115) = "" Then bottomBarHeight = 50 Else bottomBarHeight = loaddata(115)
If loaddata(116) = "" Then placesSide = "Left" Else placesSide = loaddata(116) If loaddata(116) = "" Then placesSide = "Left" Else placesSide = loaddata(116)
If loaddata(117) = "" Then startHeight = 526 Else startHeight = loaddata(117) If loaddata(117) = "" Then startHeight = 526 Else startHeight = loaddata(117)
If loaddata(118) = "" Then startWidth = 320 Else startWidth = loaddata(118) If loaddata(118) = "" Then startWidth = 320 Else startWidth = loaddata(118)
If loaddata(119) = "" Then shutdownstring = "Shut Down ShiftOS" Else shutdownstring = loaddata(119) If loaddata(119) = "" Then shutdownstring = "Shut Down ShiftOS" Else shutdownstring = loaddata(119)
<<<<<<< HEAD
If loaddata(120) = "" Then userNamePosition = "Middle, Right" Else userNamePosition = loaddata(120) If loaddata(120) = "" Then userNamePosition = "Middle, Right" Else userNamePosition = loaddata(120)
If loaddata(121) = "" Then recentIconsHorizontal = False Else recentIconsHorizontal = loaddata(121) If loaddata(121) = "" Then recentIconsHorizontal = False Else recentIconsHorizontal = loaddata(121)
If loaddata(122) = "" Then usernametextcolor = Color.White Else usernametextcolor = Color.FromArgb(loaddata(122)) If loaddata(122) = "" Then usernametextcolor = Color.White Else usernametextcolor = Color.FromArgb(loaddata(122))
If loaddata(123) = "" Then usernamefont = "Trebuchet MS" Else usernamefont = loaddata(123) If loaddata(123) = "" Then usernamefont = "Trebuchet MS" Else usernamefont = loaddata(123)
If loaddata(124) = "" Then usernamefontsize = 12 Else usernamefontsize = loaddata(124) If loaddata(124) = "" Then usernamefontsize = 12 Else usernamefontsize = loaddata(124)
=======
If loaddata(120) = "" Then userNamePosition = "Middle, Right" Else userNamePosition = loaddata(200)
Try
If loaddata(121) = "" Then recentIconsHorizontal = False Else recentIconsHorizontal = loaddata(201)
If loaddata(122) = "" Then usernametextcolor = Color.White Else usernametextcolor = Color.FromArgb(loaddata(202))
If loaddata(123) = "" Then usernamefont = "Trebuchet MS" Else usernamefont = loaddata(203)
If loaddata(124) = "" Then usernamefontsize = 12 Else usernamefontsize = loaddata(204)
Catch
usernametextcolor = Color.White
usernamefont = "Trebuchet MS"
recentIconsHorizontal = False
usernamefontsize = 12
End Try
>>>>>>> origin/master
If loaddata(125) = "" Then usernamefontstyle = FontStyle.Bold Else usernamefontstyle = loaddata(125) If loaddata(125) = "" Then usernamefontstyle = FontStyle.Bold Else usernamefontstyle = loaddata(125)
If loaddata(126) = "" Then userNamePanelBackgroundColor = Color.Gray Else userNamePanelBackgroundColor = Color.FromArgb(loaddata(126)) If loaddata(126) = "" Then userNamePanelBackgroundColor = Color.Gray Else userNamePanelBackgroundColor = Color.FromArgb(loaddata(126))
If loaddata(127) = "" Then powerPanelBackgroundColor = Color.Gray Else powerPanelBackgroundColor = Color.FromArgb(loaddata(127)) If loaddata(127) = "" Then powerPanelBackgroundColor = Color.Gray Else powerPanelBackgroundColor = Color.FromArgb(loaddata(127))
@ -474,24 +464,24 @@ Module Skins
' SAVE TO SKN FILE ' SAVE TO SKN FILE
Public Sub saveskin(ByVal path As String) Public Sub saveskin(ByVal path As String)
If Not File.Exists(path) Then If Not File.Exists(path) Then
Dim sw As StreamWriter = New StreamWriter(savepath + "Shiftum42\Skins\Loaded\SKN-version") 'tells skin loader which system to use when openning the file Dim sw As StreamWriter = New StreamWriter(Paths.loadedskin & "SKN-version") 'tells skin loader which system to use when openning the file
sw.WriteLine("Name of skinning system used to create this skn file:") sw.WriteLine("Name of skinning system used to create this skn file:")
sw.WriteLine("2.0 disposal-free skinning") sw.WriteLine("2.0 disposal-free skinning")
sw.WriteLine("Skinning system created by william.1008 on December 2014, based on 1.0 system by DevX") sw.WriteLine("Skinning system created by william.1008 on December 2014, based on 1.0 system by DevX")
sw.Close() sw.Close()
saveskinfiles(False) saveskinfiles(False)
Compression.ZipFile.CreateFromDirectory(savepath + "Shiftum42\Skins\Loaded", path) Compression.ZipFile.CreateFromDirectory(Paths.loadedskin, path)
File.Delete(savepath + "Shiftum42\Skins\Loaded\SKN-version") File.Delete(Paths.loadedskin & "SKN-version")
Else Else
infobox.showinfo("File Exists", "That file location is already taken, please choose another.") infobox.showinfo("File Exists", "That file location is already taken, please choose another.")
End If End If
End Sub End Sub
' SAVE TO SAVE FOLDER ' SAVE TO SAVE FOLDER
Public Sub saveskinfiles(ByVal apply As Boolean) Public Sub saveskinfiles(ByVal apply As Boolean)
If File.Exists(savepath + "Shiftum42\Skins\Loaded\") Then If File.Exists(Paths.loadedskin) Then
Directory.Delete(savepath + "Shiftum42\Skins\Loaded\") Directory.Delete(Paths.loadedskin)
End If End If
Directory.CreateDirectory(savepath + "Shiftum42\Skins\Loaded\") Directory.CreateDirectory(Paths.loadedskin)
saveimage(titlebar, "titlebar") saveimage(titlebar, "titlebar")
saveimage(borderleft, "borderleft") saveimage(borderleft, "borderleft")
saveimage(borderright, "borderright") saveimage(borderright, "borderright")
@ -653,7 +643,7 @@ Module Skins
' End of skin data text was at line 110, if adding future items, check for "End of skin data" on line 110 ' End of skin data text was at line 110, if adding future items, check for "End of skin data" on line 110
savedata(200) = "End of skin data" savedata(200) = "End of skin data"
File.WriteAllLines(savepath + "Shiftum42\Skins\Loaded\data.dat", savedata) File.WriteAllLines(Paths.loadedskin & "data.dat", savedata)
If apply = True Then If apply = True Then
applyskin() applyskin()
End If End If
@ -784,14 +774,14 @@ Module Skins
End Sub End Sub
Private Sub saveimage(ByVal img As Image, ByVal name As String) Private Sub saveimage(ByVal img As Image, ByVal name As String)
If Not IsNothing(img) Then If Not IsNothing(img) Then
If File.Exists(savepath + "Shiftum42\Skins\Loaded\" & name) Then File.Delete(savepath + "Shiftum42\Skins\Loaded\" & name) If File.Exists(loadedskin & name) Then File.Delete(loadedskin & name)
Try Try
img.Save(savepath + "Shiftum42\Skins\Loaded\" & name, System.Drawing.Imaging.ImageFormat.Png) img.Save(loadedskin & name, System.Drawing.Imaging.ImageFormat.Png)
Catch ex As Exception Catch ex As Exception
infobox.showinfo("Saving Error", "Opps, an error occured when saving the file " & savepath + "Shiftum42\Skins\Loaded\" & name & ". Please contact DevX to report the problem.") infobox.showinfo("Saving Error", "Oops, an error occured when saving the file " & loadedskin & name & ". Please contact the devs to report the problem.")
End Try End Try
Else Else
If File.Exists(savepath + "Shiftum42\Skins\Loaded\" & name) Then File.Delete(savepath + "Shiftum42\Skins\Loaded\" & name) If File.Exists(loadedskin & name) Then File.Delete(loadedskin & name)
End If End If
End Sub End Sub
End Module End Module