Skip to content

Commit

Permalink
JPD Version 2.5
Browse files Browse the repository at this point in the history
👉 GUI v1.5.5 [DEV]
- The project in the process of transfer from the VitNX version 1.1.3-PreFinalBeta (2021) to the not yet released version 2.7 (2022)
- Access links to sites will now happen much easier

👉 Downgrader v1.16.1 [BETA]
- The project was transferred from the VitNX version 1.1.3-PreFinalBeta (2021) to the not yet released version 2.7 (2022)
  • Loading branch information
Zalexanninev15 committed Feb 26, 2022
1 parent 0f7a470 commit 9df275e
Show file tree
Hide file tree
Showing 12 changed files with 355 additions and 367 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ sources/GUI/obj/Debug/JetpackGUI.WDebug.resources
sources/Downgrader/obj/Debug/Downgrader.csproj.FileListAbsolute.txt
sources/GUI/obj/Release/JetpackGUI.ChooseGame.resources
sources/GUI/obj/Release/build.force
sources/Downgrader/obj/Release/build.force
5 changes: 2 additions & 3 deletions sources/Downgrader/Downgrader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@
<Reference Include="System" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="VitNX, Version=1.0.3.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\DEV\JPDBUILD\files\VitNX.dll</HintPath>
<Reference Include="VitNX2">
<HintPath>..\..\..\VitNX\source\VitNX\bin\Debug\VitNX2.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
386 changes: 196 additions & 190 deletions sources/Downgrader/Program.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions sources/Downgrader/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
[assembly: AssemblyTrademark("Jetpack Downgrader (2020-2022)")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.16.0.4")]
[assembly: AssemblyFileVersion("1.16.0.4")]
[assembly: AssemblyVersion("1.16.1.0")]
[assembly: AssemblyFileVersion("1.16.1.0")]
12 changes: 12 additions & 0 deletions sources/GUI/Classes/Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ public static class Data
public static string JetpackDowngraderVersion { get; } = "2.4.0.2";
public static string PathToGame { get; set; }
public static bool DebugMode { get; set; }
public static string NewVersionDetector { get; } = "https://raw.githubusercontent.com/Zalexanninev15/Jetpack-Downgrader/unstable/Version.txt";
public static string GitHubPing { get; } = "github.com";
}

public class ModsData
Expand All @@ -19,4 +21,14 @@ public class ModsData
public string Screenshot2 { get; set; }
public string File { get; set; }
}

public static class Urls
{
public static string GitHub { get; } = "https://github.com/Zalexanninev15/Jetpack-Downgrader";
public static string Release { get; } = "https://github.com/Zalexanninev15/Jetpack-Downgrader/releases/latest";
public static string GTAForums { get; } = "https://gtaforums.com/topic/969056-jetpack-downgrader";
public static string GitHubAppUsage { get; } = "https://github.com/Zalexanninev15/Jetpack-Downgrader/blob/main/README.md#usage";
public static string GitHubAppAuthors { get; } = "https://github.com/Zalexanninev15/Jetpack-Downgrader/blob/main/README.md#authors";
public static string GitHubAppIssues { get; } = "https://github.com/Zalexanninev15/Jetpack-Downgrader/issues";
}
}
7 changes: 3 additions & 4 deletions sources/GUI/GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,11 @@
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" />
<Reference Include="VitNX, Version=1.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\DEV\JPDBUILD\files\VitNX.dll</HintPath>
<Reference Include="VitNX2">
<HintPath>..\..\..\VitNX\source\VitNX\bin\Debug\VitNX2.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
<Reference Include="WindowsFormsIntegration" />
Expand Down Expand Up @@ -169,6 +167,7 @@
</EmbeddedResource>
<EmbeddedResource Include="OtherForms\About.resx">
<DependentUpon>About.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="OtherForms\ChooseGame.resx">
<DependentUpon>ChooseGame.cs</DependentUpon>
Expand Down
190 changes: 88 additions & 102 deletions sources/GUI/MainForm.cs

Large diffs are not rendered by default.

50 changes: 16 additions & 34 deletions sources/GUI/OtherForms/About.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Windows.Forms;
using System.Xml.Serialization;
using VitNX.Forms;
using VitNX.Win32;
using System.Xml.Serialization;

using VitNX.Functions.Windows.Win32;
using VitNX.UI.ControlsV1.BasedOnDarkUI.Forms;
using VitNX.Functions.Windows.Apps;

