From f5108d8698529b8a4b53c92418c641341d2fbdcd Mon Sep 17 00:00:00 2001 From: Quacky Date: Tue, 15 Aug 2017 16:11:00 -0500 Subject: [PATCH] seperate URI stuff and even more ui tweaks.. --- .../RBXLegacyLauncher/MainForm.Designer.cs | 62 +++++++------------ .../RBXLegacyLauncher/MainForm.cs | 16 ----- .../RBXLegacyLauncher/SecurityFuncs.cs | 10 --- RBXLegacyURI/RBXLegacyURI.sln | 18 ++++++ RBXLegacyURI/RBXLegacyURI/Program.cs | 38 ++++++++++++ .../RBXLegacyURI/Properties/AssemblyInfo.cs | 18 ++++++ RBXLegacyURI/RBXLegacyURI/RBXLegacyURI.csproj | 52 ++++++++++++++++ 7 files changed, 150 insertions(+), 64 deletions(-) create mode 100644 RBXLegacyURI/RBXLegacyURI.sln create mode 100644 RBXLegacyURI/RBXLegacyURI/Program.cs create mode 100644 RBXLegacyURI/RBXLegacyURI/Properties/AssemblyInfo.cs create mode 100644 RBXLegacyURI/RBXLegacyURI/RBXLegacyURI.csproj diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs index 3a25b4d..308b56d 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.Designer.cs @@ -71,6 +71,7 @@ this.tabPage8 = new System.Windows.Forms.TabPage(); this.richTextBox2 = new System.Windows.Forms.RichTextBox(); this.tabPage4 = new System.Windows.Forms.TabPage(); + this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.label2 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); @@ -79,7 +80,6 @@ this.label7 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); - this.button21 = new System.Windows.Forms.Button(); this.button9 = new System.Windows.Forms.Button(); this.button8 = new System.Windows.Forms.Button(); this.checkBox3 = new System.Windows.Forms.CheckBox(); @@ -98,7 +98,6 @@ this.label27 = new System.Windows.Forms.Label(); this.label28 = new System.Windows.Forms.Label(); this.textBox5 = new System.Windows.Forms.TextBox(); - this.pictureBox2 = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); @@ -734,6 +733,18 @@ this.tabPage4.ToolTipText = "About RBXLegacy"; this.tabPage4.UseVisualStyleBackColor = true; // + // pictureBox2 + // + this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image"))); + this.pictureBox2.Location = new System.Drawing.Point(7, 246); + this.pictureBox2.Name = "pictureBox2"; + this.pictureBox2.Size = new System.Drawing.Size(89, 21); + this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox2.TabIndex = 8; + this.pictureBox2.TabStop = false; + // // label2 // this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -807,23 +818,12 @@ this.label5.Text = "label5"; this.label5.TextAlign = System.Drawing.ContentAlignment.TopCenter; // - // button21 - // - this.button21.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F); - this.button21.Location = new System.Drawing.Point(338, 89); - this.button21.Name = "button21"; - this.button21.Size = new System.Drawing.Size(87, 20); - this.button21.TabIndex = 44; - this.button21.Text = "Install URI"; - this.button21.UseVisualStyleBackColor = true; - this.button21.Click += new System.EventHandler(this.Button21Click); - // // button9 // - this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F); - this.button9.Location = new System.Drawing.Point(248, 111); + this.button9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.button9.Location = new System.Drawing.Point(339, 107); this.button9.Name = "button9"; - this.button9.Size = new System.Drawing.Size(85, 20); + this.button9.Size = new System.Drawing.Size(85, 23); this.button9.TabIndex = 37; this.button9.Text = "Reset Config"; this.button9.UseVisualStyleBackColor = true; @@ -842,7 +842,7 @@ // // checkBox3 // - this.checkBox3.Location = new System.Drawing.Point(248, 68); + this.checkBox3.Location = new System.Drawing.Point(248, 65); this.checkBox3.Name = "checkBox3"; this.checkBox3.Size = new System.Drawing.Size(177, 18); this.checkBox3.TabIndex = 22; @@ -866,12 +866,12 @@ // button3 // this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button3.Location = new System.Drawing.Point(248, 89); + this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button3.Location = new System.Drawing.Point(247, 84); this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(87, 20); + this.button3.Size = new System.Drawing.Size(177, 21); this.button3.TabIndex = 6; - this.button3.Text = "Open Studio"; + this.button3.Text = "Launch ROBLOX Studio"; this.button3.UseVisualStyleBackColor = true; this.button3.Click += new System.EventHandler(this.Button3Click); // @@ -895,10 +895,10 @@ // // button5 // - this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.button5.Location = new System.Drawing.Point(338, 111); + this.button5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button5.Location = new System.Drawing.Point(247, 107); this.button5.Name = "button5"; - this.button5.Size = new System.Drawing.Size(87, 20); + this.button5.Size = new System.Drawing.Size(87, 23); this.button5.TabIndex = 10; this.button5.Text = "Save Config"; this.button5.UseVisualStyleBackColor = true; @@ -991,18 +991,6 @@ this.textBox5.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.textBox5.TextChanged += new System.EventHandler(this.TextBox5TextChanged); // - // pictureBox2 - // - this.pictureBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image"))); - this.pictureBox2.Location = new System.Drawing.Point(7, 246); - this.pictureBox2.Name = "pictureBox2"; - this.pictureBox2.Size = new System.Drawing.Size(89, 21); - this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBox2.TabIndex = 8; - this.pictureBox2.TabStop = false; - // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1010,7 +998,6 @@ this.BackColor = System.Drawing.SystemColors.ControlLightLight; this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.ClientSize = new System.Drawing.Size(427, 459); - this.Controls.Add(this.button21); this.Controls.Add(this.textBox5); this.Controls.Add(this.label28); this.Controls.Add(this.label27); @@ -1059,7 +1046,6 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.TextBox textBox7; private System.Windows.Forms.Label label45; - private System.Windows.Forms.Button button21; private System.Windows.Forms.Label label41; private System.Windows.Forms.Label label40; private System.Windows.Forms.Label label42; diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs index 732b356..3344547 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/MainForm.cs @@ -1028,21 +1028,5 @@ namespace RBXLegacyLauncher base.OnFormClosing(e); WriteConfigValues(); } - - void Button21Click(object sender, EventArgs e) - { - try - { - string loadstring = Environment.CurrentDirectory + Path.DirectorySeparatorChar + System.AppDomain.CurrentDomain.FriendlyName; - SecurityFuncs.RegisterURLProtocol("RBXLegacy", loadstring, "RBXLegacy URI"); - ConsolePrint("URI Successfully Installed!", 3); - DialogResult result1 = MessageBox.Show("URI Successfully Installed!","RBXLegacy Launcher - Install URI", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - catch (Exception ex) - { - ConsolePrint("ERROR 5 - Failed to install URI. (" + ex.Message + ")", 2); - DialogResult result2 = MessageBox.Show("Failed to install URI. (Error: " + ex.Message + ")","RBXLegacy Launcher - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } } } diff --git a/RBXLegacyLauncher/RBXLegacyLauncher/SecurityFuncs.cs b/RBXLegacyLauncher/RBXLegacyLauncher/SecurityFuncs.cs index 0e2fd71..80db7a5 100644 --- a/RBXLegacyLauncher/RBXLegacyLauncher/SecurityFuncs.cs +++ b/RBXLegacyLauncher/RBXLegacyLauncher/SecurityFuncs.cs @@ -34,16 +34,6 @@ namespace RBXLegacyLauncher return (s.Length % 4 == 0) && Regex.IsMatch(s, @"^[a-zA-Z0-9\+/]*={0,3}$", RegexOptions.None); } - public static void RegisterURLProtocol(string protocolName, string applicationPath, string description) - { - RegistryKey subKey = Registry.ClassesRoot.CreateSubKey(protocolName); - subKey.SetValue((string) null, (object) description); - subKey.SetValue("URL Protocol", (object) string.Empty); - Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell"); - Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell\\open"); - Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell\\open\\command").SetValue((string) null, (object) ("\"" + applicationPath + "\" \"%1\"")); - } - public static bool checkClientMD5(string client) { string rbxexe = ""; diff --git a/RBXLegacyURI/RBXLegacyURI.sln b/RBXLegacyURI/RBXLegacyURI.sln new file mode 100644 index 0000000..e9046be --- /dev/null +++ b/RBXLegacyURI/RBXLegacyURI.sln @@ -0,0 +1,18 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +# SharpDevelop 4.4 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RBXLegacyURI", "RBXLegacyURI\RBXLegacyURI.csproj", "{4E7FD061-7980-4921-BFA3-237009EE80D3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4E7FD061-7980-4921-BFA3-237009EE80D3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E7FD061-7980-4921-BFA3-237009EE80D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E7FD061-7980-4921-BFA3-237009EE80D3}.Release|Any CPU.Build.0 = Release|Any CPU + {4E7FD061-7980-4921-BFA3-237009EE80D3}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/RBXLegacyURI/RBXLegacyURI/Program.cs b/RBXLegacyURI/RBXLegacyURI/Program.cs new file mode 100644 index 0000000..2278475 --- /dev/null +++ b/RBXLegacyURI/RBXLegacyURI/Program.cs @@ -0,0 +1,38 @@ +using Microsoft.Win32; +using System; + +namespace RBXLegacyURI +{ + internal class Program + { + private static void registerURI(string protocolName, string applicationPath, string description) + { + RegistryKey registryKey = Registry.ClassesRoot.CreateSubKey(protocolName); + registryKey.SetValue(null, description); + registryKey.SetValue("URL Protocol", string.Empty); + Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell"); + Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell\\open"); + registryKey = Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell\\open\\command"); + registryKey.SetValue(null, "\"" + applicationPath + "\" \"%1\""); + } + + private static void Main(string[] args) + { + Console.Title = "RBXLegacy"; + try { + Program.registerURI("RBXLegacy", AppDomain.CurrentDomain.BaseDirectory + "RBXLegacyLauncher.exe", ""); + Program.registerURI("rbxlegacy", AppDomain.CurrentDomain.BaseDirectory + "RBXLegacyLauncher.exe", ""); // chromium + Console.WriteLine("RBXLegacy has been installed on your computer successfully! You can now join RBXLegacy servers with URI."); + Console.WriteLine("Press any key to continue . . ."); + Console.ReadKey(); + } catch (Exception) { + Console.Title = "RBXLegacy - ERROR"; + Console.WriteLine("RBXLegacy failed to install the RBXLegacy URL protocol."); + Console.WriteLine("Make sure you're running this application as an administrator, and that RBXLegacyLauncher.exe is in the RBXLegacy folder."); + Console.WriteLine("Press any key to continue . . ."); + Console.ReadKey(); + Console.WriteLine("z0mgh4x0r l0gs"); // how can they see this still??? 1337 h4x0r + } + } + } +} diff --git a/RBXLegacyURI/RBXLegacyURI/Properties/AssemblyInfo.cs b/RBXLegacyURI/RBXLegacyURI/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a3c9f59 --- /dev/null +++ b/RBXLegacyURI/RBXLegacyURI/Properties/AssemblyInfo.cs @@ -0,0 +1,18 @@ +#region Using directives + +using System; +using System.Reflection; +using System.Runtime.InteropServices; + +#endregion + +[assembly: AssemblyTitle("RBXLegacyURI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("RBXLegacyURI")] +[assembly: AssemblyCopyright("Copyright 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: ComVisible(false)] +[assembly: AssemblyVersion("1.0.*")] diff --git a/RBXLegacyURI/RBXLegacyURI/RBXLegacyURI.csproj b/RBXLegacyURI/RBXLegacyURI/RBXLegacyURI.csproj new file mode 100644 index 0000000..93381f3 --- /dev/null +++ b/RBXLegacyURI/RBXLegacyURI/RBXLegacyURI.csproj @@ -0,0 +1,52 @@ + + + + {4E7FD061-7980-4921-BFA3-237009EE80D3} + Debug + AnyCPU + Exe + RBXLegacyURI + RBXLegacyURI + v4.0 + Client + Properties + + + x86 + + + bin\Debug\ + True + Full + False + True + DEBUG;TRACE + + + bin\Release\ + False + None + True + False + TRACE + + + + + 3.5 + + + + 3.5 + + + + 3.5 + + + + + + + + \ No newline at end of file