mirror of
https://github.com/TheUltimateHacker/ShiftOS.git
synced 2025-01-22 09:01:58 -05:00
Added Paths module
This commit is contained in:
parent
c8d95621fb
commit
6975f73850
5 changed files with 46 additions and 14 deletions
|
@ -382,9 +382,12 @@
|
|||
End Sub
|
||||
|
||||
Private Sub Clock_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
|
||||
Try
|
||||
ShiftOSDesktop.programsopen = ShiftOSDesktop.programsopen - 1
|
||||
Me.Hide()
|
||||
ShiftOSDesktop.setuppanelbuttons()
|
||||
Catch
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'end of general setup
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
19
ShiftOS/Paths.vb
Normal file
19
ShiftOS/Paths.vb
Normal file
|
@ -0,0 +1,19 @@
|
|||
Module Paths
|
||||
Public root As String = "C:\ShiftOS\"
|
||||
|
||||
Public progdata As String = "C:\ShiftOS\SoftwareData\"
|
||||
|
||||
Public advdata As String = "C:\ShiftOS\SoftwareData\AdvStart\"
|
||||
Public kidata As String = "C:\ShiftOS\SoftwareData\KnowledgeInput\"
|
||||
Public shiftnetdata As String = "C:\ShiftOS\SoftwareData\Shiftnet\"
|
||||
Public dnldata As String = "C:\ShiftOS\SoftwareData\DownloadManager\"
|
||||
|
||||
Public savedata As String = "C:\ShiftOS\Shiftum42\"
|
||||
|
||||
Public home As String = "C:\ShiftOS\Home\"
|
||||
Public desktop As String = "C:\ShiftOS\Home\Desktop\"
|
||||
Public documents As String = "C:\ShiftOS\Home\Documents\"
|
||||
Public music As String = "C:\ShiftOS\Home\Music\"
|
||||
Public pictures As String = "C:\ShiftOS\Home\Pictures\"
|
||||
Public skins As String = "C:\ShiftOS\Home\Skins\"
|
||||
End Module
|
|
@ -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"
|
||||
|
||||
|
@ -1063,15 +1063,15 @@
|
|||
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)
|
||||
File_Crypt.EncryptFile(ShiftOSPath + "Shiftum42\Drivers\HDD.dri", "C:\ShiftOS\Shiftum42\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
|
||||
|
@ -5077,6 +5077,7 @@
|
|||
hideStart()
|
||||
Else
|
||||
infobox.showinfo("Error", "Could not find app 'Pong'.")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub KnowledgeInputToolStripMenuItem1_Click(sender As Object, e As EventArgs) Handles KnowledgeInputToolStripMenuItem1.Click
|
||||
|
|
|
@ -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)
|
||||
|
@ -420,10 +421,17 @@ Module Skins
|
|||
If loaddata(118) = "" Then startWidth = 320 Else startWidth = loaddata(118)
|
||||
If loaddata(119) = "" Then shutdownstring = "Shut Down ShiftOS" Else shutdownstring = loaddata(119)
|
||||
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
|
||||
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))
|
||||
|
|
Loading…
Reference in a new issue