This commit is contained in:
Thomas G 2022-07-26 15:16:55 +10:00
parent cfea9c1909
commit 7ed68e330b
528 changed files with 110 additions and 2140 deletions

Binary file not shown.

View File

@ -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\x64_netcoreincluded.pubxml</_LastSelectedProfileId>
<_LastSelectedProfileId>C:\Users\Thomas\source\repos\ARCHBLOXLauncher1\Properties\PublishProfiles\x86.pubxml</_LastSelectedProfileId>
</PropertyGroup>
<ItemGroup>
<Compile Update="Form1.cs">

190
Form1.Designer.cs generated
View File

@ -28,10 +28,8 @@
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.AnimationHandler_SlideOutJoinBox = new System.Windows.Forms.Timer(this.components);
this.JoinBox = new System.Windows.Forms.GroupBox();
this.serverip = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
@ -48,17 +46,7 @@
this.HostBTN = new System.Windows.Forms.Button();
this.JoinBTN = new System.Windows.Forms.Button();
this.UpdateBTN = new System.Windows.Forms.Button();
this.AnimationHandler_SlideOutButtons = new System.Windows.Forms.Timer(this.components);
this.AnimationHandler_SlideInButtons = new System.Windows.Forms.Timer(this.components);
this.AnimationHandler_SlideInJoinBox = new System.Windows.Forms.Timer(this.components);
this.BackBTN_Join = new System.Windows.Forms.Button();
this.AnimationHandler_SlideInBackBTNJoin = new System.Windows.Forms.Timer(this.components);
this.AnimationHandler_SlideOutBackBTNJoin = new System.Windows.Forms.Timer(this.components);
this.BackBTN_Host = new System.Windows.Forms.Button();
this.AnimationHandler_SlideOutBackBTNHost = new System.Windows.Forms.Timer(this.components);
this.AnimationHandler_SlideInBackBTNHost = new System.Windows.Forms.Timer(this.components);
this.AnimationHandler_SlideOutHostBox = new System.Windows.Forms.Timer(this.components);
this.AnimationHandler_SlideInHostBox = new System.Windows.Forms.Timer(this.components);
this.BackBTN = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.JoinBox.SuspendLayout();
this.HostBox.SuspendLayout();
@ -69,17 +57,13 @@
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
this.pictureBox1.Image = global::ARCHBLOXLauncherGUI.Properties.Resources.unknown;
this.pictureBox1.Location = new System.Drawing.Point(51, 12);
this.pictureBox1.Location = new System.Drawing.Point(51, 11);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(203, 40);
this.pictureBox1.Size = new System.Drawing.Size(203, 37);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// AnimationHandler_SlideOutJoinBox
//
this.AnimationHandler_SlideOutJoinBox.Interval = 1;
//
// JoinBox
//
this.JoinBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(49)))), ((int)(((byte)(107)))), ((int)(((byte)(223)))));
@ -88,50 +72,51 @@
this.JoinBox.Controls.Add(this.serverport);
this.JoinBox.Controls.Add(this.label7);
this.JoinBox.Controls.Add(this.button2);
this.JoinBox.Location = new System.Drawing.Point(400, 58);
this.JoinBox.Location = new System.Drawing.Point(7, 48);
this.JoinBox.Name = "JoinBox";
this.JoinBox.Size = new System.Drawing.Size(286, 150);
this.JoinBox.Size = new System.Drawing.Size(286, 140);
this.JoinBox.TabIndex = 26;
this.JoinBox.TabStop = false;
this.JoinBox.Visible = false;
//
// serverip
//
this.serverip.CharacterCasing = System.Windows.Forms.CharacterCasing.Lower;
this.serverip.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.serverip.Location = new System.Drawing.Point(6, 40);
this.serverip.Location = new System.Drawing.Point(6, 37);
this.serverip.MaxLength = 15;
this.serverip.Name = "serverip";
this.serverip.PlaceholderText = "IP";
this.serverip.Size = new System.Drawing.Size(276, 23);
this.serverip.Size = new System.Drawing.Size(276, 21);
this.serverip.TabIndex = 18;
//
// label4
//
this.label4.AutoSize = true;
this.label4.BackColor = System.Drawing.Color.Transparent;
this.label4.Location = new System.Drawing.Point(6, 19);
this.label4.Location = new System.Drawing.Point(6, 18);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(270, 15);
this.label4.Size = new System.Drawing.Size(277, 14);
this.label4.TabIndex = 17;
this.label4.Text = "Server IP (Use localhost if joining your own server)";
//
// serverport
//
this.serverport.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.serverport.Location = new System.Drawing.Point(6, 84);
this.serverport.Location = new System.Drawing.Point(6, 78);
this.serverport.MaxLength = 5;
this.serverport.Name = "serverport";
this.serverport.PlaceholderText = "PORT";
this.serverport.Size = new System.Drawing.Size(274, 23);
this.serverport.Size = new System.Drawing.Size(274, 21);
this.serverport.TabIndex = 19;
//
// label7
//
this.label7.AutoSize = true;
this.label7.BackColor = System.Drawing.Color.Transparent;
this.label7.Location = new System.Drawing.Point(6, 66);
this.label7.Location = new System.Drawing.Point(6, 62);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(64, 15);
this.label7.Size = new System.Drawing.Size(67, 14);
this.label7.TabIndex = 25;
this.label7.Text = "Server Port";
//
@ -142,9 +127,9 @@
this.button2.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button2.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button2.Location = new System.Drawing.Point(6, 117);
this.button2.Location = new System.Drawing.Point(6, 109);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(274, 23);
this.button2.Size = new System.Drawing.Size(274, 21);
this.button2.TabIndex = 24;
this.button2.Text = "Join";
this.button2.UseVisualStyleBackColor = false;
@ -159,39 +144,40 @@
this.HostBox.Controls.Add(this.button3);
this.HostBox.Controls.Add(this.textBox2);
this.HostBox.Controls.Add(this.button1);
this.HostBox.Location = new System.Drawing.Point(400, 58);
this.HostBox.Location = new System.Drawing.Point(7, 48);
this.HostBox.Name = "HostBox";
this.HostBox.Size = new System.Drawing.Size(288, 140);
this.HostBox.Size = new System.Drawing.Size(288, 131);
this.HostBox.TabIndex = 27;
this.HostBox.TabStop = false;
this.HostBox.Visible = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Location = new System.Drawing.Point(4, 19);
this.label2.Location = new System.Drawing.Point(4, 18);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(162, 15);
this.label2.Size = new System.Drawing.Size(168, 14);
this.label2.TabIndex = 23;
this.label2.Text = "Port (53640 is recommended)";
//
// textBox1
//
this.textBox1.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.textBox1.Location = new System.Drawing.Point(6, 37);
this.textBox1.Location = new System.Drawing.Point(6, 35);
this.textBox1.MaxLength = 5;
this.textBox1.Name = "textBox1";
this.textBox1.PlaceholderText = "PORT";
this.textBox1.Size = new System.Drawing.Size(274, 23);
this.textBox1.Size = new System.Drawing.Size(274, 21);
this.textBox1.TabIndex = 24;
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.Location = new System.Drawing.Point(4, 63);
this.label3.Location = new System.Drawing.Point(4, 59);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(187, 15);
this.label3.Size = new System.Drawing.Size(190, 14);
this.label3.TabIndex = 27;
this.label3.Text = "Filename (use temp.rbxl if unsure)";
//
@ -201,9 +187,9 @@
this.button3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button3.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button3.Location = new System.Drawing.Point(207, 80);
this.button3.Location = new System.Drawing.Point(207, 75);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(73, 23);
this.button3.Size = new System.Drawing.Size(73, 21);
this.button3.TabIndex = 26;
this.button3.Text = "Browse...";
this.button3.UseVisualStyleBackColor = true;
@ -212,10 +198,10 @@
// textBox2
//
this.textBox2.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.textBox2.Location = new System.Drawing.Point(6, 81);
this.textBox2.Location = new System.Drawing.Point(6, 76);
this.textBox2.Name = "textBox2";
this.textBox2.PlaceholderText = "Filename";
this.textBox2.Size = new System.Drawing.Size(195, 23);
this.textBox2.Size = new System.Drawing.Size(195, 21);
this.textBox2.TabIndex = 25;
//
// button1
@ -225,9 +211,9 @@
this.button1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.button1.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.button1.Location = new System.Drawing.Point(6, 109);
this.button1.Location = new System.Drawing.Point(6, 102);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(274, 23);
this.button1.Size = new System.Drawing.Size(274, 21);
this.button1.TabIndex = 28;
this.button1.Text = "Host";
this.button1.UseVisualStyleBackColor = false;
@ -238,11 +224,11 @@
this.HostBTN.BackgroundImage = global::ARCHBLOXLauncherGUI.Properties.Resources.buttonblue;
this.HostBTN.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.HostBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.HostBTN.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.HostBTN.Font = new System.Drawing.Font("Segoe UI Semilight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.HostBTN.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.HostBTN.Location = new System.Drawing.Point(-278, 138);
this.HostBTN.Location = new System.Drawing.Point(12, 121);
this.HostBTN.Name = "HostBTN";
this.HostBTN.Size = new System.Drawing.Size(276, 52);
this.HostBTN.Size = new System.Drawing.Size(137, 49);
this.HostBTN.TabIndex = 28;
this.HostBTN.Text = "Host a Game";
this.HostBTN.UseVisualStyleBackColor = true;
@ -253,11 +239,11 @@
this.JoinBTN.BackgroundImage = global::ARCHBLOXLauncherGUI.Properties.Resources.buttonblue;
this.JoinBTN.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.JoinBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.JoinBTN.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.JoinBTN.Font = new System.Drawing.Font("Segoe UI Semilight", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.JoinBTN.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.JoinBTN.Location = new System.Drawing.Point(-278, 196);
this.JoinBTN.Location = new System.Drawing.Point(155, 121);
this.JoinBTN.Name = "JoinBTN";
this.JoinBTN.Size = new System.Drawing.Size(276, 52);
this.JoinBTN.Size = new System.Drawing.Size(135, 49);
this.JoinBTN.TabIndex = 29;
this.JoinBTN.Text = "Join a Game";
this.JoinBTN.UseVisualStyleBackColor = true;
@ -268,88 +254,39 @@
this.UpdateBTN.BackgroundImage = global::ARCHBLOXLauncherGUI.Properties.Resources.buttonblue;
this.UpdateBTN.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.UpdateBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.UpdateBTN.Font = new System.Drawing.Font("Segoe UI", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.UpdateBTN.Font = new System.Drawing.Font("Segoe UI Semilight", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.UpdateBTN.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
this.UpdateBTN.Location = new System.Drawing.Point(-278, 82);
this.UpdateBTN.Location = new System.Drawing.Point(12, 66);
this.UpdateBTN.Name = "UpdateBTN";
this.UpdateBTN.Size = new System.Drawing.Size(276, 52);
this.UpdateBTN.Size = new System.Drawing.Size(276, 49);
this.UpdateBTN.TabIndex = 30;
this.UpdateBTN.Text = "Re-Install";
this.UpdateBTN.Text = "Install";
this.UpdateBTN.UseVisualStyleBackColor = true;
this.UpdateBTN.Click += new System.EventHandler(this.UpdateBTN_Click);
//
// AnimationHandler_SlideOutButtons
// BackBTN
//
this.AnimationHandler_SlideOutButtons.Interval = 1;
//
// AnimationHandler_SlideInButtons
//
this.AnimationHandler_SlideInButtons.Interval = 1;
//
// AnimationHandler_SlideInJoinBox
//
this.AnimationHandler_SlideInJoinBox.Interval = 1;
//
// BackBTN_Join
//
this.BackBTN_Join.BackgroundImage = global::ARCHBLOXLauncherGUI.Properties.Resources.buttonblue;
this.BackBTN_Join.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.BackBTN_Join.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.BackBTN_Join.Location = new System.Drawing.Point(258, -24);
this.BackBTN_Join.Name = "BackBTN_Join";
this.BackBTN_Join.Size = new System.Drawing.Size(42, 23);
this.BackBTN_Join.TabIndex = 31;
this.BackBTN_Join.Text = "Back";
this.BackBTN_Join.UseVisualStyleBackColor = true;
this.BackBTN_Join.Click += new System.EventHandler(this.BackBTN_Join_Click);
//
// AnimationHandler_SlideInBackBTNJoin
//
this.AnimationHandler_SlideInBackBTNJoin.Interval = 1;
//
// AnimationHandler_SlideOutBackBTNJoin
//
this.AnimationHandler_SlideOutBackBTNJoin.Interval = 1;
//
// BackBTN_Host
//
this.BackBTN_Host.BackgroundImage = global::ARCHBLOXLauncherGUI.Properties.Resources.buttonblue;
this.BackBTN_Host.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.BackBTN_Host.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.BackBTN_Host.Location = new System.Drawing.Point(258, -24);
this.BackBTN_Host.Name = "BackBTN_Host";
this.BackBTN_Host.Size = new System.Drawing.Size(42, 23);
this.BackBTN_Host.TabIndex = 32;
this.BackBTN_Host.Text = "Back";
this.BackBTN_Host.UseVisualStyleBackColor = true;
this.BackBTN_Host.Click += new System.EventHandler(this.BackBTN_Host_Click);
//
// AnimationHandler_SlideOutBackBTNHost
//
this.AnimationHandler_SlideOutBackBTNHost.Interval = 1;
//
// AnimationHandler_SlideInBackBTNHost
//
this.AnimationHandler_SlideInBackBTNHost.Interval = 1;
//
// AnimationHandler_SlideOutHostBox
//
this.AnimationHandler_SlideOutHostBox.Interval = 1;
//
// AnimationHandler_SlideInHostBox
//
this.AnimationHandler_SlideInHostBox.Interval = 1;
this.BackBTN.BackgroundImage = global::ARCHBLOXLauncherGUI.Properties.Resources.buttonblue;
this.BackBTN.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.BackBTN.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.BackBTN.Location = new System.Drawing.Point(254, 19);
this.BackBTN.Name = "BackBTN";
this.BackBTN.Size = new System.Drawing.Size(42, 21);
this.BackBTN.TabIndex = 31;
this.BackBTN.Text = "Back";
this.BackBTN.UseVisualStyleBackColor = true;
this.BackBTN.Visible = false;
this.BackBTN.Click += new System.EventHandler(this.BackBTN_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(49)))), ((int)(((byte)(107)))), ((int)(((byte)(223)))));
this.BackgroundImage = global::ARCHBLOXLauncherGUI.Properties.Resources.animated;
this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.ClientSize = new System.Drawing.Size(302, 259);
this.Controls.Add(this.BackBTN_Host);
this.Controls.Add(this.BackBTN_Join);
this.ClientSize = new System.Drawing.Size(302, 193);
this.Controls.Add(this.BackBTN);
this.Controls.Add(this.UpdateBTN);
this.Controls.Add(this.JoinBTN);
this.Controls.Add(this.HostBTN);
@ -363,8 +300,6 @@
this.MaximizeBox = false;
this.Name = "Form1";
this.Text = "ARCHBLOX Launcher";
this.HelpButtonClicked += new System.ComponentModel.CancelEventHandler(this.Form1_HelpButtonClicked);
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.JoinBox.ResumeLayout(false);
this.JoinBox.PerformLayout();
@ -377,7 +312,6 @@
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Timer AnimationHandler_SlideOutJoinBox;
private System.Windows.Forms.GroupBox JoinBox;
private System.Windows.Forms.TextBox serverip;
private System.Windows.Forms.Label label4;
@ -394,16 +328,6 @@
private System.Windows.Forms.Button HostBTN;
private System.Windows.Forms.Button JoinBTN;
private System.Windows.Forms.Button UpdateBTN;
private System.Windows.Forms.Timer AnimationHandler_SlideOutButtons;
private System.Windows.Forms.Timer AnimationHandler_SlideInButtons;
private System.Windows.Forms.Timer AnimationHandler_SlideInJoinBox;
private System.Windows.Forms.Button BackBTN_Join;
private System.Windows.Forms.Timer AnimationHandler_SlideInBackBTNJoin;
private System.Windows.Forms.Timer AnimationHandler_SlideOutBackBTNJoin;
private System.Windows.Forms.Button BackBTN_Host;
private System.Windows.Forms.Timer AnimationHandler_SlideOutBackBTNHost;
private System.Windows.Forms.Timer AnimationHandler_SlideInBackBTNHost;
private System.Windows.Forms.Timer AnimationHandler_SlideOutHostBox;
private System.Windows.Forms.Timer AnimationHandler_SlideInHostBox;
private System.Windows.Forms.Button BackBTN;
}
}

