diff --git a/ARCHBLOXLauncher1.csproj.user b/ARCHBLOXLauncher1.csproj.user index 7ac85d8..3494964 100644 --- a/ARCHBLOXLauncher1.csproj.user +++ b/ARCHBLOXLauncher1.csproj.user @@ -1,7 +1,7 @@  - <_LastSelectedProfileId>C:\Users\Thomas\source\repos\ARCHBLOXLauncher1\Properties\PublishProfiles\x86.pubxml + <_LastSelectedProfileId>C:\Users\Thomas\source\repos\ARCHBLOXLauncher1\Properties\PublishProfiles\x64.pubxml diff --git a/Form1.cs b/Form1.cs index ef1865f..70a2d3f 100644 --- a/Form1.cs +++ b/Form1.cs @@ -17,6 +17,7 @@ namespace ARCHBLOXLauncher1 public partial class Form1 : Form { bool lockanims = true; + bool rbxl = false; private DiscordRpcClient client; bool ingame = false; bool hosting = false; @@ -27,7 +28,6 @@ namespace ARCHBLOXLauncher1 static string folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Archblx\", @"Versions\"); static string clientPath = Path.Combine(folderPath, version_string + @"\"); static string filePath = Path.Combine(clientPath, "ArchbloxPlayerBeta.exe"); - void slideOutJoinBox(object sender, EventArgs e) { lockanims = true; @@ -117,6 +117,13 @@ namespace ARCHBLOXLauncher1 } void slideInButtons(object sender, EventArgs e) { + if (!Directory.Exists(filePath)) + { + UpdateBTN.Text = "Install ARCHBLOX"; + } else + { + UpdateBTN.Text = "Re-Install ARCHBLOX"; + } lockanims = true; UpdateBTN.Location = new Point(UpdateBTN.Location.X + 8, UpdateBTN.Location.Y); JoinBTN.Location = new Point(UpdateBTN.Location.X, JoinBTN.Location.Y); @@ -161,7 +168,6 @@ namespace ARCHBLOXLauncher1 AnimationHandler_SlideInButtons.Start(); client = new DiscordRpcClient("996030605106090006"); - client.Logger = new ConsoleLogger() { Level = LogLevel.Warning }; client.Initialize(); client.SetPresence(new RichPresence() { @@ -178,17 +184,32 @@ namespace ARCHBLOXLauncher1 private void button1_Click(object sender, EventArgs e) { - if (!File.Exists(filePath)) + string phrase = textBox2.Text; + string[] words = phrase.Split('.'); + + foreach (var word in words) { + if (word == "rbxl") { + rbxl = true; + } else { + rbxl = false; + } + } + if (!File.Exists(filePath)) { DialogResult res = MessageBox.Show("You need to install the latest version of ARCHBLOX to host. Would you like to install it?", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (res == DialogResult.Yes) { ARCHBLOXLauncher1.Form2 form2 = new ARCHBLOXLauncher1.Form2(); form2.Show(); } + } + else if (textBox1.Text == "" || textBox2.Text == "") { + MessageBox.Show("Please fill in all of the text fields.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error); } - else - { + else if (rbxl == false) { + MessageBox.Show("Please use a valid RBXL.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + else { void ProcessExitHandler(object sender, EventArgs args) { hosting = false; @@ -232,6 +253,7 @@ namespace ARCHBLOXLauncher1 pProcess.Start(); pProcess.EnableRaisingEvents = true; pProcess.Exited += new EventHandler(ProcessExitHandler); + var random = new Random(); client.SetPresence(new DiscordRPC.RichPresence() { Details = "Hosting", @@ -243,7 +265,7 @@ namespace ARCHBLOXLauncher1 SmallImageKey = "archblox", } }); - MessageBox.Show("Starting game server on port " + textBox1.Text + " using " + textBox2.Text, "ARCHBLOX"); + MessageBox.Show("Starting game server on port " + textBox1.Text + " using " + textBox2.Text, "ARCHBLOX", MessageBoxButtons.OK , MessageBoxIcon.Information); } } @@ -258,6 +280,10 @@ namespace ARCHBLOXLauncher1 form2.Show(); } } + else if (serverip.Text == "" || serverport.Text == "") + { + MessageBox.Show("Please fill in all of the text fields.", "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Error); + } else { void ProcessExitHandler(object sender, EventArgs args) @@ -314,7 +340,7 @@ namespace ARCHBLOXLauncher1 SmallImageKey = "archblox", } }); ; - MessageBox.Show("Joining " + serverip.Text + ":" + serverport.Text, "ARCHBLOX"); + MessageBox.Show("Joining " + serverip.Text + ":" + serverport.Text, "ARCHBLOX", MessageBoxButtons.OK, MessageBoxIcon.Information); } } diff --git a/Form2.cs b/Form2.cs index 5b0fe90..8c6336d 100644 --- a/Form2.cs +++ b/Form2.cs @@ -100,7 +100,7 @@ namespace ARCHBLOXLauncher1 string filePath = Path.Combine(clientPath, Path.GetFileName(@"https://archblox.com/client/" + version_string + ".zip")); ZipFile.ExtractToDirectory(filePath, clientPath); File.Delete(filePath); - label1.Text = "Install completed! Have fun playing ARCHBLOX!"; + label1.Text = "Install completed!"; } } diff --git a/Properties/PublishProfiles/x64.pubxml.user b/Properties/PublishProfiles/x64.pubxml.user index e120d50..d6388f3 100644 --- a/Properties/PublishProfiles/x64.pubxml.user +++ b/Properties/PublishProfiles/x64.pubxml.user @@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2022-07-12T10:31:31.4891674Z;True|2022-07-12T07:42:57.8030421+10:00;True|2022-07-12T07:24:22.2110673+10:00;True|2022-07-12T07:12:22.1327523+10:00;True|2022-07-12T01:02:07.4142780+10:00;True|2022-07-12T01:01:55.1054218+10:00;True|2022-07-12T00:57:05.7704097+10:00;True|2022-07-11T19:45:06.3965836+10:00;True|2022-07-11T03:03:05.5235378+10:00;True|2022-07-11T01:29:52.2575986+10:00;True|2022-07-11T01:29:03.7081553+10:00;True|2022-07-11T01:07:30.8355486+10:00;True|2022-07-11T00:18:27.1107980+10:00;True|2022-07-10T21:59:11.0753271+10:00;True|2022-07-10T19:15:49.4105023+10:00;True|2022-07-10T19:13:41.3098116+10:00;True|2022-07-10T19:12:41.5715908+10:00; + True|2022-07-12T14:35:56.1276705Z;True|2022-07-12T20:31:31.4891674+10:00;True|2022-07-12T07:42:57.8030421+10:00;True|2022-07-12T07:24:22.2110673+10:00;True|2022-07-12T07:12:22.1327523+10:00;True|2022-07-12T01:02:07.4142780+10:00;True|2022-07-12T01:01:55.1054218+10:00;True|2022-07-12T00:57:05.7704097+10:00;True|2022-07-11T19:45:06.3965836+10:00;True|2022-07-11T03:03:05.5235378+10:00;True|2022-07-11T01:29:52.2575986+10:00;True|2022-07-11T01:29:03.7081553+10:00;True|2022-07-11T01:07:30.8355486+10:00;True|2022-07-11T00:18:27.1107980+10:00;True|2022-07-10T21:59:11.0753271+10:00;True|2022-07-10T19:15:49.4105023+10:00;True|2022-07-10T19:13:41.3098116+10:00;True|2022-07-10T19:12:41.5715908+10:00; \ No newline at end of file diff --git a/Properties/PublishProfiles/x86.pubxml.user b/Properties/PublishProfiles/x86.pubxml.user index 05e8706..9ad00bf 100644 --- a/Properties/PublishProfiles/x86.pubxml.user +++ b/Properties/PublishProfiles/x86.pubxml.user @@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121. --> - True|2022-07-12T10:31:25.7325840Z;True|2022-07-12T07:43:08.7666080+10:00;True|2022-07-12T07:24:17.3722228+10:00;True|2022-07-12T07:12:29.3685122+10:00;True|2022-07-12T01:01:59.7182995+10:00;True|2022-07-12T00:56:51.3800489+10:00;True|2022-07-11T19:45:17.8917634+10:00;True|2022-07-11T03:02:35.7176035+10:00;True|2022-07-11T01:29:59.8179775+10:00;True|2022-07-11T01:28:57.8645143+10:00;True|2022-07-11T01:07:39.1190996+10:00;True|2022-07-11T00:18:18.9541704+10:00;True|2022-07-10T21:59:16.0892178+10:00;True|2022-07-10T19:13:19.3369745+10:00;True|2022-07-10T19:13:01.5256770+10:00; + True|2022-07-12T14:36:07.1078472Z;True|2022-07-12T20:31:25.7325840+10:00;True|2022-07-12T07:43:08.7666080+10:00;True|2022-07-12T07:24:17.3722228+10:00;True|2022-07-12T07:12:29.3685122+10:00;True|2022-07-12T01:01:59.7182995+10:00;True|2022-07-12T00:56:51.3800489+10:00;True|2022-07-11T19:45:17.8917634+10:00;True|2022-07-11T03:02:35.7176035+10:00;True|2022-07-11T01:29:59.8179775+10:00;True|2022-07-11T01:28:57.8645143+10:00;True|2022-07-11T01:07:39.1190996+10:00;True|2022-07-11T00:18:18.9541704+10:00;True|2022-07-10T21:59:16.0892178+10:00;True|2022-07-10T19:13:19.3369745+10:00;True|2022-07-10T19:13:01.5256770+10:00; \ No newline at end of file diff --git a/bin/Release/netcoreapp3.1/ARCHBLOXLauncher1.dll b/bin/Release/netcoreapp3.1/ARCHBLOXLauncher1.dll index 6860026..70436e2 100644 Binary files a/bin/Release/netcoreapp3.1/ARCHBLOXLauncher1.dll and b/bin/Release/netcoreapp3.1/ARCHBLOXLauncher1.dll differ diff --git a/bin/Release/netcoreapp3.1/ARCHBLOXLauncher1.pdb b/bin/Release/netcoreapp3.1/ARCHBLOXLauncher1.pdb index 427269a..ca8680a 100644 Binary files a/bin/Release/netcoreapp3.1/ARCHBLOXLauncher1.pdb and b/bin/Release/netcoreapp3.1/ARCHBLOXLauncher1.pdb differ diff --git a/bin/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.dll b/bin/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.dll index 36500ec..0a34564 100644 Binary files a/bin/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.dll and b/bin/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.dll differ diff --git a/bin/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.pdb b/bin/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.pdb index f5cde87..064446c 100644 Binary files a/bin/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.pdb and b/bin/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.pdb differ diff --git a/bin/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.dll b/bin/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.dll index 1b85978..cdd956c 100644 Binary files a/bin/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.dll and b/bin/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.dll differ diff --git a/bin/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.pdb b/bin/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.pdb index b25ed7a..872a518 100644 Binary files a/bin/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.pdb and b/bin/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.pdb differ diff --git a/obj/Release/netcoreapp3.1/ARCHBLOXLauncher1.dll b/obj/Release/netcoreapp3.1/ARCHBLOXLauncher1.dll index 6860026..70436e2 100644 Binary files a/obj/Release/netcoreapp3.1/ARCHBLOXLauncher1.dll and b/obj/Release/netcoreapp3.1/ARCHBLOXLauncher1.dll differ diff --git a/obj/Release/netcoreapp3.1/ARCHBLOXLauncher1.pdb b/obj/Release/netcoreapp3.1/ARCHBLOXLauncher1.pdb index 427269a..ca8680a 100644 Binary files a/obj/Release/netcoreapp3.1/ARCHBLOXLauncher1.pdb and b/obj/Release/netcoreapp3.1/ARCHBLOXLauncher1.pdb differ diff --git a/obj/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.dll b/obj/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.dll index 36500ec..0a34564 100644 Binary files a/obj/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.dll and b/obj/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.dll differ diff --git a/obj/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.pdb b/obj/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.pdb index f5cde87..064446c 100644 Binary files a/obj/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.pdb and b/obj/Release/netcoreapp3.1/win-x64/ARCHBLOXLauncher1.pdb differ diff --git a/obj/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.dll b/obj/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.dll index 1b85978..cdd956c 100644 Binary files a/obj/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.dll and b/obj/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.dll differ diff --git a/obj/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.pdb b/obj/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.pdb index b25ed7a..872a518 100644 Binary files a/obj/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.pdb and b/obj/Release/netcoreapp3.1/win-x86/ARCHBLOXLauncher1.pdb differ