diff --git a/ShiftOS/Colour Picker.vb b/ShiftOS/Colour Picker.vb index e1c3065..238b719 100644 --- a/ShiftOS/Colour Picker.vb +++ b/ShiftOS/Colour Picker.vb @@ -382,9 +382,12 @@ End Sub Private Sub Clock_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing - ShiftOSDesktop.programsopen = ShiftOSDesktop.programsopen - 1 - Me.Hide() - ShiftOSDesktop.setuppanelbuttons() + Try + ShiftOSDesktop.programsopen = ShiftOSDesktop.programsopen - 1 + Me.Hide() + ShiftOSDesktop.setuppanelbuttons() + Catch + End Try End Sub 'end of general setup @@ -2050,7 +2053,7 @@ ShiftOSDesktop.lastcolourpick = pnlnewcolour.BackColor Shifter.setuppreshifterstuff() End If - + Me.Close() End Sub diff --git a/ShiftOS/NewAPI.vb b/ShiftOS/NewAPI.vb index 0ff7e43..2a5b7fb 100644 --- a/ShiftOS/NewAPI.vb +++ b/ShiftOS/NewAPI.vb @@ -2,6 +2,7 @@ Private Command As String Private NewModForm As New ModForm + Public Sub UseCode(ByVal Path As String) Dim sr As System.IO.StreamReader diff --git a/ShiftOS/Paths.vb b/ShiftOS/Paths.vb new file mode 100644 index 0000000..57bb689 --- /dev/null +++ b/ShiftOS/Paths.vb @@ -0,0 +1,44 @@ +Module Paths + + + + ' Paths: + ' Root path - Paths.root - DO NOT USE UNLESS NECISARY (Opening files from the file skimmer, blocking the user from going above C:\ShiftOS, ect) + ' Software Data - Paths.progdata - This is the base path for all program data. If you are adding a folder to this path, add a variable in here + ' AdvStart - Paths.advdata - I'm not fully sure what this does + ' Knowledge Input Data - Paths.kidata - Knowledge Input uses this to save your lists of words you've found + ' Shiftnet Data - Paths.shiftnetdata - This is where the shiftnet currently saves it's history + ' Download Manager Data - Paths.dnldata - Not sure what this does + ' Save Data - Paths.savedata - The game has it's save file in here + ' Home Directory - Paths.home - This is the folder that contains all the user's files + ' Desktop - Paths.desktop - All the files that appear on your desktop should be stored here + ' Documents - Paths.documents - The documents folder is where the user puts their documents + ' Downloads - Paths.downloads - The downloads folder is where the downloader downloads downloads from the Shiftnet + ' Music - Paths.music - The music folder is where the user puts their music + ' Pictures - Paths.pictures - The pictures folder is where the user puts their pictures + ' Skins - Paths.skins - The skins folder is where the user puts their skins + + + + + + Public root As String = "C:\ShiftOS\" 'Do NOT use this unless it is for files that must go DIRECTLY in C:\ShiftOS\ + + Public progdata As String = root & "SoftwareData\" + + Public advdata As String = progdata & "AdvStart\" + Public kidata As String = progdata & "KnowledgeInput\" + Public shiftnetdata As String = progdata & "Shiftnet\" + Public dnldata As String = progdata & "DownloadManager\" + + Public savedata As String = root & "Shiftum42\" + + Public home As String = root & "Home\" + + Public desktop As String = home & "Desktop\" + Public documents As String = home & "Documents\" + Public downloads As String = home & "Documents\" + Public music As String = home & "Music\" + Public pictures As String = home & "Pictures\" + Public skins As String = home & "Skins\" +End Module diff --git a/ShiftOS/ShiftOS.vbproj b/ShiftOS/ShiftOS.vbproj index feb32d7..4b87850 100644 --- a/ShiftOS/ShiftOS.vbproj +++ b/ShiftOS/ShiftOS.vbproj @@ -244,6 +244,7 @@ Form + ProgressBarEX.vb diff --git a/ShiftOS/ShiftOSDesktop.vb b/ShiftOS/ShiftOSDesktop.vb index 8a8276a..d0e19ef 100644 --- a/ShiftOS/ShiftOSDesktop.vb +++ b/ShiftOS/ShiftOSDesktop.vb @@ -15,7 +15,7 @@ Public newgame As Boolean = False Public lastcolourpick As Color = Color.Gray Public programsopen As Integer = 0 - Public ShiftOSPath As String = "C:\ShiftOS\" + Public ShiftOSPath As String = "C:\ShiftOS" Private actualshiftversion As String = "0.0.8" Public ingameversion As String = "0.0.1.0" @@ -1062,16 +1062,16 @@ SortOutBooleans(WebBrowserCorrupted, 613, False) If boughtdesktopicons = True Then savelines(614) = 11 Else savelines(614) = 10 If boughtadvapplauncher = True Then savelines(615) = 11 Else savelines(615) = 10 - IO.File.WriteAllLines(ShiftOSPath + "Shiftum42\Drivers\HDD.dri", savelines) - File_Crypt.EncryptFile(ShiftOSPath + "Shiftum42\Drivers\HDD.dri", "C:/ShiftOS/Shiftum42/SKernal.sft", sSecretKey) + IO.File.WriteAllLines(Paths.savedata & "Drivers\HDD.dri", savelines) + File_Crypt.EncryptFile(Paths.savedata & "Drivers\HDD.dri", Paths.savedata & "SKernal.sft", sSecretKey) Try - Dim sw As New IO.StreamWriter(ShiftOSPath & "SoftwareData\DownloadManager\Downloadhistory.lst") + Dim sw As New IO.StreamWriter(Paths.dnldata & "Downloadhistory.lst") sw.Write(downloadmanagerhistory) sw.Close() Catch ex As Exception End Try - Dim objWriter As New System.IO.StreamWriter("C:/ShiftOS/Shiftum42/HDAccess.sft", False) + Dim objWriter As New System.IO.StreamWriter(Paths.savedata & "HDAccess.sft", False) objWriter.Write(actualshiftversion) objWriter.Close() @@ -1090,8 +1090,8 @@ End Sub Private Sub loadgame() - File_Crypt.DecryptFile("C:/ShiftOS/Shiftum42/SKernal.sft", ShiftOSPath + "Shiftum42\Drivers\HDD.dri", sSecretKey) - loadlines = IO.File.ReadAllLines(ShiftOSPath + "Shiftum42\Drivers\HDD.dri") + File_Crypt.DecryptFile(Paths.savedata & "SKernal.sft", Paths.savedata & "Drivers\HDD.dri", sSecretKey) + loadlines = IO.File.ReadAllLines(Paths.savedata & "Drivers\HDD.dri") If loadlines(0) = 11 Then boughttitlebar = True Else boughttitlebar = False If loadlines(1) = 11 Then boughtgray = True Else boughtgray = False diff --git a/ShiftOS/skins.vb b/ShiftOS/skins.vb index 8473fdf..e2c4f24 100644 --- a/ShiftOS/skins.vb +++ b/ShiftOS/skins.vb @@ -409,6 +409,7 @@ Module Skins If Not loaddata(109) = "" Then enablebordercorners = loaddata(109) 'for adding extra features, check: + If loaddata(110) = "" Or loaddata(110) = "End of skin data" Then loaddata(110) = enabledraggableicons Else enabledraggableicons = loaddata(110) 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) @@ -419,11 +420,26 @@ Module Skins If loaddata(117) = "" Then startHeight = 526 Else startHeight = loaddata(117) If loaddata(118) = "" Then startWidth = 320 Else startWidth = loaddata(118) 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(121) = "" Then recentIconsHorizontal = False Else recentIconsHorizontal = loaddata(121) 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(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(126) = "" Then userNamePanelBackgroundColor = Color.Gray Else userNamePanelBackgroundColor = Color.FromArgb(loaddata(126)) If loaddata(127) = "" Then powerPanelBackgroundColor = Color.Gray Else powerPanelBackgroundColor = Color.FromArgb(loaddata(127))