201
Form1.cs
View File

@ -25,7 +25,6 @@ namespace ARCHBLOXLauncherGUI
}
// variables
bool exitafterarg = false;
bool lockanims = true;
bool rbxl = false;
private DiscordRpcClient client;
bool ingame = false;
@ -38,120 +37,10 @@ namespace ARCHBLOXLauncherGUI
static string clientPath = Path.Combine(folderPath, version_string + @"\");
static string filePath = Path.Combine(clientPath, "ArchbloxPlayerBeta.exe");
// animations
void slideOutJoinBox(object sender, EventArgs e)
{
lockanims = true;
int x = JoinBox.Location.X;
JoinBox.Location = new Point(x + 10, JoinBox.Location.Y);
if (x > 358)
{
lockanims = false;
AnimationHandler_SlideOutJoinBox.Stop();
}
}
void slideInJoinBox(object sender, EventArgs e)
{
lockanims = true;
int x = JoinBox.Location.X;
JoinBox.Location = new Point(x - 10, JoinBox.Location.Y);
if (x < 30)
{
lockanims = false;
AnimationHandler_SlideInJoinBox.Stop();
}
}
void slideOutHostBox(object sender, EventArgs e)
{
lockanims = true;
int x = HostBox.Location.X;
HostBox.Location = new Point(x + 10, HostBox.Location.Y);
if (x > 358)
{
lockanims = false;
AnimationHandler_SlideOutHostBox.Stop();
}
}
void slideInHostBox(object sender, EventArgs e)
{
lockanims = true;
int x = HostBox.Location.X;
HostBox.Location = new Point(x - 10, HostBox.Location.Y);
if (x < 30)
{
lockanims = false;
AnimationHandler_SlideInHostBox.Stop();
}
}
void slideOutBackBTNJoin(object sender, EventArgs e)
{
int y = BackBTN_Join.Location.Y;
BackBTN_Join.Location = new Point(BackBTN_Join.Location.X, y - 8);
if (y < -25)
{
AnimationHandler_SlideOutBackBTNJoin.Stop();
}
}
void slideInBackBTNJoin(object sender, EventArgs e)
{
int y = BackBTN_Join.Location.Y;
BackBTN_Join.Location = new Point(BackBTN_Join.Location.X, y + 8);
if (y > 10)
{
AnimationHandler_SlideInBackBTNJoin.Stop();
}
}
void slideOutBackBTNHost(object sender, EventArgs e)
{
int y = BackBTN_Host.Location.Y;
BackBTN_Host.Location = new Point(BackBTN_Host.Location.X, y - 8);
if (y < -25)
{
AnimationHandler_SlideOutBackBTNHost.Stop();
}
}
void slideInBackBTNHost(object sender, EventArgs e)
{
int y = BackBTN_Host.Location.Y;
BackBTN_Host.Location = new Point(BackBTN_Host.Location.X, y + 8);
if (y > 10)
{
AnimationHandler_SlideInBackBTNHost.Stop();
}
}
void slideInButtons(object sender, EventArgs e)
{
lockanims = true;
UpdateBTN.Location = new Point(UpdateBTN.Location.X + 8, UpdateBTN.Location.Y);
JoinBTN.Location = new Point(UpdateBTN.Location.X, JoinBTN.Location.Y);
HostBTN.Location = new Point(UpdateBTN.Location.X, HostBTN.Location.Y);
if (UpdateBTN.Location.X > 10)
{
AnimationHandler_SlideInButtons.Stop();
lockanims = false;
}
}
void slideOutButtons(object sender, EventArgs e)
{
lockanims = true;
UpdateBTN.Location = new Point(UpdateBTN.Location.X - 8, UpdateBTN.Location.Y);
JoinBTN.Location = new Point(UpdateBTN.Location.X, JoinBTN.Location.Y);
HostBTN.Location = new Point(UpdateBTN.Location.X, HostBTN.Location.Y);
if (UpdateBTN.Location.X < -278)
{
lockanims = false;
AnimationHandler_SlideOutButtons.Stop();
}
}
public Form1()
{
InitializeComponent();
ARCHBLOXProtocol.ARCHBLOXURIProtocol.Register();
CreateShortcut();
var lastword = "";
var info1 = "";
@ -236,25 +125,6 @@ namespace ARCHBLOXLauncherGUI
Environment.Exit(0);
}
// setup animations
AnimationHandler_SlideOutHostBox.Tick += new EventHandler(slideOutHostBox);
AnimationHandler_SlideInHostBox.Tick += new EventHandler(slideInHostBox);
AnimationHandler_SlideOutJoinBox.Tick += new EventHandler(slideOutJoinBox);
AnimationHandler_SlideInJoinBox.Tick += new EventHandler(slideInJoinBox);
AnimationHandler_SlideOutBackBTNHost.Tick += new EventHandler(slideOutBackBTNHost);
AnimationHandler_SlideInBackBTNHost.Tick += new EventHandler(slideInBackBTNHost);
AnimationHandler_SlideOutBackBTNJoin.Tick += new EventHandler(slideOutBackBTNJoin);
AnimationHandler_SlideInBackBTNJoin.Tick += new EventHandler(slideInBackBTNJoin);
AnimationHandler_SlideOutButtons.Tick += new EventHandler(slideOutButtons);
AnimationHandler_SlideInButtons.Tick += new EventHandler(slideInButtons);
AnimationHandler_SlideInButtons.Start();
client = new DiscordRpcClient("996030605106090006");
client.Initialize();
client.SetPresence(new RichPresence()
@ -448,36 +318,14 @@ namespace ARCHBLOXLauncherGUI
textBox2.Text = Path.GetFileName(dialog.FileName);
}
}
private void label1_Click(object sender, EventArgs e)
{
}
private void label4_Click(object sender, EventArgs e)
{
}
private void Form1_HelpButtonClicked(Object sender, CancelEventArgs e)
{
// this no longer exists
ARCHBLOXLauncherGUI.Form2 form2 = new ARCHBLOXLauncherGUI.Form2();
form2.Show();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void JoinBTN_Click(object sender, EventArgs e)
{
if (lockanims == false)
{
AnimationHandler_SlideOutButtons.Start();
AnimationHandler_SlideInJoinBox.Start();
AnimationHandler_SlideInBackBTNJoin.Start();
}
JoinBTN.Visible = false;
HostBTN.Visible = false;
UpdateBTN.Visible = false;
JoinBox.Visible = true;
HostBox.Visible = false;
BackBTN.Visible = true;
}
private void UpdateBTN_Click(object sender, EventArgs e)
@ -486,33 +334,24 @@ namespace ARCHBLOXLauncherGUI
form2.Show();
}
private void BackBTN_Join_Click(object sender, EventArgs e)
private void BackBTN_Click(object sender, EventArgs e)
{
if (lockanims == false) {
AnimationHandler_SlideInButtons.Start();
AnimationHandler_SlideOutJoinBox.Start();
AnimationHandler_SlideOutBackBTNJoin.Start();
}
}
private void BackBTN_Host_Click(object sender, EventArgs e)
{
if (lockanims == false)
{
AnimationHandler_SlideInButtons.Start();
AnimationHandler_SlideOutHostBox.Start();
AnimationHandler_SlideOutBackBTNHost.Start();
}
JoinBTN.Visible = true;
HostBTN.Visible = true;
UpdateBTN.Visible = true;
JoinBox.Visible = false;
HostBox.Visible = false;
BackBTN.Visible = false;
}
private void HostBTN_Click(object sender, EventArgs e)
{
if (lockanims == false)
{
AnimationHandler_SlideOutButtons.Start();
AnimationHandler_SlideInHostBox.Start();
AnimationHandler_SlideInBackBTNHost.Start();
}
JoinBTN.Visible = false;
HostBTN.Visible = false;
UpdateBTN.Visible = false;
JoinBox.Visible = false;
HostBox.Visible = true;
BackBTN.Visible = true;
}
}
}

