diff --git a/osu!petit Server Switcher.sln b/osu!petit Server Switcher.sln index 733ca57..294d070 100644 --- a/osu!petit Server Switcher.sln +++ b/osu!petit Server Switcher.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu!petit ServerSwitcher", "osu!petit Server Switcher\osu!petit ServerSwitcher.csproj", "{531FCBC2-A61A-48B3-A296-C7A39E7974AD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "osu!petit Server Switcher", "osu!petit Server Switcher\osu!petit Server Switcher.csproj", "{531FCBC2-A61A-48B3-A296-C7A39E7974AD}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -11,8 +11,8 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {531FCBC2-A61A-48B3-A296-C7A39E7974AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {531FCBC2-A61A-48B3-A296-C7A39E7974AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {531FCBC2-A61A-48B3-A296-C7A39E7974AD}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {531FCBC2-A61A-48B3-A296-C7A39E7974AD}.Debug|Any CPU.Build.0 = Release|Any CPU {531FCBC2-A61A-48B3-A296-C7A39E7974AD}.Release|Any CPU.ActiveCfg = Release|Any CPU {531FCBC2-A61A-48B3-A296-C7A39E7974AD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/osu!petit Server Switcher/ChangelogForm.Designer.cs b/osu!petit Server Switcher/ChangelogForm.Designer.cs deleted file mode 100644 index d0b755b..0000000 --- a/osu!petit Server Switcher/ChangelogForm.Designer.cs +++ /dev/null @@ -1,171 +0,0 @@ -namespace PetitServerSwitcher -{ - partial class ChangelogForm - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - Bloom bloom1 = new Bloom(); - Bloom bloom2 = new Bloom(); - Bloom bloom3 = new Bloom(); - Bloom bloom4 = new Bloom(); - Bloom bloom5 = new Bloom(); - Bloom bloom6 = new Bloom(); - Bloom bloom7 = new Bloom(); - Bloom bloom8 = new Bloom(); - Bloom bloom9 = new Bloom(); - Bloom bloom10 = new Bloom(); - Bloom bloom11 = new Bloom(); - Bloom bloom12 = new Bloom(); - Bloom bloom13 = new Bloom(); - Bloom bloom14 = new Bloom(); - Bloom bloom15 = new Bloom(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChangelogForm)); - this.genuineTheme1 = new GenuineTheme(); - this.genuineButton2 = new GenuineButton(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.genuineTheme1.SuspendLayout(); - this.SuspendLayout(); - // - // genuineTheme1 - // - this.genuineTheme1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); - this.genuineTheme1.BorderStyle = System.Windows.Forms.FormBorderStyle.None; - bloom1.Name = "Back"; - bloom1.Value = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); - bloom2.Name = "Gradient1"; - bloom2.Value = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25))))); - bloom3.Name = "Gradient2"; - bloom3.Value = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); - bloom4.Name = "Line1"; - bloom4.Value = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25))))); - bloom5.Name = "Line2"; - bloom5.Value = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(58)))), ((int)(((byte)(58))))); - bloom6.Name = "Text"; - bloom6.Value = System.Drawing.Color.White; - bloom7.Name = "Border1"; - bloom7.Value = System.Drawing.Color.FromArgb(((int)(((byte)(58)))), ((int)(((byte)(58)))), ((int)(((byte)(58))))); - bloom8.Name = "Border2"; - bloom8.Value = System.Drawing.Color.Black; - this.genuineTheme1.Colors = new Bloom[] { - bloom1, - bloom2, - bloom3, - bloom4, - bloom5, - bloom6, - bloom7, - bloom8}; - this.genuineTheme1.Controls.Add(this.genuineButton2); - this.genuineTheme1.Controls.Add(this.textBox1); - this.genuineTheme1.Customization = "KSkp/xkZGf8pKSn/GRkZ/zo6Ov//////Ojo6/wAAAP8="; - this.genuineTheme1.Dock = System.Windows.Forms.DockStyle.Fill; - this.genuineTheme1.Font = new System.Drawing.Font("Verdana", 8F); - this.genuineTheme1.Image = null; - this.genuineTheme1.Location = new System.Drawing.Point(0, 0); - this.genuineTheme1.Movable = true; - this.genuineTheme1.Name = "genuineTheme1"; - this.genuineTheme1.NoRounding = false; - this.genuineTheme1.Sizable = false; - this.genuineTheme1.Size = new System.Drawing.Size(332, 183); - this.genuineTheme1.SmartBounds = true; - this.genuineTheme1.TabIndex = 0; - this.genuineTheme1.Text = "Changelog"; - this.genuineTheme1.TransparencyKey = System.Drawing.Color.Fuchsia; - // - // genuineButton2 - // - bloom9.Name = "DownGradient1"; - bloom9.Value = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); - bloom10.Name = "DownGradient2"; - bloom10.Value = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - bloom11.Name = "NoneGradient1"; - bloom11.Value = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51))))); - bloom12.Name = "NoneGradient2"; - bloom12.Value = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); - bloom13.Name = "Text"; - bloom13.Value = System.Drawing.Color.White; - bloom14.Name = "Border1"; - bloom14.Value = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); - bloom15.Name = "Border2"; - bloom15.Value = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(25)))), ((int)(((byte)(25))))); - this.genuineButton2.Colors = new Bloom[] { - bloom9, - bloom10, - bloom11, - bloom12, - bloom13, - bloom14, - bloom15}; - this.genuineButton2.Customization = "KSkp/zMzM/8zMzP/KSkp//////////8MGRkZ/w=="; - this.genuineButton2.Font = new System.Drawing.Font("Verdana", 8F); - this.genuineButton2.Image = null; - this.genuineButton2.Location = new System.Drawing.Point(307, 3); - this.genuineButton2.Name = "genuineButton2"; - this.genuineButton2.NoRounding = false; - this.genuineButton2.Size = new System.Drawing.Size(22, 23); - this.genuineButton2.TabIndex = 2; - this.genuineButton2.Text = "x"; - this.genuineButton2.Transparent = false; - this.genuineButton2.Click += new System.EventHandler(this.genuineButton2_Click); - // - // textBox1 - // - this.textBox1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(41)))), ((int)(((byte)(41)))), ((int)(((byte)(41))))); - this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.textBox1.ForeColor = System.Drawing.Color.White; - this.textBox1.Location = new System.Drawing.Point(12, 39); - this.textBox1.Multiline = true; - this.textBox1.Name = "textBox1"; - this.textBox1.ReadOnly = true; - this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.textBox1.Size = new System.Drawing.Size(308, 132); - this.textBox1.TabIndex = 0; - this.textBox1.Text = resources.GetString("textBox1.Text"); - // - // ChangelogForm - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(332, 183); - this.Controls.Add(this.genuineTheme1); - this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; - this.Name = "ChangelogForm"; - this.Text = "ChangelogForm"; - this.TransparencyKey = System.Drawing.Color.Fuchsia; - this.genuineTheme1.ResumeLayout(false); - this.genuineTheme1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private GenuineTheme genuineTheme1; - private System.Windows.Forms.TextBox textBox1; - private GenuineButton genuineButton2; - } -} \ No newline at end of file diff --git a/osu!petit Server Switcher/ChangelogForm.cs b/osu!petit Server Switcher/ChangelogForm.cs deleted file mode 100644 index 6e8af6f..0000000 --- a/osu!petit Server Switcher/ChangelogForm.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace PetitServerSwitcher -{ - public partial class ChangelogForm : Form - { - public ChangelogForm() - { - InitializeComponent(); - } - - private void genuineButton2_Click(object sender, EventArgs e) - { - // Close changelog - this.Close(); - } - } -} diff --git a/osu!petit Server Switcher/ChangelogForm.resx b/osu!petit Server Switcher/ChangelogForm.resx deleted file mode 100644 index 9a78a30..0000000 --- a/osu!petit Server Switcher/ChangelogForm.resx +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - v1.4 -- Add redirection for i.ppy.sh - -v1.3 -- Add mirror IP -- Add local server check -- Add local/remote button (for Ripple developers) - -v.1.2 -- Add automatic IP update if server IP changes -- Add update IP button to get ripple's IP directly from the server - -v1.12 -- Add hosts file exist check -- Support for non default windirs - -v1.11 -- Update HTTPS certificate - -v1.10 -- Add HTTPS certificate installer - -v0.91 -- Changed some stuff in updater - -v0.90 -- First release - - \ No newline at end of file diff --git a/osu!petit Server Switcher/MainForm.Designer.cs b/osu!petit Server Switcher/MainForm.Designer.cs index c259c9b..d76550b 100644 --- a/osu!petit Server Switcher/MainForm.Designer.cs +++ b/osu!petit Server Switcher/MainForm.Designer.cs @@ -152,6 +152,7 @@ private void InitializeComponent() this.genuineTheme1.TabIndex = 0; this.genuineTheme1.Text = "osu!petit Server Switcher"; this.genuineTheme1.TransparencyKey = System.Drawing.Color.Fuchsia; + this.genuineTheme1.Click += new System.EventHandler(this.genuineTheme1_Click); // // localButton // @@ -258,7 +259,7 @@ private void InitializeComponent() this.label2.ForeColor = System.Drawing.Color.White; this.label2.Location = new System.Drawing.Point(113, 19); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(62, 13); + this.label2.Size = new System.Drawing.Size(93, 13); this.label2.TabIndex = 6; this.label2.Text = "petit!mirror IP:"; // @@ -269,7 +270,7 @@ private void InitializeComponent() this.label1.ForeColor = System.Drawing.Color.White; this.label1.Location = new System.Drawing.Point(2, 19); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(63, 13); + this.label1.Size = new System.Drawing.Size(77, 13); this.label1.TabIndex = 4; this.label1.Text = "osu!petit IP:"; // @@ -421,11 +422,11 @@ private void InitializeComponent() this.label4.ForeColor = System.Drawing.Color.Gold; this.label4.Location = new System.Drawing.Point(15, 18); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(199, 78); + this.label4.Size = new System.Drawing.Size(213, 78); this.label4.TabIndex = 2; - this.label4.Text = "You are playing on a local server!\r\nThat\'s only for osu!petit developers!\r\nYou won\'t" + - " be able to connect\r\nif you leave the switcher in the\r\ncurrent state. Please pre" + - "ss the\r\nLocal/Remote button."; + this.label4.Text = "You are playing on a local server!\r\nThat\'s only for osu!petit developers!\r\nYou wo" + + "n\'t be able to connect\r\nif you leave the switcher in the\r\ncurrent state. Please " + + "press the\r\nLocal/Remote button."; this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // MainForm diff --git a/osu!petit Server Switcher/MainForm.cs b/osu!petit Server Switcher/MainForm.cs index f57638f..b6ba35e 100644 --- a/osu!petit Server Switcher/MainForm.cs +++ b/osu!petit Server Switcher/MainForm.cs @@ -15,7 +15,7 @@ using System.Globalization; using System.Collections.Specialized; using System.Security.Cryptography.X509Certificates; -using rss.Properties; +using ss.Properties; using System.Resources; namespace PetitServerSwitcher @@ -28,7 +28,6 @@ public partial class MainForm : Form public bool testConnection = false; public int currentVersion = 1; // Increment this and update changelog before compiling a new update - public int latestChangelog = 0; public string settingsPath = System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\osu!petit Server Switcher"; public string hostsPath = Environment.GetEnvironmentVariable("windir") + "\\system32\\drivers\\etc\\hosts"; @@ -58,14 +57,13 @@ public MainForm() File.AppendAllText(settingsPath + "\\petit.txt", petitIP + Environment.NewLine); File.AppendAllText(settingsPath + "\\petit.txt", mirrorIP + Environment.NewLine); File.AppendAllText(settingsPath + "\\petit.txt", "true"); - File.AppendAllText(settingsPath + "\\petit.txt", Convert.ToString(currentVersion-1)+Environment.NewLine); } // Read petit.txt string[] petitTxt = File.ReadAllLines(settingsPath + "\\petit.txt"); - // If there are 4 lines, it's not corrupter or memes - if (petitTxt.Length == 4) + // If there are 3 lines, it's not corrupter or memes + if (petitTxt.Length == 3) { // Read IP petitIP = petitTxt[0]; @@ -76,26 +74,12 @@ public MainForm() Boolean.TryParse(petitTxt[2], out isBool); if (isBool) testConnection = Convert.ToBoolean(petitTxt[2]); - - // Read latest changelog - latestChangelog = Convert.ToInt32(petitTxt[3]); } else { // Something went wrong, use default settings } - // Check if we have to show a changelog - if (latestChangelog < currentVersion) - { - // Show new changelog - ChangelogForm cf = new ChangelogForm(); - cf.ShowDialog(); - - // Update latest changelog - latestChangelog = currentVersion; - } - // Update settings updateSettings(); @@ -125,7 +109,6 @@ public void saveSettings() File.WriteAllText(settingsPath + "\\petit.txt", petitIP + Environment.NewLine); File.AppendAllText(settingsPath + "\\petit.txt", mirrorIP + Environment.NewLine); File.AppendAllText(settingsPath + "\\petit.txt", Convert.ToString(testConnection) + Environment.NewLine); - File.AppendAllText(settingsPath + "\\petit.txt", Convert.ToString(latestChangelog)); } public bool findServer() @@ -568,5 +551,10 @@ private void localButton_Click(object sender, EventArgs e) petit = true; } + + private void genuineTheme1_Click(object sender, EventArgs e) + { + + } } } diff --git a/osu!petit Server Switcher/Properties/AssemblyInfo.cs b/osu!petit Server Switcher/Properties/AssemblyInfo.cs index d0abc09..863cf14 100644 --- a/osu!petit Server Switcher/Properties/AssemblyInfo.cs +++ b/osu!petit Server Switcher/Properties/AssemblyInfo.cs @@ -1,15 +1,16 @@ -using System.Reflection; +using System.Resources; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // Le informazioni generali relative a un assembly sono controllate dal seguente // set di attributi. Modificare i valori di questi attributi per modificare le informazioni // associate a un assembly. -[assembly: AssemblyTitle("rss")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyTitle("osu!petit Server Switcher")] +[assembly: AssemblyDescription("Switch osu! Server between Bancho and osu!petit.")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("rss")] +[assembly: AssemblyCompany("osu!petit")] +[assembly: AssemblyProduct("osu!petit Server Switcher")] [assembly: AssemblyCopyright("")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -34,3 +35,5 @@ // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: NeutralResourcesLanguage("en")] + diff --git a/osu!petit Server Switcher/Properties/Resources.Designer.cs b/osu!petit Server Switcher/Properties/Resources.Designer.cs index 8b282e5..d794232 100644 --- a/osu!petit Server Switcher/Properties/Resources.Designer.cs +++ b/osu!petit Server Switcher/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace rss.Properties { +namespace ss.Properties { using System; @@ -39,7 +39,7 @@ internal Resources() { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("rss.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ss.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/osu!petit Server Switcher/Properties/Settings.Designer.cs b/osu!petit Server Switcher/Properties/Settings.Designer.cs index 67dba89..12b5d27 100644 --- a/osu!petit Server Switcher/Properties/Settings.Designer.cs +++ b/osu!petit Server Switcher/Properties/Settings.Designer.cs @@ -1,14 +1,14 @@ //------------------------------------------------------------------------------ // -// Il codice è stato generato da uno strumento. -// Versione runtime:4.0.30319.42000 +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 // -// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se -// il codice viene rigenerato. +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. // //------------------------------------------------------------------------------ -namespace rss.Properties { +namespace ss.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] diff --git a/osu!petit Server Switcher/app.manifest b/osu!petit Server Switcher/app.manifest index 8297ad4..3d4d1a5 100644 --- a/osu!petit Server Switcher/app.manifest +++ b/osu!petit Server Switcher/app.manifest @@ -19,8 +19,8 @@ - + diff --git a/osu!petit Server Switcher/osu!petit ServerSwitcher.csproj b/osu!petit Server Switcher/osu!petit Server Switcher.csproj similarity index 87% rename from osu!petit Server Switcher/osu!petit ServerSwitcher.csproj rename to osu!petit Server Switcher/osu!petit Server Switcher.csproj index ad0ea7c..f452adb 100644 --- a/osu!petit Server Switcher/osu!petit ServerSwitcher.csproj +++ b/osu!petit Server Switcher/osu!petit Server Switcher.csproj @@ -7,8 +7,8 @@ {531FCBC2-A61A-48B3-A296-C7A39E7974AD} WinExe Properties - rss - rss + ss + osu!petit Server Switcher v4.0 512 true @@ -24,6 +24,7 @@ false false true + true 0 0.0.0.0 false @@ -47,22 +48,23 @@ bin\Release\ TRACE prompt - 4 + 1 ripple-server-switcher-icon.ico - 0B0D1F47C13C90A4DF83D67D9CBD708DDFD78408 + F75548109069E95E4EFDB0F6595A819302F4857E - RippleServerSwitcher_ChiaveTemporanea.pfx + + false - false + true app.manifest @@ -84,12 +86,6 @@ - - Form - - - ChangelogForm.cs - Form @@ -109,9 +105,6 @@ Component - - ChangelogForm.cs - MainForm.cs @@ -132,7 +125,6 @@ - @@ -143,7 +135,7 @@ False - Microsoft .NET Framework 4.5.2 %28x86 e x64%29 + Microsoft .NET Framework 4.5.2 %28x86 and x64%29 true