diff options
28 files changed, 321 insertions, 1867 deletions
diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs index 3ad8035..9399859 100644 --- a/ShiftOS.Server/Program.cs +++ b/ShiftOS.Server/Program.cs @@ -429,8 +429,10 @@ Contents: bool legionExists = false; foreach (var legion in legions) + { if (legion.ShortName == l.ShortName) legionExists = true; + } if (legionExists == false) { 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<Color> 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 /// <summary> /// /// </summary> + [DefaultTitle("Choose file")] public partial class FileDialog : UserControl, IShiftOSWindow { public FileDialog(string[] filetypes, FileOpenerStyle style, Action<string> _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<byte[], Image, ImageLayout> 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 - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - 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<string, OnlineUser> users = new Dictionary<string, OnlineUser>(); - - 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 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root>
\ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs index 439d5ab..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() @@ -66,21 +67,27 @@ namespace ShiftOS.WinForms.Applications BannerColor = ConsoleColor.DarkRed }); } - else if(msg.Name == "legion_create_ok") + else if (msg.Name == "legion_create_ok") { SaveSystem.CurrentSave.CurrentLegions.Clear(); SaveSystem.CurrentSave.CurrentLegions.Add(editingLegion.ShortName); SaveSystem.SaveGame(); - myLegionToolStripMenuItem_Click(this, EventArgs.Empty); + this.Invoke(new Action(() => + { + myLegionToolStripMenuItem_Click(this, EventArgs.Empty); + })); } - else if(msg.Name == "legion_alreadyexists") + else if (msg.Name == "legion_alreadyexists") { - Infobox.Show("Legion already exists", "A legion with the short name you provided already exists. Please choose another."); + this.Invoke(new Action(() => + { + Infobox.Show("Legion already exists", "A legion with the short name you provided already exists. Please choose another."); + })); } - else if(msg.Name == "legion_users_found") + else if (msg.Name == "legion_users_found") { lvusers.Items.Clear(); - foreach(var usr in JsonConvert.DeserializeObject<string[]>(msg.Contents)) + foreach (var usr in JsonConvert.DeserializeObject<string[]>(msg.Contents)) { lvusers.Items.Add(usr); } @@ -89,7 +96,7 @@ namespace ShiftOS.WinForms.Applications { ShowLegionInfo(JsonConvert.DeserializeObject<Legion>(msg.Contents)); } - else if(msg.Name == "legion_all") + else if (msg.Name == "legion_all") { PopulateJoinLegion(JsonConvert.DeserializeObject<List<Legion>>(msg.Contents)); } 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 - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - 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 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root>
\ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/NameChanger.Designer.cs b/ShiftOS.WinForms/Applications/NameChanger.Designer.cs index b51822f..ec1cecd 100644 --- a/ShiftOS.WinForms/Applications/NameChanger.Designer.cs +++ b/ShiftOS.WinForms/Applications/NameChanger.Designer.cs @@ -47,33 +47,139 @@ namespace ShiftOS.WinForms.Applications { /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { - this.listBox1 = new System.Windows.Forms.ListBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.flnames = new System.Windows.Forms.FlowLayoutPanel(); + this.flbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnclose = new System.Windows.Forms.Button(); + this.btnloaddefault = new System.Windows.Forms.Button(); + this.btnimport = new System.Windows.Forms.Button(); + this.btnexport = new System.Windows.Forms.Button(); + this.btnapply = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.flbuttons.SuspendLayout(); this.SuspendLayout(); // - // listBox1 + // panel1 // - this.listBox1.FormattingEnabled = true; - this.listBox1.Location = new System.Drawing.Point(3, 3); - this.listBox1.Name = "listBox1"; - this.listBox1.Size = new System.Drawing.Size(138, 342); - this.listBox1.TabIndex = 0; - this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged); + this.panel1.Controls.Add(this.flnames); + this.panel1.Controls.Add(this.flbuttons); + 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(354, 349); + this.panel1.TabIndex = 0; + // + // flnames + // + this.flnames.AutoScroll = true; + this.flnames.Dock = System.Windows.Forms.DockStyle.Fill; + this.flnames.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flnames.Location = new System.Drawing.Point(0, 0); + this.flnames.Name = "flnames"; + this.flnames.Size = new System.Drawing.Size(354, 320); + this.flnames.TabIndex = 0; + this.flnames.WrapContents = false; + // + // flbuttons + // + this.flbuttons.AutoSize = true; + this.flbuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flbuttons.Controls.Add(this.btnclose); + this.flbuttons.Controls.Add(this.btnloaddefault); + this.flbuttons.Controls.Add(this.btnimport); + this.flbuttons.Controls.Add(this.btnexport); + this.flbuttons.Controls.Add(this.btnapply); + this.flbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flbuttons.Location = new System.Drawing.Point(0, 320); + this.flbuttons.Name = "flbuttons"; + this.flbuttons.Size = new System.Drawing.Size(354, 29); + this.flbuttons.TabIndex = 0; + // + // btnclose + // + this.btnclose.AutoSize = true; + this.btnclose.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnclose.Location = new System.Drawing.Point(3, 3); + this.btnclose.Name = "btnclose"; + this.btnclose.Size = new System.Drawing.Size(43, 23); + this.btnclose.TabIndex = 0; + this.btnclose.Text = "Close"; + this.btnclose.UseVisualStyleBackColor = true; + this.btnclose.Click += new System.EventHandler(this.btnclose_Click); + // + // btnloaddefault + // + this.btnloaddefault.AutoSize = true; + this.btnloaddefault.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnloaddefault.Location = new System.Drawing.Point(52, 3); + this.btnloaddefault.Name = "btnloaddefault"; + this.btnloaddefault.Size = new System.Drawing.Size(76, 23); + this.btnloaddefault.TabIndex = 1; + this.btnloaddefault.Text = "Load default"; + this.btnloaddefault.UseVisualStyleBackColor = true; + this.btnloaddefault.Click += new System.EventHandler(this.btnloaddefault_Click); + // + // btnimport + // + this.btnimport.AutoSize = true; + this.btnimport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnimport.Location = new System.Drawing.Point(134, 3); + this.btnimport.Name = "btnimport"; + this.btnimport.Size = new System.Drawing.Size(46, 23); + this.btnimport.TabIndex = 2; + this.btnimport.Text = "Import"; + this.btnimport.UseVisualStyleBackColor = true; + this.btnimport.Click += new System.EventHandler(this.btnimport_Click); + // + // btnexport + // + this.btnexport.AutoSize = true; + this.btnexport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnexport.Location = new System.Drawing.Point(186, 3); + this.btnexport.Name = "btnexport"; + this.btnexport.Size = new System.Drawing.Size(47, 23); + this.btnexport.TabIndex = 3; + this.btnexport.Text = "Export"; + this.btnexport.UseVisualStyleBackColor = true; + this.btnexport.Click += new System.EventHandler(this.btnexport_Click); + // + // btnapply + // + this.btnapply.AutoSize = true; + this.btnapply.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnapply.Location = new System.Drawing.Point(239, 3); + this.btnapply.Name = "btnapply"; + this.btnapply.Size = new System.Drawing.Size(43, 23); + this.btnapply.TabIndex = 4; + this.btnapply.Text = "Apply"; + this.btnapply.UseVisualStyleBackColor = true; + this.btnapply.Click += new System.EventHandler(this.btnapply_Click); // // NameChanger // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.listBox1); + this.Controls.Add(this.panel1); this.Name = "NameChanger"; - this.Text = "Name Changer"; - this.Size = new System.Drawing.Size(459, 406); + this.Size = new System.Drawing.Size(354, 349); this.Load += new System.EventHandler(this.NameChanger_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.flbuttons.ResumeLayout(false); + this.flbuttons.PerformLayout(); this.ResumeLayout(false); } #endregion - private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.FlowLayoutPanel flnames; + private System.Windows.Forms.FlowLayoutPanel flbuttons; + private System.Windows.Forms.Button btnclose; + private System.Windows.Forms.Button btnloaddefault; + private System.Windows.Forms.Button btnimport; + private System.Windows.Forms.Button btnexport; + private System.Windows.Forms.Button btnapply; } }
\ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/NameChanger.cs b/ShiftOS.WinForms/Applications/NameChanger.cs index 8483c22..c983841 100644 --- a/ShiftOS.WinForms/Applications/NameChanger.cs +++ b/ShiftOS.WinForms/Applications/NameChanger.cs @@ -31,20 +31,67 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using Newtonsoft.Json; using ShiftOS.Engine; +using ShiftOS.Objects.ShiftFS; +using ShiftOS.WinForms.Tools; namespace ShiftOS.WinForms.Applications { [Launcher("Name Changer", true, "al_name_changer", "Customization")] [RequiresUpgrade("name_changer")] [WinOpen("name_changer")] - public partial class NameChanger : UserControl, IShiftOSWindow { - public NameChanger() { + [DefaultTitle("Name Changer")] + public partial class NameChanger : UserControl, IShiftOSWindow + { + public NameChanger() + { InitializeComponent(); } + private Dictionary<string, string> names = new Dictionary<string, string>(); + public void OnLoad() { + names = JsonConvert.DeserializeObject<Dictionary<string, string>>(JsonConvert.SerializeObject(NameChangerBackend.GetCurrent())); + SetupUI(); + } + + public void SetupUI() + { + flnames.Controls.Clear(); + foreach(var name in names) + { + var pnl = new Panel(); + var lbl = new Label(); + var txt = new TextBox(); + pnl.Controls.Add(lbl); + lbl.Show(); + pnl.Controls.Add(txt); + txt.Show(); + + ControlManager.SetupControls(pnl); + + pnl.Width = flnames.Width - 10; + pnl.Height = 50; + lbl.Left = 10; + lbl.Width = (pnl.Width / 4) - 10; + lbl.Text = name.Key; + lbl.Top = (pnl.Height - lbl.Height) / 2; + lbl.TextAlign = ContentAlignment.MiddleLeft; + + txt.Text = name.Value; + + txt.TextChanged += (o, a) => + { + names[name.Key] = txt.Text; + }; + txt.Width = pnl.Width - (pnl.Width / 4) - 20; + txt.Left = lbl.Width + 20; + txt.Top = (pnl.Height - txt.Height) / 2; + flnames.Controls.Add(pnl); + pnl.Show(); + } } public void OnSkinLoad() @@ -60,13 +107,90 @@ namespace ShiftOS.WinForms.Applications { { } - private void NameChanger_Load(object sender, EventArgs e) { + private void NameChanger_Load(object sender, EventArgs e) + { + + } + + private void btnclose_Click(object sender, EventArgs e) + { + this.Close(); + } + private void btnloaddefault_Click(object sender, EventArgs e) + { + names = NameChangerBackend.GetDefault(); + SetupUI(); } - private void listBox1_SelectedIndexChanged(object sender, EventArgs e) + private void btnimport_Click(object sender, EventArgs e) { + FileSkimmerBackend.GetFile(new[] { ".nme" }, FileOpenerStyle.Open, new Action<string>((path) => + { + names = JsonConvert.DeserializeObject<Dictionary<string, string>>(Utils.ReadAllText(path)); + })); + } + + private void btnexport_Click(object sender, EventArgs e) + { + FileSkimmerBackend.GetFile(new[] { ".nme" }, FileOpenerStyle.Save, new Action<string>((path) => + { + Utils.WriteAllText(path, JsonConvert.SerializeObject(names)); + })); + } + + private void btnapply_Click(object sender, EventArgs e) + { + SkinEngine.LoadedSkin.AppNames = names; + Utils.WriteAllText(Paths.GetPath("skin.json"), SkinEngine.LoadedSkin.ToString()); + SkinEngine.LoadSkin(); + } + } + + public static class NameChangerBackend + { + public static Dictionary<string, string> GetDefault() + { + var dict = new Dictionary<string, string>(); + foreach(var winType in AppearanceManager.GetAllWindowTypes()) + { + if (dict.ContainsKey(winType.Name)) + dict[winType.Name] = AppearanceManager.GetDefaultTitle(winType); + else + dict.Add(winType.Name, AppearanceManager.GetDefaultTitle(winType)); + } + return dict; + } + + public static Dictionary<string,string> GetCurrent() + { + if (SkinEngine.LoadedSkin == null) + return GetDefault(); + + if (SkinEngine.LoadedSkin.AppNames == null) + SkinEngine.LoadedSkin.AppNames = GetDefault(); + + foreach(var def in GetDefault()) + { + if (!SkinEngine.LoadedSkin.AppNames.ContainsKey(def.Key)) + SkinEngine.LoadedSkin.AppNames.Add(def.Key, def.Value); + } + + return SkinEngine.LoadedSkin.AppNames; + } + + public static string GetName(IShiftOSWindow win) + { + if (SkinEngine.LoadedSkin == null) + return AppearanceManager.GetDefaultTitle(win.GetType()); + + if (SkinEngine.LoadedSkin.AppNames == null) + SkinEngine.LoadedSkin.AppNames = GetDefault(); + + if (!SkinEngine.LoadedSkin.AppNames.ContainsKey(win.GetType().Name)) + SkinEngine.LoadedSkin.AppNames.Add(win.GetType().Name, AppearanceManager.GetDefaultTitle(win.GetType())); + return SkinEngine.LoadedSkin.AppNames[win.GetType().Name]; } } } 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 - { - /// <summary> - /// Required designer variable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Clean up any resources being used. - /// </summary> - /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// <summary> - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// </summary> - 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<ServerMessage> runner = new Action<ServerMessage>((msg) => - { - if(msg.Name == "virusdb") - { - VirusDB = JsonConvert.DeserializeObject<Dictionary<string, string>>(msg.Contents); - } - }); - - ServerManager.MessageReceived += (srv) => - { - runner?.Invoke(srv); - runner = null; - }; - - ServerManager.SendMessage("getvirusdb", ""); - } - - Dictionary<string, string> 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<string> infected = new List<string>(); - - 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<string> Viruses { get; set; } - - public InfectedFile(string fpath, string[] viruses) - { - FilePath = fpath; - Viruses = new List<string>(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 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root>
\ 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 - { - /// <summary> - /// Erforderliche Designervariable. - /// </summary> - private System.ComponentModel.IContainer components = null; - - /// <summary> - /// Verwendete Ressourcen bereinigen. - /// </summary> - /// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param> - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Vom Komponenten-Designer generierter Code - - /// <summary> - /// Erforderliche Methode für die Designerunterstützung. - /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. - /// </summary> - 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 @@ -<?xml version="1.0" encoding="utf-8"?> -<root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" /> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string" /> - <xsd:attribute name="type" type="xsd:string" /> - <xsd:attribute name="mimetype" type="xsd:string" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string" /> - <xsd:attribute name="name" type="xsd:string" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> - <xsd:attribute ref="xml:space" /> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" /> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> -</root>
\ 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 @@ <Compile Include="Applications\GraphicPicker.Designer.cs"> <DependentUpon>GraphicPicker.cs</DependentUpon> </Compile> - <Compile Include="Applications\mp3Player.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Applications\mp3Player.Designer.cs"> - <DependentUpon>mp3Player.cs</DependentUpon> - </Compile> - <Compile Include="Applications\MUDAuthenticator.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Applications\MUDAuthenticator.Designer.cs"> - <DependentUpon>MUDAuthenticator.cs</DependentUpon> - </Compile> <Compile Include="Applications\MUDControlCentre.cs"> <SubType>UserControl</SubType> </Compile> <Compile Include="Applications\MUDControlCentre.Designer.cs"> <DependentUpon>MUDControlCentre.cs</DependentUpon> </Compile> - <Compile Include="Applications\MUDPasswordCracker.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Applications\MUDPasswordCracker.Designer.cs"> - <DependentUpon>MUDPasswordCracker.cs</DependentUpon> - </Compile> <Compile Include="Applications\NameChanger.cs"> <SubType>UserControl</SubType> </Compile> @@ -177,12 +159,6 @@ <Compile Include="Applications\TextPad.Designer.cs"> <DependentUpon>TextPad.cs</DependentUpon> </Compile> - <Compile Include="Applications\VirusScanner.cs"> - <SubType>UserControl</SubType> - </Compile> - <Compile Include="Applications\VirusScanner.Designer.cs"> - <DependentUpon>VirusScanner.cs</DependentUpon> - </Compile> <Compile Include="Applications\Terminal.cs"> <SubType>UserControl</SubType> </Compile> @@ -271,18 +247,9 @@ <EmbeddedResource Include="Applications\GraphicPicker.resx"> <DependentUpon>GraphicPicker.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Applications\mp3Player.resx"> - <DependentUpon>mp3Player.cs</DependentUpon> - </EmbeddedResource> - <EmbeddedResource Include="Applications\MUDAuthenticator.resx"> - <DependentUpon>MUDAuthenticator.cs</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="Applications\MUDControlCentre.resx"> <DependentUpon>MUDControlCentre.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Applications\MUDPasswordCracker.resx"> - <DependentUpon>MUDPasswordCracker.cs</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="Applications\NameChanger.resx"> <DependentUpon>NameChanger.cs</DependentUpon> </EmbeddedResource> @@ -304,9 +271,6 @@ <EmbeddedResource Include="Applications\TextPad.resx"> <DependentUpon>TextPad.cs</DependentUpon> </EmbeddedResource> - <EmbeddedResource Include="Applications\VirusScanner.resx"> - <DependentUpon>VirusScanner.cs</DependentUpon> - </EmbeddedResource> <EmbeddedResource Include="Applications\Terminal.resx"> <DependentUpon>Terminal.cs</DependentUpon> </EmbeddedResource> diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs index be59c70..bb9b478 100644 --- a/ShiftOS.WinForms/WindowBorder.cs +++ b/ShiftOS.WinForms/WindowBorder.cs @@ -36,6 +36,7 @@ using static ShiftOS.Engine.SkinEngine; using System.Runtime.InteropServices; using ShiftOS.Engine; using ShiftOS.WinForms.Tools; +using ShiftOS.WinForms.Applications; /// <summary> /// Window border. @@ -211,7 +212,7 @@ namespace ShiftOS.WinForms /// </summary> public void Setup() { - this.lbtitletext.Text = Localization.Parse(this._parentWindow.Text); + this.lbtitletext.Text = NameChangerBackend.GetName(ParentWindow); if (SaveSystem.CurrentSave != null) { @@ -232,23 +233,6 @@ namespace ShiftOS.WinForms } /// <summary> - /// Gets or sets the text. - /// </summary> - /// <value>The text.</value> - public override string Text - { - get - { - return lbtitletext?.Text; - } - - set - { - lbtitletext.Text = value; - } - } - - /// <summary> /// Setups the skin. /// </summary> /// <returns>The skin.</returns> 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; /// <summary> /// 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; diff --git a/ShiftOS_TheReturn/AppearanceManager.cs b/ShiftOS_TheReturn/AppearanceManager.cs index dd205b2..112bca5 100644 --- a/ShiftOS_TheReturn/AppearanceManager.cs +++ b/ShiftOS_TheReturn/AppearanceManager.cs @@ -29,6 +29,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using System.Linq; +using System.Reflection; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; @@ -75,6 +76,39 @@ namespace ShiftOS.Engine } } + public static IEnumerable<Type> GetAllWindowTypes() + { + List<Type> types = new List<Type>(); + foreach(var file in System.IO.Directory.GetFiles(Environment.CurrentDirectory)) + { + if(file.EndsWith(".exe") || file.EndsWith(".dll")) + { + try + { + var asm = Assembly.LoadFile(file); + foreach(var type in asm.GetTypes()) + { + if (type.GetInterfaces().Contains(typeof(IShiftOSWindow))) + types.Add(type); + } + } + catch { } + } + } + return types; + } + + public static string GetDefaultTitle(Type winType) + { + foreach(var attrib in winType.GetCustomAttributes(false)) + { + if(attrib is DefaultTitleAttribute) + { + return (attrib as DefaultTitleAttribute).Title; + } + } + return winType.Name; + } public static string LastTerminalText { get; set; } public static int CurrentPosition { get; set; } @@ -205,4 +239,15 @@ namespace ShiftOS.Engine string Text { get; set; } IShiftOSWindow ParentWindow { get; set; } } + + public class DefaultTitleAttribute : Attribute + { + public DefaultTitleAttribute(string title) + { + Title = title; + } + + public string Title { get; private set; } + } + } diff --git a/ShiftOS_TheReturn/Skinning.cs b/ShiftOS_TheReturn/Skinning.cs index 80945b8..b3dddd3 100644 --- a/ShiftOS_TheReturn/Skinning.cs +++ b/ShiftOS_TheReturn/Skinning.cs @@ -137,6 +137,9 @@ namespace ShiftOS.Engine { return JsonConvert.SerializeObject(this, Formatting.Indented); } + [ShifterHidden] + public Dictionary<string, string> AppNames = new Dictionary<string, string>(); + [ShifterMeta("Windows")] [ShifterCategory("Titlebar")] [RequiresUpgrade("shift_title_text")] |
