diff --git a/.gitignore b/.gitignore index 102b0e7..e6760ba 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,16 @@ sources/packages/DarkUI.2.0.2/.signature.p7s sources/packages/DarkUI.2.0.2/DarkUI.2.0.2.nupkg sources/packages/DarkUI.2.0.2/icon-64.png sources/packages/DarkUI.2.0.2/lib/DarkUI.dll +*.exe +*.cache +sources/GUI/obj/Release/JetpackDowngraderGUI.MainForm.resources +sources/GUI/obj/Release/GUI.csproj.FileListAbsolute.txt +*.dll +sources/GUI/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs +sources/GUI/bin/Release/gui.exe.config +sources/GUI/obj/Release/GUI.csproj.CopyComplete +sources/GUI/obj/Release/JetpackDowngraderGUI.Properties.Resources.resources +sources/Downgrader/obj/Release/JetpackDowngrader.Properties.Resources.resources +sources/Downgrader/obj/Release/Jetpack Downgrader.csproj.FileListAbsolute.txt +sources/Downgrader/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs +sources/Downgrader/bin/Release/jpd.exe.config diff --git a/README.md b/README.md index 6401697..b9ec573 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Jetpack Downgrader | [Latest release](https://github.com/Zalexanninev15/Jetpack-Downgrader/releases/latest) | [Topic](https://gtaforums.com/topic/969056-jetpack-downgrader) -![alt](https://github.com/Zalexanninev15/Jetpack-Downgrader/raw/main/logo.png) +![alt](https://github.com/Zalexanninev15/Jetpack-Downgrader/raw/dev/data/logo.png) [![](https://img.shields.io/badge/OS-Windows-informational?logo=windows)](https://github.com/Zalexanninev15/Jetpack-Downgrader) [![](https://img.shields.io/github/v/release/Zalexanninev15/Jetpack-Downgrader)](https://github.com/Zalexanninev15/Jetpack-Downgrader/releases/latest) @@ -9,8 +9,12 @@ ## Description -App for downgrading the game Grand Theft Auto: San Andreas to version 1.0. -Is required .NET Framework 4.8 and Windows 7/8/8.1/10 +App for downgrading the game Grand Theft Auto: San Andreas to version 1.0 + +## System requirements + +* **OS:** Windows 7/8/8.1/10 +* **Additional:** .NET Framework 4.8 ## Authors diff --git a/languages/EN.txt b/data/Languages/EN.txt similarity index 78% rename from languages/EN.txt rename to data/Languages/EN.txt index 56ee3fb..7c305cf 100644 --- a/languages/EN.txt +++ b/data/Languages/EN.txt @@ -1,6 +1,10 @@ [Interface] PathLabel=Path to the game folder: -AppSettings=App Settings +Tab1=Downgrader Settings +Tab2=Modifications +Downgrade=Downgrade +Play=Play && Test +Stage=Select the desired stage [CheckBox] Backup=Backup original files before downgrade Shortcut=Make shortcut on Desktop @@ -14,10 +18,15 @@ InstallDirectX=Install DirectX [Title] Info=Information Error=Error +Warning=Warning FolderSelectDialog=Select the game folder [InfoMsg] Succes=Downgrade completed! +Version=Version +Author=Created by [ErrorMsg] ReadINI=Error reading settings from the jpd.ini file! WriteINI=Error writing settings to the jpd.ini file! +[WarningMsg] +PathNotFound=Path to the game is not valid! BrowserNotFound=Browser to open the link was not found! \ No newline at end of file diff --git a/jpd.ini b/data/jpd.ini similarity index 100% rename from jpd.ini rename to data/jpd.ini diff --git a/logo.png b/data/logo.png similarity index 100% rename from logo.png rename to data/logo.png diff --git a/sources/Downgrader/Classes/ProgressBar.cs b/sources/Downgrader/Classes/ProgressBar.cs index 8e13231..2aac144 100644 --- a/sources/Downgrader/Classes/ProgressBar.cs +++ b/sources/Downgrader/Classes/ProgressBar.cs @@ -27,10 +27,7 @@ private void TimerHandler(object state) if (disposed) return; int progressBlockCount = (int)(currentProgress * blockCount); int percent = (int)(currentProgress * 100); - string text = string.Format(work + ": [{0}{1}] {2,3}% {3}", - new string('#', progressBlockCount), new string('-', blockCount - progressBlockCount), - percent, - animation[animationIndex++ % animation.Length]); + string text = string.Format(work + ": [{0}{1}] {2,3}% {3}", new string('#', progressBlockCount), new string('-', blockCount - progressBlockCount), percent, animation[animationIndex++ % animation.Length]); UpdateText(text); ResetTimer(); } @@ -40,8 +37,7 @@ private void UpdateText(string text) { int commonPrefixLength = 0; int commonLength = Math.Min(currentText.Length, text.Length); - while (commonPrefixLength < commonLength && text[commonPrefixLength] == currentText[commonPrefixLength]) - commonPrefixLength++; + while (commonPrefixLength < commonLength && text[commonPrefixLength] == currentText[commonPrefixLength]) { commonPrefixLength++; } StringBuilder outputBuilder = new StringBuilder(); outputBuilder.Append('\b', currentText.Length - commonPrefixLength); outputBuilder.Append(text.Substring(commonPrefixLength)); @@ -51,13 +47,11 @@ private void UpdateText(string text) outputBuilder.Append(' ', overlapCount); outputBuilder.Append('\b', overlapCount); } + Console.ForegroundColor = ConsoleColor.Blue; Console.Write(outputBuilder); currentText = text; } - private void ResetTimer() - { - timer.Change(animationInterval, TimeSpan.FromMilliseconds(-1)); - } + private void ResetTimer() { timer.Change(animationInterval, TimeSpan.FromMilliseconds(-1)); } public void Dispose() { lock (timer) diff --git a/sources/Downgrader/Jetpack Downgrader.csproj b/sources/Downgrader/Jetpack Downgrader.csproj index 5f0f39e..7397b5b 100644 --- a/sources/Downgrader/Jetpack Downgrader.csproj +++ b/sources/Downgrader/Jetpack Downgrader.csproj @@ -58,10 +58,16 @@ + + True + True + Resources.resx + + @@ -77,5 +83,11 @@ True + + + ResXFileCodeGenerator + Resources.Designer.cs + + \ No newline at end of file diff --git a/sources/Downgrader/Program.cs b/sources/Downgrader/Program.cs index 11af11c..ecfdebc 100644 --- a/sources/Downgrader/Program.cs +++ b/sources/Downgrader/Program.cs @@ -49,9 +49,10 @@ static void MakeTransparent(byte pct) [STAThread] public static void Main(string[] args) { - Console.ForegroundColor = ConsoleColor.White; - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); + Console.ResetColor(); + Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); + try { ZipFile.ExtractToDirectory(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches\game.jppe", @Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches"); } catch { } + try { File.Delete(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches\game.jppe"); } catch { } string[] fl = new string[17]; string[] flmd5 = new string[17]; int er = 0, gv = 0; bool[] settings = new bool[18]; string path = ""; DialogResult result = DialogResult.No; // All files for downgrading (universal) fl[0] = @"\gta-sa.exe"; fl[1] = @"\gta_sa.exe"; fl[2] = @"\audio\CONFIG\TrakLkup.dat"; fl[3] = @"\audio\streams\BEATS"; @@ -66,9 +67,12 @@ public static void Main(string[] args) flmd5[12] = "3359BA8CB820299161199EE7EF3F1C02"; flmd5[13] = "60AD23E272C3B0AA937053FE3006BE93"; flmd5[14] = "9598B82CF1E5AE7A8558057A01F6F2CE"; flmd5[15] = "DBE7E372D55914C39EB1D565E8707C8C"; flmd5[16] = "9282E0DF8D7EEE3C4A49B44758DD694D"; Console.Title = "Jetpack Downgrader"; - Console.WriteLine("[JPD] App: Jetpack Downgrader\n[JPD] Version: " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + "\n[JPD] License: MIT License\n[JPD] Authors: Zalexanninev15 (programmer and creator) & Vadim M. (consultant)\n[JPD] GitHub: https://github.com/Zalexanninev15/Jetpack-Downgrader\n"); + Console.ForegroundColor = ConsoleColor.Yellow; + Console.WriteLine("[JPD] App: Jetpack Downgrader\n[JPD] Version: " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString().Replace(".0", "") + "\n[JPD] License: MIT License\n[JPD] Authors: Zalexanninev15 (programmer and creator) & Vadim M. (consultant)\n[JPD] GitHub: https://github.com/Zalexanninev15/Jetpack-Downgrader\n"); + Console.ResetColor(); try { + if (File.Exists("jpd.ini") == false) { File.WriteAllText("jpd.ini", Properties.Resources.jpd); } IniLoader cfg = new IniLoader(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\jpd.ini"); settings[2] = Convert.ToBoolean(cfg.GetValue("Downgrader", "CreateBackups")); settings[6] = Convert.ToBoolean(cfg.GetValue("Downgrader", "CreateShortcut")); @@ -96,11 +100,7 @@ public static void Main(string[] args) if ((settings[1] == true) && (settings[8] == false)) { try { path = args[0]; } catch { } if (Directory.Exists(@path) == false) { Logger("Game", "Path", "null"); } } if (settings[8] == true) { - var dialog = new FolderSelectDialog - { - InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), - Title = "Select the game folder" - }; + var dialog = new FolderSelectDialog { InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory), Title = "Select the game folder" }; if (dialog.Show()) { path = dialog.FileName; } else { path = ""; } } if ((path != "") && Directory.Exists(@path)) @@ -118,17 +118,14 @@ public static void Main(string[] args) // // Get version (EXE) string SaEXE = @path + @"\gta-sa.exe"; + Logger("GamePath", "Current", @path); Logger("Downgrader", "Process", "Get version (EXE)..."); if (File.Exists(SaEXE)) { try { string SteamEXEmd5 = GetMD5(SaEXE); - if (SteamEXEmd5 == "5BFD4DD83989A8264DE4B8E771F237FD") - { - gv = 1; - Logger("Game", "Version", "Steam"); - } + if (SteamEXEmd5 == "5BFD4DD83989A8264DE4B8E771F237FD") { gv = 1; Logger("Game", "Version", "Steam"); } else { gv = 4; @@ -136,30 +133,14 @@ public static void Main(string[] args) try { string OtherEXEmd5 = GetMD5(SaEXE); - if (OtherEXEmd5 == "6687A315558935B3FC80CDBFF04437A4") - { - gv = 3; - Logger("Game", "Version", "Rockstar Games Launcher"); - } - if ((OtherEXEmd5 == "BF25C28E9F6C13BD2D9E28F151899373") || (OtherEXEmd5 == "4E99D762F44B1D5E7652DFA7E73D6B6F")) - { - gv = 2; - Logger("Game", "Version", "2.0"); - } + if (OtherEXEmd5 == "6687A315558935B3FC80CDBFF04437A4") { gv = 3; Logger("Game", "Version", "Rockstar Games Launcher"); } + if ((OtherEXEmd5 == "BF25C28E9F6C13BD2D9E28F151899373") || (OtherEXEmd5 == "4E99D762F44B1D5E7652DFA7E73D6B6F")) { gv = 2; Logger("Game", "Version", "2.0"); } if ((OtherEXEmd5 != "6687A315558935B3FC80CDBFF04437A4") && (OtherEXEmd5 != "BF25C28E9F6C13BD2D9E28F151899373") && (OtherEXEmd5 != "4E99D762F44B1D5E7652DFA7E73D6B6F")) { if ((OtherEXEmd5 != "E7697A085336F974A4A6102A51223960") && (OtherEXEmd5 != "170B3A9108687B26DA2D8901C6948A18") && (OtherEXEmd5 != "91A9F6611ADDFB46682B56F9E247DB84") && (OtherEXEmd5 != "9369501599574D19AC93DE41547C4EC1")) { - if ((OtherEXEmd5 != "A2929A61E4D63DD3C15749B2B7ED74AE") && (OtherEXEmd5 != "25405921D1C47747FD01FD0BFE0A05AE")) - { - gv = 4; - Logger("Game", "Version", "Unknown [NOT SUPPORTED]"); - } - else - { - gv = 6; - Logger("Game", "Version", "1.01"); - } + if ((OtherEXEmd5 != "A2929A61E4D63DD3C15749B2B7ED74AE") && (OtherEXEmd5 != "25405921D1C47747FD01FD0BFE0A05AE")) { gv = 4; Logger("Game", "Version", "Unknown [NOT SUPPORTED]"); } + else { gv = 6; Logger("Game", "Version", "1.01"); } } else { @@ -181,38 +162,18 @@ public static void Main(string[] args) try { string OtherEXEmd5 = GetMD5(SaEXE); - if (OtherEXEmd5 == "5BFD4DD83989A8264DE4B8E771F237FD") - { - gv = 1; - Logger("Game", "Version", "Steam"); - } + if (OtherEXEmd5 == "5BFD4DD83989A8264DE4B8E771F237FD") { gv = 1; Logger("Game", "Version", "Steam"); } else { gv = 4; - if (OtherEXEmd5 == "6687A315558935B3FC80CDBFF04437A4") - { - gv = 3; - Logger("Game", "Version", "Rockstar Games Launcher"); - } - if ((OtherEXEmd5 == "BF25C28E9F6C13BD2D9E28F151899373") || (OtherEXEmd5 == "4E99D762F44B1D5E7652DFA7E73D6B6F")) - { - gv = 2; - Logger("Game", "Version", "2.0"); - } + if (OtherEXEmd5 == "6687A315558935B3FC80CDBFF04437A4") { gv = 3; Logger("Game", "Version", "Rockstar Games Launcher"); } + if ((OtherEXEmd5 == "BF25C28E9F6C13BD2D9E28F151899373") || (OtherEXEmd5 == "4E99D762F44B1D5E7652DFA7E73D6B6F")) { gv = 2; Logger("Game", "Version", "2.0"); } if ((OtherEXEmd5 != "6687A315558935B3FC80CDBFF04437A4") && (OtherEXEmd5 != "BF25C28E9F6C13BD2D9E28F151899373") && (OtherEXEmd5 != "4E99D762F44B1D5E7652DFA7E73D6B6F")) { if ((OtherEXEmd5 != "E7697A085336F974A4A6102A51223960") && (OtherEXEmd5 != "170B3A9108687B26DA2D8901C6948A18") && (OtherEXEmd5 != "91A9F6611ADDFB46682B56F9E247DB84") && (OtherEXEmd5 != "9369501599574D19AC93DE41547C4EC1")) { - if ((OtherEXEmd5 != "A2929A61E4D63DD3C15749B2B7ED74AE") && (OtherEXEmd5 != "25405921D1C47747FD01FD0BFE0A05AE")) - { - gv = 4; - Logger("Game", "Version", "Unknown [NOT SUPPORTED]"); - } - else - { - gv = 6; - Logger("Game", "Version", "1.01"); - } + if ((OtherEXEmd5 != "A2929A61E4D63DD3C15749B2B7ED74AE") && (OtherEXEmd5 != "25405921D1C47747FD01FD0BFE0A05AE")) { gv = 4; Logger("Game", "Version", "Unknown [NOT SUPPORTED]"); } + else { gv = 6; Logger("Game", "Version", "1.01"); } } else { @@ -264,22 +225,14 @@ public static void Main(string[] args) Logger("Downgrader", "Process", "Deleting index.bin file..."); try { - if (File.Exists(@path + @"\index.bin")) - { - File.Delete(@path + @"\index.bin"); - Logger("GarbageCleaning", "index.bin", "true"); - } + if (File.Exists(@path + @"\index.bin")) { File.Delete(@path + @"\index.bin"); Logger("GarbageCleaning", "index.bin", "true"); } else { Logger("GarbageCleaning", "index.bin", "false"); } } catch { Logger("GarbageCleaning", "index.bin", "false"); } Logger("Downgrader", "Process", "Deleting MTLX.dll file..."); try { - if (File.Exists(@path + @"\MTLX.dll")) - { - File.Delete(@path + @"\MTLX.dll"); - Logger("GarbageCleaning", "MTLX.dll", "true"); - } + if (File.Exists(@path + @"\MTLX.dll")) { File.Delete(@path + @"\MTLX.dll"); Logger("GarbageCleaning", "MTLX.dll", "true"); } else { Logger("GarbageCleaning", "MTLX.dll", "false"); } } catch { Logger("GarbageCleaning", "MTLX.dll", "false"); } @@ -295,7 +248,7 @@ public static void Main(string[] args) Logger("DirectPlay", "Enabled", "true"); Logger("DirectPlay", "Guide if DirectPlay not work", "https://docs.microsoft.com/en-us/answers/questions/108291/enable-windows-10-direct-play.html?childToView=111216#answer-111216"); } - if ((settings[13] == true) && (gv != 5)) { result = MessageBox.Show("Would you like to install DirectX 9.0c files to avoid possible problems with running the game? The files will be downloaded from the Internet and installed automatically", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); } + if ((settings[13] == true) && (gv != 5)) { result = MessageBox.Show("Would you like to install DirectX 9.0c files to avoid possible problems with running the game?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); } if (((result == DialogResult.Yes) || (settings[17] == true)) && (gv != 5)) { if (Directory.Exists(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\DirectX")) @@ -303,7 +256,7 @@ public static void Main(string[] args) try { Logger("DirectX", "Process", "Installing..."); - Logger("DirectX", "Process", "The app is not frozen, just busy right now..."); + Logger("DirectX", "Process", "App is not frozen, just busy right now..."); Process.Start(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\DirectX\DXSETUP.exe", "/silent").WaitForExit(); Logger("DirectX", "Process", "Installation completed successfully"); } @@ -312,7 +265,7 @@ public static void Main(string[] args) else { Logger("DirectX", "Process", "Downloading installer..."); - Logger("DirectX", "Process", "The app is not frozen, just busy right now..."); + Logger("DirectX", "Process", "App is not frozen, just busy right now..."); try { using (WebClient wc = new WebClient()) { wc.DownloadFile("http://github.com/Zalexanninev15/Jetpack-Downgrader/releases/download/1.11.6/DirectX_Installer.zip", @Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\DirectX_Installer.zip"); } @@ -321,13 +274,12 @@ public static void Main(string[] args) ZipFile.ExtractToDirectory(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\DirectX_Installer.zip", @Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location)); File.Delete(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\DirectX_Installer.zip"); Logger("DirectX", "Process", "Installing..."); - Logger("DirectX", "Process", "The app is not frozen, just busy right now..."); + Logger("DirectX", "Process", "App is not frozen, just busy right now..."); Process.Start(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\DirectX\DXSETUP.exe", "/silent").WaitForExit(); Logger("DirectX", "Process", "Installation completed successfully"); } catch { Logger("DirectX", "Process", "Installation error"); } } - try { Directory.Delete(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\DirectX", true); } catch { } } if ((settings[12] == true) && (gv == 0)) { gv = 6; settings[12] = true; } if ((gv != 0) && (er == 0) && (settings[3] == false)) @@ -342,11 +294,7 @@ public static void Main(string[] args) File.SetAttributes(@path + fl[1], FileAttributes.Normal); try { File.SetAttributes(@path + fl[1] + ".bak", FileAttributes.Normal); } catch { } } - else - { - er = 1; - Logger("Game", @path + fl[1], "false"); - } + else { er = 1; Logger("Game", @path + fl[1], "false"); } } if (gv == 3) // Rockstar Games Launcher { @@ -358,26 +306,10 @@ public static void Main(string[] args) { File.SetAttributes(@path + fl[i], FileAttributes.Normal); try { File.SetAttributes(@path + fl[i] + ".bak", FileAttributes.Normal); } catch { } - if (settings[15] == false) - { - progress.DoThis(false); - Logger("Game", @path + fl[i], "true"); - } - } - else - { - er = 1; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("Game", @path + fl[i], "false"); - } - } - if (settings[15] == true) - { - progress.DoText("Checking files progress"); - progress.Report((double)i / fl.Length); + if (settings[15] == false) { progress.DoThis(false); Logger("Game", @path + fl[i], "true"); } } + else { er = 1; if (settings[15] == false) { progress.DoThis(false); Logger("Game", @path + fl[i], "false"); } } + if (settings[15] == true) { progress.DoText("Checking files progress"); progress.Report((double)i / fl.Length); } } } } @@ -393,27 +325,11 @@ public static void Main(string[] args) { File.SetAttributes(@path + fl[i], FileAttributes.Normal); try { File.SetAttributes(@path + fl[i] + ".bak", FileAttributes.Normal); } catch { } - if (settings[15] == false) - { - progress.DoThis(false); - Logger("Game", @path + fl[i], "true"); - } - } - else - { - er = 1; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("Game", @path + fl[i], "false"); - } + if (settings[15] == false) { progress.DoThis(false); Logger("Game", @path + fl[i], "true"); } } + else { er = 1; if (settings[15] == false) { progress.DoThis(false); Logger("Game", @path + fl[i], "false"); } } } - if (settings[15] == true) - { - progress.DoText("Checking files progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("Checking files progress"); progress.Report((double)i / fl.Length); } } } } @@ -429,27 +345,15 @@ public static void Main(string[] args) { File.SetAttributes(@path + fl[i], FileAttributes.Normal); try { File.SetAttributes(@path + fl[i] + ".bak", FileAttributes.Normal); } catch { } - if (settings[15] == false) - { - progress.DoThis(false); - Logger("Game", @path + fl[i], "true"); - } + if (settings[15] == false) { progress.DoThis(false); Logger("Game", @path + fl[i], "true"); } } else { er = 1; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("Game", @path + fl[i], "false"); - } + if (settings[15] == false) { progress.DoThis(false); Logger("Game", @path + fl[i], "false"); } } } - if (settings[15] == true) - { - progress.DoText("Checking files progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("Checking files progress"); progress.Report((double)i / fl.Length); } } } } @@ -459,7 +363,7 @@ public static void Main(string[] args) // Checking files before downgrade (MD5) string GameMD5 = ""; Logger("Game", "All", "true"); - Logger("Downgrader", "Process", "Checking files before downgrade (MD5)..."); + Logger("Downgrader", "Process", "Checking original files before downgrade (MD5)..."); if (gv == 3) // Rockstar Games Launcher { using (var progress = new ProgressBar()) @@ -469,28 +373,16 @@ public static void Main(string[] args) try { GameMD5 = GetMD5(@path + fl[i]); - if (settings[15] == false) - { - progress.DoThis(false); - Logger("GameMD5", @path + fl[i], GameMD5); - } + if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], GameMD5); } if (GameMD5 == flmd5[i]) { fisv = true; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("GameMD5", @path + fl[i], "1.0"); - } + if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "1.0"); } } - else { if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "Higher than 1.0"); } } + else { if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "Higher than 1.0!"); } } } catch { fisv = true; if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "File not found!"); } } - if (settings[15] == true) - { - progress.DoText("MD5 verification progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("MD5 verification progress"); progress.Report((double)i / fl.Length); } } } } @@ -505,29 +397,17 @@ public static void Main(string[] args) try { GameMD5 = GetMD5(@path + fl[i]); - if (settings[15] == false) - { - progress.DoThis(false); - Logger("GameMD5", @path + fl[i], GameMD5); - } + if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], GameMD5); } if (GameMD5 == flmd5[i]) { fisv = true; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("GameMD5", @path + fl[i], "1.0"); - } + if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "1.0"); } } - else { if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "Higher than 1.0"); } } + else { if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "Higher than 1.0!"); } } } catch { fisv = true; if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "File not found!"); } } } - if (settings[15] == true) - { - progress.DoText("MD5 verification progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("MD5 verification progress"); progress.Report((double)i / fl.Length); } } } } @@ -542,29 +422,17 @@ public static void Main(string[] args) try { GameMD5 = GetMD5(@path + fl[i]); - if (settings[15] == false) - { - progress.DoThis(false); - Logger("GameMD5", @path + fl[i], GameMD5); - } + if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], GameMD5);} if (GameMD5 == flmd5[i]) { fisv = true; - if (settings[15] == false) - { - - Logger("GameMD5", @path + fl[i], "1.0"); - } + if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "1.0"); } } - else { if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "Higher than 1.0"); } } + else { if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "Higher than 1.0!"); } } } catch { fisv = true; if (settings[15] == false) { progress.DoThis(false); Logger("GameMD5", @path + fl[i], "File not found!"); } } } - if (settings[15] == true) - { - progress.DoText("MD5 verification progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("MD5 verification progress"); progress.Report((double)i / fl.Length); } } } } @@ -581,7 +449,7 @@ public static void Main(string[] args) { settings[10] = true; Logger("Downgrader", "Process", "Copying the game folder before downgrading..."); - Logger("Downgrader", "Process", "The app is not frozen, just busy right now..."); + Logger("Downgrader", "Process", "App is not frozen, just busy right now..."); try { try { Directory.Delete(@path + "_Downgraded", true); } catch { } @@ -599,54 +467,30 @@ public static void Main(string[] args) Logger("Downgrader", "Process", "Create backups..."); if (gv == 6) // 1.01 { - if (File.Exists(@path + fl[1] + ".bak")) - File.Delete(@path + fl[1] + ".bak"); - try - { - File.Move(@path + fl[1], @path + fl[1] + ".bak"); - Logger("GameBackup", @path + fl[1], "Done!"); - } + if (File.Exists(@path + fl[1] + ".bak")) { File.Delete(@path + fl[1] + ".bak"); } + try { File.Move(@path + fl[1], @path + fl[1] + ".bak"); Logger("GameBackup", @path + fl[1], "Done!"); } catch { er = 1; Logger("GameBackup", @path + fl[1], "File for backup wasn't found!"); } } if (gv == 3) // Rockstar Games Launcher { - if (File.Exists(@path + fl[1] + ".bak")) - File.Delete(@path + fl[1] + ".bak"); - try - { - File.Move(@path + fl[1], @path + fl[1] + ".bak"); - if (settings[15] == false) { Logger("GameBackup", @path + fl[1], "Done!"); } - } + if (File.Exists(@path + fl[1] + ".bak")) { File.Delete(@path + fl[1] + ".bak"); } + try { File.Move(@path + fl[1], @path + fl[1] + ".bak"); if (settings[15] == false) { Logger("GameBackup", @path + fl[1], "Done!"); } } catch { er = 1; if (settings[15] == false) { Logger("GameBackup", @path + fl[1], "File for backup wasn't found!"); } } using (var progress = new ProgressBar()) { for (int i = 2; i < fl.Length; i++) { - if (File.Exists(@path + fl[i] + ".bak")) - File.Delete(@path + fl[i] + ".bak"); - try - { - File.Move(@path + fl[i], @path + fl[i] + ".bak"); - if (settings[15] == false) { progress.DoThis(false); Logger("GameBackup", @path + fl[i], "Done!"); } - } + if (File.Exists(@path + fl[i] + ".bak")) { File.Delete(@path + fl[i] + ".bak"); } + try { File.Move(@path + fl[i], @path + fl[i] + ".bak"); if (settings[15] == false) { progress.DoThis(false); Logger("GameBackup", @path + fl[i], "Done!"); } } catch { er = 1; if (settings[15] == false) { progress.DoThis(false); Logger("GameBackup", @path + fl[i], "File for backup wasn't found!"); } } - if (settings[15] == true) - { - progress.DoText("Backup progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("Backup progress"); progress.Report((double)i / fl.Length); } } } } if (gv == 2) // Version 2.0 { - if (File.Exists(@path + fl[1] + ".bak")) - File.Delete(@path + fl[1] + ".bak"); - try - { - File.Move(@path + fl[1], @path + fl[1] + ".bak"); - if (settings[15] == false) { Logger("GameBackup", @path + fl[1], "Done!"); } - } + if (File.Exists(@path + fl[1] + ".bak")) { File.Delete(@path + fl[1] + ".bak"); } + try { File.Move(@path + fl[1], @path + fl[1] + ".bak"); if (settings[15] == false) { Logger("GameBackup", @path + fl[1], "Done!"); } } catch { er = 1; if (settings[15] == false) { Logger("GameBackup", @path + fl[1], "File for backup wasn't found!"); } } using (var progress = new ProgressBar()) { @@ -654,27 +498,17 @@ public static void Main(string[] args) { if ((i >= 2) && (i > 11)) { - if (File.Exists(@path + fl[i] + ".bak")) - File.Delete(@path + fl[i] + ".bak"); - try - { - File.Move(@path + fl[i], @path + fl[i] + ".bak"); - if (settings[15] == false) { progress.DoThis(false); Logger("GameBackup", @path + fl[i], "Done!"); } - } + if (File.Exists(@path + fl[i] + ".bak")) { File.Delete(@path + fl[i] + ".bak"); } + try { File.Move(@path + fl[i], @path + fl[i] + ".bak"); if (settings[15] == false) { progress.DoThis(false); Logger("GameBackup", @path + fl[i], "Done!"); } } catch { er = 1; if (settings[15] == false) { progress.DoThis(false); Logger("GameBackup", @path + fl[i], "File for backup wasn't found!"); } } } - if (settings[15] == true) - { - progress.DoText("Backup progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("Backup progress"); progress.Report((double)i / fl.Length); } } } } if (gv == 1) // Steam version { - if (File.Exists(@path + fl[0] + ".bak")) - File.Delete(@path + fl[0] + ".bak"); + if (File.Exists(@path + fl[0] + ".bak")) { File.Delete(@path + fl[0] + ".bak"); } try { File.Move(@path + fl[0], @path + fl[0] + ".bak"); @@ -687,20 +521,11 @@ public static void Main(string[] args) { if (i >= 2) { - if (File.Exists(@path + fl[i] + ".bak")) - File.Delete(@path + fl[i] + ".bak"); - try - { - File.Move(@path + fl[i], @path + fl[i] + ".bak"); - if (settings[15] == false) { progress.DoThis(false); Logger("GameBackup", @path + fl[i], "Done!"); } - } + if (File.Exists(@path + fl[i] + ".bak")) { File.Delete(@path + fl[i] + ".bak"); } + try { File.Move(@path + fl[i], @path + fl[i] + ".bak"); if (settings[15] == false) { progress.DoThis(false); Logger("GameBackup", @path + fl[i], "Done!"); } } catch { er = 1; if (settings[15] == false) { progress.DoThis(false); Logger("GameBackup", @path + fl[i], "File for backup wasn't found!"); } } } - if (settings[15] == true) - { - progress.DoText("Backup progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("Backup progress"); progress.Report((double)i / fl.Length); } } } } @@ -710,16 +535,15 @@ public static void Main(string[] args) { if (Directory.Exists(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches")) { - // Downgrader [2.6.5-Beta] Logger("Downgrader", "Process", "Downgrading..."); try { // For All Versions | EXE - File.Copy(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches" + @"\game.jpp", @path + fl[1], true); + File.Copy(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches\game.jpp", @path + fl[1], true); if (settings[15] == false) { Logger("NewGame", @path + fl[1], "1.0"); } if (gv == 1) { - File.Copy(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches" + @"\game.jpp", @path + fl[0], true); + File.Copy(@Path.GetDirectoryName(@System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches\game.jpp", @path + fl[0], true); if (settings[15] == false) { Logger("NewGame", @path + fl[1], "1.0"); } } if ((gv == 3) || (gv == 1)) // Rockstar Games Launcher & Steam @@ -729,18 +553,12 @@ public static void Main(string[] args) for (int i = 2; i < fl.Length; i++) { string par = " -d -s " + '"' + @path + fl[i] + '"' + " " + '"' + Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches" + fl[i] + ".jpp" + '"' + " " + '"' + path + fl[i] + ".temp" + '"'; - if (settings[2] == true) - par = " -d -s " + '"' + @path + fl[i] + ".bak" + '"' + " " + '"' + Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches" + fl[i] + ".jpp" + '"' + " " + '"' + path + fl[i] + ".temp" + '"'; + if (settings[2] == true) { par = " -d -s " + '"' + @path + fl[i] + ".bak" + '"' + " " + '"' + Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches" + fl[i] + ".jpp" + '"' + " " + '"' + path + fl[i] + ".temp" + '"'; } Patcher(@par); - if (settings[2] == false) - File.Delete(@path + fl[i]); + if (settings[2] == false){ File.Delete(@path + fl[i]); } File.Move(@path + fl[i] + ".temp", @path + fl[i]); if (settings[15] == false) { progress.DoThis(false); Logger("NewGame", @path + fl[i], "1.0"); } - if (settings[15] == true) - { - progress.DoText("Downgrade progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("Downgrade progress"); progress.Report((double)i / fl.Length); } } } } @@ -753,19 +571,13 @@ public static void Main(string[] args) if ((i >= 2) && (i > 11)) { string par = " -d -s " + '"' + @path + fl[i] + '"' + " " + '"' + Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches" + fl[i] + ".jpp" + '"' + " " + '"' + path + fl[i] + ".temp" + '"'; - if (settings[2] == true) - par = " -d -s " + '"' + @path + fl[i] + ".bak" + '"' + " " + '"' + Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches" + fl[i] + ".jpp" + '"' + " " + '"' + path + fl[i] + ".temp" + '"'; + if (settings[2] == true) { par = " -d -s " + '"' + @path + fl[i] + ".bak" + '"' + " " + '"' + Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + @"\patches" + fl[i] + ".jpp" + '"' + " " + '"' + path + fl[i] + ".temp" + '"'; } Patcher(@par); - if (settings[2] == false) - File.Delete(@path + fl[i]); + if (settings[2] == false) { File.Delete(@path + fl[i]); } File.Move(@path + fl[i] + ".temp", @path + fl[i]); if (settings[15] == false) { progress.DoThis(false); Logger("NewGame", @path + fl[i], "1.0"); } } - if (settings[15] == true) - { - progress.DoText("Downgrade progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("Downgrade progress"); progress.Report((double)i / fl.Length); } } } } @@ -783,16 +595,8 @@ public static void Main(string[] args) { GameMD5 = GetMD5(@path + fl[1]); Logger("NewGameMD5", @path + fl[1], GameMD5); - if (GameMD5 == flmd5[0]) - { - fisv = true; - Logger("NewGameMD5", @path + fl[1], "1.0"); - } - else - { - fisv = false; - Logger("NewGameMD5", @path + fl[1], "Higher than 1.0"); - } + if (GameMD5 == flmd5[0]) { fisv = true; Logger("NewGameMD5", @path + fl[1], "1.0"); } + else { fisv = false; Logger("NewGameMD5", @path + fl[1], "Higher than 1.0!"); } } catch { fisv = false; Logger("NewGameMD5", @path + fl[1], "File not found!"); } } @@ -802,16 +606,8 @@ public static void Main(string[] args) { GameMD5 = GetMD5(@path + fl[1]); if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], GameMD5); } - if (GameMD5 == flmd5[0]) - { - fisv = true; - if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "1.0"); } - } - else - { - fisv = false; - if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "Higher than 1.0"); } - } + if (GameMD5 == flmd5[0]) { fisv = true; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "1.0"); } } + else { fisv = false; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "Higher than 1.0!"); }} } catch { fisv = false; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "File not found!"); } } using (var progress = new ProgressBar()) @@ -821,36 +617,20 @@ public static void Main(string[] args) try { GameMD5 = GetMD5(@path + fl[i]); - if (settings[15] == false) - { - progress.DoThis(false); - Logger("NewGameMD5", @path + fl[i], GameMD5); - } + if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], GameMD5); } if (GameMD5 == flmd5[i]) { fisv = true; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("NewGameMD5", @path + fl[i], "1.0"); - } + if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], "1.0"); } } else { fisv = false; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("NewGameMD5", @path + fl[i], "Higher than 1.0"); - } + if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], "Higher than 1.0!"); } } } catch { fisv = false; if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], "File not found!"); } } - if (settings[15] == true) - { - progress.DoText("MD5 verification progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("MD5 verification progress"); progress.Report((double)i / fl.Length); } } } } @@ -860,16 +640,8 @@ public static void Main(string[] args) { GameMD5 = GetMD5(@path + fl[1]); if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], GameMD5); } - if (GameMD5 == flmd5[0]) - { - fisv = true; - if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "1.0"); } - } - else - { - fisv = false; - if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "Higher than 1.0"); } - } + if (GameMD5 == flmd5[0]) { fisv = true; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "1.0"); } } + else { fisv = false; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "Higher than 1.0!"); } } } catch { fisv = false; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "File not found!"); } } using (var progress = new ProgressBar()) @@ -882,32 +654,12 @@ public static void Main(string[] args) { GameMD5 = GetMD5(@path + fl[i]); if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], GameMD5); } - if (GameMD5 == flmd5[i]) - { - fisv = true; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("NewGameMD5", @path + fl[i], "1.0"); - } - } - else - { - fisv = false; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("NewGameMD5", @path + fl[i], "Higher than 1.0"); - } - } + if (GameMD5 == flmd5[i]) { fisv = true; if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], "1.0"); } } + else { fisv = false; if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], "Higher than 1.0!"); } } } catch { fisv = false; if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], "File not found!"); } } } - if (settings[15] == true) - { - progress.DoText("MD5 verification progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("MD5 verification progress"); progress.Report((double)i / fl.Length); } } } } @@ -917,32 +669,16 @@ public static void Main(string[] args) { GameMD5 = GetMD5(@path + fl[0]); if (settings[15] == false) { Logger("NewGameMD5", @path + fl[0], GameMD5); } - if (GameMD5 == flmd5[0]) - { - fisv = true; - if (settings[15] == false) { Logger("NewGameMD5", @path + fl[0], "1.0"); } - } - else - { - fisv = false; - if (settings[15] == false) { Logger("NewGameMD5", @path + fl[0], "Higher than 1.0"); } - } + if (GameMD5 == flmd5[0]) { fisv = true; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[0], "1.0"); } } + else { fisv = false; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[0], "Higher than 1.0!"); } } } catch { fisv = false; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[0], "File not found!"); } } try { GameMD5 = GetMD5(@path + fl[1]); if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], GameMD5); } - if (GameMD5 == flmd5[0]) - { - fisv = true; - if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "1.0"); } - } - else - { - fisv = false; - if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "Higher than 1.0"); } - } + if (GameMD5 == flmd5[0]) { fisv = true; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "1.0"); } } + else { fisv = false; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "Higher than 1.0!"); } } } catch { fisv = false; if (settings[15] == false) { Logger("NewGameMD5", @path + fl[1], "File not found!"); } } using (var progress = new ProgressBar()) @@ -953,31 +689,11 @@ public static void Main(string[] args) { GameMD5 = GetMD5(@path + fl[i]); if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], GameMD5); } - if (GameMD5 == flmd5[i]) - { - fisv = true; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("NewGameMD5", @path + fl[i], "1.0"); - } - } - else - { - fisv = false; - if (settings[15] == false) - { - progress.DoThis(false); - Logger("NewGameMD5", @path + fl[i], "Higher than 1.0"); - } - } + if (GameMD5 == flmd5[i]) { fisv = true; if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], "1.0"); } } + else { fisv = false; if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], "Higher than 1.0!"); } } } catch { fisv = false; if (settings[15] == false) { progress.DoThis(false); Logger("NewGameMD5", @path + fl[i], "File not found!"); } } - if (settings[15] == true) - { - progress.DoText("MD5 verification progress"); - progress.Report((double)i / fl.Length); - } + if (settings[15] == true) { progress.DoText("MD5 verification progress"); progress.Report((double)i / fl.Length); } } } } @@ -989,11 +705,7 @@ public static void Main(string[] args) if ((result == DialogResult.Yes) || (settings[6] == true)) { Logger("Downgrader", "Process", "Creating a shortcut..."); - try - { - Create(@Environment.GetFolderPath(@Environment.SpecialFolder.Desktop) + @"\GTA San Andreas 1.0.lnk", @path + @"\gta_sa.exe"); - Logger("Downgrader", "CreateShortcut", "true"); - } + try { Create(@Environment.GetFolderPath(@Environment.SpecialFolder.Desktop) + @"\GTA San Andreas 1.0.lnk", @path + @"\gta_sa.exe"); Logger("Downgrader", "CreateShortcut", "true"); } catch { Logger("Downgrader", "CreateShortcut", "false"); } } if (settings[13] == true) { result = MessageBox.Show("Would you like to register the game in the system?\n(for launchers, SAMP and other projects)", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); } @@ -1003,11 +715,7 @@ public static void Main(string[] args) try { bool is64BitOS = Environment.Is64BitOperatingSystem; - if (is64BitOS == true) - { - Registry.LocalMachine.CreateSubKey("SOFTWARE\\WOW6432Node\\Rockstar Games\\GTA San Andreas\\Installation"); - Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Rockstar Games\\GTA San Andreas\\Installation", "ExePath", "\"" + path.ToString() + "\""); - } + if (is64BitOS == true) { Registry.LocalMachine.CreateSubKey("SOFTWARE\\WOW6432Node\\Rockstar Games\\GTA San Andreas\\Installation"); Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Rockstar Games\\GTA San Andreas\\Installation", "ExePath", "\"" + path.ToString() + "\""); } Registry.LocalMachine.CreateSubKey("SOFTWARE\\Rockstar Games\\GTA San Andreas\\Installation"); Registry.SetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Rockstar Games\\GTA San Andreas\\Installation", "ExePath", "\"" + path.ToString() + "\""); Logger("Downgrader", "RegisterGamePath", "true"); @@ -1023,7 +731,7 @@ public static void Main(string[] args) } else { Logger("GameBackup", "All", "Some game files were not found, so it is not possible to continue working!"); Logger("Downgrader", "Game", "Please check the original files and, if necessary, reinstall the game!"); } } - else { if (settings[5] == false) { Logger("GameMD5", "All", "It is impossible to determine exactly which version some files are taken from, because some of them have 1.0, and others are Higher than 1.0!"); Logger("Downgrader", "Game", "Please check the original files and, if necessary, reinstall the game!"); } } + else { if (settings[5] == false) { Logger("GameMD5", "All", "It is impossible to determine exactly which version some files are taken from, because some of them have 1.0, and others are Higher than 1.0!!"); Logger("Downgrader", "Game", "Please check the original files and, if necessary, reinstall the game!"); } } } else { if (settings[4] == false) { Logger("Game", "All", "Some game files were not found, so it is not possible to continue working!"); Logger("Downgrader", "Game", "Please check the original files and, if necessary, reinstall the game!"); } } } @@ -1032,9 +740,8 @@ public static void Main(string[] args) else { Logger("Game", "Path", "false"); } } else { Logger("Downgrader", "Process", "File patcher.exe was not found!"); } - if (settings[1] == false) { Console.WriteLine("Press Enter to Exit"); Console.ReadLine(); } + if (settings[1] == false) { Logger("GamePath", "Current", @path); Console.ForegroundColor = ConsoleColor.Yellow; Console.WriteLine("Press Enter to Exit"); Console.ResetColor(); Console.ReadLine(); } } - public static void Patcher(string argument) { Process start_info = new Process(); @@ -1046,10 +753,17 @@ public static void Patcher(string argument) start_info.Start(); start_info.WaitForExit(); } - - public static void Logger(string type, string ido, string status) { Console.WriteLine("[" + type + "] " + ido + "=" + status); } - - public static void Create(string ShortcutPath, string TargetPath) + private static void Logger(string type, string ido, string status) + { + if ((type == "NewGameMD5") || ((type == "GamePath") && (ido == "Current"))) { Console.ForegroundColor = ConsoleColor.Yellow; } + if ((status == "Forced downgrade mode is used...") || (status == "Installation completed successfully") || (status == "1.0") || (status == "new") || (status == "true") || (status == "Downgrade completed!") || (status == "Done!")) { Console.ForegroundColor = ConsoleColor.Green; } + if ((status == "Deleting MTLX.dll file...") || (status == "Deleting index.bin file...") || (status == "Deleting gta_sa.set (Public Documents) file...") || (status == "Deleting gta_sa.set (Documents) file...") || (status == "Adding entries to the registry...") || (status == "Creating a shortcut...") || (status == "Checking files after downgrade (MD5)...") || (status == "Downgrading...") || (status == "Create backups...") || (status == "Checking original files before downgrade (MD5)...") || (status == "Scanning files...") || (status == "Get version (EXE)...") || (status == "Copying the game folder before downgrading...") || (status == "App is not frozen, just busy right now...") || (status == "Downloading installer...") || (status == "Installing...") || (status == "In process...") || (status == "Preparing installer...")) { Console.ForegroundColor = ConsoleColor.Blue; } + if ((ido == "Guide if DirectPlay not work") || ((type == "GamePath") && (ido == "New")) || (status == "Rockstar Games Launcher") || (status == "Steam") || (status == "1.01") || (status == "2.0")) { Console.ForegroundColor = ConsoleColor.Yellow; } + if ((status == "Please make sure that you have downloaded the patches (patches folder), otherwise, the downgrader will not be able to start its work!") || (status == "File patcher.exe was not found!") || (status == "File not found!") || (status == "Higher than 1.0!") || (status == "Unknown [NOT SUPPORTED]") || (status == "Unknown [ERROR]") || (status == "false") || (status == "File for backup wasn't found!") || (status == "Downgrade is not required!")) { Console.ForegroundColor = ConsoleColor.Red; } + Console.WriteLine("[" + type + "] " + ido + "=" + status); + Console.ResetColor(); + } + private static void Create(string ShortcutPath, string TargetPath) { IWshRuntimeLibrary.WshShell wshShell = new IWshRuntimeLibrary.WshShell(); IWshRuntimeLibrary.IWshShortcut Shortcut = (IWshRuntimeLibrary.IWshShortcut)wshShell.CreateShortcut(ShortcutPath); @@ -1057,8 +771,7 @@ public static void Create(string ShortcutPath, string TargetPath) Shortcut.WorkingDirectory = TargetPath.Replace(@"\gta_sa.exe", ""); Shortcut.Save(); } - - public static string GetMD5(string file) + private static string GetMD5(string file) { using (var md5 = MD5.Create()) { @@ -1066,10 +779,7 @@ public static string GetMD5(string file) { var hashBytes = md5.ComputeHash(stream); var sb = new StringBuilder(); - foreach (var t in hashBytes) - { - sb.Append(t.ToString("X2")); - } + foreach (var t in hashBytes) { sb.Append(t.ToString("X2")); } return Convert.ToString(sb); } } diff --git a/sources/Downgrader/Properties/AssemblyInfo.cs b/sources/Downgrader/Properties/AssemblyInfo.cs index 47115fc..aceefee 100644 --- a/sources/Downgrader/Properties/AssemblyInfo.cs +++ b/sources/Downgrader/Properties/AssemblyInfo.cs @@ -1,10 +1,5 @@ -#region Using directives - -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; - -#endregion - [assembly: AssemblyTitle("Jetpack Downgrader")] [assembly: AssemblyDescription("App for downgrading the game Grand Theft Auto: San Andreas to version 1.0")] [assembly: AssemblyConfiguration("")] @@ -14,5 +9,5 @@ [assembly: AssemblyTrademark("Jetpack Downgrader (2020-2021)")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("1.11.6.0")] -[assembly: AssemblyFileVersion("1.11.6.0")] \ No newline at end of file +[assembly: AssemblyVersion("1.12.2.3")] +[assembly: AssemblyFileVersion("1.12.2.3")] \ No newline at end of file diff --git a/sources/Downgrader/Properties/Resources.Designer.cs b/sources/Downgrader/Properties/Resources.Designer.cs new file mode 100644 index 0000000..c6f1d52 --- /dev/null +++ b/sources/Downgrader/Properties/Resources.Designer.cs @@ -0,0 +1,40 @@ +namespace JetpackDowngrader.Properties { + using System; + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("JetpackDowngrader.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + internal static string jpd { + get { + return ResourceManager.GetString("jpd", resourceCulture); + } + } + } +} \ No newline at end of file diff --git a/sources/Downgrader/Properties/Resources.resx b/sources/Downgrader/Properties/Resources.resx new file mode 100644 index 0000000..0e1dda8 --- /dev/null +++ b/sources/Downgrader/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Resources\jpd.ini;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1251 + + \ No newline at end of file diff --git a/sources/Downgrader/Resources/jpd.ini b/sources/Downgrader/Resources/jpd.ini new file mode 100644 index 0000000..c445952 --- /dev/null +++ b/sources/Downgrader/Resources/jpd.ini @@ -0,0 +1,20 @@ +[Downgrader] +CreateBackups=false +CreateShortcut=false +ResetGame=false +GarbageCleaning=false +RegisterGamePath=false +CreateNewGamePath=false +Forced=false +EnableDirectPlay=false +InstallDirectX=false +[JPD] +SelectFolder=true +ConsoleTransparency=false +UseMsg=true +UseProgressBar=true +Component=false +[Only] +GameVersion=false +NextCheckFiles=false +NextCheckFilesAndCheckMD5=false \ No newline at end of file diff --git a/sources/GUI/Classes/INIEditor.cs b/sources/GUI/Classes/INIEditor.cs index c5ce7af..096e31d 100644 --- a/sources/GUI/Classes/INIEditor.cs +++ b/sources/GUI/Classes/INIEditor.cs @@ -10,7 +10,7 @@ public class IniEditor [DllImport("kernel32.dll", EntryPoint = "GetPrivateProfileString")] private static extern int GetValue(string section, string key, string def, StringBuilder buffer, int size, string path); [DllImport("kernel32.dll", EntryPoint = "WritePrivateProfileString")] - private static extern int WritePrivateString(string section, string key, string str, string path); + private static extern int SetValue(string section, string key, string str, string path); public IniEditor(string aPath) { path = aPath; } public string GetValue(string aSection, string aKey) @@ -27,9 +27,6 @@ public string GetValue(string aSection, string aKey) return localText; } - public void WritePrivateString(string aSection, string aKey, string aValue) - { - WritePrivateString(aSection, aKey, aValue, path); - } + public void SetValue(string aSection, string aKey, string aValue) { SetValue(aSection, aKey, aValue, path); } } } \ No newline at end of file diff --git a/sources/GUI/GUI.csproj b/sources/GUI/GUI.csproj index 698f7c7..bb47b87 100644 --- a/sources/GUI/GUI.csproj +++ b/sources/GUI/GUI.csproj @@ -87,6 +87,10 @@ + + + + @@ -97,8 +101,6 @@ Resources.Designer.cs - - - + \ No newline at end of file diff --git a/sources/GUI/MainForm.Designer.cs b/sources/GUI/MainForm.Designer.cs index bda105b..03b35c9 100644 --- a/sources/GUI/MainForm.Designer.cs +++ b/sources/GUI/MainForm.Designer.cs @@ -32,9 +32,7 @@ private void InitializeComponent() System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); this.button1 = new System.Windows.Forms.Button(); this.button3 = new System.Windows.Forms.Button(); - this.button4 = new DarkUI.Controls.DarkButton(); this.GamePath = new DarkUI.Controls.DarkTextBox(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.checkBox1 = new DarkUI.Controls.DarkCheckBox(); this.checkBox2 = new DarkUI.Controls.DarkCheckBox(); this.label1 = new DarkUI.Controls.DarkTitle(); @@ -47,12 +45,29 @@ private void InitializeComponent() this.checkBox8 = new DarkUI.Controls.DarkCheckBox(); this.button6 = new DarkUI.Controls.DarkButton(); this.button2 = new DarkUI.Controls.DarkButton(); - this.darkSectionPanel1 = new DarkUI.Controls.DarkSectionPanel(); + this.DSPanel = new DarkUI.Controls.DarkSectionPanel(); + this.ModsPanel = new DarkUI.Controls.DarkSectionPanel(); this.darkTitle2 = new DarkUI.Controls.DarkTitle(); this.darkTitle1 = new DarkUI.Controls.DarkTitle(); this.button7 = new DarkUI.Controls.DarkButton(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.pictureBox4 = new System.Windows.Forms.PictureBox(); + this.pictureBox3 = new System.Windows.Forms.PictureBox(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); + this.HelloUser = new DarkUI.Controls.DarkTitle(); + this.pictureBox5 = new System.Windows.Forms.PictureBox(); + this.pictureBox6 = new System.Windows.Forms.PictureBox(); + this.pictureBox7 = new System.Windows.Forms.PictureBox(); + this.pictureBox8 = new System.Windows.Forms.PictureBox(); + this.DSPanel.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.darkSectionPanel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).BeginInit(); this.SuspendLayout(); // // button1 @@ -62,7 +77,7 @@ private void InitializeComponent() this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button1.Font = new System.Drawing.Font("Arial", 9.75F); this.button1.ForeColor = System.Drawing.Color.White; - this.button1.Location = new System.Drawing.Point(366, 20); + this.button1.Location = new System.Drawing.Point(353, 16); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(166, 31); this.button1.TabIndex = 2; @@ -78,26 +93,14 @@ private void InitializeComponent() this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.button3.Font = new System.Drawing.Font("Arial", 9.75F); this.button3.ForeColor = System.Drawing.Color.White; - this.button3.Location = new System.Drawing.Point(538, 20); + this.button3.Location = new System.Drawing.Point(525, 16); this.button3.Name = "button3"; this.button3.Size = new System.Drawing.Size(166, 31); this.button3.TabIndex = 2; this.button3.TabStop = false; - this.button3.Text = "4. Test and play"; + this.button3.Text = "4. Play && Test"; this.button3.UseVisualStyleBackColor = false; // - // button4 - // - this.button4.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.button4.Location = new System.Drawing.Point(755, 20); - this.button4.Name = "button4"; - this.button4.Padding = new System.Windows.Forms.Padding(5); - this.button4.Size = new System.Drawing.Size(104, 31); - this.button4.TabIndex = 8; - this.button4.TabStop = false; - this.button4.Text = "App Settings"; - this.button4.Click += new System.EventHandler(this.button4_Click); - // // GamePath // this.GamePath.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(69)))), ((int)(((byte)(73)))), ((int)(((byte)(74))))); @@ -109,18 +112,6 @@ private void InitializeComponent() this.GamePath.Size = new System.Drawing.Size(600, 22); this.GamePath.TabIndex = 9; this.GamePath.TabStop = false; - this.GamePath.Text = "Test Text"; - // - // pictureBox1 - // - this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); - this.pictureBox1.Location = new System.Drawing.Point(790, 43); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(30, 22); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBox1.TabIndex = 10; - this.pictureBox1.TabStop = false; - this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); // // checkBox1 // @@ -132,6 +123,7 @@ private void InitializeComponent() this.checkBox1.TabIndex = 11; this.checkBox1.TabStop = false; this.checkBox1.Text = "Backup original files before downgrade"; + this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // // checkBox2 // @@ -143,6 +135,7 @@ private void InitializeComponent() this.checkBox2.TabIndex = 11; this.checkBox2.TabStop = false; this.checkBox2.Text = "Make shortcut on Desktop"; + this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged); // // label1 // @@ -164,6 +157,7 @@ private void InitializeComponent() this.checkBox9.TabIndex = 11; this.checkBox9.TabStop = false; this.checkBox9.Text = "Remove GTA_SA.SET (Reset game settings and prevents crash)"; + this.checkBox9.CheckedChanged += new System.EventHandler(this.checkBox9_CheckedChanged); // // checkBox4 // @@ -175,6 +169,7 @@ private void InitializeComponent() this.checkBox4.TabIndex = 11; this.checkBox4.TabStop = false; this.checkBox4.Text = "Remove unneeded files (ONLY for version \r\nfrom Rockstar Games Launcher)"; + this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged); // // checkBox6 // @@ -186,6 +181,7 @@ private void InitializeComponent() this.checkBox6.TabIndex = 11; this.checkBox6.TabStop = false; this.checkBox6.Text = "Register game path (Make game visible)"; + this.checkBox6.CheckedChanged += new System.EventHandler(this.checkBox6_CheckedChanged); // // checkBox3 // @@ -197,6 +193,7 @@ private void InitializeComponent() this.checkBox3.TabIndex = 11; this.checkBox3.TabStop = false; this.checkBox3.Text = "Move game to another folder (Prevents auto-update and rehash)"; + this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged); // // checkBox5 // @@ -208,6 +205,7 @@ private void InitializeComponent() this.checkBox5.TabIndex = 11; this.checkBox5.TabStop = false; this.checkBox5.Text = "Forced (ONLY for version 1.0)"; + this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged); // // checkBox7 // @@ -219,6 +217,7 @@ private void InitializeComponent() this.checkBox7.TabIndex = 11; this.checkBox7.TabStop = false; this.checkBox7.Text = "DirectPlay (ONLY for Windows 10)"; + this.checkBox7.CheckedChanged += new System.EventHandler(this.checkBox7_CheckedChanged); // // checkBox8 // @@ -230,52 +229,67 @@ private void InitializeComponent() this.checkBox8.TabIndex = 11; this.checkBox8.TabStop = false; this.checkBox8.Text = "Install DirectX"; + this.checkBox8.CheckedChanged += new System.EventHandler(this.checkBox8_CheckedChanged); // // button6 // this.button6.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.button6.Location = new System.Drawing.Point(25, 20); + this.button6.Location = new System.Drawing.Point(12, 16); this.button6.Name = "button6"; this.button6.Padding = new System.Windows.Forms.Padding(5); this.button6.Size = new System.Drawing.Size(176, 31); this.button6.TabIndex = 8; this.button6.TabStop = false; this.button6.Text = "1. Downgrader Settings"; + this.button6.Click += new System.EventHandler(this.button6_Click); // // button2 // this.button2.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.button2.Location = new System.Drawing.Point(207, 20); + this.button2.Location = new System.Drawing.Point(194, 16); this.button2.Name = "button2"; this.button2.Padding = new System.Windows.Forms.Padding(5); this.button2.Size = new System.Drawing.Size(153, 31); this.button2.TabIndex = 8; this.button2.TabStop = false; this.button2.Text = "2. Modifications"; - // - // darkSectionPanel1 - // - this.darkSectionPanel1.Controls.Add(this.checkBox1); - this.darkSectionPanel1.Controls.Add(this.darkTitle2); - this.darkSectionPanel1.Controls.Add(this.darkTitle1); - this.darkSectionPanel1.Controls.Add(this.button7); - this.darkSectionPanel1.Controls.Add(this.label1); - this.darkSectionPanel1.Controls.Add(this.pictureBox1); - this.darkSectionPanel1.Controls.Add(this.GamePath); - this.darkSectionPanel1.Controls.Add(this.checkBox2); - this.darkSectionPanel1.Controls.Add(this.checkBox9); - this.darkSectionPanel1.Controls.Add(this.checkBox4); - this.darkSectionPanel1.Controls.Add(this.checkBox8); - this.darkSectionPanel1.Controls.Add(this.checkBox6); - this.darkSectionPanel1.Controls.Add(this.checkBox7); - this.darkSectionPanel1.Controls.Add(this.checkBox3); - this.darkSectionPanel1.Controls.Add(this.checkBox5); - this.darkSectionPanel1.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.darkSectionPanel1.Location = new System.Drawing.Point(25, 67); - this.darkSectionPanel1.Name = "darkSectionPanel1"; - this.darkSectionPanel1.SectionHeader = "Downgrader Settings"; - this.darkSectionPanel1.Size = new System.Drawing.Size(834, 323); - this.darkSectionPanel1.TabIndex = 14; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // DSPanel + // + this.DSPanel.Controls.Add(this.ModsPanel); + this.DSPanel.Controls.Add(this.checkBox1); + this.DSPanel.Controls.Add(this.darkTitle2); + this.DSPanel.Controls.Add(this.darkTitle1); + this.DSPanel.Controls.Add(this.button7); + this.DSPanel.Controls.Add(this.label1); + this.DSPanel.Controls.Add(this.pictureBox1); + this.DSPanel.Controls.Add(this.GamePath); + this.DSPanel.Controls.Add(this.checkBox2); + this.DSPanel.Controls.Add(this.checkBox9); + this.DSPanel.Controls.Add(this.checkBox4); + this.DSPanel.Controls.Add(this.checkBox8); + this.DSPanel.Controls.Add(this.checkBox6); + this.DSPanel.Controls.Add(this.checkBox7); + this.DSPanel.Controls.Add(this.checkBox3); + this.DSPanel.Controls.Add(this.checkBox5); + this.DSPanel.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.DSPanel.Location = new System.Drawing.Point(12, 62); + this.DSPanel.Name = "DSPanel"; + this.DSPanel.SectionHeader = "Downgrader Settings"; + this.DSPanel.Size = new System.Drawing.Size(834, 329); + this.DSPanel.TabIndex = 14; + this.DSPanel.Visible = false; + // + // ModsPanel + // + this.ModsPanel.Font = new System.Drawing.Font("Arial", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.ModsPanel.Location = new System.Drawing.Point(1, 0); + this.ModsPanel.Name = "ModsPanel"; + this.ModsPanel.SectionHeader = "Modifications"; + this.ModsPanel.Size = new System.Drawing.Size(834, 329); + this.ModsPanel.TabIndex = 15; + this.ModsPanel.Visible = false; // // darkTitle2 // @@ -301,7 +315,7 @@ private void InitializeComponent() // this.button7.Anchor = System.Windows.Forms.AnchorStyles.None; this.button7.Font = new System.Drawing.Font("Arial", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.button7.Location = new System.Drawing.Point(323, 280); + this.button7.Location = new System.Drawing.Point(323, 283); this.button7.Name = "button7"; this.button7.Padding = new System.Windows.Forms.Padding(5); this.button7.Size = new System.Drawing.Size(167, 29); @@ -310,16 +324,115 @@ private void InitializeComponent() this.button7.Text = "Edit settings manually"; this.button7.Click += new System.EventHandler(this.button7_Click); // + // pictureBox1 + // + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(790, 43); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(30, 22); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox1.TabIndex = 10; + this.pictureBox1.TabStop = false; + this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click); + // + // pictureBox4 + // + this.pictureBox4.Image = global::JetpackDowngraderGUI.Properties.Resources.GitHub; + this.pictureBox4.Location = new System.Drawing.Point(802, 12); + this.pictureBox4.Name = "pictureBox4"; + this.pictureBox4.Size = new System.Drawing.Size(44, 39); + this.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox4.TabIndex = 13; + this.pictureBox4.TabStop = false; + this.pictureBox4.Click += new System.EventHandler(this.pictureBox4_Click); + // + // pictureBox3 + // + this.pictureBox3.Image = global::JetpackDowngraderGUI.Properties.Resources.JPD; + this.pictureBox3.Location = new System.Drawing.Point(752, 12); + this.pictureBox3.Name = "pictureBox3"; + this.pictureBox3.Size = new System.Drawing.Size(44, 39); + this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox3.TabIndex = 13; + this.pictureBox3.TabStop = false; + this.pictureBox3.Click += new System.EventHandler(this.pictureBox3_Click); + // + // pictureBox2 + // + this.pictureBox2.Image = global::JetpackDowngraderGUI.Properties.Resources.Settings; + this.pictureBox2.Location = new System.Drawing.Point(702, 12); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(44, 39); + this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox2.TabIndex = 13; + this.pictureBox2.TabStop = false; + // + // HelloUser + // + this.HelloUser.Font = new System.Drawing.Font("Arial", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.HelloUser.Location = new System.Drawing.Point(142, 142); + this.HelloUser.Name = "HelloUser"; + this.HelloUser.Size = new System.Drawing.Size(393, 46); + this.HelloUser.TabIndex = 12; + this.HelloUser.Text = "Select the desired stage"; + // + // pictureBox5 + // + this.pictureBox5.Image = global::JetpackDowngraderGUI.Properties.Resources.Up; + this.pictureBox5.Location = new System.Drawing.Point(65, 69); + this.pictureBox5.Name = "pictureBox5"; + this.pictureBox5.Size = new System.Drawing.Size(44, 39); + this.pictureBox5.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox5.TabIndex = 13; + this.pictureBox5.TabStop = false; + // + // pictureBox6 + // + this.pictureBox6.Image = global::JetpackDowngraderGUI.Properties.Resources.Up; + this.pictureBox6.Location = new System.Drawing.Point(247, 69); + this.pictureBox6.Name = "pictureBox6"; + this.pictureBox6.Size = new System.Drawing.Size(44, 39); + this.pictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox6.TabIndex = 13; + this.pictureBox6.TabStop = false; + // + // pictureBox7 + // + this.pictureBox7.Image = global::JetpackDowngraderGUI.Properties.Resources.Up; + this.pictureBox7.Location = new System.Drawing.Point(409, 69); + this.pictureBox7.Name = "pictureBox7"; + this.pictureBox7.Size = new System.Drawing.Size(44, 39); + this.pictureBox7.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox7.TabIndex = 13; + this.pictureBox7.TabStop = false; + // + // pictureBox8 + // + this.pictureBox8.Image = global::JetpackDowngraderGUI.Properties.Resources.Up; + this.pictureBox8.Location = new System.Drawing.Point(586, 69); + this.pictureBox8.Name = "pictureBox8"; + this.pictureBox8.Size = new System.Drawing.Size(44, 39); + this.pictureBox8.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox8.TabIndex = 13; + this.pictureBox8.TabStop = false; + // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(63)))), ((int)(((byte)(65))))); - this.ClientSize = new System.Drawing.Size(886, 410); - this.Controls.Add(this.darkSectionPanel1); + this.ClientSize = new System.Drawing.Size(859, 403); + this.Controls.Add(this.DSPanel); + this.Controls.Add(this.pictureBox4); + this.Controls.Add(this.pictureBox3); + this.Controls.Add(this.pictureBox8); + this.Controls.Add(this.pictureBox7); + this.Controls.Add(this.pictureBox6); + this.Controls.Add(this.pictureBox5); + this.Controls.Add(this.pictureBox2); + this.Controls.Add(this.HelloUser); this.Controls.Add(this.button2); this.Controls.Add(this.button6); - this.Controls.Add(this.button4); this.Controls.Add(this.button3); this.Controls.Add(this.button1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; @@ -330,9 +443,16 @@ private void InitializeComponent() this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "Jetpack Downgrader"; this.Load += new System.EventHandler(this.MainForm_Load); + this.DSPanel.ResumeLayout(false); + this.DSPanel.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.darkSectionPanel1.ResumeLayout(false); - this.darkSectionPanel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox4)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox5)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox6)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox7)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox8)).EndInit(); this.ResumeLayout(false); } @@ -340,7 +460,6 @@ private void InitializeComponent() #endregion private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button3; - private DarkUI.Controls.DarkButton button4; private DarkUI.Controls.DarkTextBox GamePath; private System.Windows.Forms.PictureBox pictureBox1; private DarkUI.Controls.DarkCheckBox checkBox1; @@ -355,9 +474,18 @@ private void InitializeComponent() private DarkUI.Controls.DarkCheckBox checkBox8; private DarkUI.Controls.DarkButton button6; private DarkUI.Controls.DarkButton button2; - private DarkUI.Controls.DarkSectionPanel darkSectionPanel1; + private DarkUI.Controls.DarkSectionPanel DSPanel; private DarkUI.Controls.DarkTitle darkTitle1; private DarkUI.Controls.DarkTitle darkTitle2; private DarkUI.Controls.DarkButton button7; + private System.Windows.Forms.PictureBox pictureBox2; + private System.Windows.Forms.PictureBox pictureBox3; + private System.Windows.Forms.PictureBox pictureBox4; + private DarkUI.Controls.DarkTitle HelloUser; + private System.Windows.Forms.PictureBox pictureBox5; + private System.Windows.Forms.PictureBox pictureBox6; + private System.Windows.Forms.PictureBox pictureBox7; + private System.Windows.Forms.PictureBox pictureBox8; + private DarkUI.Controls.DarkSectionPanel ModsPanel; } } \ No newline at end of file diff --git a/sources/GUI/MainForm.cs b/sources/GUI/MainForm.cs index 2266a12..e30e62d 100644 --- a/sources/GUI/MainForm.cs +++ b/sources/GUI/MainForm.cs @@ -1,25 +1,38 @@ using System; using System.Diagnostics; using System.Net; +using System.IO; using System.Windows.Forms; namespace JetpackDowngraderGUI { public partial class MainForm : Form { + // Dark title for Windows 10 + [System.Runtime.InteropServices.DllImport("DwmApi")] + private static extern int DwmSetWindowAttribute(IntPtr hwnd, int attr, int[] attrValue, int attrSize); + protected override void OnHandleCreated(EventArgs e) { if (DwmSetWindowAttribute(Handle, 19, new[] { 1 }, 4) != 0) { DwmSetWindowAttribute(Handle, 20, new[] { 1 }, 4); } } + // string[] lc = new string[100]; bool[] appset = new bool[8]; + bool tabFix = false; public MainForm() { InitializeComponent(); } - + IniEditor cfg = new IniEditor(@Application.StartupPath + @"\app\jpd.ini"); + IniEditor lang = new IniEditor(@Application.StartupPath + @"\languages\" + Properties.Settings.Default.LanguageCode + ".txt"); private void MainForm_Load(object sender, EventArgs e) { try { // Loading the localization - IniEditor lang = new IniEditor(@Application.StartupPath + @"\languages\" + Properties.Settings.Default.LanguageCode + ".txt"); // Text (GUI) loading label1.Text = Convert.ToString(lang.GetValue("Interface", "PathLabel")); - button4.Text = Convert.ToString(lang.GetValue("Interface", "AppSettings")); + DSPanel.SectionHeader = Convert.ToString(lang.GetValue("Interface", "Tab1")); + button6.Text = "1. " + DSPanel.SectionHeader; + ModsPanel.SectionHeader = Convert.ToString(lang.GetValue("Interface", "Tab2")); + button2.Text = "2. " + ModsPanel.SectionHeader; + button1.Text = "3. " + Convert.ToString(lang.GetValue("Interface", "Downgrade")); + button3.Text = "4. " + Convert.ToString(lang.GetValue("Interface", "Play")); + HelloUser.Text = Convert.ToString(lang.GetValue("Interface", "Stage")); // CheckBox loading checkBox1.Text = Convert.ToString(lang.GetValue("CheckBox", "Backup")); checkBox2.Text = Convert.ToString(lang.GetValue("CheckBox", "Shortcut")); @@ -33,20 +46,23 @@ private void MainForm_Load(object sender, EventArgs e) // Title loading lc[0] = Convert.ToString(lang.GetValue("Title", "Info")); lc[1] = Convert.ToString(lang.GetValue("Title", "Error")); + lc[8] = Convert.ToString(lang.GetValue("Title", "Warning")); lc[6] = Convert.ToString(lang.GetValue("Title", "FolderSelectDialog")); // InfoMsg loading lc[4] = Convert.ToString(lang.GetValue("InfoMsg", "Succes")); + lc[9] = Convert.ToString(lang.GetValue("InfoMsg", "Version")); + lc[10] = Convert.ToString(lang.GetValue("InfoMsg", "Author")); // ErrorMsg loading lc[2] = Convert.ToString(lang.GetValue("ErrorMsg", "ReadINI")); lc[3] = Convert.ToString(lang.GetValue("ErrorMsg", "WriteINI")); - lc[5] = Convert.ToString(lang.GetValue("ErrorMsg", "BrowserNotFound")); + // WarningMsg loading + lc[7] = Convert.ToString(lang.GetValue("WarningMsg", "PathNotFound")); + lc[5] = Convert.ToString(lang.GetValue("WarningMsg", "BrowserNotFound")); } catch { MessageBox.Show("Error loading the localization file!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } // Loading settings try { - - IniEditor cfg = new IniEditor(@Application.StartupPath + @"\app\jpd.ini"); checkBox1.Checked = Convert.ToBoolean(cfg.GetValue("Downgrader", "CreateBackups")); checkBox2.Checked = Convert.ToBoolean(cfg.GetValue("Downgrader", "CreateShortcut")); checkBox9.Checked = Convert.ToBoolean(cfg.GetValue("Downgrader", "ResetGame")); @@ -68,22 +84,30 @@ private void MainForm_Load(object sender, EventArgs e) catch { MsgError(lc[2], lc[1]); } } - private void button1_Click(object sender, EventArgs e) + async void button1_Click(object sender, EventArgs e) { - Process.Start(@Application.StartupPath + @"\app\jpd.exe").WaitForExit(); - // Install mods - - // - MsgInfo(lc[4], lc[0]); - } - - private void MsgInfo(string message, string title) { MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Information); } - private void MsgError(string message, string title) { MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Error); } - private void button7_Click(object sender, EventArgs e) { Process.Start("notepad.exe", @Application.StartupPath + @"\app\jpd.ini"); } + if (Directory.Exists(@GamePath.Text)) + { + this.Enabled = false; + button3.Enabled = false; + int d = 0; + cfg.SetValue("JPD", "SelectFolder", "false"); + cfg.SetValue("JPD", "UseMsg", "false"); + cfg.SetValue("JPD", "Component", "true"); + Process.Start(@Application.StartupPath + @"\app\jpd.exe", "\"" + GamePath.Text + "\"").WaitForExit(); + string str = "jpd"; + foreach (Process process2 in Process.GetProcesses()) { if (!process2.ProcessName.ToLower().Contains(str.ToLower())) { d = 1; } } + if (d == 1) + { + // Install mods - private void button4_Click(object sender, EventArgs e) - { - // Change language + // + MsgInfo(lc[4], lc[0]); + this.Enabled = true; + button3.Enabled = true; + } + } + else { MsgWarning(lc[7], lc[8]); } } private void pictureBox1_Click(object sender, EventArgs e) @@ -95,5 +119,23 @@ private void pictureBox1_Click(object sender, EventArgs e) }; if (dialog.Show()) { GamePath.Text = dialog.FileName; } else { GamePath.Clear(); } } + + private void checkBox2_CheckedChanged(object sender, EventArgs e) { cfg.SetValue("Downgrader", "CreateShortcut", Convert.ToString(checkBox2.Checked).Replace("T", "t").Replace("F", "f")); } + private void checkBox1_CheckedChanged(object sender, EventArgs e) { cfg.SetValue("Downgrader", "CreateBackups", Convert.ToString(checkBox1.Checked).Replace("T", "t").Replace("F", "f")); } + private void checkBox4_CheckedChanged(object sender, EventArgs e) { cfg.SetValue("Downgrader", "GarbageCleaning", Convert.ToString(checkBox4.Checked).Replace("T", "t").Replace("F", "f")); } + private void checkBox6_CheckedChanged(object sender, EventArgs e) { cfg.SetValue("Downgrader", "RegisterGamePath", Convert.ToString(checkBox6.Checked).Replace("T", "t").Replace("F", "f")); } + private void checkBox5_CheckedChanged(object sender, EventArgs e) { cfg.SetValue("Downgrader", "Forced", Convert.ToString(checkBox5.Checked).Replace("T", "t").Replace("F", "f")); } + private void checkBox8_CheckedChanged(object sender, EventArgs e) { cfg.SetValue("Downgrader", "InstallDirectX", Convert.ToString(checkBox8.Checked).Replace("T", "t").Replace("F", "f")); } + private void checkBox7_CheckedChanged(object sender, EventArgs e) { cfg.SetValue("Downgrader", "EnableDirectPlay", Convert.ToString(checkBox7.Checked).Replace("T", "t").Replace("F", "f")); } + private void checkBox3_CheckedChanged(object sender, EventArgs e) { cfg.SetValue("Downgrader", "CreateNewGamePath", Convert.ToString(checkBox3.Checked).Replace("T", "t").Replace("F", "f")); } + private void checkBox9_CheckedChanged(object sender, EventArgs e) { cfg.SetValue("Downgrader", "ResetGame", Convert.ToString(checkBox9.Checked).Replace("T", "t").Replace("F", "f")); } + private void pictureBox4_Click(object sender, EventArgs e) { try { Process.Start("https://github.com/Zalexanninev15/Jetpack-Downgrader"); } catch { MsgError(lc[5], lc[1]); } } + private void MsgInfo(string message, string title) { MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Information); } + private void MsgError(string message, string title) { MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Error); } + private void MsgWarning(string message, string title) { MessageBox.Show(message, title, MessageBoxButtons.OK, MessageBoxIcon.Warning); } + private void button7_Click(object sender, EventArgs e) { Process.Start("notepad.exe", @Application.StartupPath + @"\app\jpd.ini"); } + private void pictureBox3_Click(object sender, EventArgs e) { MsgInfo("Jetpack Downgrader GUI\n" + lc[9] + ": " + Convert.ToString(Application.ProductVersion).Replace(".0", "") + "\n" + lc[10] + " Zalexanninev15", lc[0]); } + private void button6_Click(object sender, EventArgs e) { if (DSPanel.Visible == false) { tabFix = false; ModsPanel.Visible = false; DSPanel.Visible = true; } else { if (tabFix == false) { DSPanel.Visible = false; ModsPanel.Visible = false; } else { tabFix = false; ModsPanel.Visible = false; } } } + private void button2_Click(object sender, EventArgs e) { if (ModsPanel.Visible == false) { tabFix = true; DSPanel.Visible = true; ModsPanel.Visible = true; } else { ModsPanel.Visible = false; DSPanel.Visible = false; tabFix = false; } } } } \ No newline at end of file diff --git a/sources/GUI/Properties/AssemblyInfo.cs b/sources/GUI/Properties/AssemblyInfo.cs index d78bc0c..9014d78 100644 --- a/sources/GUI/Properties/AssemblyInfo.cs +++ b/sources/GUI/Properties/AssemblyInfo.cs @@ -1,10 +1,5 @@ -#region Using directives - -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; - -#endregion - [assembly: AssemblyTitle("Jetpack Downgrader GUI")] [assembly: AssemblyDescription("GUI for Jetpack Downgrader")] [assembly: AssemblyConfiguration("")] @@ -14,5 +9,5 @@ [assembly: AssemblyTrademark("Jetpack Downgrader (2020-2021)")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] -[assembly: AssemblyVersion("0.3.0.0")] -[assembly: AssemblyFileVersion("0.3.0.0")] \ No newline at end of file +[assembly: AssemblyVersion("0.4.1.2")] +[assembly: AssemblyFileVersion("0.4.1.2")] \ No newline at end of file diff --git a/sources/GUI/Properties/Resources.Designer.cs b/sources/GUI/Properties/Resources.Designer.cs index d05d6b2..5c9753a 100644 --- a/sources/GUI/Properties/Resources.Designer.cs +++ b/sources/GUI/Properties/Resources.Designer.cs @@ -1,24 +1,5 @@ -//------------------------------------------------------------------------------ -// -// Этот код создан программой. -// Исполняемая версия:4.0.30319.42000 -// -// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае -// повторной генерации кода. -// -//------------------------------------------------------------------------------ - -namespace JetpackDowngraderGUI.Properties { +namespace JetpackDowngraderGUI.Properties { using System; - - - /// - /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. - /// - // Этот класс создан автоматически классом StronglyTypedResourceBuilder - // с помощью такого средства, как ResGen или Visual Studio. - // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen - // с параметром /str или перестройте свой проект VS. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] @@ -31,10 +12,6 @@ internal class Resources { [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } - - /// - /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. - /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { @@ -45,11 +22,6 @@ internal Resources() { return resourceMan; } } - - /// - /// Перезаписывает свойство CurrentUICulture текущего потока для всех - /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. - /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { @@ -59,5 +31,29 @@ internal Resources() { resourceCulture = value; } } + internal static System.Drawing.Bitmap GitHub { + get { + object obj = ResourceManager.GetObject("GitHub", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap JPD { + get { + object obj = ResourceManager.GetObject("JPD", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap Settings { + get { + object obj = ResourceManager.GetObject("Settings", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + internal static System.Drawing.Bitmap Up { + get { + object obj = ResourceManager.GetObject("Up", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } -} +} \ No newline at end of file diff --git a/sources/GUI/Properties/Resources.resx b/sources/GUI/Properties/Resources.resx index 1af7de1..6617954 100644 --- a/sources/GUI/Properties/Resources.resx +++ b/sources/GUI/Properties/Resources.resx @@ -117,4 +117,17 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\Settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\JPD.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\GitHub.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\Up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/sources/GUI/Properties/Settings.Designer.cs b/sources/GUI/Properties/Settings.Designer.cs index 018d18a..bcacd28 100644 --- a/sources/GUI/Properties/Settings.Designer.cs +++ b/sources/GUI/Properties/Settings.Designer.cs @@ -1,16 +1,4 @@ -//------------------------------------------------------------------------------ -// -// Этот код создан программой. -// Исполняемая версия:4.0.30319.42000 -// -// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае -// повторной генерации кода. -// -//------------------------------------------------------------------------------ - -namespace JetpackDowngraderGUI.Properties { - - +namespace JetpackDowngraderGUI.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { @@ -35,4 +23,4 @@ public string LanguageCode { } } } -} +} \ No newline at end of file diff --git a/sources/GUI/Resources/GitHub.png b/sources/GUI/Resources/GitHub.png new file mode 100644 index 0000000..ac74546 Binary files /dev/null and b/sources/GUI/Resources/GitHub.png differ diff --git a/sources/GUI/Resources/JPD.png b/sources/GUI/Resources/JPD.png new file mode 100644 index 0000000..4f5ad83 Binary files /dev/null and b/sources/GUI/Resources/JPD.png differ diff --git a/sources/GUI/Resources/Settings.png b/sources/GUI/Resources/Settings.png new file mode 100644 index 0000000..c464df7 Binary files /dev/null and b/sources/GUI/Resources/Settings.png differ diff --git a/sources/GUI/Resources/Up.png b/sources/GUI/Resources/Up.png new file mode 100644 index 0000000..32eecf6 Binary files /dev/null and b/sources/GUI/Resources/Up.png differ