View File

@ -57,36 +57,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="AnimationHandler_SlideOutJoinBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>734, 10</value>
</metadata>
<metadata name="AnimationHandler_SlideOutButtons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>481, 43</value>
</metadata>
<metadata name="AnimationHandler_SlideInButtons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>485, 8</value>
</metadata>
<metadata name="AnimationHandler_SlideInJoinBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>733, 43</value>
</metadata>
<metadata name="AnimationHandler_SlideInBackBTNJoin.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>969, 13</value>
</metadata>
<metadata name="AnimationHandler_SlideOutBackBTNJoin.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>972, 45</value>
</metadata>
<metadata name="AnimationHandler_SlideOutBackBTNHost.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>7, 10</value>
</metadata>
<metadata name="AnimationHandler_SlideInBackBTNHost.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>8, 45</value>
</metadata>
<metadata name="AnimationHandler_SlideOutHostBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>254, 15</value>
</metadata>
<metadata name="AnimationHandler_SlideInHostBox.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>256, 45</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

1
Form2.Designer.cs generated
View File

@ -76,7 +76,6 @@
this.MinimizeBox = false;
this.Name = "Form2";
this.Text = "ARCHBLOX Installer";
this.Load += new System.EventHandler(this.Form2_Load);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();

View File

@ -28,13 +28,14 @@ namespace ARCHBLOXLauncherGUI
public Form2()
{
InitializeComponent();
// setup file paths etc
// setup other variables
byte[] raw = wc.DownloadData("https://archblox.com/client/version.txt");
string webData = Encoding.UTF8.GetString(raw);
string version_string = webData;
string folderPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Archblx\", @"Versions\");
string clientPath = Path.Combine(folderPath, version_string + @"\");
string filePath = Path.Combine(clientPath, Path.GetFileName(@"https://archblox.com/client/" + version_string + ".zip"));
// setup file paths etc
{
if (Directory.Exists(folderPath))
{
@ -42,7 +43,6 @@ namespace ARCHBLOXLauncherGUI
DialogResult res = MessageBox.Show("Do you want to delete previous installs of ARCHBLOX? Current size of ARCHBLOX folder: " + GetDirectorySize(folderPath) + "MB.", "ARCHBLOX", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if (res == DialogResult.Yes)
{
ARCHBLOXProtocol.ARCHBLOXURIProtocol.Unregister();
label1.Text = "Removing previous installs...";
Directory.Delete(folderPath, true);
@ -81,11 +81,6 @@ namespace ARCHBLOXLauncherGUI
handle.WaitOne();
}
}
private void Form2_Load(object sender, EventArgs e)
{
// nothing
}
private void Client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
{
if (IsCompleted == false)
@ -103,7 +98,6 @@ namespace ARCHBLOXLauncherGUI
label1.Text = "Installing URi...";
try
{
System.AppDomain.CurrentDomain.SetPrincipalPolicy(System.Security.Principal.PrincipalPolicy.WindowsPrincipal);
ARCHBLOXProtocol.ARCHBLOXURIProtocol.Register();
Uri_Installed = true;
}

View File

@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2022-07-15T12:07:23.9248742Z;True|2022-07-15T22:05:25.5663085+10:00;True|2022-07-13T16:54:56.8432517+10:00;False|2022-07-13T16:52:26.5433436+10:00;True|2022-07-13T16:47:01.0681916+10:00;True|2022-07-13T16:28:49.6060671+10:00;False|2022-07-13T16:28:36.6234772+10:00;True|2022-07-13T16:27:25.2155759+10:00;True|2022-07-13T16:20:04.4747082+10:00;True|2022-07-13T00:37:48.5001758+10:00;True|2022-07-13T00:37:23.7218937+10:00;True|2022-07-13T00:35:56.1276705+10:00;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>
<History>True|2022-07-26T05:16:38.5877346Z;True|2022-07-15T22:07:23.9248742+10:00;True|2022-07-15T22:05:25.5663085+10:00;True|2022-07-13T16:54:56.8432517+10:00;False|2022-07-13T16:52:26.5433436+10:00;True|2022-07-13T16:47:01.0681916+10:00;True|2022-07-13T16:28:49.6060671+10:00;False|2022-07-13T16:28:36.6234772+10:00;True|2022-07-13T16:27:25.2155759+10:00;True|2022-07-13T16:20:04.4747082+10:00;True|2022-07-13T00:37:48.5001758+10:00;True|2022-07-13T00:37:23.7218937+10:00;True|2022-07-13T00:35:56.1276705+10:00;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>

View File

@ -4,6 +4,6 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<History>True|2022-07-15T12:08:58.3308190Z;True|2022-07-15T22:07:37.1469826+10:00;True|2022-07-13T16:19:59.8973544+10:00;True|2022-07-13T00:38:04.2388491+10:00;True|2022-07-13T00:37:19.8958675+10:00;True|2022-07-13T00:36:07.1078472+10:00;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>
<History>True|2022-07-26T05:16:51.0859791Z;True|2022-07-15T22:08:58.3308190+10:00;True|2022-07-15T22:07:37.1469826+10:00;True|2022-07-13T16:19:59.8973544+10:00;True|2022-07-13T00:38:04.2388491+10:00;True|2022-07-13T00:37:19.8958675+10:00;True|2022-07-13T00:36:07.1078472+10:00;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>

View File

@ -2,6 +2,9 @@
using System.Windows.Forms;
using System.Security.Permissions;
using Microsoft.Win32;
using System.Text;
using System.Net;
using System.IO;
namespace ARCHBLOXProtocol
{
@ -11,83 +14,30 @@ namespace ARCHBLOXProtocol
};
internal static class ARCHBLOXURIProtocol
{
private const string _Protocol = "archblox";
private const string _ProtocolHandler = "url.archblox";
private static readonly string _launch = string.Format(
"{0}{1}{0} {0}%1{0}", (char)34, Application.ExecutablePath);
private static readonly Version _win8Version = new Version(6, 2, 9200, 0);
private static readonly bool _isWin8 =
Environment.OSVersion.Platform == PlatformID.Win32NT &&
Environment.OSVersion.Version >= _win8Version;
private static RegistryKey softwareClasses = Registry.CurrentUser.OpenSubKey("Software").OpenSubKey("Classes", true);
internal static void Register()
{
if (_isWin8) RegisterWin8();
else RegisterWin7();
}
// credit to p0s0 for helping me with this
if (softwareClasses.OpenSubKey("archblox") == null) {} else { softwareClasses.DeleteSubKeyTree("archblox"); }
RegistryKey key = softwareClasses.CreateSubKey("archblox", true);
key.SetValue("", "URL: archblox Protocol");
key.SetValue("URL Protocol", "");
private static void RegisterWin7()
{
var regKey = Registry.ClassesRoot.CreateSubKey(_Protocol);
RegistryKey key1 = key.CreateSubKey("DefaultIcon", true);
key1.SetValue("", ARCHBLOXLauncherGUI.Extensions.GetExecutablePath());
regKey.CreateSubKey("DefaultIcon")
.SetValue(null, string.Format("{0}{1},1{0}", (char)34,
Application.ExecutablePath));
RegistryKey key2 = key.CreateSubKey("shell", true);
RegistryKey key3 = key2.CreateSubKey("open", true);
regKey.SetValue(null, "URL:archblox Protocol");
regKey.SetValue("URL Protocol", "");
RegistryKey key4 = key3.CreateSubKey("command", true);
key4.SetValue("", "\"" + ARCHBLOXLauncherGUI.Extensions.GetExecutablePath() + "\" %1");
regKey = regKey.CreateSubKey(@"shell\open\command");
regKey.SetValue(null, _launch);
}
private static void RegisterWin8()
{
RegisterWin7();
var regKey = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Classes")
.CreateSubKey(_ProtocolHandler);
regKey.SetValue(null, _Protocol);
regKey.CreateSubKey("DefaultIcon")
.SetValue(null, string.Format("{0}{1},1{0}", (char)34,
Application.ExecutablePath));
regKey.CreateSubKey(@"shell\open\command").SetValue(null, _launch);
Registry.LocalMachine.CreateSubKey(string.Format(
@"SOFTWARE\{0}\{1}\Capabilities\ApplicationDescription\URLAssociations",
Application.CompanyName, Application.ProductName))
.SetValue(_Protocol, _ProtocolHandler);
Registry.LocalMachine.CreateSubKey(@"SOFTWARE\RegisteredApplications")
.SetValue(Application.ProductName, string.Format(
@"SOFTWARE\{0}\Capabilities", Application.ProductName));
}
internal static void Unregister()
{
PrincipalPermission principalPerm = new PrincipalPermission(null, "Administrators");
principalPerm.Demand();
if (!_isWin8)
{
Registry.ClassesRoot.DeleteSubKeyTree("archblox", false);
return;
}
// extra work required.
Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Classes")
.DeleteSubKeyTree(_ProtocolHandler, false);
Registry.LocalMachine.DeleteSubKeyTree(string.Format(@"SOFTWARE\{0}\{1}",
Application.CompanyName, Application.ProductName));
Registry.LocalMachine.CreateSubKey(@"SOFTWARE\RegisteredApplications")
.DeleteValue(Application.ProductName);
key.Close();
key1.Close();
key2.Close();
key3.Close();
key4.Close();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,16 +1,10 @@
{
"runtimeOptions": {
"tfm": "netcoreapp3.1",
"includedFrameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "3.1.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "3.1.0"
}
],
"framework": {
"name": "Microsoft.WindowsDesktop.App",
"version": "3.1.0"
},
"configProperties": {
"System.Reflection.Metadata.MetadataUpdater.IsSupported": false
}

View File

@ -1,5 +0,0 @@
SOS and other diagnostic tools now ship of band and work with any version of the .NET Core runtime.
SOS has moved to the diagnostics repo here: https://github.com/dotnet/diagnostics.git.
Instructions to install SOS: https://github.com/dotnet/diagnostics#installing-sos.

Some files were not shown because too many files have changed in this diff Show More