namespace JetpackGUI
{
public partial class About : Form
{
protected override void OnHandleCreated(EventArgs e)
{
if (NativeFunctions.DwmSetWindowAttribute(Handle, 19, new[] { 1 }, 4) != 0)
NativeFunctions.DwmSetWindowAttribute(Handle, 20, new[] { 1 }, 4);
if (Import.DwmSetWindowAttribute(Handle, 19, new[] { 1 }, 4) != 0)
Import.DwmSetWindowAttribute(Handle, 20, new[] { 1 }, 4);
}

public About()
Expand All @@ -28,41 +29,37 @@ private void MsgWarning()

private void darkButton1_Click(object sender, EventArgs e)
{
try { Process.Start("https://github.com/Zalexanninev15/Jetpack-Downgrader/issues"); }
catch
if (!Processes.OpenLink(Urls.GitHubAppIssues))
{
MsgWarning();
Clipboard.SetText("https://github.com/Zalexanninev15/Jetpack-Downgrader/issues");
Clipboard.SetText(Urls.GitHubAppIssues);
}
}

private void darkButton1_Click_1(object sender, EventArgs e)
{
try { Process.Start("https://github.com/Zalexanninev15/Jetpack-Downgrader#authors"); }
catch
if (!Processes.OpenLink(Urls.GitHubAppAuthors))
{
MsgWarning();
Clipboard.SetText("https://github.com/Zalexanninev15/Jetpack-Downgrader#authors");
Clipboard.SetText(Urls.GitHubAppAuthors);
}
}

private void darkButton3_Click(object sender, EventArgs e)
{
try { Process.Start("https://github.com/Zalexanninev15/Jetpack-Downgrader"); }
catch
if (!Processes.OpenLink(Urls.GitHub))
{
MsgWarning();
Clipboard.SetText("https://github.com/Zalexanninev15/Jetpack-Downgrader");
Clipboard.SetText(Urls.GitHub);
}
}

private void darkButton4_Click(object sender, EventArgs e)
{
try { Process.Start("https://gtaforums.com/topic/969056-jetpack-downgrader"); }
catch
if (!Processes.OpenLink(Urls.GTAForums))
{
MsgWarning();
Clipboard.SetText("https://gtaforums.com/topic/969056-jetpack-downgrader/");
Clipboard.SetText(Urls.GTAForums);
}
}

Expand All @@ -76,7 +73,7 @@ private void MyLang_Load(object sender, EventArgs e)
language.ReadXml();
string langcode = language.Fields.LanguageCode;
XmlSerializer lzol = new XmlSerializer(typeof(LanguagesString));
using (StringReader reader = new StringReader(File.ReadAllText(@Application.StartupPath + @"\files\languages\" + langcode + ".xml")))
using (StringReader reader = new StringReader(File.ReadAllText($@"{Application.StartupPath}\files\languages\{langcode}.xml")))
{
var LOCAL = (LanguagesString)lzol.Deserialize(reader);
Text = LOCAL.AboutTitle;
Expand All @@ -92,20 +89,5 @@ private void MyLang_Load(object sender, EventArgs e)
MSG[1] = LOCAL.BrowserNotFound;
}
}

private int db = 0;

private void pictureBox1_Click(object sender, EventArgs e)
{
//if (Data.DebugMode)
//{
// try
// {
// db += 1;
// if (db == 10) { WDebug wdb = new WDebug(); wdb.ShowDialog(); }
// }
// catch { }
//}
}
}
}
17 changes: 7 additions & 10 deletions sources/GUI/OtherForms/ChooseGame.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
using System;
using System.IO;
using System.Windows.Forms;
using System.Xml.Serialization;
using VitNX.Win32;
using System.Windows.Forms;

using VitNX.Functions.Windows.Win32;

namespace JetpackGUI
{
public partial class ChooseGame : Form
{
protected override void OnHandleCreated(EventArgs e)
{
if (NativeFunctions.DwmSetWindowAttribute(Handle, 19, new[] { 1 }, 4) != 0)
NativeFunctions.DwmSetWindowAttribute(Handle, 20, new[] { 1 }, 4);
if (Import.DwmSetWindowAttribute(Handle, 19, new[] { 1 }, 4) != 0)
Import.DwmSetWindowAttribute(Handle, 20, new[] { 1 }, 4);
}

private GUI mygui = new GUI();
Expand All @@ -22,13 +21,11 @@ public ChooseGame()
}

private void button2_Click(object sender, EventArgs e)
{

{
}

private void MyLang_Load(object sender, EventArgs e)
{

{
}
}
}
14 changes: 8 additions & 6 deletions sources/GUI/OtherForms/FirstLaunch.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
using System;
using System.IO;
using System.Windows.Forms;
using System.Xml.Serialization;
using VitNX.Win32;
using System.Xml.Serialization;

using VitNX.Functions.Windows.Win32;
using VitNX.UI.ControlsV1.BasedOnDarkUI.Forms;

namespace JetpackGUI
{
public partial class MyLang : Form
{
protected override void OnHandleCreated(EventArgs e)
{
if (NativeFunctions.DwmSetWindowAttribute(Handle, 19, new[] { 1 }, 4) != 0)
NativeFunctions.DwmSetWindowAttribute(Handle, 20, new[] { 1 }, 4);
if (Import.DwmSetWindowAttribute(Handle, 19, new[] { 1 }, 4) != 0)
Import.DwmSetWindowAttribute(Handle, 20, new[] { 1 }, 4);
}

private GUI mygui = new GUI();
Expand All @@ -32,14 +34,14 @@ private void button2_Click(object sender, EventArgs e)
System.Threading.Tasks.Task.Delay(300);
Application.Restart();
}
else { VitNX.Forms.VitNX_MessageBox.ShowInfo("You need to select a language from the list!", "Information"); }
else { VitNX_MessageBox.ShowInfo("You need to select a language from the list!", "Information"); }
}

private void MyLang_Load(object sender, EventArgs e)
{
this.Size = new System.Drawing.Size(265, 152);
AllLangs.Items.Clear();
langs = Directory.GetFiles(@Application.StartupPath + @"\files\languages", "*.xml");
langs = Directory.GetFiles(Application.StartupPath + @"\files\languages", "*.xml");
for (int i = 0; i < langs.Length; i++)
{
if (langs[i] != "")
Expand Down
32 changes: 18 additions & 14 deletions sources/GUI/Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Windows.Forms;

using System.Windows.Forms;

using VitNX.Functions.Common.Information;
using VitNX.UI.ControlsV1.BasedOnDarkUI.Forms;

namespace JetpackGUI
{
internal static class Program
Expand All @@ -19,15 +20,14 @@ public static void Main(string[] args)
{
try
{
Ping ping = new Ping();
PingReply pingReply = null;
pingReply = ping.Send("github.com");
using (WebClient wc = new WebClient())
{
string toolkit_version = wc.DownloadString("https://raw.githubusercontent.com/Zalexanninev15/Jetpack-Downgrader/unstable/Version.txt");
if (Internet.IsHaveInternet("github.com") == Internet.INTERNET_STATUS.CONNECTED)
{
string toolkit_version = VitNX.Functions.Common.Web.DataFromSites.DownloadString(Data.NewVersionDetector, Application.ProductVersion);
if (toolkit_version != Data.JetpackDowngraderVersion)
AvailableNewVersion = true;
AvailableNewVersion = true;
}
else
AvailableNewVersion = false;
}
catch { AvailableNewVersion = false; }
}
Expand All @@ -42,11 +42,15 @@ public static void Main(string[] args)
}
else
{
VitNX.Forms.VitNX_MessageBox.ShowInfo("An update is available!\nNow you will be redirected to the download page of the latest version", "Information");
try { System.Diagnostics.Process.Start("https://github.com/Zalexanninev15/Jetpack-Downgrader/releases/latest"); } catch { VitNX.Forms.VitNX_MessageBox.ShowWarning("Browser to open the link was not found! The link will be copied to the clipboard!", "Warning"); Clipboard.SetText("https://github.com/Zalexanninev15/Jetpack-Downgrader/releases/latest"); }
VitNX_MessageBox.ShowInfo("An update is available!\nNow you will be redirected to the download page of the latest version", "Information");
if (!VitNX.Functions.Windows.Apps.Processes.OpenLink(Urls.Release))
{
VitNX_MessageBox.ShowWarning("Browser to open the link was not found! The link will be copied to the clipboard!", "Warning");
Clipboard.SetText(Urls.Release);
}
}
}
catch (Exception ex) { VitNX.Forms.VitNX_MessageBox.ShowError(ex.ToString(), "Error"); }
catch (Exception ex) { VitNX_MessageBox.ShowError(ex.ToString(), "Error"); }
}
}
}
4 changes: 2 additions & 2 deletions sources/GUI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
[assembly: AssemblyTrademark("Jetpack Downgrader (2020-2022)")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.5.1.0")]
[assembly: AssemblyFileVersion("1.5.1.0")]
[assembly: AssemblyVersion("1.5.5.0")]
[assembly: AssemblyFileVersion("1.5.5.0")]

0 comments on commit 9df275e

Please sign in to comment.