2.4
This commit is contained in:
parent
5dd605c475
commit
1652ad247f
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<_LastSelectedProfileId>C:\Users\Thomas\source\repos\ARCHBLOXLauncher1\Properties\PublishProfiles\x86.pubxml</_LastSelectedProfileId>
|
||||
<_LastSelectedProfileId>C:\Users\Thomas\source\repos\ARCHBLOXLauncher1\Properties\PublishProfiles\x64.pubxml</_LastSelectedProfileId>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Form1.cs">
|
||||
|
|
|
|||
40
Form1.cs
40
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
2
Form2.cs
2
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!";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>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;</History>
|
||||
<History>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;</History>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
|||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<History>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;</History>
|
||||
<History>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;</History>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue