diff --git a/ShiftOS.WinForms/Applications/ColorPicker.cs b/ShiftOS.WinForms/Applications/ColorPicker.cs index e3b19ad..b3a7b1c 100644 --- a/ShiftOS.WinForms/Applications/ColorPicker.cs +++ b/ShiftOS.WinForms/Applications/ColorPicker.cs @@ -37,6 +37,7 @@ using API = ShiftOS.WinForms.Tools.ColorPickerDataBackend; namespace ShiftOS.WinForms.Applications { + [DefaultTitle("Choose color")] public partial class ColorPicker : UserControl, IShiftOSWindow { public ColorPicker(Color oldcol, string ctc, Action callback) diff --git a/ShiftOS.WinForms/Applications/Dialog.cs b/ShiftOS.WinForms/Applications/Dialog.cs index 4d13e23..8b03be1 100644 --- a/ShiftOS.WinForms/Applications/Dialog.cs +++ b/ShiftOS.WinForms/Applications/Dialog.cs @@ -35,6 +35,7 @@ using ShiftOS.Engine; namespace ShiftOS.WinForms.Applications { + [DefaultTitle("Information")] public partial class Dialog : UserControl, IShiftOSWindow, IInfobox { public Dialog() diff --git a/ShiftOS.WinForms/Applications/FileDialog.cs b/ShiftOS.WinForms/Applications/FileDialog.cs index 4f17f6e..1b596b7 100644 --- a/ShiftOS.WinForms/Applications/FileDialog.cs +++ b/ShiftOS.WinForms/Applications/FileDialog.cs @@ -41,6 +41,7 @@ namespace ShiftOS.WinForms.Applications /// /// /// + [DefaultTitle("Choose file")] public partial class FileDialog : UserControl, IShiftOSWindow { public FileDialog(string[] filetypes, FileOpenerStyle style, Action _callback) diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.cs b/ShiftOS.WinForms/Applications/FileSkimmer.cs index db86bbe..6e0adfe 100644 --- a/ShiftOS.WinForms/Applications/FileSkimmer.cs +++ b/ShiftOS.WinForms/Applications/FileSkimmer.cs @@ -42,6 +42,7 @@ namespace ShiftOS.WinForms.Applications [Launcher("File Skimmer", true, "al_file_skimmer", "Utilities")] [RequiresUpgrade("file_skimmer")] [WinOpen("file_skimmer")] + [DefaultTitle("File Skimmer")] public partial class FileSkimmer : UserControl, IShiftOSWindow { public FileSkimmer() diff --git a/ShiftOS.WinForms/Applications/GraphicPicker.cs b/ShiftOS.WinForms/Applications/GraphicPicker.cs index c808440..3799546 100644 --- a/ShiftOS.WinForms/Applications/GraphicPicker.cs +++ b/ShiftOS.WinForms/Applications/GraphicPicker.cs @@ -37,6 +37,7 @@ using ShiftOS.WinForms.Tools; namespace ShiftOS.WinForms.Applications { + [DefaultTitle("Choose graphic")] public partial class GraphicPicker : UserControl, IShiftOSWindow { public GraphicPicker(Image old, string name, ImageLayout layout, Action cb) diff --git a/ShiftOS.WinForms/Applications/MUDAuthenticator.Designer.cs b/ShiftOS.WinForms/Applications/MUDAuthenticator.Designer.cs deleted file mode 100644 index 154cfe4..0000000 --- a/ShiftOS.WinForms/Applications/MUDAuthenticator.Designer.cs +++ /dev/null @@ -1,237 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -namespace ShiftOS.WinForms.Applications -{ - partial class MUDAuthenticator - { - /// - /// 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() - { - this.panel1 = new System.Windows.Forms.Panel(); - this.pnlmain = new System.Windows.Forms.Panel(); - this.pnlusers = new System.Windows.Forms.GroupBox(); - this.lbusers = new System.Windows.Forms.ListBox(); - this.fluserbuttons = new System.Windows.Forms.FlowLayoutPanel(); - this.btnview = new System.Windows.Forms.Button(); - this.btnrefreshusers = new System.Windows.Forms.Button(); - this.pnllogin = new System.Windows.Forms.GroupBox(); - this.txtpassword = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.btnlogin = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.panel1.SuspendLayout(); - this.pnlmain.SuspendLayout(); - this.pnlusers.SuspendLayout(); - this.fluserbuttons.SuspendLayout(); - this.pnllogin.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Controls.Add(this.pnlmain); - this.panel1.Controls.Add(this.pnllogin); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(622, 430); - this.panel1.TabIndex = 0; - // - // pnlmain - // - this.pnlmain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlmain.Controls.Add(this.pnlusers); - this.pnlmain.Location = new System.Drawing.Point(13, 13); - this.pnlmain.Name = "pnlmain"; - this.pnlmain.Size = new System.Drawing.Size(597, 405); - this.pnlmain.TabIndex = 1; - this.pnlmain.Visible = false; - // - // pnlusers - // - this.pnlusers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnlusers.Controls.Add(this.lbusers); - this.pnlusers.Controls.Add(this.fluserbuttons); - this.pnlusers.Location = new System.Drawing.Point(16, 27); - this.pnlusers.Name = "pnlusers"; - this.pnlusers.Size = new System.Drawing.Size(265, 356); - this.pnlusers.TabIndex = 0; - this.pnlusers.TabStop = false; - this.pnlusers.Text = "groupBox1"; - // - // lbusers - // - this.lbusers.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbusers.FormattingEnabled = true; - this.lbusers.Location = new System.Drawing.Point(3, 16); - this.lbusers.Name = "lbusers"; - this.lbusers.Size = new System.Drawing.Size(259, 308); - this.lbusers.TabIndex = 0; - // - // fluserbuttons - // - this.fluserbuttons.AutoSize = true; - this.fluserbuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.fluserbuttons.Controls.Add(this.btnview); - this.fluserbuttons.Controls.Add(this.btnrefreshusers); - this.fluserbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; - this.fluserbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.fluserbuttons.Location = new System.Drawing.Point(3, 324); - this.fluserbuttons.Name = "fluserbuttons"; - this.fluserbuttons.Size = new System.Drawing.Size(259, 29); - this.fluserbuttons.TabIndex = 1; - // - // btnview - // - this.btnview.AutoSize = true; - this.btnview.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnview.Location = new System.Drawing.Point(173, 3); - this.btnview.Name = "btnview"; - this.btnview.Size = new System.Drawing.Size(83, 23); - this.btnview.TabIndex = 0; - this.btnview.Text = "View user info"; - this.btnview.UseVisualStyleBackColor = true; - // - // btnrefreshusers - // - this.btnrefreshusers.AutoSize = true; - this.btnrefreshusers.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnrefreshusers.Location = new System.Drawing.Point(113, 3); - this.btnrefreshusers.Name = "btnrefreshusers"; - this.btnrefreshusers.Size = new System.Drawing.Size(54, 23); - this.btnrefreshusers.TabIndex = 1; - this.btnrefreshusers.Text = "Refresh"; - this.btnrefreshusers.UseVisualStyleBackColor = true; - // - // pnllogin - // - this.pnllogin.Controls.Add(this.txtpassword); - this.pnllogin.Controls.Add(this.label2); - this.pnllogin.Controls.Add(this.btnlogin); - this.pnllogin.Controls.Add(this.label1); - this.pnllogin.Location = new System.Drawing.Point(177, 180); - this.pnllogin.Name = "pnllogin"; - this.pnllogin.Size = new System.Drawing.Size(419, 251); - this.pnllogin.TabIndex = 0; - this.pnllogin.TabStop = false; - this.pnllogin.Text = "Log in"; - // - // txtpassword - // - this.txtpassword.Location = new System.Drawing.Point(13, 137); - this.txtpassword.Name = "txtpassword"; - this.txtpassword.Size = new System.Drawing.Size(387, 20); - this.txtpassword.TabIndex = 3; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(10, 100); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(81, 13); - this.label2.TabIndex = 2; - this.label2.Text = "{PASSWORD}:"; - // - // btnlogin - // - this.btnlogin.Location = new System.Drawing.Point(325, 209); - this.btnlogin.Name = "btnlogin"; - this.btnlogin.Size = new System.Drawing.Size(75, 23); - this.btnlogin.TabIndex = 1; - this.btnlogin.Text = "Submit"; - this.btnlogin.UseVisualStyleBackColor = true; - this.btnlogin.Click += new System.EventHandler(this.btnlogin_Click); - // - // label1 - // - this.label1.Location = new System.Drawing.Point(7, 20); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(393, 64); - this.label1.TabIndex = 0; - this.label1.Text = "{LOGIN_EXP}"; - // - // MUDAuthenticator - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.ClientSize = new System.Drawing.Size(622, 430); - this.Controls.Add(this.panel1); - this.Name = "MUDAuthenticator"; - this.Text = "{MUD_AUTHENTICATOR_NAME}"; - this.panel1.ResumeLayout(false); - this.pnlmain.ResumeLayout(false); - this.pnlusers.ResumeLayout(false); - this.pnlusers.PerformLayout(); - this.fluserbuttons.ResumeLayout(false); - this.fluserbuttons.PerformLayout(); - this.pnllogin.ResumeLayout(false); - this.pnllogin.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.GroupBox pnllogin; - private System.Windows.Forms.TextBox txtpassword; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Button btnlogin; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Panel pnlmain; - private System.Windows.Forms.GroupBox pnlusers; - private System.Windows.Forms.ListBox lbusers; - private System.Windows.Forms.FlowLayoutPanel fluserbuttons; - private System.Windows.Forms.Button btnview; - private System.Windows.Forms.Button btnrefreshusers; - } -} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/MUDAuthenticator.cs b/ShiftOS.WinForms/Applications/MUDAuthenticator.cs deleted file mode 100644 index 32731ed..0000000 --- a/ShiftOS.WinForms/Applications/MUDAuthenticator.cs +++ /dev/null @@ -1,174 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -using ShiftOS.Objects; -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; -using ShiftOS.Engine; - -namespace ShiftOS.WinForms.Applications -{ - [MultiplayerOnly] - [Launcher("MUD Administrator", true, "al_mud_cracker", "Administration")] - [RequiresUpgrade("mud_cracker")] - [WinOpen("mud_administrator")] - public partial class MUDAuthenticator : UserControl, IShiftOSWindow - { - public MUDAuthenticator() - { - try - { - InitializeComponent(); - ServerManager.ServerAccessGranted += () => - { - this.Invoke(new Action(() => { Granted(); })); - }; - ServerManager.ServerAccessDenied += () => - { - this.Invoke(new Action(() => { Denied(); })); - }; - ServerManager.GUIDReceived += (guid) => - { - this.guid = guid; - }; - ServerManager.UsersReceived += (users) => - { - foreach(var user in users) - { - if (!this.users.ContainsKey(user.Username)) - { - this.users.Add(user.Username, user); - } - else - { - this.users[user.Username].OnlineChat += ";" + user.OnlineChat; - } - } - this.Invoke(new Action(() => - { - SetupUserList(); - })); - }; - } - catch - { - - } - - pnllogin.Left = (pnllogin.Parent.Width - pnllogin.Width) / 2; - pnllogin.Top = (pnllogin.Parent.Height - pnllogin.Height) / 2; - - pnllogin.Parent.SizeChanged += (o, a) => - { - pnllogin.Left = (pnllogin.Parent.Width - pnllogin.Width) / 2; - pnllogin.Top = (pnllogin.Parent.Height - pnllogin.Height) / 2; - }; - - pnlmain.Left = (pnlmain.Parent.Width - pnlmain.Width) / 2; - pnlmain.Top = (pnlmain.Parent.Height - pnlmain.Height) / 2; - - - - } - - public void Granted() - { - Infobox.Show("{ACCESS_GRANTED}", "{ACCESS_GRANTED_MUDADMIN_EXP}"); - //This will tell the server to take the granted password off the list of granted passwords - //so the user must generate and crack a new one. - ServerManager.SendMessage("mudhack_killpass", ""); - - SetupAuthUI(); - } - - public void SetupAuthUI() - { - pnllogin.Hide(); - - pnlmain.Show(); - - PopulateUserList(); - } - - Dictionary users = new Dictionary(); - - public void PopulateUserList() - { - users = null; - ServerManager.SendMessage("mudhack_getallusers", ""); - } - - private string guid = null; - - public void SetupUserList() - { - lbusers.Items.Clear(); - foreach(var kv in users) - { - guid = null; - ServerManager.SendMessage("getguid_send", kv.Key); - while(guid == null) - { - - } - users[kv.Key].Guid = guid; - lbusers.Items.Add(kv.Key); - } - } - - public void Denied() - { - Infobox.Show("{ACCESS_DENIED}", "{ACCESS_DENIED_MUDADMIN_EXP}"); - } - - private void btnlogin_Click(object sender, EventArgs e) - { - ServerManager.SendMessage("mudhack_verify", "{pass: \"" + txtpassword.Text + "\"}"); - } - - public void OnLoad() - { - } - - public void OnSkinLoad() - { - } - - public bool OnUnload() - { - return true; - } - - public void OnUpgrade() - { - } - } -} diff --git a/ShiftOS.WinForms/Applications/MUDAuthenticator.resx b/ShiftOS.WinForms/Applications/MUDAuthenticator.resx deleted file mode 100644 index 1af7de1..0000000 --- a/ShiftOS.WinForms/Applications/MUDAuthenticator.resx +++ /dev/null @@ -1,120 +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 - - \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs index 34086a7..0479268 100644 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs @@ -41,6 +41,7 @@ namespace ShiftOS.WinForms.Applications [RequiresUpgrade("mud_fundamentals")] [Launcher("MUD Control Centre", true, "al_mud_control_centre", "Networking")] [WinOpen("mud_control_centre")] + [DefaultTitle("MUD Control Centre")] public partial class MUDControlCentre : UserControl, IShiftOSWindow { public MUDControlCentre() diff --git a/ShiftOS.WinForms/Applications/MUDPasswordCracker.Designer.cs b/ShiftOS.WinForms/Applications/MUDPasswordCracker.Designer.cs deleted file mode 100644 index 85d4077..0000000 --- a/ShiftOS.WinForms/Applications/MUDPasswordCracker.Designer.cs +++ /dev/null @@ -1,126 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -namespace ShiftOS.WinForms.Applications -{ - partial class MUDPasswordCracker - { - /// - /// 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() - { - this.panel1 = new System.Windows.Forms.Panel(); - this.txtpassword = new System.Windows.Forms.TextBox(); - this.lblpassword = new System.Windows.Forms.Label(); - this.btncrack = new System.Windows.Forms.Button(); - this.panel1.SuspendLayout(); - this.SuspendLayout(); - // - // panel1 - // - this.panel1.Controls.Add(this.txtpassword); - this.panel1.Controls.Add(this.lblpassword); - this.panel1.Controls.Add(this.btncrack); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(439, 131); - this.panel1.TabIndex = 0; - // - // txtpassword - // - this.txtpassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtpassword.Location = new System.Drawing.Point(13, 53); - this.txtpassword.Name = "txtpassword"; - this.txtpassword.Size = new System.Drawing.Size(414, 20); - this.txtpassword.TabIndex = 2; - // - // lblpassword - // - this.lblpassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.lblpassword.Location = new System.Drawing.Point(13, 13); - this.lblpassword.Name = "lblpassword"; - this.lblpassword.Size = new System.Drawing.Size(414, 36); - this.lblpassword.TabIndex = 1; - this.lblpassword.Text = "{PASSWORD}:"; - this.lblpassword.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // btncrack - // - this.btncrack.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btncrack.Location = new System.Drawing.Point(12, 96); - this.btncrack.Name = "btncrack"; - this.btncrack.Size = new System.Drawing.Size(415, 23); - this.btncrack.TabIndex = 0; - this.btncrack.Text = "{CRACK}"; - this.btncrack.UseVisualStyleBackColor = true; - this.btncrack.Click += new System.EventHandler(this.btncrack_Click); - // - // MUDPasswordCracker - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(439, 131); - this.Controls.Add(this.panel1); - this.Name = "MUDPasswordCracker"; - this.Text = "Multi-User Domain Password Cracker v1.0"; - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.TextBox txtpassword; - private System.Windows.Forms.Label lblpassword; - private System.Windows.Forms.Button btncrack; - } -} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/MUDPasswordCracker.cs b/ShiftOS.WinForms/Applications/MUDPasswordCracker.cs deleted file mode 100644 index 4a1a5c8..0000000 --- a/ShiftOS.WinForms/Applications/MUDPasswordCracker.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; -using ShiftOS.Engine; - -namespace ShiftOS.WinForms.Applications -{ - [MultiplayerOnly] - [Launcher("MUD cracker 1.0", true, "al_mud_cracker")] - [RequiresUpgrade("mud_cracker")] - [WinOpen("mud_cracker")] - public partial class MUDPasswordCracker : UserControl, IShiftOSWindow - { - public MUDPasswordCracker() - { - InitializeComponent(); - } - - private string PasswordToCrack { get; set; } - private string Password { get; set; } - - - private void btncrack_Click(object sender, EventArgs e) - { - ServerManager.ServerPasswordGenerated += (pass) => - { - PasswordToCrack = pass; - this.Invoke(new Action(() => - { - BeginCrack(); - })); - }; - ServerManager.InitiateMUDHack(); - } - - public void BeginCrack() - { - btncrack.Enabled = false; - btncrack.Text = "Starting crack..."; - - var t = new Thread(new ThreadStart(() => - { - int secondsleft = 30; - while(secondsleft > 0) - { - try - { - this.Invoke(new Action(() => - { - btncrack.Text = $"Cracking... step {secondsleft}."; - })); - - - - secondsleft -= 1; - - Thread.Sleep(1000); - } - catch - { - - } - } - this.Invoke(new Action(() => EndCrack())); - - })); - t.IsBackground = true; - t.Start(); - } - - public void EndCrack() - { - lblpassword.Show(); - txtpassword.Show(); - txtpassword.ReadOnly = true; - txtpassword.Text = PasswordToCrack; - - } - - public void OnLoad() - { - - } - - public void OnSkinLoad() - { - } - - public bool OnUnload() - { - return true; - } - - public void OnUpgrade() - { - } - } -} diff --git a/ShiftOS.WinForms/Applications/MUDPasswordCracker.resx b/ShiftOS.WinForms/Applications/MUDPasswordCracker.resx deleted file mode 100644 index 1af7de1..0000000 --- a/ShiftOS.WinForms/Applications/MUDPasswordCracker.resx +++ /dev/null @@ -1,120 +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 - - \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/NameChanger.cs b/ShiftOS.WinForms/Applications/NameChanger.cs index ce17439..605ba3b 100644 --- a/ShiftOS.WinForms/Applications/NameChanger.cs +++ b/ShiftOS.WinForms/Applications/NameChanger.cs @@ -38,6 +38,7 @@ namespace ShiftOS.WinForms.Applications { [Launcher("Name Changer", true, "al_name_changer", "Customization")] [RequiresUpgrade("name_changer")] [WinOpen("name_changer")] + [DefaultTitle("Name Changer")] public partial class NameChanger : UserControl, IShiftOSWindow { public NameChanger() diff --git a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs index 49a7b7c..2e4dce0 100644 --- a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs +++ b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs @@ -40,6 +40,7 @@ namespace ShiftOS.WinForms.Applications [Launcher("Shiftorium", true, "al_shiftorium", "Utilities")] [RequiresUpgrade("shiftorium_gui")] [WinOpen("shiftorium")] + [DefaultTitle("Shiftorium")] public partial class ShiftoriumFrontend : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/Skin Loader.cs b/ShiftOS.WinForms/Applications/Skin Loader.cs index 42b103d..9933633 100644 --- a/ShiftOS.WinForms/Applications/Skin Loader.cs +++ b/ShiftOS.WinForms/Applications/Skin Loader.cs @@ -40,6 +40,7 @@ namespace ShiftOS.WinForms.Applications [Launcher("Skin Loader", true, "al_skin_loader", "Customization")] [RequiresUpgrade("skinning")] [WinOpen("skin_loader")] + [DefaultTitle("Skin Loader")] public partial class Skin_Loader : UserControl, IShiftOSWindow { public Skin_Loader() diff --git a/ShiftOS.WinForms/Applications/VirusScanner.Designer.cs b/ShiftOS.WinForms/Applications/VirusScanner.Designer.cs deleted file mode 100644 index 3d6088d..0000000 --- a/ShiftOS.WinForms/Applications/VirusScanner.Designer.cs +++ /dev/null @@ -1,226 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -using ShiftOS.WinForms.Controls; - -namespace ShiftOS.WinForms.Applications -{ - partial class VirusScanner - { - /// - /// 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() - { - this.btnfullscan = new System.Windows.Forms.Button(); - this.btnhomescan = new System.Windows.Forms.Button(); - this.btnsysscan = new System.Windows.Forms.Button(); - this.grpresults = new System.Windows.Forms.GroupBox(); - this.lbviruses = new System.Windows.Forms.ListBox(); - this.btnremoveviruses = new System.Windows.Forms.Button(); - this.lblresults = new System.Windows.Forms.Label(); - this.grpabout = new System.Windows.Forms.GroupBox(); - this.rtbterm = new TerminalBox(); - this.lblabout = new System.Windows.Forms.Label(); - this.pgcontents = new System.Windows.Forms.Panel(); - this.grpresults.SuspendLayout(); - this.grpabout.SuspendLayout(); - this.pgcontents.SuspendLayout(); - this.SuspendLayout(); - // - // btnfullscan - // - this.btnfullscan.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnfullscan.Location = new System.Drawing.Point(10, 12); - this.btnfullscan.Name = "btnfullscan"; - this.btnfullscan.Size = new System.Drawing.Size(175, 23); - this.btnfullscan.TabIndex = 0; - this.btnfullscan.Text = "{START_SYSTEM_SCAN}"; - this.btnfullscan.UseVisualStyleBackColor = true; - this.btnfullscan.Click += new System.EventHandler(this.btnfullscan_Click); - // - // btnhomescan - // - this.btnhomescan.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnhomescan.Location = new System.Drawing.Point(10, 41); - this.btnhomescan.Name = "btnhomescan"; - this.btnhomescan.Size = new System.Drawing.Size(175, 23); - this.btnhomescan.TabIndex = 1; - this.btnhomescan.Text = "{SCAN_HOME}"; - this.btnhomescan.UseVisualStyleBackColor = true; - this.btnhomescan.Click += new System.EventHandler(this.btnhomescan_Click); - // - // btnsysscan - // - this.btnsysscan.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnsysscan.Location = new System.Drawing.Point(10, 70); - this.btnsysscan.Name = "btnsysscan"; - this.btnsysscan.Size = new System.Drawing.Size(175, 23); - this.btnsysscan.TabIndex = 2; - this.btnsysscan.Text = "{SCAN_SYSTEM}"; - this.btnsysscan.UseVisualStyleBackColor = true; - this.btnsysscan.Click += new System.EventHandler(this.btnsysscan_Click); - // - // grpresults - // - this.grpresults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.grpresults.Controls.Add(this.lbviruses); - this.grpresults.Controls.Add(this.btnremoveviruses); - this.grpresults.Controls.Add(this.lblresults); - this.grpresults.Location = new System.Drawing.Point(3, 168); - this.grpresults.Name = "grpresults"; - this.grpresults.Size = new System.Drawing.Size(179, 158); - this.grpresults.TabIndex = 3; - this.grpresults.TabStop = false; - this.grpresults.Text = "{RESULTS}"; - // - // lbviruses - // - this.lbviruses.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbviruses.FormattingEnabled = true; - this.lbviruses.Location = new System.Drawing.Point(3, 16); - this.lbviruses.Name = "lbviruses"; - this.lbviruses.Size = new System.Drawing.Size(173, 116); - this.lbviruses.TabIndex = 2; - // - // btnremoveviruses - // - this.btnremoveviruses.Dock = System.Windows.Forms.DockStyle.Bottom; - this.btnremoveviruses.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnremoveviruses.Location = new System.Drawing.Point(3, 132); - this.btnremoveviruses.Name = "btnremoveviruses"; - this.btnremoveviruses.Size = new System.Drawing.Size(173, 23); - this.btnremoveviruses.TabIndex = 1; - this.btnremoveviruses.Text = "Remove"; - this.btnremoveviruses.UseVisualStyleBackColor = true; - this.btnremoveviruses.Visible = false; - this.btnremoveviruses.Click += new System.EventHandler(this.btnremoveviruses_Click); - // - // lblresults - // - this.lblresults.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblresults.Location = new System.Drawing.Point(3, 16); - this.lblresults.Name = "lblresults"; - this.lblresults.Size = new System.Drawing.Size(173, 139); - this.lblresults.TabIndex = 0; - this.lblresults.Text = "{SCAN_NOT_STARTED}"; - // - // grpabout - // - this.grpabout.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.grpabout.Controls.Add(this.rtbterm); - this.grpabout.Controls.Add(this.lblabout); - this.grpabout.Location = new System.Drawing.Point(191, 12); - this.grpabout.Name = "grpabout"; - this.grpabout.Size = new System.Drawing.Size(362, 314); - this.grpabout.TabIndex = 5; - this.grpabout.TabStop = false; - this.grpabout.Text = "{ABOUT}"; - // - // rtbterm - // - this.rtbterm.Dock = System.Windows.Forms.DockStyle.Fill; - this.rtbterm.Location = new System.Drawing.Point(3, 16); - this.rtbterm.Name = "rtbterm"; - this.rtbterm.Size = new System.Drawing.Size(356, 295); - this.rtbterm.TabIndex = 1; - this.rtbterm.Text = ""; - // - // lblabout - // - this.lblabout.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblabout.Location = new System.Drawing.Point(3, 16); - this.lblabout.Name = "lblabout"; - this.lblabout.Size = new System.Drawing.Size(356, 295); - this.lblabout.TabIndex = 0; - this.lblabout.Text = "{VIRUSSCANNER_ABOUT}"; - // - // pgcontents - // - this.pgcontents.BackColor = System.Drawing.Color.White; - this.pgcontents.Controls.Add(this.grpabout); - this.pgcontents.Controls.Add(this.grpresults); - this.pgcontents.Controls.Add(this.btnsysscan); - this.pgcontents.Controls.Add(this.btnhomescan); - this.pgcontents.Controls.Add(this.btnfullscan); - this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); - this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(565, 343); - this.pgcontents.TabIndex = 25; - // - // VirusScanner - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.pgcontents); - this.Name = "VirusScanner"; - this.Text = "{VIRUS_SCANNER_NAME}"; - this.Size = new System.Drawing.Size(565, 343); - this.Load += new System.EventHandler(this.VirusScanner_Load); - this.grpresults.ResumeLayout(false); - this.grpabout.ResumeLayout(false); - this.pgcontents.ResumeLayout(false); - this.ResumeLayout(false); - - } - - #endregion - - internal System.Windows.Forms.Button btnfullscan; - internal System.Windows.Forms.Button btnhomescan; - internal System.Windows.Forms.Button btnsysscan; - internal System.Windows.Forms.GroupBox grpresults; - internal System.Windows.Forms.Button btnremoveviruses; - internal System.Windows.Forms.Label lblresults; - internal System.Windows.Forms.GroupBox grpabout; - internal System.Windows.Forms.Label lblabout; - internal System.Windows.Forms.Panel pgcontents; - private TerminalBox rtbterm; - private System.Windows.Forms.ListBox lbviruses; - } -} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/VirusScanner.cs b/ShiftOS.WinForms/Applications/VirusScanner.cs deleted file mode 100644 index 3582bd6..0000000 --- a/ShiftOS.WinForms/Applications/VirusScanner.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using System.Windows.Forms; -using Newtonsoft.Json; -using ShiftOS.Engine; -using ShiftOS.Objects; -using static ShiftOS.Objects.ShiftFS.Utils; - -namespace ShiftOS.WinForms.Applications -{ - [Launcher("Virus Scanner", true, "al_virus_scanner", "Administration")] - [RequiresUpgrade("virus_scanner")] - [WinOpen("virus_scanner")] - public partial class VirusScanner : UserControl, IShiftOSWindow - { - public VirusScanner() - { - InitializeComponent(); - Action runner = new Action((msg) => - { - if(msg.Name == "virusdb") - { - VirusDB = JsonConvert.DeserializeObject>(msg.Contents); - } - }); - - ServerManager.MessageReceived += (srv) => - { - runner?.Invoke(srv); - runner = null; - }; - - ServerManager.SendMessage("getvirusdb", ""); - } - - Dictionary VirusDB = null; - - private void btnfullscan_Click(object sender, EventArgs e) - { - lblabout.Hide(); - lbviruses.Hide(); - rtbterm.Show(); - rtbterm.Focus(); - rtbterm.Text = ""; - var t = new Thread(new ThreadStart(() => - { - ScanFolder("0:"); - })); - t.IsBackground = true; - t.Start(); - } - - public List infected = new List(); - - public void ScanFolder(string path) - { - this.Invoke(new Action(() => - { - lblresults.Hide(); - })); - foreach (var file in GetFiles(path)) - { - Console.WriteLine(file + " is now being scanned."); - string contents = ReadAllText(file); - - foreach(var kv in VirusDB) - { - if(kv.Value == contents) - { - if(kv.Key.EndsWith(".0") || kv.Key.EndsWith(".1")) - { - infected.Add(file); - Console.WriteLine($"{file} - Virus detected: {kv.Key}"); - this.Invoke(new Action(() => - { - AddVirusToList(kv.Key); - })); - } - } - } - } - - foreach(var dir in GetDirectories(path)) - { - if (dir != null) - { - ScanFolder(dir); - } - } - } - - public void AddVirusToList(string type) - { - lblresults.Hide(); - lbviruses.Show(); - btnremoveviruses.Show(); - lbviruses.Items.Add(type); - } - - private void VirusScanner_Load(object sender, EventArgs e) - { - Applications.Terminal.MakeWidget(rtbterm); - rtbterm.Hide(); - } - - private void btnhomescan_Click(object sender, EventArgs e) - { - lblabout.Hide(); - rtbterm.Show(); - rtbterm.Focus(); - rtbterm.Text = ""; - var t = new Thread(new ThreadStart(() => - { - ScanFolder(Paths.GetPath("home")); - })); - t.IsBackground = true; - t.Start(); - } - - private void btnsysscan_Click(object sender, EventArgs e) - { - lblabout.Hide(); - rtbterm.Show(); - rtbterm.Focus(); - rtbterm.Text = ""; - var t = new Thread(new ThreadStart(() => - { - ScanFolder(Paths.GetPath("system")); - })); - t.IsBackground = true; - t.Start(); - } - - private void btnremoveviruses_Click(object sender, EventArgs e) - { - while(infected.Count > 0) - { - Delete(infected[0]); - infected.RemoveAt(0); - } - - lbviruses.Items.Clear(); - } - - public void OnLoad() - { - } - - public void OnSkinLoad() - { - } - - public bool OnUnload() - { - return true; - } - - public void OnUpgrade() - { - } - } - - public class InfectedFile - { - public string FilePath { get; set; } - public List Viruses { get; set; } - - public InfectedFile(string fpath, string[] viruses) - { - FilePath = fpath; - Viruses = new List(viruses); - } - } -} diff --git a/ShiftOS.WinForms/Applications/VirusScanner.resx b/ShiftOS.WinForms/Applications/VirusScanner.resx deleted file mode 100644 index 1af7de1..0000000 --- a/ShiftOS.WinForms/Applications/VirusScanner.resx +++ /dev/null @@ -1,120 +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 - - \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/mp3Player.Designer.cs b/ShiftOS.WinForms/Applications/mp3Player.Designer.cs deleted file mode 100644 index 45443b9..0000000 --- a/ShiftOS.WinForms/Applications/mp3Player.Designer.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -namespace ShiftOS.Engine -{ - partial class UserControl1 - { - /// - /// Erforderliche Designervariable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Verwendete Ressourcen bereinigen. - /// - /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Vom Komponenten-Designer generierter Code - - /// - /// Erforderliche Methode für die Designerunterstützung. - /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. - /// - private void InitializeComponent() - { - this.mp3FilePath = new System.Windows.Forms.TextBox(); - this.button1 = new System.Windows.Forms.Button(); - this.stopMp3 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // mp3FilePath - // - this.mp3FilePath.Location = new System.Drawing.Point(131, 8); - this.mp3FilePath.Name = "mp3FilePath"; - this.mp3FilePath.ReadOnly = true; - this.mp3FilePath.Size = new System.Drawing.Size(239, 20); - this.mp3FilePath.TabIndex = 1; - // - // button1 - // - this.button1.Location = new System.Drawing.Point(3, 8); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(122, 21); - this.button1.TabIndex = 2; - this.button1.Text = "Choose Song"; - this.button1.UseVisualStyleBackColor = true; - this.button1.Click += new System.EventHandler(this.button1_Click); - // - // stopMp3 - // - this.stopMp3.Location = new System.Drawing.Point(445, 8); - this.stopMp3.Name = "stopMp3"; - this.stopMp3.Size = new System.Drawing.Size(65, 21); - this.stopMp3.TabIndex = 3; - this.stopMp3.Text = "Stop"; - this.stopMp3.UseVisualStyleBackColor = true; - this.stopMp3.Click += new System.EventHandler(this.stopMp3_Click); - // - // button2 - // - this.button2.Location = new System.Drawing.Point(376, 8); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(63, 21); - this.button2.TabIndex = 4; - this.button2.Text = "Play"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // UserControl1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.button2); - this.Controls.Add(this.stopMp3); - this.Controls.Add(this.button1); - this.Controls.Add(this.mp3FilePath); - this.Name = "UserControl1"; - this.Text = "{WAV_PLAYER_NAME}"; - this.Size = new System.Drawing.Size(530, 70); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - private System.Windows.Forms.TextBox mp3FilePath; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button stopMp3; - private System.Windows.Forms.Button button2; - } -} diff --git a/ShiftOS.WinForms/Applications/mp3Player.cs b/ShiftOS.WinForms/Applications/mp3Player.cs deleted file mode 100644 index 8fc0b79..0000000 --- a/ShiftOS.WinForms/Applications/mp3Player.cs +++ /dev/null @@ -1,91 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2017 Michael VanOverbeek and ShiftOS devs - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Drawing; -using System.Data; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace ShiftOS.Engine -{ - [Launcher("WAV Player", true, "wav_player_al")] - [RequiresUpgrade("wav_player")] - [WinOpen("wav_player")] - public partial class UserControl1 : UserControl, IShiftOSWindow - { - string path; - public UserControl1() - { - InitializeComponent(); - } - - private void button1_Click(object sender, EventArgs e) - { - OpenFileDialog ofd = new OpenFileDialog(); - ofd.Filter = "WAV|*.wav"; - - if(ofd.ShowDialog() == DialogResult.OK) - { - path = ofd.FileName; - mp3FilePath.Text = ofd.FileName; - } - } - - private void stopMp3_Click(object sender, EventArgs e) - { - System.Media.SoundPlayer player = new System.Media.SoundPlayer(); - player.Stop(); - } - - public void OnLoad() - { - } - - public void OnSkinLoad() - { - } - - public bool OnUnload() - { - return true; - } - - public void OnUpgrade() - { - } - - private void button2_Click(object sender, EventArgs e) - { - System.Media.SoundPlayer player = new System.Media.SoundPlayer(); - player.SoundLocation = path; - player.Load(); - player.Play(); - } - } -} diff --git a/ShiftOS.WinForms/Applications/mp3Player.resx b/ShiftOS.WinForms/Applications/mp3Player.resx deleted file mode 100644 index 1af7de1..0000000 --- a/ShiftOS.WinForms/Applications/mp3Player.resx +++ /dev/null @@ -1,120 +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 - - \ No newline at end of file diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj index 249c670..adfabe9 100644 --- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj +++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj @@ -111,30 +111,12 @@ GraphicPicker.cs - - UserControl - - - mp3Player.cs - - - UserControl - - - MUDAuthenticator.cs - UserControl MUDControlCentre.cs - - UserControl - - - MUDPasswordCracker.cs - UserControl @@ -177,12 +159,6 @@ TextPad.cs - - UserControl - - - VirusScanner.cs - UserControl @@ -271,18 +247,9 @@ GraphicPicker.cs - - mp3Player.cs - - - MUDAuthenticator.cs - MUDControlCentre.cs - - MUDPasswordCracker.cs - NameChanger.cs @@ -304,9 +271,6 @@ TextPad.cs - - VirusScanner.cs - Terminal.cs diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs index 528839d..9490850 100644 --- a/ShiftOS.WinForms/WinformsDesktop.cs +++ b/ShiftOS.WinForms/WinformsDesktop.cs @@ -34,6 +34,7 @@ using System.Windows.Forms; using ShiftOS.Engine; using static ShiftOS.Engine.SkinEngine; using ShiftOS.WinForms.Tools; +using ShiftOS.WinForms.Applications; /// /// Winforms desktop. @@ -131,7 +132,7 @@ namespace ShiftOS.WinForms pnlbtn.BackgroundImageLayout = GetImageLayout("panelbutton"); var pnlbtntext = new Label(); - pnlbtntext.Text = form.Text; + pnlbtntext.Text = NameChangerBackend.GetName(form.ParentWindow); pnlbtntext.AutoSize = true; pnlbtntext.Location = LoadedSkin.PanelButtonFromLeft; pnlbtntext.ForeColor = LoadedSkin.PanelButtonTextColor;