aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb
diff options
context:
space:
mode:
authorEverythingWindows <[email protected]>2022-11-06 18:45:00 +0700
committerEverythingWindows <[email protected]>2022-11-06 18:45:00 +0700
commit1ca1bed37df7422ab7049f44bf864494747abd51 (patch)
treee5ee3ca8163b7f4c191cc1e9ae4a909037a24888 /ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb
parent2a3e5ec4d537770bb3d310bfb9bda12c0615aedd (diff)
downloadshiftos-therevival-old-0.2.3.tar.gz
shiftos-therevival-old-0.2.3.tar.bz2
shiftos-therevival-old-0.2.3.zip
0.2.3 final code0.2.3
Diffstat (limited to 'ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb')
-rw-r--r--ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb53
1 files changed, 34 insertions, 19 deletions
diff --git a/ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb b/ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb
index a04ab37..73f0c32 100644
--- a/ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb
+++ b/ShiftOS-TheRevival/MainForms/ShiftOSMenu.vb
@@ -26,8 +26,8 @@ Public Class ShiftOSMenu
'Catch ex As Exception
' MsgBox("Why? Because of " & ex.Message)
'End Try
+ CheckInstall()
CheckUpdate()
- 'CheckInstall()
BannerChange.Start()
End Sub
@@ -40,6 +40,7 @@ Public Class ShiftOSMenu
Case "Free Roam Mode"
Try
Strings.IsFree = True
+ Strings.OnceInfo(6) = "free"
FreeRoamMode()
Terminal.Show()
Close()
@@ -51,6 +52,11 @@ Public Class ShiftOSMenu
End Try
Case "Continue"
MsgBox("This feature is in development")
+ Strings.IsFree = False
+ Strings.OnceInfo(6) = "story"
+ Terminal.Show()
+ Terminal.StayAtChapter = True
+ Close()
End Select
End Sub
@@ -63,6 +69,7 @@ Public Class ShiftOSMenu
btn_Exit.Visible = False
Case "New Game"
Strings.IsFree = False
+ Strings.OnceInfo(6) = "story"
MsgBox("This feature is in development, be sure to watch out for bugs")
IntroStory.Show()
NewGameMode()
@@ -82,12 +89,12 @@ Public Class ShiftOSMenu
Private Sub CheckUpdate()
Try
- If File.Exists("C:\SOS_NewVer.txt") = True Then
- File.Delete("C:\SOS_NewVer.txt")
+ If File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SOS_NewVer.txt") = True Then
+ File.Delete(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SOS_NewVer.txt")
End If
- My.Computer.Network.DownloadFile("http://148.251.124.62:8080/ShiftOS/data/NewVer.txt", "C:\SOS_NewVer.txt")
+ My.Computer.Network.DownloadFile("http://148.251.124.62:8080/ShiftOS/data/NewVer.txt", Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SOS_NewVer.txt")
Dim CurrentVersion As String = My.Resources.CurrentVersion
- Dim NewVersion As String = File.ReadAllText("C:\SOS_NewVer.txt")
+ Dim NewVersion As String = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\SOS_NewVer.txt")
If CurrentVersion = NewVersion Then
Else
@@ -107,25 +114,33 @@ Public Class ShiftOSMenu
Private Sub CheckInstall()
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS") = True Then
- Dim WhatVersion As String = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\version.txt")
- If WhatVersion = My.Resources.CurrentVersion Then
-
- Else
- btn_Aboot.Enabled = False
- btn_Exit.Enabled = False
- btn_FreeRoam.Enabled = False
- btn_StoryMode.Enabled = False
- ShouldUpdate = True
- ShiftOSUpdater.Show()
- End If
+ 'Dim WhatVersion As String = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\version.txt")
+ 'If WhatVersion = My.Resources.CurrentVersion Then
+
+ 'Else
+ ' btn_Aboot.Enabled = False
+ ' btn_Exit.Enabled = False
+ ' btn_FreeRoam.Enabled = False
+ ' btn_StoryMode.Enabled = False
+ ' ShouldUpdate = True
+ ' ShiftOSUpdater.Show()
+ 'End If
Else
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS") = True Then
If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS") = True Then
- Directory.CreateDirectory(My.Computer.FileSystem.GetTempFileName & "\ShiftOS\ShiftFS")
+
+ Else
+ Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS")
+ End If
+ If Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved") = True Then
+
+ Else
+ Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved")
End If
Else
- Directory.CreateDirectory(My.Computer.FileSystem.GetTempFileName & "\ShiftOS")
- Directory.CreateDirectory(My.Computer.FileSystem.GetTempFileName & "\ShiftOS\ShiftFS")
+ Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS")
+ Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\ShiftFS")
+ Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\ShiftOS\saved")
End If
End If
End Sub