From 5fd343195be5632ba341031953d4a4e6d9317253 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 18 Jun 2017 20:31:19 -0400 Subject: [PATCH] Localize a lot of the window titles --- ShiftOS.WinForms/Applications/About.cs | 6 +- ShiftOS.WinForms/Applications/AddressBook.cs | 8 +- ShiftOS.WinForms/Applications/Artpad.cs | 5 +- ShiftOS.WinForms/Applications/AudioPlayer.cs | 8 +- ShiftOS.WinForms/Applications/Calculator.cs | 5 +- ShiftOS.WinForms/Applications/Chat.cs | 8 +- ShiftOS.WinForms/Applications/ColorPicker.cs | 2 +- .../Applications/Dialog.Designer.cs | 144 +- ShiftOS.WinForms/Applications/Dialog.cs | 15 +- ShiftOS.WinForms/Applications/Downloader.cs | 6 +- ShiftOS.WinForms/Applications/FileDialog.cs | 4 +- ShiftOS.WinForms/Applications/FileSkimmer.cs | 6 +- .../Applications/FormatEditor.Designer.cs | 139 +- ShiftOS.WinForms/Applications/FormatEditor.cs | 172 +- .../Applications/GraphicPicker.cs | 2 +- ShiftOS.WinForms/Applications/IconManager.cs | 4 +- ShiftOS.WinForms/Applications/Installer.cs | 6 +- .../Applications/MUDControlCentre.Designer.cs | 1411 ----------------- .../Applications/MUDControlCentre.cs | 958 ----------- .../Applications/MUDControlCentre.resx | 133 -- ShiftOS.WinForms/Applications/MindBlow.cs | 4 +- ShiftOS.WinForms/Applications/NameChanger.cs | 90 +- .../Applications/Notifications.Designer.cs | 114 -- .../Applications/Notifications.cs | 275 ---- .../Applications/Notifications.resx | 120 -- ShiftOS.WinForms/Applications/Pong.cs | 6 +- ShiftOS.WinForms/Applications/ShiftLetters.cs | 6 +- ShiftOS.WinForms/Applications/ShiftLotto.cs | 4 +- ShiftOS.WinForms/Applications/ShiftSweeper.cs | 6 +- ShiftOS.WinForms/Applications/Shifter.cs | 5 +- ShiftOS.WinForms/Applications/Shiftnet.cs | 6 +- .../Applications/ShiftoriumFrontend.cs | 6 +- .../Applications/ShopItemCreator.Designer.cs | 197 --- .../Applications/ShopItemCreator.cs | 112 -- .../Applications/ShopItemCreator.resx | 120 -- .../Applications/Skin Loader.Designer.cs | 38 +- ShiftOS.WinForms/Applications/Skin Loader.cs | 4 +- ShiftOS.WinForms/Applications/Terminal.cs | 5 +- ShiftOS.WinForms/Applications/TextPad.cs | 5 +- ShiftOS.WinForms/Resources/strings_en.txt | 51 + ShiftOS.WinForms/ShiftOS.WinForms.csproj | 27 - ShiftOS.WinForms/Stories/LegionStory.cs | 148 -- ShiftOS.WinForms/WinformsDesktop.cs | 5 - ShiftOS_TheReturn/AppLauncherDaemon.cs | 7 +- ShiftOS_TheReturn/CommandParser.cs | 78 +- ShiftOS_TheReturn/Desktop.cs | 2 +- ShiftOS_TheReturn/TerminalBackend.cs | 16 +- 47 files changed, 405 insertions(+), 4094 deletions(-) delete mode 100644 ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs delete mode 100644 ShiftOS.WinForms/Applications/MUDControlCentre.cs delete mode 100644 ShiftOS.WinForms/Applications/MUDControlCentre.resx delete mode 100644 ShiftOS.WinForms/Applications/Notifications.Designer.cs delete mode 100644 ShiftOS.WinForms/Applications/Notifications.cs delete mode 100644 ShiftOS.WinForms/Applications/Notifications.resx delete mode 100644 ShiftOS.WinForms/Applications/ShopItemCreator.Designer.cs delete mode 100644 ShiftOS.WinForms/Applications/ShopItemCreator.cs delete mode 100644 ShiftOS.WinForms/Applications/ShopItemCreator.resx diff --git a/ShiftOS.WinForms/Applications/About.cs b/ShiftOS.WinForms/Applications/About.cs index a27238d..07805bf 100644 --- a/ShiftOS.WinForms/Applications/About.cs +++ b/ShiftOS.WinForms/Applications/About.cs @@ -36,9 +36,9 @@ using System.Reflection; namespace ShiftOS.WinForms.Applications { - [WinOpen("about")] - [Launcher("About", false, null, "Accessories")] - [DefaultTitle("About ShiftOS")] + [WinOpen("{WO_ABOUT}")] + [Launcher("{TITLE_ABOUT}", false, null, "{AL_ACCESSORIES}")] + [DefaultTitle("{TITLE_ABOUT}")] public partial class About : UserControl, IShiftOSWindow { public About() diff --git a/ShiftOS.WinForms/Applications/AddressBook.cs b/ShiftOS.WinForms/Applications/AddressBook.cs index 9a4ce51..bc6a4cd 100644 --- a/ShiftOS.WinForms/Applications/AddressBook.cs +++ b/ShiftOS.WinForms/Applications/AddressBook.cs @@ -13,10 +13,10 @@ using Newtonsoft.Json; namespace ShiftOS.WinForms.Applications { - [WinOpen("address_book")] - [AppscapeEntry("Address Book", "Add and edit your contacts within the digital society in an easy-to-use application.", 1024, 750, null, "Office")] - [DefaultTitle("Address Book")] - [Launcher("Address Book", false, null, "Office")] + [WinOpen("{WO_ADDRESSBOOK}")] + [AppscapeEntry("{TITLE_ADDRESSBOOK}", "{DESC_ADDRESSBOOK}", 1024, 750, null, "{AL_OFFICE}")] + [DefaultTitle("{TITLE_ADDRESSBOOK}")] + [Launcher("{TITLE_ADDRESSBOOK}", false, null, "{AL_OFFICE}")] public partial class AddressBook : UserControl, IShiftOSWindow { public AddressBook() diff --git a/ShiftOS.WinForms/Applications/Artpad.cs b/ShiftOS.WinForms/Applications/Artpad.cs index 7ef66aa..12914b4 100644 --- a/ShiftOS.WinForms/Applications/Artpad.cs +++ b/ShiftOS.WinForms/Applications/Artpad.cs @@ -43,10 +43,11 @@ using System.Diagnostics; namespace ShiftOS.WinForms.Applications { [MultiplayerOnly] - [Launcher("Artpad", true, "al_artpad", "Graphics")] + [Launcher("{TIITLE_ARTPAD}", true, "al_artpad", "{AL_GRAPHICS}")] [RequiresUpgrade("artpad")] - [WinOpen("artpad")] + [WinOpen("{WO_ARTPAD}")] [DefaultIcon("iconArtpad")] + [DefaultTitle("{TITLE_ARTPAD}")] public partial class Artpad : UserControl, IShiftOSWindow { /// diff --git a/ShiftOS.WinForms/Applications/AudioPlayer.cs b/ShiftOS.WinForms/Applications/AudioPlayer.cs index 9940ddd..49cf3a9 100644 --- a/ShiftOS.WinForms/Applications/AudioPlayer.cs +++ b/ShiftOS.WinForms/Applications/AudioPlayer.cs @@ -37,10 +37,10 @@ using System.Threading; namespace ShiftOS.WinForms.Applications { - [AppscapeEntry("Audio Player", "Play music and other sounds on your computer.", 3047, 1000, "file_skimmer", "Entertainment")] - [Launcher("Audio Player", false, null, "Entertainment")] - [WinOpen("audio_player")] - [DefaultTitle("Audio Player")] + [AppscapeEntry("{TITLE_AUDIOPLAYER}", "{DESC_AUDIOPLAYER}", 3047, 1000, "file_skimmer", "{AL_ENTERTAINMENT}")] + [Launcher("{TITLE_AUDIOPLAYER}", false, null, "{AL_ENTERTAINMENT}")] + [WinOpen("{WO_AUDIOPLAYER}")] + [DefaultTitle("{TITLE_AUDIOPLAYER}")] public partial class AudioPlayer : UserControl, IShiftOSWindow { public AudioPlayer() diff --git a/ShiftOS.WinForms/Applications/Calculator.cs b/ShiftOS.WinForms/Applications/Calculator.cs index 4fa84de..02136b7 100644 --- a/ShiftOS.WinForms/Applications/Calculator.cs +++ b/ShiftOS.WinForms/Applications/Calculator.cs @@ -35,10 +35,11 @@ using ShiftOS.Engine; namespace ShiftOS.WinForms.Applications { - [Launcher("Calculator", true, "al_calculator", "Accessories")] + [Launcher("{TITLE_CALCULATOR}", true, "al_calculator", "{AL_ACCESSORIES}")] [RequiresUpgrade("calculator")] - [WinOpen("calculator")] + [WinOpen("{WO_CALCULATOR}")] [DefaultIcon("iconCalculator")] + [DefaultTitle("{TITLE_CALCULATOR}")] public partial class Calculator : UserControl, IShiftOSWindow { public bool justopened = false; diff --git a/ShiftOS.WinForms/Applications/Chat.cs b/ShiftOS.WinForms/Applications/Chat.cs index 7a2de81..14a8a80 100644 --- a/ShiftOS.WinForms/Applications/Chat.cs +++ b/ShiftOS.WinForms/Applications/Chat.cs @@ -38,10 +38,10 @@ using System.Threading; namespace ShiftOS.WinForms.Applications { [MultiplayerOnly] - [WinOpen("simplesrc")] - [Launcher("SimpleSRC Client", false, null, "Networking")] - [DefaultTitle("SimpleSRC Client")] - [AppscapeEntry("SimpleSRC", "A simple ShiftOS Relay Chat client that allows you to talk with other ShiftOS users from all over the world.", 300, 145, "file_skimmer", "Networking")] + [WinOpen("{WO_SIMPLESRC}")] + [Launcher("{TITLE_SIMPLESRC}", false, null, "{AL_NETWORKING}")] + [DefaultTitle("{TITLE_SIMPLESRC}")] + [AppscapeEntry("{TITLE_SIMPLESRC}", "{DESC_SIMPLESRC}", 300, 145, "file_skimmer", "{AL_NETWORKING}")] public partial class Chat : UserControl, IShiftOSWindow { public Chat() diff --git a/ShiftOS.WinForms/Applications/ColorPicker.cs b/ShiftOS.WinForms/Applications/ColorPicker.cs index bf35567..76ea17f 100644 --- a/ShiftOS.WinForms/Applications/ColorPicker.cs +++ b/ShiftOS.WinForms/Applications/ColorPicker.cs @@ -37,7 +37,7 @@ using API = ShiftOS.WinForms.Tools.ColorPickerDataBackend; namespace ShiftOS.WinForms.Applications { - [DefaultTitle("Choose color")] [DefaultIcon("iconColourPicker")] + [DefaultTitle("{TITLE_COLORPICKER}")] [DefaultIcon("iconColourPicker")] public partial class ColorPicker : UserControl, IShiftOSWindow { public ColorPicker(Color oldcol, string ctc, Action callback) diff --git a/ShiftOS.WinForms/Applications/Dialog.Designer.cs b/ShiftOS.WinForms/Applications/Dialog.Designer.cs index c75c0b3..5928452 100644 --- a/ShiftOS.WinForms/Applications/Dialog.Designer.cs +++ b/ShiftOS.WinForms/Applications/Dialog.Designer.cs @@ -53,16 +53,16 @@ namespace ShiftOS.WinForms.Applications private void InitializeComponent() { this.panel1 = new System.Windows.Forms.Panel(); - this.pbicon = new System.Windows.Forms.PictureBox(); - this.btnok = new System.Windows.Forms.Button(); - this.flyesno = new System.Windows.Forms.FlowLayoutPanel(); - this.btnno = new System.Windows.Forms.Button(); - this.btnyes = new System.Windows.Forms.Button(); - this.lbmessage = new System.Windows.Forms.Label(); this.txtinput = new System.Windows.Forms.TextBox(); + this.lbmessage = new System.Windows.Forms.Label(); + this.flyesno = new System.Windows.Forms.FlowLayoutPanel(); + this.btnyes = new System.Windows.Forms.Button(); + this.btnno = new System.Windows.Forms.Button(); + this.btnok = new System.Windows.Forms.Button(); + this.pbicon = new System.Windows.Forms.PictureBox(); this.panel1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbicon)).BeginInit(); this.flyesno.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbicon)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -78,66 +78,14 @@ namespace ShiftOS.WinForms.Applications this.panel1.Size = new System.Drawing.Size(341, 177); this.panel1.TabIndex = 0; // - // pbicon + // txtinput // - this.pbicon.Location = new System.Drawing.Point(14, 19); - this.pbicon.Name = "pbicon"; - this.pbicon.Size = new System.Drawing.Size(64, 64); - this.pbicon.TabIndex = 0; - this.pbicon.TabStop = false; - // - // btnok - // - this.btnok.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + this.txtinput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.btnok.AutoSize = true; - this.btnok.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnok.Location = new System.Drawing.Point(149, 140); - this.btnok.Name = "btnok"; - this.btnok.Size = new System.Drawing.Size(32, 23); - this.btnok.TabIndex = 1; - this.btnok.Text = "OK"; - this.btnok.UseVisualStyleBackColor = true; - // - // flyesno - // - this.flyesno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.flyesno.AutoSize = true; - this.flyesno.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flyesno.Controls.Add(this.btnyes); - this.flyesno.Controls.Add(this.btnno); - this.flyesno.Location = new System.Drawing.Point(129, 134); - this.flyesno.Name = "flyesno"; - this.flyesno.Size = new System.Drawing.Size(78, 29); - this.flyesno.TabIndex = 2; - this.flyesno.WrapContents = false; - // - // btnno - // - this.btnno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btnno.AutoSize = true; - this.btnno.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnno.Location = new System.Drawing.Point(44, 3); - this.btnno.Name = "btnno"; - this.btnno.Size = new System.Drawing.Size(31, 23); - this.btnno.TabIndex = 3; - this.btnno.Text = "No"; - this.btnno.UseVisualStyleBackColor = true; - // - // btnyes - // - this.btnyes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.btnyes.AutoSize = true; - this.btnyes.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnyes.Location = new System.Drawing.Point(3, 3); - this.btnyes.Name = "btnyes"; - this.btnyes.Size = new System.Drawing.Size(35, 23); - this.btnyes.TabIndex = 4; - this.btnyes.Text = "Yes"; - this.btnyes.UseVisualStyleBackColor = true; + this.txtinput.Location = new System.Drawing.Point(88, 116); + this.txtinput.Name = "txtinput"; + this.txtinput.Size = new System.Drawing.Size(250, 20); + this.txtinput.TabIndex = 4; // // lbmessage // @@ -151,14 +99,66 @@ namespace ShiftOS.WinForms.Applications this.lbmessage.Text = "label1"; this.lbmessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // txtinput + // flyesno // - this.txtinput.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + this.flyesno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.txtinput.Location = new System.Drawing.Point(88, 116); - this.txtinput.Name = "txtinput"; - this.txtinput.Size = new System.Drawing.Size(250, 20); - this.txtinput.TabIndex = 4; + this.flyesno.AutoSize = true; + this.flyesno.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flyesno.Controls.Add(this.btnyes); + this.flyesno.Controls.Add(this.btnno); + this.flyesno.Location = new System.Drawing.Point(129, 134); + this.flyesno.Name = "flyesno"; + this.flyesno.Size = new System.Drawing.Size(157, 29); + this.flyesno.TabIndex = 2; + this.flyesno.WrapContents = false; + // + // btnyes + // + this.btnyes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnyes.AutoSize = true; + this.btnyes.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnyes.Location = new System.Drawing.Point(3, 3); + this.btnyes.Name = "btnyes"; + this.btnyes.Size = new System.Drawing.Size(75, 23); + this.btnyes.TabIndex = 4; + this.btnyes.Text = "{GEN_YES}"; + this.btnyes.UseVisualStyleBackColor = true; + // + // btnno + // + this.btnno.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnno.AutoSize = true; + this.btnno.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnno.Location = new System.Drawing.Point(84, 3); + this.btnno.Name = "btnno"; + this.btnno.Size = new System.Drawing.Size(70, 23); + this.btnno.TabIndex = 3; + this.btnno.Text = "{GEN_NO}"; + this.btnno.UseVisualStyleBackColor = true; + // + // btnok + // + this.btnok.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnok.AutoSize = true; + this.btnok.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnok.Location = new System.Drawing.Point(149, 140); + this.btnok.Name = "btnok"; + this.btnok.Size = new System.Drawing.Size(69, 23); + this.btnok.TabIndex = 1; + this.btnok.Text = "{GEN_OK}"; + this.btnok.UseVisualStyleBackColor = true; + // + // pbicon + // + this.pbicon.Location = new System.Drawing.Point(14, 19); + this.pbicon.Name = "pbicon"; + this.pbicon.Size = new System.Drawing.Size(64, 64); + this.pbicon.TabIndex = 0; + this.pbicon.TabStop = false; // // Dialog // @@ -169,9 +169,9 @@ namespace ShiftOS.WinForms.Applications this.Size = new System.Drawing.Size(341, 177); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbicon)).EndInit(); this.flyesno.ResumeLayout(false); this.flyesno.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbicon)).EndInit(); this.ResumeLayout(false); } diff --git a/ShiftOS.WinForms/Applications/Dialog.cs b/ShiftOS.WinForms/Applications/Dialog.cs index f9d0b86..5844e1c 100644 --- a/ShiftOS.WinForms/Applications/Dialog.cs +++ b/ShiftOS.WinForms/Applications/Dialog.cs @@ -35,10 +35,11 @@ using System.Threading.Tasks; using System.Windows.Forms; using Microsoft.VisualBasic.Devices; using ShiftOS.Engine; +using ShiftOS.WinForms.Tools; namespace ShiftOS.WinForms.Applications { - [DefaultTitle("Information")] + [DefaultTitle("{TITLE_INFOBOX}")] [DefaultIcon("iconInfoBox")] public partial class Dialog : UserControl, IShiftOSWindow, IInfobox { @@ -51,13 +52,21 @@ namespace ShiftOS.WinForms.Applications public void OnLoad() { - AppearanceManager.SetWindowTitle(this, this.Title); + if(!string.IsNullOrWhiteSpace(Title)) + AppearanceManager.SetWindowTitle(this, this.Title); ShiftOS.Engine.AudioManager.PlayStream(Properties.Resources.infobox); } public void OnSkinLoad() { - AppearanceManager.SetWindowTitle(this, this.Title); + if(!string.IsNullOrWhiteSpace(Title)) + AppearanceManager.SetWindowTitle(this, this.Title); + + int top = btnok.Top; + btnok.CenterParent(); + btnyes.Parent.CenterParent(); + btnok.Top = top; + btnyes.Parent.Top = top; } public bool OnUnload() diff --git a/ShiftOS.WinForms/Applications/Downloader.cs b/ShiftOS.WinForms/Applications/Downloader.cs index bcad56a..0c280f6 100644 --- a/ShiftOS.WinForms/Applications/Downloader.cs +++ b/ShiftOS.WinForms/Applications/Downloader.cs @@ -42,10 +42,10 @@ using System.IO.Compression; namespace ShiftOS.WinForms.Applications { [MultiplayerOnly] - [Launcher("Downloader", true, "al_downloader", "Networking")] + [Launcher("{TITLE_DOWNLOADER}", true, "al_downloader", "{AL_NETWORKING}")] [DefaultIcon("iconDownloader")] - [WinOpen("downloader")] - [DefaultTitle("Downloader")] + [WinOpen("{WO_DOWNLOADER}")] + [DefaultTitle("{TITLE_DOWNLOADER}")] [RequiresUpgrade("downloader")] public partial class Downloader : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/FileDialog.cs b/ShiftOS.WinForms/Applications/FileDialog.cs index ba92f08..ca73675 100644 --- a/ShiftOS.WinForms/Applications/FileDialog.cs +++ b/ShiftOS.WinForms/Applications/FileDialog.cs @@ -41,7 +41,7 @@ namespace ShiftOS.WinForms.Applications /// /// /// - [DefaultTitle("Choose file")] + [DefaultTitle("{TITLE_FILEDIALOG}")] [DefaultIcon("iconFileSkimmer")] public partial class FileDialog : UserControl, IShiftOSWindow { @@ -103,7 +103,7 @@ namespace ShiftOS.WinForms.Applications } else { - Infobox.Show("{FILE_NOT_FOUND}", "{FILE_NOT_FOUND_EXP}"); + Infobox.Show("{TITLE_FILENOTFOUND}", "{PROMPT_FILENOTFOUND}"); } } diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.cs b/ShiftOS.WinForms/Applications/FileSkimmer.cs index 218e9e2..51d7bd8 100644 --- a/ShiftOS.WinForms/Applications/FileSkimmer.cs +++ b/ShiftOS.WinForms/Applications/FileSkimmer.cs @@ -39,10 +39,10 @@ using Newtonsoft.Json; namespace ShiftOS.WinForms.Applications { - [Launcher("File Skimmer", true, "al_file_skimmer", "Utilities")] + [Launcher("{TITLE_FILESKIMMER}", true, "al_file_skimmer", "{AL_UTILITIES}")] [RequiresUpgrade("file_skimmer")] - [WinOpen("file_skimmer")] - [DefaultTitle("File Skimmer")] + [WinOpen("{WO_FILESKIMMER}")] + [DefaultTitle("{TITLE_FILESKIMMER}")] [DefaultIcon("iconFileSkimmer")] public partial class FileSkimmer : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/FormatEditor.Designer.cs b/ShiftOS.WinForms/Applications/FormatEditor.Designer.cs index 536ea62..a7a6160 100644 --- a/ShiftOS.WinForms/Applications/FormatEditor.Designer.cs +++ b/ShiftOS.WinForms/Applications/FormatEditor.Designer.cs @@ -57,13 +57,16 @@ namespace ShiftOS.WinForms.Applications this.btnAddOptionalText = new System.Windows.Forms.Button(); this.btnAddRegexText = new System.Windows.Forms.Button(); this.btnAddCommand = new System.Windows.Forms.Button(); - this.lblExampleCommand = new System.Windows.Forms.Label(); this.btnAddColor = new System.Windows.Forms.Button(); - this.richTextBox1 = new System.Windows.Forms.RichTextBox(); - this.btnTest = new System.Windows.Forms.Button(); this.btnSave = new System.Windows.Forms.Button(); this.btnLoad = new System.Windows.Forms.Button(); this.btnApply = new System.Windows.Forms.Button(); + this.txtentersyntax = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.btnloaddefault = new System.Windows.Forms.Button(); + this.panelEditor.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // panelEditor @@ -71,6 +74,8 @@ namespace ShiftOS.WinForms.Applications this.panelEditor.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.panelEditor.AutoScroll = true; + this.panelEditor.Controls.Add(this.label1); + this.panelEditor.Controls.Add(this.txtentersyntax); this.panelEditor.Location = new System.Drawing.Point(4, 4); this.panelEditor.Name = "panelEditor"; this.panelEditor.Size = new System.Drawing.Size(589, 46); @@ -84,7 +89,6 @@ namespace ShiftOS.WinForms.Applications this.btnAddText.TabIndex = 2; this.btnAddText.Text = "Add Text"; this.btnAddText.UseVisualStyleBackColor = true; - this.btnAddText.Click += new System.EventHandler(this.btnAddText_Click); // // btnAddOptionalText // @@ -94,7 +98,6 @@ namespace ShiftOS.WinForms.Applications this.btnAddOptionalText.TabIndex = 3; this.btnAddOptionalText.Text = "Add Optional Text"; this.btnAddOptionalText.UseVisualStyleBackColor = true; - this.btnAddOptionalText.Click += new System.EventHandler(this.btnAddOptionalText_Click); // // btnAddRegexText // @@ -104,7 +107,6 @@ namespace ShiftOS.WinForms.Applications this.btnAddRegexText.TabIndex = 4; this.btnAddRegexText.Text = "Add Regex Text"; this.btnAddRegexText.UseVisualStyleBackColor = true; - this.btnAddRegexText.Click += new System.EventHandler(this.btnAddRegexText_Click); // // btnAddCommand // @@ -114,16 +116,6 @@ namespace ShiftOS.WinForms.Applications this.btnAddCommand.TabIndex = 5; this.btnAddCommand.Text = "+ Namespace"; this.btnAddCommand.UseVisualStyleBackColor = true; - this.btnAddCommand.Click += new System.EventHandler(this.btnAddCommand_Click); - // - // lblExampleCommand - // - this.lblExampleCommand.AutoSize = true; - this.lblExampleCommand.Location = new System.Drawing.Point(4, 115); - this.lblExampleCommand.Name = "lblExampleCommand"; - this.lblExampleCommand.Size = new System.Drawing.Size(290, 13); - this.lblExampleCommand.TabIndex = 8; - this.lblExampleCommand.Text = "Create a command and an example usage will show up here"; // // btnAddColor // @@ -133,76 +125,104 @@ namespace ShiftOS.WinForms.Applications this.btnAddColor.TabIndex = 9; this.btnAddColor.Text = "Add Color"; this.btnAddColor.UseVisualStyleBackColor = true; - this.btnAddColor.Click += new System.EventHandler(this.btnAddColor_Click); - // - // richTextBox1 - // - this.richTextBox1.Location = new System.Drawing.Point(7, 132); - this.richTextBox1.Multiline = false; - this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.Size = new System.Drawing.Size(476, 23); - this.richTextBox1.TabIndex = 10; - this.richTextBox1.Text = ""; - this.richTextBox1.TextChanged += new System.EventHandler(this.richTextBox1_TextChanged); - // - // btnTest - // - this.btnTest.Location = new System.Drawing.Point(490, 132); - this.btnTest.Name = "btnTest"; - this.btnTest.Size = new System.Drawing.Size(47, 23); - this.btnTest.TabIndex = 11; - this.btnTest.Text = "Test"; - this.btnTest.UseVisualStyleBackColor = true; - this.btnTest.Click += new System.EventHandler(this.btnTest_Click); // // btnSave // - this.btnSave.Location = new System.Drawing.Point(7, 161); + this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnSave.AutoSize = true; + this.btnSave.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnSave.Location = new System.Drawing.Point(3, 3); this.btnSave.Name = "btnSave"; - this.btnSave.Size = new System.Drawing.Size(47, 23); + this.btnSave.Size = new System.Drawing.Size(82, 23); this.btnSave.TabIndex = 13; - this.btnSave.Text = "Save"; + this.btnSave.Text = "{GEN_SAVE}"; this.btnSave.UseVisualStyleBackColor = true; - this.btnSave.Click += new System.EventHandler(this.btnSave_Click); // // btnLoad // - this.btnLoad.Location = new System.Drawing.Point(60, 161); + this.btnLoad.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnLoad.AutoSize = true; + this.btnLoad.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnLoad.Location = new System.Drawing.Point(91, 3); this.btnLoad.Name = "btnLoad"; - this.btnLoad.Size = new System.Drawing.Size(47, 23); + this.btnLoad.Size = new System.Drawing.Size(83, 23); this.btnLoad.TabIndex = 14; - this.btnLoad.Text = "Load"; + this.btnLoad.Text = "{GEN_LOAD}"; this.btnLoad.UseVisualStyleBackColor = true; - this.btnLoad.Click += new System.EventHandler(this.btnLoad_Click); // // btnApply // - this.btnApply.Location = new System.Drawing.Point(113, 161); + this.btnApply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnApply.AutoSize = true; + this.btnApply.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnApply.Location = new System.Drawing.Point(318, 3); this.btnApply.Name = "btnApply"; - this.btnApply.Size = new System.Drawing.Size(47, 23); + this.btnApply.Size = new System.Drawing.Size(88, 23); this.btnApply.TabIndex = 15; - this.btnApply.Text = "Apply"; + this.btnApply.Text = "{GEN_APPLY}"; this.btnApply.UseVisualStyleBackColor = true; - this.btnApply.Click += new System.EventHandler(this.btnApply_Click); + // + // txtentersyntax + // + this.txtentersyntax.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtentersyntax.Location = new System.Drawing.Point(3, 23); + this.txtentersyntax.Name = "txtentersyntax"; + this.txtentersyntax.Size = new System.Drawing.Size(583, 20); + this.txtentersyntax.TabIndex = 0; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(4, 4); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(187, 13); + this.label1.TabIndex = 1; + this.label1.Text = "{FORMATEDITOR_ENTERSYNTAX}"; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel1.Controls.Add(this.btnSave); + this.flowLayoutPanel1.Controls.Add(this.btnLoad); + this.flowLayoutPanel1.Controls.Add(this.btnloaddefault); + this.flowLayoutPanel1.Controls.Add(this.btnApply); + this.flowLayoutPanel1.Location = new System.Drawing.Point(11, 123); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(409, 29); + this.flowLayoutPanel1.TabIndex = 16; + // + // btnloaddefault + // + this.btnloaddefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnloaddefault.AutoSize = true; + this.btnloaddefault.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnloaddefault.Location = new System.Drawing.Point(180, 3); + this.btnloaddefault.Name = "btnloaddefault"; + this.btnloaddefault.Size = new System.Drawing.Size(132, 23); + this.btnloaddefault.TabIndex = 16; + this.btnloaddefault.Text = "{GEN_LOADDEFAULT}"; + this.btnloaddefault.UseVisualStyleBackColor = true; // // FormatEditor // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.btnApply); - this.Controls.Add(this.btnLoad); - this.Controls.Add(this.btnSave); - this.Controls.Add(this.btnTest); - this.Controls.Add(this.richTextBox1); + this.Controls.Add(this.flowLayoutPanel1); this.Controls.Add(this.btnAddColor); - this.Controls.Add(this.lblExampleCommand); this.Controls.Add(this.btnAddText); this.Controls.Add(this.btnAddOptionalText); this.Controls.Add(this.btnAddRegexText); this.Controls.Add(this.btnAddCommand); this.Controls.Add(this.panelEditor); this.Name = "FormatEditor"; - this.Size = new System.Drawing.Size(596, 426); + this.Size = new System.Drawing.Size(596, 164); + this.panelEditor.ResumeLayout(false); + this.panelEditor.PerformLayout(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -214,12 +234,13 @@ namespace ShiftOS.WinForms.Applications private System.Windows.Forms.Button btnAddOptionalText; private System.Windows.Forms.Button btnAddRegexText; private System.Windows.Forms.Button btnAddCommand; - private System.Windows.Forms.Label lblExampleCommand; private System.Windows.Forms.Button btnAddColor; - private System.Windows.Forms.RichTextBox richTextBox1; - private System.Windows.Forms.Button btnTest; private System.Windows.Forms.Button btnSave; private System.Windows.Forms.Button btnLoad; private System.Windows.Forms.Button btnApply; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtentersyntax; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button btnloaddefault; } } diff --git a/ShiftOS.WinForms/Applications/FormatEditor.cs b/ShiftOS.WinForms/Applications/FormatEditor.cs index 6c84661..89e1196 100644 --- a/ShiftOS.WinForms/Applications/FormatEditor.cs +++ b/ShiftOS.WinForms/Applications/FormatEditor.cs @@ -33,154 +33,64 @@ using System.Threading.Tasks; using System.Windows.Forms; using ShiftOS.Engine; -namespace ShiftOS.WinForms.Applications { - [MultiplayerOnly] - [Launcher("Format Editor", true, "al_format_editor", "Customization")] - [AppscapeEntry("Format Editor", "Edit the syntax of your Terminal to be however you like.", 740, 750, "file_skimmer", "Customization")] - [WinOpen("formateditor")] - [DefaultTitle("Format Editor")] - [DefaultIcon("iconFormatEditor")] - public partial class FormatEditor : UserControl, IShiftOSWindow { +namespace ShiftOS.WinForms.Applications +{ + public partial class FormatEditor : UserControl, IShiftOSWindow + { - IList parts = new List(); - CommandParser parser = new CommandParser(); - IList editorBoxes = new List(); + private CommandParser EditingParser = null; - string commandMode = "namespace"; - int avcount = 0; - - public FormatEditor() { + public FormatEditor() + { InitializeComponent(); } - public void OnLoad() { + public void OnLoad() + { + EditingParser = CommandParser.Load(SkinEngine.LoadedSkin.CurrentParser.Save()); + SetupUI(); OnUpgrade(); } + public void SetupUI() + { + txtentersyntax.Text = ""; + foreach(var part in EditingParser.parts) + { + if(part is CommandFormatCommand) + { + txtentersyntax.Text += Localization.Parse("{FORMATEDITOR_COMMAND_LOWER}"); + } + else if(part is CommandFormatText) + { + txtentersyntax.Text += (part as CommandFormatText).str; + } + else if (part is CommandFormatOptionalText) + { + txtentersyntax.Text += "[" + (part as CommandFormatOptionalText).str + "]"; + } + else if(part is CommandFormatArgument) + { + txtentersyntax.Text += Localization.Parse("{FORMATEDITOR_ARGUMENT_LOWER}"); + } + else if(part is CommandFormatValue) + { + txtentersyntax.Text += Localization.Parse("{FORMATEDITOR_VALUE_LOWER}"); + } + } + } + public void OnSkinLoad() { } public bool OnUnload() { return true; } - public void OnUpgrade() { + public void OnUpgrade() + { btnAddOptionalText.Visible = ShiftoriumFrontend.UpgradeInstalled("format_editor_optional_text"); btnAddRegexText.Visible = ShiftoriumFrontend.UpgradeInstalled("format_editor_regex"); btnAddColor.Visible = ShiftoriumFrontend.UpgradeInstalled("format_editor_syntax_highlighting"); } - private void addPart(CommandFormat part) { - parser.AddPart(part); - addPart(part.Draw()); - } - - private void addPart(Control part) { - Panel container = new Panel(); - - Control drawnPart = part; - container.Size = drawnPart.Size; - container.Controls.Add(drawnPart); - - int woffset = 0; - if (editorBoxes.Count > 0) { - woffset = editorBoxes.Last().Width + editorBoxes.Last().Location.X; - } else { - woffset = 0; - } - - container.Location = new Point(woffset, 0); - editorBoxes.Add(container); - panelEditor.Controls.Add(container); - } - - private void btnAddText_Click(object sender, EventArgs e) { - addPart(new CommandFormatText()); - } - - private void btnAddOptionalText_Click(object sender, EventArgs e) { - addPart(new CommandFormatOptionalText()); - } - - private void btnAddRegexText_Click(object sender, EventArgs e) { - - } - - private void btnAddColor_Click(object sender, EventArgs e) { - - } - - private void btnAddCommand_Click(object sender, EventArgs e) { - switch (commandMode) { - case "namespace": - addPart(new CommandFormatNamespace()); - commandMode = "command"; - btnAddCommand.Text = "+ Command"; - break; - case "command": - addPart(new CommandFormatCommand()); - commandMode = "argument"; - btnAddCommand.Text = "+ Argument"; - break; - case "argument": - addPart(new CommandFormatArgument()); - commandMode = "value"; - btnAddCommand.Text = "+ \"Value\""; - break; - case "value": - addPart(new CommandFormatValue()); - avcount++; - if (avcount >= 2) { - commandMode = ""; - btnAddCommand.Text = ""; - btnAddCommand.Enabled = false; - }else { - commandMode = "argument"; - btnAddCommand.Text = "+ Argument"; - } - break; - } - } - - private void richTextBox1_TextChanged(object sender, EventArgs e) { - var result = parser.ParseCommand(richTextBox1.Text); - - if (result.Equals(default(KeyValuePair, Dictionary>))) { - lblExampleCommand.Text = "Syntax Error"; - } else { - string argvs = "{"; - - foreach (KeyValuePair entry in result.Value) { - argvs += entry.Key + "=\"" + entry.Value + "\", "; - } - - argvs += "}"; - - lblExampleCommand.Text = result.Key + argvs; - } - } - - private void btnTest_Click(object sender, EventArgs e) { - - } - - private void btnSave_Click(object sender, EventArgs e) { - CurrentCommandParser.parser = parser; - - FileSkimmerBackend.GetFile(new string[] { ".cf" }, FileOpenerStyle.Save, new Action((result) => { - Objects.ShiftFS.Utils.WriteAllText(result, parser.Save()); - })); - } - - private void btnLoad_Click(object sender, EventArgs e) { - FileSkimmerBackend.GetFile(new string[] { ".cf" }, FileOpenerStyle.Open, new Action((result) => { - parser = CommandParser.Load(Objects.ShiftFS.Utils.ReadAllText(result)); - foreach(CommandFormat part in parser.parts) { - addPart(part.Draw()); - } - })); - } - - private void btnApply_Click(object sender, EventArgs e) { - CurrentCommandParser.parser = parser; - } } } diff --git a/ShiftOS.WinForms/Applications/GraphicPicker.cs b/ShiftOS.WinForms/Applications/GraphicPicker.cs index 2a31815..5e0f995 100644 --- a/ShiftOS.WinForms/Applications/GraphicPicker.cs +++ b/ShiftOS.WinForms/Applications/GraphicPicker.cs @@ -38,7 +38,7 @@ using ShiftOS.WinForms.Tools; namespace ShiftOS.WinForms.Applications { [MultiplayerOnly] - [DefaultTitle("Choose graphic")] [DefaultIcon("icongraphicpicker")] + [DefaultTitle("{TITLE_CHOOSEGRAPHIC}")] [DefaultIcon("icongraphicpicker")] public partial class GraphicPicker : UserControl, IShiftOSWindow { public GraphicPicker(Image old, string name, ImageLayout layout, Action cb) diff --git a/ShiftOS.WinForms/Applications/IconManager.cs b/ShiftOS.WinForms/Applications/IconManager.cs index 7bbeb34..1f3166f 100644 --- a/ShiftOS.WinForms/Applications/IconManager.cs +++ b/ShiftOS.WinForms/Applications/IconManager.cs @@ -15,8 +15,8 @@ using Newtonsoft.Json; namespace ShiftOS.WinForms.Applications { [RequiresUpgrade("icon_manager")] - [Launcher("Icon Manager", true, "al_icon_manager", "Customization")] - [DefaultTitle("Icon Manager")] + [Launcher("{TITLE_ICONMANAGER}", true, "al_icon_manager", "{AL_CUSTOMIZATION}")] + [DefaultTitle("{TITLE_ICONMANAGER}")] [DefaultIcon("iconIconManager")] public partial class IconManager : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/Installer.cs b/ShiftOS.WinForms/Applications/Installer.cs index bd40a6d..284ac2c 100644 --- a/ShiftOS.WinForms/Applications/Installer.cs +++ b/ShiftOS.WinForms/Applications/Installer.cs @@ -14,11 +14,11 @@ using Newtonsoft.Json; namespace ShiftOS.WinForms.Applications { - [WinOpen("installer")] + [WinOpen("{WO_INSTALLER}")] [RequiresUpgrade("installer")] [MultiplayerOnly] - [DefaultTitle("Installer")] - [Launcher("Installer", true, "al_installer", "Utilities")] + [DefaultTitle("{TITLE_INSTALLER}")] + [Launcher("{TITLE_INSTALLER}", true, "al_installer", "{AL_UTILITIES}")] public partial class Installer : UserControl, IShiftOSWindow { public Installer() diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs deleted file mode 100644 index 125ea99..0000000 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs +++ /dev/null @@ -1,1411 +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 MUDControlCentre - { - /// - /// 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 Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MUDControlCentre)); - this.menuStrip1 = new System.Windows.Forms.MenuStrip(); - this.youToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.profileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.tsMemos = new System.Windows.Forms.ToolStripMenuItem(); - this.disconnectFromMuDToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.shopsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.browseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.myShopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.openAShopToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.legionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.createLegionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.joinLegionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.myLegionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); - this.pnlclasses = new System.Windows.Forms.Panel(); - this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel(); - this.btnchooseclass = new System.Windows.Forms.Button(); - this.lbclasses = new System.Windows.Forms.ListBox(); - this.lbclassdesc = new System.Windows.Forms.Label(); - this.lbclasstitle = new System.Windows.Forms.Label(); - this.you_systemstatus = new System.Windows.Forms.Panel(); - this.btndeletesave = new System.Windows.Forms.Button(); - this.lblsysstatus = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.shop_all = new System.Windows.Forms.Panel(); - this.flshoplist = new System.Windows.Forms.FlowLayoutPanel(); - this.lblistdesc = new System.Windows.Forms.Label(); - this.lblistname = new System.Windows.Forms.Label(); - this.shop_view = new System.Windows.Forms.Panel(); - this.panel5 = new System.Windows.Forms.Panel(); - this.lbupgradedesc = new System.Windows.Forms.Label(); - this.pnlbuy = new System.Windows.Forms.Panel(); - this.btneditshop = new System.Windows.Forms.Button(); - this.lbprice = new System.Windows.Forms.Label(); - this.btnbuy = new System.Windows.Forms.Button(); - this.lbupgradetitle = new System.Windows.Forms.Label(); - this.panel1 = new System.Windows.Forms.Panel(); - this.lbupgrades = new System.Windows.Forms.ListBox(); - this.lbcodepoints = new System.Windows.Forms.Label(); - this.lbshopname = new System.Windows.Forms.Label(); - this.shop_editor = new System.Windows.Forms.Panel(); - this.panel7 = new System.Windows.Forms.Panel(); - this.txtshopdescription = new System.Windows.Forms.TextBox(); - this.panel8 = new System.Windows.Forms.Panel(); - this.label15 = new System.Windows.Forms.Label(); - this.btnsaveshop = new System.Windows.Forms.Button(); - this.label16 = new System.Windows.Forms.Label(); - this.panel9 = new System.Windows.Forms.Panel(); - this.lbeditingshopitems = new System.Windows.Forms.ListBox(); - this.txtshopname = new System.Windows.Forms.TextBox(); - this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel(); - this.btnaddshopitem = new System.Windows.Forms.Button(); - this.btnremoveitem = new System.Windows.Forms.Button(); - this.btnedititem = new System.Windows.Forms.Button(); - this.lgn_create = new System.Windows.Forms.Panel(); - this.btncreate = new System.Windows.Forms.Button(); - this.txtnewlegiondescription = new System.Windows.Forms.TextBox(); - this.panel2 = new System.Windows.Forms.Panel(); - this.label10 = new System.Windows.Forms.Label(); - this.label5 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.panel4 = new System.Windows.Forms.Panel(); - this.cbpublicity = new System.Windows.Forms.ComboBox(); - this.cbcolorchooser = new System.Windows.Forms.ComboBox(); - this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); - this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); - this.label9 = new System.Windows.Forms.Label(); - this.txtnewlegionshortname = new System.Windows.Forms.TextBox(); - this.label11 = new System.Windows.Forms.Label(); - this.txtnewlegiontitle = new System.Windows.Forms.TextBox(); - this.job_current = new System.Windows.Forms.Panel(); - this.lbtaskdescription = new System.Windows.Forms.Label(); - this.lbtaskname = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); - this.lgn_view = new System.Windows.Forms.Panel(); - this.pnllgnusers = new System.Windows.Forms.Panel(); - this.lvusers = new System.Windows.Forms.ListView(); - this.label4 = new System.Windows.Forms.Label(); - this.lbdescription = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.banner = new System.Windows.Forms.Panel(); - this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); - this.btnleavelegion = new System.Windows.Forms.Button(); - this.btnjoinlegion = new System.Windows.Forms.Button(); - this.lblegiontitle = new System.Windows.Forms.Label(); - this.lgn_join = new System.Windows.Forms.Panel(); - this.fllegionlist = new System.Windows.Forms.FlowLayoutPanel(); - this.panel3 = new System.Windows.Forms.Panel(); - this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); - this.button1 = new System.Windows.Forms.Button(); - this.button2 = new System.Windows.Forms.Button(); - this.label8 = new System.Windows.Forms.Label(); - this.you_memos = new System.Windows.Forms.Panel(); - this.flmemos = new System.Windows.Forms.FlowLayoutPanel(); - this.label3 = new System.Windows.Forms.Label(); - this.menuStrip1.SuspendLayout(); - this.toolStripContainer1.ContentPanel.SuspendLayout(); - this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); - this.toolStripContainer1.SuspendLayout(); - this.pnlclasses.SuspendLayout(); - this.flowLayoutPanel6.SuspendLayout(); - this.you_systemstatus.SuspendLayout(); - this.shop_all.SuspendLayout(); - this.shop_view.SuspendLayout(); - this.panel5.SuspendLayout(); - this.pnlbuy.SuspendLayout(); - this.panel1.SuspendLayout(); - this.shop_editor.SuspendLayout(); - this.panel7.SuspendLayout(); - this.panel8.SuspendLayout(); - this.panel9.SuspendLayout(); - this.flowLayoutPanel5.SuspendLayout(); - this.lgn_create.SuspendLayout(); - this.panel2.SuspendLayout(); - this.panel4.SuspendLayout(); - this.flowLayoutPanel4.SuspendLayout(); - this.job_current.SuspendLayout(); - this.lgn_view.SuspendLayout(); - this.pnllgnusers.SuspendLayout(); - this.banner.SuspendLayout(); - this.flowLayoutPanel1.SuspendLayout(); - this.lgn_join.SuspendLayout(); - this.panel3.SuspendLayout(); - this.flowLayoutPanel2.SuspendLayout(); - this.you_memos.SuspendLayout(); - this.SuspendLayout(); - // - // menuStrip1 - // - this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None; - this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.youToolStripMenuItem, - this.shopsToolStripMenuItem, - this.legionsToolStripMenuItem}); - this.menuStrip1.Location = new System.Drawing.Point(0, 0); - this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.Size = new System.Drawing.Size(756, 24); - this.menuStrip1.TabIndex = 0; - this.menuStrip1.Text = "menuStrip1"; - // - // youToolStripMenuItem - // - this.youToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.profileToolStripMenuItem, - this.tsMemos, - this.disconnectFromMuDToolStripMenuItem}); - this.youToolStripMenuItem.Name = "youToolStripMenuItem"; - this.youToolStripMenuItem.Size = new System.Drawing.Size(39, 20); - this.youToolStripMenuItem.Text = "You"; - // - // profileToolStripMenuItem - // - this.profileToolStripMenuItem.Name = "profileToolStripMenuItem"; - this.profileToolStripMenuItem.Size = new System.Drawing.Size(192, 22); - this.profileToolStripMenuItem.Text = "System status"; - this.profileToolStripMenuItem.Click += new System.EventHandler(this.profileToolStripMenuItem_Click); - // - // tsMemos - // - this.tsMemos.Name = "tsMemos"; - this.tsMemos.Size = new System.Drawing.Size(192, 22); - this.tsMemos.Text = "Memos"; - this.tsMemos.Click += new System.EventHandler(this.tsMemos_Click); - // - // disconnectFromMuDToolStripMenuItem - // - this.disconnectFromMuDToolStripMenuItem.Name = "disconnectFromMuDToolStripMenuItem"; - this.disconnectFromMuDToolStripMenuItem.Size = new System.Drawing.Size(192, 22); - this.disconnectFromMuDToolStripMenuItem.Text = "Disconnect from MUD"; - this.disconnectFromMuDToolStripMenuItem.Click += new System.EventHandler(this.disconnectFromMuDToolStripMenuItem_Click); - // - // shopsToolStripMenuItem - // - this.shopsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.browseToolStripMenuItem, - this.myShopToolStripMenuItem, - this.openAShopToolStripMenuItem}); - this.shopsToolStripMenuItem.Name = "shopsToolStripMenuItem"; - this.shopsToolStripMenuItem.Size = new System.Drawing.Size(51, 20); - this.shopsToolStripMenuItem.Text = "Shops"; - // - // browseToolStripMenuItem - // - this.browseToolStripMenuItem.Name = "browseToolStripMenuItem"; - this.browseToolStripMenuItem.Size = new System.Drawing.Size(142, 22); - this.browseToolStripMenuItem.Text = "Browse"; - this.browseToolStripMenuItem.Click += new System.EventHandler(this.browseToolStripMenuItem_Click); - // - // myShopToolStripMenuItem - // - this.myShopToolStripMenuItem.Name = "myShopToolStripMenuItem"; - this.myShopToolStripMenuItem.Size = new System.Drawing.Size(142, 22); - this.myShopToolStripMenuItem.Text = "My Shop"; - this.myShopToolStripMenuItem.Click += new System.EventHandler(this.myShopToolStripMenuItem_Click); - // - // openAShopToolStripMenuItem - // - this.openAShopToolStripMenuItem.Name = "openAShopToolStripMenuItem"; - this.openAShopToolStripMenuItem.Size = new System.Drawing.Size(142, 22); - this.openAShopToolStripMenuItem.Text = "Open a Shop"; - this.openAShopToolStripMenuItem.Click += new System.EventHandler(this.openAShopToolStripMenuItem_Click); - // - // legionsToolStripMenuItem - // - this.legionsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.createLegionToolStripMenuItem, - this.joinLegionToolStripMenuItem, - this.myLegionToolStripMenuItem}); - this.legionsToolStripMenuItem.Name = "legionsToolStripMenuItem"; - this.legionsToolStripMenuItem.Size = new System.Drawing.Size(60, 20); - this.legionsToolStripMenuItem.Text = "Legions"; - // - // createLegionToolStripMenuItem - // - this.createLegionToolStripMenuItem.Name = "createLegionToolStripMenuItem"; - this.createLegionToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.createLegionToolStripMenuItem.Text = "Create Legion"; - this.createLegionToolStripMenuItem.Click += new System.EventHandler(this.createLegionToolStripMenuItem_Click); - // - // joinLegionToolStripMenuItem - // - this.joinLegionToolStripMenuItem.Name = "joinLegionToolStripMenuItem"; - this.joinLegionToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.joinLegionToolStripMenuItem.Text = "Join Legion"; - this.joinLegionToolStripMenuItem.Click += new System.EventHandler(this.joinLegionToolStripMenuItem_Click); - // - // myLegionToolStripMenuItem - // - this.myLegionToolStripMenuItem.Name = "myLegionToolStripMenuItem"; - this.myLegionToolStripMenuItem.Size = new System.Drawing.Size(147, 22); - this.myLegionToolStripMenuItem.Text = "My Legion"; - this.myLegionToolStripMenuItem.Click += new System.EventHandler(this.myLegionToolStripMenuItem_Click); - // - // toolStripContainer1 - // - // - // toolStripContainer1.ContentPanel - // - this.toolStripContainer1.ContentPanel.Controls.Add(this.pnlclasses); - this.toolStripContainer1.ContentPanel.Controls.Add(this.you_systemstatus); - this.toolStripContainer1.ContentPanel.Controls.Add(this.shop_all); - this.toolStripContainer1.ContentPanel.Controls.Add(this.shop_view); - this.toolStripContainer1.ContentPanel.Controls.Add(this.shop_editor); - this.toolStripContainer1.ContentPanel.Controls.Add(this.lgn_create); - this.toolStripContainer1.ContentPanel.Controls.Add(this.job_current); - this.toolStripContainer1.ContentPanel.Controls.Add(this.lgn_view); - this.toolStripContainer1.ContentPanel.Controls.Add(this.lgn_join); - this.toolStripContainer1.ContentPanel.Controls.Add(this.you_memos); - this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(756, 464); - this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; - this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); - this.toolStripContainer1.Name = "toolStripContainer1"; - this.toolStripContainer1.Size = new System.Drawing.Size(756, 488); - this.toolStripContainer1.TabIndex = 2; - this.toolStripContainer1.Text = "toolStripContainer1"; - // - // toolStripContainer1.TopToolStripPanel - // - this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1); - // - // pnlclasses - // - this.pnlclasses.Controls.Add(this.flowLayoutPanel6); - this.pnlclasses.Controls.Add(this.lbclasses); - this.pnlclasses.Controls.Add(this.lbclassdesc); - this.pnlclasses.Controls.Add(this.lbclasstitle); - this.pnlclasses.Dock = System.Windows.Forms.DockStyle.Fill; - this.pnlclasses.Location = new System.Drawing.Point(0, 0); - this.pnlclasses.Name = "pnlclasses"; - this.pnlclasses.Size = new System.Drawing.Size(756, 464); - this.pnlclasses.TabIndex = 3; - // - // flowLayoutPanel6 - // - this.flowLayoutPanel6.AutoSize = true; - this.flowLayoutPanel6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel6.Controls.Add(this.btnchooseclass); - this.flowLayoutPanel6.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flowLayoutPanel6.Location = new System.Drawing.Point(0, 415); - this.flowLayoutPanel6.Name = "flowLayoutPanel6"; - this.flowLayoutPanel6.Padding = new System.Windows.Forms.Padding(10); - this.flowLayoutPanel6.Size = new System.Drawing.Size(756, 49); - this.flowLayoutPanel6.TabIndex = 3; - // - // btnchooseclass - // - this.btnchooseclass.AutoSize = true; - this.btnchooseclass.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnchooseclass.Location = new System.Drawing.Point(13, 13); - this.btnchooseclass.Name = "btnchooseclass"; - this.btnchooseclass.Size = new System.Drawing.Size(53, 23); - this.btnchooseclass.TabIndex = 0; - this.btnchooseclass.Text = "Choose"; - this.btnchooseclass.UseVisualStyleBackColor = true; - this.btnchooseclass.Click += new System.EventHandler(this.btnchooseclass_Click); - // - // lbclasses - // - this.lbclasses.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbclasses.FormattingEnabled = true; - this.lbclasses.Location = new System.Drawing.Point(0, 66); - this.lbclasses.Name = "lbclasses"; - this.lbclasses.Size = new System.Drawing.Size(756, 398); - this.lbclasses.TabIndex = 2; - // - // lbclassdesc - // - this.lbclassdesc.AutoSize = true; - this.lbclassdesc.Dock = System.Windows.Forms.DockStyle.Top; - this.lbclassdesc.Location = new System.Drawing.Point(0, 33); - this.lbclassdesc.Name = "lbclassdesc"; - this.lbclassdesc.Padding = new System.Windows.Forms.Padding(10); - this.lbclassdesc.Size = new System.Drawing.Size(727, 33); - this.lbclassdesc.TabIndex = 1; - this.lbclassdesc.Text = "A class is a way for the multi-user domain to better understand you. It defines w" + - "ho you are as a sentient being, what you do, what you like, and so on."; - // - // lbclasstitle - // - this.lbclasstitle.AutoSize = true; - this.lbclasstitle.Dock = System.Windows.Forms.DockStyle.Top; - this.lbclasstitle.Location = new System.Drawing.Point(0, 0); - this.lbclasstitle.Name = "lbclasstitle"; - this.lbclasstitle.Padding = new System.Windows.Forms.Padding(10); - this.lbclasstitle.Size = new System.Drawing.Size(82, 33); - this.lbclasstitle.TabIndex = 0; - this.lbclasstitle.Tag = "header1"; - this.lbclasstitle.Text = "Join a class"; - // - // you_systemstatus - // - this.you_systemstatus.Controls.Add(this.btndeletesave); - this.you_systemstatus.Controls.Add(this.lblsysstatus); - this.you_systemstatus.Controls.Add(this.label1); - this.you_systemstatus.Dock = System.Windows.Forms.DockStyle.Fill; - this.you_systemstatus.Location = new System.Drawing.Point(0, 0); - this.you_systemstatus.Name = "you_systemstatus"; - this.you_systemstatus.Size = new System.Drawing.Size(756, 464); - this.you_systemstatus.TabIndex = 0; - // - // btndeletesave - // - this.btndeletesave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btndeletesave.AutoSize = true; - this.btndeletesave.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btndeletesave.Location = new System.Drawing.Point(613, 415); - this.btndeletesave.Name = "btndeletesave"; - this.btndeletesave.Size = new System.Drawing.Size(99, 23); - this.btndeletesave.TabIndex = 2; - this.btndeletesave.Tag = "header3"; - this.btndeletesave.Text = "Delete my system"; - this.btndeletesave.UseVisualStyleBackColor = true; - this.btndeletesave.Click += new System.EventHandler(this.btndeletesave_Click); - // - // lblsysstatus - // - this.lblsysstatus.Dock = System.Windows.Forms.DockStyle.Fill; - this.lblsysstatus.Location = new System.Drawing.Point(0, 43); - this.lblsysstatus.Name = "lblsysstatus"; - this.lblsysstatus.Padding = new System.Windows.Forms.Padding(15); - this.lblsysstatus.Size = new System.Drawing.Size(756, 421); - this.lblsysstatus.TabIndex = 1; - this.lblsysstatus.Text = "Username: {username}\r\nSystem name: {sysname}\r\n\r\nCodepoints: {cp}\r\nUpgrades: {boug" + - "ht}/{available}\r\n\r\nSystem version: {sysver}\r\n\r\nShared scripts: {scripts}\r\n\r\nCurr" + - "ent legion: {legionname}\r\nRole: {role}"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Dock = System.Windows.Forms.DockStyle.Top; - this.label1.Location = new System.Drawing.Point(0, 0); - this.label1.Margin = new System.Windows.Forms.Padding(15); - this.label1.Name = "label1"; - this.label1.Padding = new System.Windows.Forms.Padding(15); - this.label1.Size = new System.Drawing.Size(56, 43); - this.label1.TabIndex = 0; - this.label1.Tag = "header1"; - this.label1.Text = "You"; - // - // shop_all - // - this.shop_all.Controls.Add(this.flshoplist); - this.shop_all.Controls.Add(this.lblistdesc); - this.shop_all.Controls.Add(this.lblistname); - this.shop_all.Dock = System.Windows.Forms.DockStyle.Fill; - this.shop_all.Location = new System.Drawing.Point(0, 0); - this.shop_all.Name = "shop_all"; - this.shop_all.Size = new System.Drawing.Size(756, 464); - this.shop_all.TabIndex = 7; - // - // flshoplist - // - this.flshoplist.AutoScroll = true; - this.flshoplist.Dock = System.Windows.Forms.DockStyle.Fill; - this.flshoplist.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flshoplist.Location = new System.Drawing.Point(0, 94); - this.flshoplist.Name = "flshoplist"; - this.flshoplist.Size = new System.Drawing.Size(756, 370); - this.flshoplist.TabIndex = 1; - this.flshoplist.WrapContents = false; - // - // lblistdesc - // - this.lblistdesc.Dock = System.Windows.Forms.DockStyle.Top; - this.lblistdesc.Location = new System.Drawing.Point(0, 43); - this.lblistdesc.Name = "lblistdesc"; - this.lblistdesc.Padding = new System.Windows.Forms.Padding(15, 0, 15, 15); - this.lblistdesc.Size = new System.Drawing.Size(756, 51); - this.lblistdesc.TabIndex = 0; - this.lblistdesc.Tag = ""; - this.lblistdesc.Text = resources.GetString("lblistdesc.Text"); - // - // lblistname - // - this.lblistname.AutoSize = true; - this.lblistname.Dock = System.Windows.Forms.DockStyle.Top; - this.lblistname.Location = new System.Drawing.Point(0, 0); - this.lblistname.Name = "lblistname"; - this.lblistname.Padding = new System.Windows.Forms.Padding(15); - this.lblistname.Size = new System.Drawing.Size(67, 43); - this.lblistname.TabIndex = 2; - this.lblistname.Tag = "header1"; - this.lblistname.Text = "Shops"; - // - // shop_view - // - this.shop_view.Controls.Add(this.panel5); - this.shop_view.Controls.Add(this.panel1); - this.shop_view.Dock = System.Windows.Forms.DockStyle.Fill; - this.shop_view.Location = new System.Drawing.Point(0, 0); - this.shop_view.Name = "shop_view"; - this.shop_view.Size = new System.Drawing.Size(756, 464); - this.shop_view.TabIndex = 6; - // - // panel5 - // - this.panel5.Controls.Add(this.lbupgradedesc); - this.panel5.Controls.Add(this.pnlbuy); - this.panel5.Controls.Add(this.lbupgradetitle); - this.panel5.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel5.Location = new System.Drawing.Point(389, 0); - this.panel5.Name = "panel5"; - this.panel5.Size = new System.Drawing.Size(367, 464); - this.panel5.TabIndex = 1; - // - // lbupgradedesc - // - this.lbupgradedesc.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbupgradedesc.Location = new System.Drawing.Point(0, 43); - this.lbupgradedesc.Name = "lbupgradedesc"; - this.lbupgradedesc.Size = new System.Drawing.Size(367, 385); - this.lbupgradedesc.TabIndex = 2; - this.lbupgradedesc.Text = "label6"; - this.lbupgradedesc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // pnlbuy - // - this.pnlbuy.Controls.Add(this.btneditshop); - this.pnlbuy.Controls.Add(this.lbprice); - this.pnlbuy.Controls.Add(this.btnbuy); - this.pnlbuy.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlbuy.Location = new System.Drawing.Point(0, 428); - this.pnlbuy.Name = "pnlbuy"; - this.pnlbuy.Size = new System.Drawing.Size(367, 36); - this.pnlbuy.TabIndex = 1; - // - // btneditshop - // - this.btneditshop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btneditshop.Location = new System.Drawing.Point(198, 3); - this.btneditshop.Name = "btneditshop"; - this.btneditshop.Size = new System.Drawing.Size(75, 23); - this.btneditshop.TabIndex = 2; - this.btneditshop.Text = "Edit shop"; - this.btneditshop.UseVisualStyleBackColor = true; - this.btneditshop.Click += new System.EventHandler(this.btneditshop_Click); - // - // lbprice - // - this.lbprice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.lbprice.AutoSize = true; - this.lbprice.Location = new System.Drawing.Point(6, 10); - this.lbprice.Name = "lbprice"; - this.lbprice.Size = new System.Drawing.Size(35, 13); - this.lbprice.TabIndex = 1; - this.lbprice.Text = "label6"; - // - // btnbuy - // - this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnbuy.Location = new System.Drawing.Point(283, 3); - this.btnbuy.Name = "btnbuy"; - this.btnbuy.Size = new System.Drawing.Size(75, 23); - this.btnbuy.TabIndex = 0; - this.btnbuy.Text = "Buy"; - this.btnbuy.UseVisualStyleBackColor = true; - this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click); - // - // lbupgradetitle - // - this.lbupgradetitle.Dock = System.Windows.Forms.DockStyle.Top; - this.lbupgradetitle.Location = new System.Drawing.Point(0, 0); - this.lbupgradetitle.Name = "lbupgradetitle"; - this.lbupgradetitle.Size = new System.Drawing.Size(367, 43); - this.lbupgradetitle.TabIndex = 0; - this.lbupgradetitle.Tag = "header2"; - this.lbupgradetitle.Text = "Welcome to my shop!"; - this.lbupgradetitle.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // panel1 - // - this.panel1.Controls.Add(this.lbupgrades); - this.panel1.Controls.Add(this.lbcodepoints); - this.panel1.Controls.Add(this.lbshopname); - this.panel1.Cursor = System.Windows.Forms.Cursors.Default; - this.panel1.Dock = System.Windows.Forms.DockStyle.Left; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(389, 464); - this.panel1.TabIndex = 0; - // - // lbupgrades - // - this.lbupgrades.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbupgrades.FormattingEnabled = true; - this.lbupgrades.Location = new System.Drawing.Point(0, 46); - this.lbupgrades.Name = "lbupgrades"; - this.lbupgrades.Size = new System.Drawing.Size(389, 405); - this.lbupgrades.TabIndex = 2; - // - // lbcodepoints - // - this.lbcodepoints.AutoSize = true; - this.lbcodepoints.Dock = System.Windows.Forms.DockStyle.Bottom; - this.lbcodepoints.Location = new System.Drawing.Point(0, 451); - this.lbcodepoints.Margin = new System.Windows.Forms.Padding(10); - this.lbcodepoints.Name = "lbcodepoints"; - this.lbcodepoints.Size = new System.Drawing.Size(72, 13); - this.lbcodepoints.TabIndex = 1; - this.lbcodepoints.Tag = "header2"; - this.lbcodepoints.Text = "Codepoints: 0"; - // - // lbshopname - // - this.lbshopname.Dock = System.Windows.Forms.DockStyle.Top; - this.lbshopname.Location = new System.Drawing.Point(0, 0); - this.lbshopname.Name = "lbshopname"; - this.lbshopname.Size = new System.Drawing.Size(389, 46); - this.lbshopname.TabIndex = 0; - this.lbshopname.Tag = "header1"; - this.lbshopname.Text = "My shop"; - this.lbshopname.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // shop_editor - // - this.shop_editor.Controls.Add(this.panel7); - this.shop_editor.Controls.Add(this.panel9); - this.shop_editor.Dock = System.Windows.Forms.DockStyle.Fill; - this.shop_editor.Location = new System.Drawing.Point(0, 0); - this.shop_editor.Name = "shop_editor"; - this.shop_editor.Size = new System.Drawing.Size(756, 464); - this.shop_editor.TabIndex = 8; - // - // panel7 - // - this.panel7.Controls.Add(this.txtshopdescription); - this.panel7.Controls.Add(this.panel8); - this.panel7.Controls.Add(this.label16); - this.panel7.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel7.Location = new System.Drawing.Point(389, 0); - this.panel7.Name = "panel7"; - this.panel7.Size = new System.Drawing.Size(367, 464); - this.panel7.TabIndex = 1; - // - // txtshopdescription - // - this.txtshopdescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.txtshopdescription.Location = new System.Drawing.Point(0, 43); - this.txtshopdescription.Multiline = true; - this.txtshopdescription.Name = "txtshopdescription"; - this.txtshopdescription.Size = new System.Drawing.Size(367, 385); - this.txtshopdescription.TabIndex = 2; - this.txtshopdescription.TextChanged += new System.EventHandler(this.txtshopdescription_TextChanged); - // - // panel8 - // - this.panel8.Controls.Add(this.label15); - this.panel8.Controls.Add(this.btnsaveshop); - this.panel8.Dock = System.Windows.Forms.DockStyle.Bottom; - this.panel8.Location = new System.Drawing.Point(0, 428); - this.panel8.Name = "panel8"; - this.panel8.Size = new System.Drawing.Size(367, 36); - this.panel8.TabIndex = 1; - // - // label15 - // - this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(6, 10); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(267, 13); - this.label15.TabIndex = 1; - this.label15.Text = "When you are done editing your shop, click this button:"; - // - // btnsaveshop - // - this.btnsaveshop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnsaveshop.Location = new System.Drawing.Point(283, 3); - this.btnsaveshop.Name = "btnsaveshop"; - this.btnsaveshop.Size = new System.Drawing.Size(75, 23); - this.btnsaveshop.TabIndex = 0; - this.btnsaveshop.Text = "Save"; - this.btnsaveshop.UseVisualStyleBackColor = true; - this.btnsaveshop.Click += new System.EventHandler(this.btnsaveshop_Click); - // - // label16 - // - this.label16.Dock = System.Windows.Forms.DockStyle.Top; - this.label16.Location = new System.Drawing.Point(0, 0); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(367, 43); - this.label16.TabIndex = 0; - this.label16.Tag = "header2"; - this.label16.Text = "Welcome to my shop!"; - this.label16.TextAlign = System.Drawing.ContentAlignment.TopCenter; - // - // panel9 - // - this.panel9.Controls.Add(this.lbeditingshopitems); - this.panel9.Controls.Add(this.txtshopname); - this.panel9.Controls.Add(this.flowLayoutPanel5); - this.panel9.Cursor = System.Windows.Forms.Cursors.Default; - this.panel9.Dock = System.Windows.Forms.DockStyle.Left; - this.panel9.Location = new System.Drawing.Point(0, 0); - this.panel9.Name = "panel9"; - this.panel9.Size = new System.Drawing.Size(389, 464); - this.panel9.TabIndex = 0; - // - // lbeditingshopitems - // - this.lbeditingshopitems.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbeditingshopitems.FormattingEnabled = true; - this.lbeditingshopitems.Location = new System.Drawing.Point(0, 20); - this.lbeditingshopitems.Name = "lbeditingshopitems"; - this.lbeditingshopitems.Size = new System.Drawing.Size(389, 415); - this.lbeditingshopitems.TabIndex = 2; - // - // txtshopname - // - this.txtshopname.Dock = System.Windows.Forms.DockStyle.Top; - this.txtshopname.Location = new System.Drawing.Point(0, 0); - this.txtshopname.Name = "txtshopname"; - this.txtshopname.Size = new System.Drawing.Size(389, 20); - this.txtshopname.TabIndex = 4; - this.txtshopname.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtshopname.TextChanged += new System.EventHandler(this.txtshopname_TextChanged); - // - // flowLayoutPanel5 - // - this.flowLayoutPanel5.AutoSize = true; - this.flowLayoutPanel5.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel5.Controls.Add(this.btnaddshopitem); - this.flowLayoutPanel5.Controls.Add(this.btnremoveitem); - this.flowLayoutPanel5.Controls.Add(this.btnedititem); - this.flowLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flowLayoutPanel5.Location = new System.Drawing.Point(0, 435); - this.flowLayoutPanel5.Name = "flowLayoutPanel5"; - this.flowLayoutPanel5.Size = new System.Drawing.Size(389, 29); - this.flowLayoutPanel5.TabIndex = 3; - // - // btnaddshopitem - // - this.btnaddshopitem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnaddshopitem.AutoSize = true; - this.btnaddshopitem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnaddshopitem.Location = new System.Drawing.Point(3, 3); - this.btnaddshopitem.Name = "btnaddshopitem"; - this.btnaddshopitem.Size = new System.Drawing.Size(36, 23); - this.btnaddshopitem.TabIndex = 1; - this.btnaddshopitem.Text = "Add"; - this.btnaddshopitem.UseVisualStyleBackColor = true; - this.btnaddshopitem.Click += new System.EventHandler(this.btnaddshopitem_Click); - // - // btnremoveitem - // - this.btnremoveitem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnremoveitem.AutoSize = true; - this.btnremoveitem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnremoveitem.Location = new System.Drawing.Point(45, 3); - this.btnremoveitem.Name = "btnremoveitem"; - this.btnremoveitem.Size = new System.Drawing.Size(57, 23); - this.btnremoveitem.TabIndex = 2; - this.btnremoveitem.Text = "Remove"; - this.btnremoveitem.UseVisualStyleBackColor = true; - this.btnremoveitem.Click += new System.EventHandler(this.btnremoveitem_Click); - // - // btnedititem - // - this.btnedititem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnedititem.AutoSize = true; - this.btnedititem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnedititem.Location = new System.Drawing.Point(108, 3); - this.btnedititem.Name = "btnedititem"; - this.btnedititem.Size = new System.Drawing.Size(35, 23); - this.btnedititem.TabIndex = 3; - this.btnedititem.Text = "Edit"; - this.btnedititem.UseVisualStyleBackColor = true; - this.btnedititem.Click += new System.EventHandler(this.btnedititem_Click); - // - // lgn_create - // - this.lgn_create.Controls.Add(this.btncreate); - this.lgn_create.Controls.Add(this.txtnewlegiondescription); - this.lgn_create.Controls.Add(this.panel2); - this.lgn_create.Controls.Add(this.label7); - this.lgn_create.Controls.Add(this.panel4); - this.lgn_create.Dock = System.Windows.Forms.DockStyle.Fill; - this.lgn_create.Location = new System.Drawing.Point(0, 0); - this.lgn_create.Name = "lgn_create"; - this.lgn_create.Size = new System.Drawing.Size(756, 464); - this.lgn_create.TabIndex = 4; - // - // btncreate - // - this.btncreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btncreate.Location = new System.Drawing.Point(672, 415); - this.btncreate.Name = "btncreate"; - this.btncreate.Size = new System.Drawing.Size(75, 23); - this.btncreate.TabIndex = 5; - this.btncreate.Text = "Create"; - this.btncreate.UseVisualStyleBackColor = true; - this.btncreate.Click += new System.EventHandler(this.btncreate_Click); - // - // txtnewlegiondescription - // - this.txtnewlegiondescription.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.txtnewlegiondescription.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtnewlegiondescription.Location = new System.Drawing.Point(21, 176); - this.txtnewlegiondescription.Multiline = true; - this.txtnewlegiondescription.Name = "txtnewlegiondescription"; - this.txtnewlegiondescription.Size = new System.Drawing.Size(368, 262); - this.txtnewlegiondescription.TabIndex = 4; - this.txtnewlegiondescription.TextChanged += new System.EventHandler(this.txtnewlegiondescription_TextChanged); - // - // panel2 - // - this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel2.Controls.Add(this.label10); - this.panel2.Controls.Add(this.label5); - this.panel2.Location = new System.Drawing.Point(413, 130); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(337, 278); - this.panel2.TabIndex = 3; - // - // label10 - // - this.label10.Dock = System.Windows.Forms.DockStyle.Fill; - this.label10.Location = new System.Drawing.Point(0, 13); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(337, 265); - this.label10.TabIndex = 3; - this.label10.Text = resources.GetString("label10.Text"); - // - // label5 - // - this.label5.AutoSize = true; - this.label5.Dock = System.Windows.Forms.DockStyle.Top; - this.label5.Location = new System.Drawing.Point(0, 0); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(61, 13); - this.label5.TabIndex = 2; - this.label5.Tag = "header2"; - this.label5.Text = "Instructions"; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(21, 130); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(60, 13); - this.label7.TabIndex = 1; - this.label7.Tag = "header2"; - this.label7.Text = "Description"; - // - // panel4 - // - this.panel4.BackColor = System.Drawing.Color.Blue; - this.panel4.Controls.Add(this.cbpublicity); - this.panel4.Controls.Add(this.cbcolorchooser); - this.panel4.Controls.Add(this.flowLayoutPanel3); - this.panel4.Controls.Add(this.flowLayoutPanel4); - this.panel4.Dock = System.Windows.Forms.DockStyle.Top; - this.panel4.Location = new System.Drawing.Point(0, 0); - this.panel4.Name = "panel4"; - this.panel4.Size = new System.Drawing.Size(756, 100); - this.panel4.TabIndex = 0; - this.panel4.Tag = "keepbg"; - // - // cbpublicity - // - this.cbpublicity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.cbpublicity.FormattingEnabled = true; - this.cbpublicity.Location = new System.Drawing.Point(502, 73); - this.cbpublicity.Name = "cbpublicity"; - this.cbpublicity.Size = new System.Drawing.Size(121, 21); - this.cbpublicity.TabIndex = 6; - // - // cbcolorchooser - // - this.cbcolorchooser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.cbcolorchooser.FormattingEnabled = true; - this.cbcolorchooser.Location = new System.Drawing.Point(629, 73); - this.cbcolorchooser.Name = "cbcolorchooser"; - this.cbcolorchooser.Size = new System.Drawing.Size(121, 21); - this.cbcolorchooser.TabIndex = 5; - this.cbcolorchooser.SelectedIndexChanged += new System.EventHandler(this.cbcolorchooser_SelectedIndexChanged); - // - // flowLayoutPanel3 - // - this.flowLayoutPanel3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.flowLayoutPanel3.AutoSize = true; - this.flowLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel3.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.flowLayoutPanel3.Location = new System.Drawing.Point(712, 224); - this.flowLayoutPanel3.Name = "flowLayoutPanel3"; - this.flowLayoutPanel3.Size = new System.Drawing.Size(0, 0); - this.flowLayoutPanel3.TabIndex = 2; - this.flowLayoutPanel3.Tag = "keepbg"; - this.flowLayoutPanel3.Paint += new System.Windows.Forms.PaintEventHandler(this.flowLayoutPanel3_Paint); - // - // flowLayoutPanel4 - // - this.flowLayoutPanel4.AutoSize = true; - this.flowLayoutPanel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel4.Controls.Add(this.label9); - this.flowLayoutPanel4.Controls.Add(this.txtnewlegionshortname); - this.flowLayoutPanel4.Controls.Add(this.label11); - this.flowLayoutPanel4.Controls.Add(this.txtnewlegiontitle); - this.flowLayoutPanel4.Location = new System.Drawing.Point(27, 33); - this.flowLayoutPanel4.Name = "flowLayoutPanel4"; - this.flowLayoutPanel4.Size = new System.Drawing.Size(174, 19); - this.flowLayoutPanel4.TabIndex = 4; - this.flowLayoutPanel4.Tag = "keepbg"; - // - // label9 - // - this.label9.AutoSize = true; - this.label9.Location = new System.Drawing.Point(3, 0); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(10, 13); - this.label9.TabIndex = 4; - this.label9.Tag = "keepbg header1"; - this.label9.Text = "["; - // - // txtnewlegionshortname - // - this.txtnewlegionshortname.BackColor = System.Drawing.Color.Blue; - this.txtnewlegionshortname.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtnewlegionshortname.ForeColor = System.Drawing.Color.White; - this.txtnewlegionshortname.Location = new System.Drawing.Point(19, 3); - this.txtnewlegionshortname.MaxLength = 4; - this.txtnewlegionshortname.MinimumSize = new System.Drawing.Size(4, 13); - this.txtnewlegionshortname.Name = "txtnewlegionshortname"; - this.txtnewlegionshortname.Size = new System.Drawing.Size(36, 13); - this.txtnewlegionshortname.TabIndex = 3; - this.txtnewlegionshortname.Tag = "inheritbg inheritfg header1"; - this.txtnewlegionshortname.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtnewlegionshortname.TextChanged += new System.EventHandler(this.txtnewlegionshortname_TextChanged); - // - // label11 - // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(61, 0); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(13, 13); - this.label11.TabIndex = 5; - this.label11.Tag = "keepbg header1"; - this.label11.Text = "] "; - // - // txtnewlegiontitle - // - this.txtnewlegiontitle.BackColor = System.Drawing.Color.Blue; - this.txtnewlegiontitle.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.txtnewlegiontitle.ForeColor = System.Drawing.Color.White; - this.txtnewlegiontitle.Location = new System.Drawing.Point(80, 3); - this.txtnewlegiontitle.MaxLength = 25; - this.txtnewlegiontitle.Name = "txtnewlegiontitle"; - this.txtnewlegiontitle.Size = new System.Drawing.Size(91, 13); - this.txtnewlegiontitle.TabIndex = 6; - this.txtnewlegiontitle.Tag = "inheritbg inheritfg header1"; - this.txtnewlegiontitle.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.txtnewlegiontitle.TextChanged += new System.EventHandler(this.txtnewlegiontitle_TextChanged); - // - // job_current - // - this.job_current.Controls.Add(this.lbtaskdescription); - this.job_current.Controls.Add(this.lbtaskname); - this.job_current.Controls.Add(this.label6); - this.job_current.Dock = System.Windows.Forms.DockStyle.Fill; - this.job_current.Location = new System.Drawing.Point(0, 0); - this.job_current.Name = "job_current"; - this.job_current.Size = new System.Drawing.Size(756, 464); - this.job_current.TabIndex = 3; - // - // lbtaskdescription - // - this.lbtaskdescription.Dock = System.Windows.Forms.DockStyle.Fill; - this.lbtaskdescription.Location = new System.Drawing.Point(0, 26); - this.lbtaskdescription.Margin = new System.Windows.Forms.Padding(30); - this.lbtaskdescription.Name = "lbtaskdescription"; - this.lbtaskdescription.Size = new System.Drawing.Size(756, 438); - this.lbtaskdescription.TabIndex = 2; - this.lbtaskdescription.Text = "label12"; - // - // lbtaskname - // - this.lbtaskname.AutoSize = true; - this.lbtaskname.Dock = System.Windows.Forms.DockStyle.Top; - this.lbtaskname.Location = new System.Drawing.Point(0, 13); - this.lbtaskname.Margin = new System.Windows.Forms.Padding(15); - this.lbtaskname.Name = "lbtaskname"; - this.lbtaskname.Size = new System.Drawing.Size(60, 13); - this.lbtaskname.TabIndex = 1; - this.lbtaskname.Tag = "header2"; - this.lbtaskname.Text = "Task name"; - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Dock = System.Windows.Forms.DockStyle.Top; - this.label6.Location = new System.Drawing.Point(0, 0); - this.label6.Margin = new System.Windows.Forms.Padding(15); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(68, 13); - this.label6.TabIndex = 0; - this.label6.Tag = "header1"; - this.label6.Text = "Current Task"; - // - // lgn_view - // - this.lgn_view.Controls.Add(this.pnllgnusers); - this.lgn_view.Controls.Add(this.lbdescription); - this.lgn_view.Controls.Add(this.label2); - this.lgn_view.Controls.Add(this.banner); - this.lgn_view.Dock = System.Windows.Forms.DockStyle.Fill; - this.lgn_view.Location = new System.Drawing.Point(0, 0); - this.lgn_view.Name = "lgn_view"; - this.lgn_view.Size = new System.Drawing.Size(756, 464); - this.lgn_view.TabIndex = 2; - // - // pnllgnusers - // - this.pnllgnusers.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Right))); - this.pnllgnusers.Controls.Add(this.lvusers); - this.pnllgnusers.Controls.Add(this.label4); - this.pnllgnusers.Location = new System.Drawing.Point(413, 130); - this.pnllgnusers.Name = "pnllgnusers"; - this.pnllgnusers.Size = new System.Drawing.Size(337, 308); - this.pnllgnusers.TabIndex = 3; - // - // lvusers - // - this.lvusers.Dock = System.Windows.Forms.DockStyle.Fill; - this.lvusers.FullRowSelect = true; - this.lvusers.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; - this.lvusers.HideSelection = false; - this.lvusers.Location = new System.Drawing.Point(0, 13); - this.lvusers.Name = "lvusers"; - this.lvusers.Size = new System.Drawing.Size(337, 295); - this.lvusers.TabIndex = 3; - this.lvusers.UseCompatibleStateImageBehavior = false; - this.lvusers.View = System.Windows.Forms.View.SmallIcon; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Dock = System.Windows.Forms.DockStyle.Top; - this.label4.Location = new System.Drawing.Point(0, 0); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(34, 13); - this.label4.TabIndex = 2; - this.label4.Tag = "header2"; - this.label4.Text = "Users"; - // - // lbdescription - // - this.lbdescription.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.lbdescription.Location = new System.Drawing.Point(24, 185); - this.lbdescription.Name = "lbdescription"; - this.lbdescription.Size = new System.Drawing.Size(354, 253); - this.lbdescription.TabIndex = 2; - this.lbdescription.Text = "This is the description of this multi-user domain legion. Keep it descriptive."; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(21, 130); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(60, 13); - this.label2.TabIndex = 1; - this.label2.Tag = "header2"; - this.label2.Text = "Description"; - // - // banner - // - this.banner.BackColor = System.Drawing.Color.Blue; - this.banner.Controls.Add(this.flowLayoutPanel1); - this.banner.Controls.Add(this.lblegiontitle); - this.banner.Dock = System.Windows.Forms.DockStyle.Top; - this.banner.Location = new System.Drawing.Point(0, 0); - this.banner.Name = "banner"; - this.banner.Size = new System.Drawing.Size(756, 100); - this.banner.TabIndex = 0; - this.banner.Tag = "keepbg"; - // - // flowLayoutPanel1 - // - this.flowLayoutPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.flowLayoutPanel1.AutoSize = true; - this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel1.Controls.Add(this.btnleavelegion); - this.flowLayoutPanel1.Controls.Add(this.btnjoinlegion); - this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.flowLayoutPanel1.Location = new System.Drawing.Point(550, 68); - this.flowLayoutPanel1.Name = "flowLayoutPanel1"; - this.flowLayoutPanel1.Size = new System.Drawing.Size(203, 29); - this.flowLayoutPanel1.TabIndex = 2; - this.flowLayoutPanel1.Tag = "keepbg"; - // - // btnleavelegion - // - this.btnleavelegion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnleavelegion.AutoSize = true; - this.btnleavelegion.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnleavelegion.Location = new System.Drawing.Point(99, 3); - this.btnleavelegion.Name = "btnleavelegion"; - this.btnleavelegion.Size = new System.Drawing.Size(101, 23); - this.btnleavelegion.TabIndex = 1; - this.btnleavelegion.Tag = "keepbg"; - this.btnleavelegion.Text = "Leave this Legion"; - this.btnleavelegion.UseVisualStyleBackColor = true; - this.btnleavelegion.Click += new System.EventHandler(this.btnleavelegion_Click); - // - // btnjoinlegion - // - this.btnjoinlegion.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btnjoinlegion.AutoSize = true; - this.btnjoinlegion.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnjoinlegion.Location = new System.Drawing.Point(3, 3); - this.btnjoinlegion.Name = "btnjoinlegion"; - this.btnjoinlegion.Size = new System.Drawing.Size(90, 23); - this.btnjoinlegion.TabIndex = 2; - this.btnjoinlegion.Tag = "keepbg"; - this.btnjoinlegion.Text = "Join this Legion"; - this.btnjoinlegion.UseVisualStyleBackColor = true; - this.btnjoinlegion.Click += new System.EventHandler(this.btnjoinlegion_Click); - // - // lblegiontitle - // - this.lblegiontitle.AutoSize = true; - this.lblegiontitle.Location = new System.Drawing.Point(18, 30); - this.lblegiontitle.Name = "lblegiontitle"; - this.lblegiontitle.Size = new System.Drawing.Size(62, 13); - this.lblegiontitle.TabIndex = 0; - this.lblegiontitle.Tag = "header1 keepbg"; - this.lblegiontitle.Text = "Legion Title"; - // - // lgn_join - // - this.lgn_join.Controls.Add(this.fllegionlist); - this.lgn_join.Controls.Add(this.panel3); - this.lgn_join.Dock = System.Windows.Forms.DockStyle.Fill; - this.lgn_join.Location = new System.Drawing.Point(0, 0); - this.lgn_join.Name = "lgn_join"; - this.lgn_join.Size = new System.Drawing.Size(756, 464); - this.lgn_join.TabIndex = 3; - // - // fllegionlist - // - this.fllegionlist.AutoScroll = true; - this.fllegionlist.Dock = System.Windows.Forms.DockStyle.Fill; - this.fllegionlist.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.fllegionlist.Location = new System.Drawing.Point(0, 100); - this.fllegionlist.Name = "fllegionlist"; - this.fllegionlist.Size = new System.Drawing.Size(756, 364); - this.fllegionlist.TabIndex = 1; - this.fllegionlist.WrapContents = false; - // - // panel3 - // - this.panel3.BackColor = System.Drawing.Color.Blue; - this.panel3.Controls.Add(this.flowLayoutPanel2); - this.panel3.Controls.Add(this.label8); - this.panel3.Dock = System.Windows.Forms.DockStyle.Top; - this.panel3.Location = new System.Drawing.Point(0, 0); - this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(756, 100); - this.panel3.TabIndex = 0; - this.panel3.Tag = ""; - // - // flowLayoutPanel2 - // - this.flowLayoutPanel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.flowLayoutPanel2.AutoSize = true; - this.flowLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.flowLayoutPanel2.Controls.Add(this.button1); - this.flowLayoutPanel2.Controls.Add(this.button2); - this.flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; - this.flowLayoutPanel2.Location = new System.Drawing.Point(547, 3); - this.flowLayoutPanel2.Name = "flowLayoutPanel2"; - this.flowLayoutPanel2.Size = new System.Drawing.Size(209, 29); - this.flowLayoutPanel2.TabIndex = 2; - this.flowLayoutPanel2.Tag = "keepbg"; - // - // button1 - // - this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button1.AutoSize = true; - this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.button1.Location = new System.Drawing.Point(100, 3); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(106, 23); - this.button1.TabIndex = 1; - this.button1.Tag = "keepbg"; - this.button1.Text = "Create new Legion"; - this.button1.UseVisualStyleBackColor = true; - // - // button2 - // - this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.button2.AutoSize = true; - this.button2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.button2.Location = new System.Drawing.Point(3, 3); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(91, 23); - this.button2.TabIndex = 2; - this.button2.Tag = "keepbg"; - this.button2.Text = "Use invite code"; - this.button2.UseVisualStyleBackColor = true; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(18, 17); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(70, 13); - this.label8.TabIndex = 0; - this.label8.Tag = "header1 keepbg"; - this.label8.Text = "Join a Legion"; - // - // you_memos - // - this.you_memos.Controls.Add(this.flmemos); - this.you_memos.Controls.Add(this.label3); - this.you_memos.Dock = System.Windows.Forms.DockStyle.Fill; - this.you_memos.Location = new System.Drawing.Point(0, 0); - this.you_memos.Name = "you_memos"; - this.you_memos.Size = new System.Drawing.Size(756, 464); - this.you_memos.TabIndex = 1; - // - // flmemos - // - this.flmemos.Dock = System.Windows.Forms.DockStyle.Fill; - this.flmemos.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.flmemos.Location = new System.Drawing.Point(0, 43); - this.flmemos.Name = "flmemos"; - this.flmemos.Padding = new System.Windows.Forms.Padding(15); - this.flmemos.Size = new System.Drawing.Size(756, 421); - this.flmemos.TabIndex = 1; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Dock = System.Windows.Forms.DockStyle.Top; - this.label3.Location = new System.Drawing.Point(0, 0); - this.label3.Margin = new System.Windows.Forms.Padding(15); - this.label3.Name = "label3"; - this.label3.Padding = new System.Windows.Forms.Padding(15); - this.label3.Size = new System.Drawing.Size(71, 43); - this.label3.TabIndex = 0; - this.label3.Tag = "header1"; - this.label3.Text = "Memos"; - // - // MUDControlCentre - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Black; - this.Controls.Add(this.toolStripContainer1); - this.ForeColor = System.Drawing.Color.White; - this.Name = "MUDControlCentre"; - this.Size = new System.Drawing.Size(756, 488); - this.menuStrip1.ResumeLayout(false); - this.menuStrip1.PerformLayout(); - this.toolStripContainer1.ContentPanel.ResumeLayout(false); - this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); - this.toolStripContainer1.TopToolStripPanel.PerformLayout(); - this.toolStripContainer1.ResumeLayout(false); - this.toolStripContainer1.PerformLayout(); - this.pnlclasses.ResumeLayout(false); - this.pnlclasses.PerformLayout(); - this.flowLayoutPanel6.ResumeLayout(false); - this.flowLayoutPanel6.PerformLayout(); - this.you_systemstatus.ResumeLayout(false); - this.you_systemstatus.PerformLayout(); - this.shop_all.ResumeLayout(false); - this.shop_all.PerformLayout(); - this.shop_view.ResumeLayout(false); - this.panel5.ResumeLayout(false); - this.pnlbuy.ResumeLayout(false); - this.pnlbuy.PerformLayout(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); - this.shop_editor.ResumeLayout(false); - this.panel7.ResumeLayout(false); - this.panel7.PerformLayout(); - this.panel8.ResumeLayout(false); - this.panel8.PerformLayout(); - this.panel9.ResumeLayout(false); - this.panel9.PerformLayout(); - this.flowLayoutPanel5.ResumeLayout(false); - this.flowLayoutPanel5.PerformLayout(); - this.lgn_create.ResumeLayout(false); - this.lgn_create.PerformLayout(); - this.panel2.ResumeLayout(false); - this.panel2.PerformLayout(); - this.panel4.ResumeLayout(false); - this.panel4.PerformLayout(); - this.flowLayoutPanel4.ResumeLayout(false); - this.flowLayoutPanel4.PerformLayout(); - this.job_current.ResumeLayout(false); - this.job_current.PerformLayout(); - this.lgn_view.ResumeLayout(false); - this.lgn_view.PerformLayout(); - this.pnllgnusers.ResumeLayout(false); - this.pnllgnusers.PerformLayout(); - this.banner.ResumeLayout(false); - this.banner.PerformLayout(); - this.flowLayoutPanel1.ResumeLayout(false); - this.flowLayoutPanel1.PerformLayout(); - this.lgn_join.ResumeLayout(false); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - this.flowLayoutPanel2.ResumeLayout(false); - this.flowLayoutPanel2.PerformLayout(); - this.you_memos.ResumeLayout(false); - this.you_memos.PerformLayout(); - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.MenuStrip menuStrip1; - private System.Windows.Forms.ToolStripMenuItem youToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem profileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem tsMemos; - private System.Windows.Forms.ToolStripMenuItem disconnectFromMuDToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem shopsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem browseToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem myShopToolStripMenuItem; - private System.Windows.Forms.ToolStripContainer toolStripContainer1; - private System.Windows.Forms.Panel you_systemstatus; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label lblsysstatus; - private System.Windows.Forms.Panel you_memos; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.FlowLayoutPanel flmemos; - private System.Windows.Forms.ToolStripMenuItem legionsToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem createLegionToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem joinLegionToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem myLegionToolStripMenuItem; - private System.Windows.Forms.Panel lgn_view; - private System.Windows.Forms.Panel banner; - private System.Windows.Forms.Label lblegiontitle; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; - private System.Windows.Forms.Button btnleavelegion; - private System.Windows.Forms.Button btnjoinlegion; - private System.Windows.Forms.Panel pnllgnusers; - private System.Windows.Forms.ListView lvusers; - private System.Windows.Forms.Label label4; - private System.Windows.Forms.Label lbdescription; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Panel lgn_join; - private System.Windows.Forms.FlowLayoutPanel fllegionlist; - private System.Windows.Forms.Panel panel3; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; - private System.Windows.Forms.Button button1; - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Label label8; - private System.Windows.Forms.Panel lgn_create; - private System.Windows.Forms.TextBox txtnewlegiondescription; - private System.Windows.Forms.Panel panel2; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label5; - private System.Windows.Forms.Label label7; - private System.Windows.Forms.Panel panel4; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox txtnewlegionshortname; - private System.Windows.Forms.Label label11; - private System.Windows.Forms.TextBox txtnewlegiontitle; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; - private System.Windows.Forms.ToolStripMenuItem openAShopToolStripMenuItem; - private System.Windows.Forms.ComboBox cbcolorchooser; - private System.Windows.Forms.Button btncreate; - private System.Windows.Forms.ComboBox cbpublicity; - private System.Windows.Forms.Panel shop_view; - private System.Windows.Forms.Panel panel5; - private System.Windows.Forms.Label lbupgradedesc; - private System.Windows.Forms.Panel pnlbuy; - private System.Windows.Forms.Label lbprice; - private System.Windows.Forms.Button btnbuy; - private System.Windows.Forms.Label lbupgradetitle; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.ListBox lbupgrades; - private System.Windows.Forms.Label lbcodepoints; - private System.Windows.Forms.Label lbshopname; - private System.Windows.Forms.Panel job_current; - private System.Windows.Forms.Label lbtaskname; - private System.Windows.Forms.Label label6; - private System.Windows.Forms.Label lbtaskdescription; - private System.Windows.Forms.Panel shop_all; - private System.Windows.Forms.FlowLayoutPanel flshoplist; - private System.Windows.Forms.Label lblistdesc; - private System.Windows.Forms.Label lblistname; - private System.Windows.Forms.Panel shop_editor; - private System.Windows.Forms.Panel panel7; - private System.Windows.Forms.TextBox txtshopdescription; - private System.Windows.Forms.Panel panel8; - private System.Windows.Forms.Label label15; - private System.Windows.Forms.Button btnsaveshop; - private System.Windows.Forms.Label label16; - private System.Windows.Forms.Panel panel9; - private System.Windows.Forms.ListBox lbeditingshopitems; - private System.Windows.Forms.TextBox txtshopname; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5; - private System.Windows.Forms.Button btnaddshopitem; - private System.Windows.Forms.Button btnremoveitem; - private System.Windows.Forms.Button btnedititem; - private System.Windows.Forms.Button btneditshop; - private System.Windows.Forms.Button btndeletesave; - private System.Windows.Forms.Panel pnlclasses; - private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel6; - private System.Windows.Forms.Button btnchooseclass; - private System.Windows.Forms.ListBox lbclasses; - private System.Windows.Forms.Label lbclassdesc; - private System.Windows.Forms.Label lbclasstitle; - } -} diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs deleted file mode 100644 index 97212e7..0000000 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.cs +++ /dev/null @@ -1,958 +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; -using ShiftOS.Engine; -using Newtonsoft.Json; -using ShiftOS.Objects; -using ShiftOS.WinForms.Tools; - -namespace ShiftOS.WinForms.Applications -{ - [MultiplayerOnly] - [RequiresUpgrade("mud_control_centre")] - [Launcher("MUD Control Centre", true, "al_mud_control_centre", "Networking")] - [WinOpen("mud_control_centre")] - [DefaultIcon("iconSysinfo")] - [DefaultTitle("MUD Control Centre")] - public partial class MUDControlCentre : UserControl, IShiftOSWindow - { - public MUDControlCentre() - { - if (SaveSystem.CurrentSave.CurrentLegions == null) - SaveSystem.CurrentSave.CurrentLegions = new List(); - InitializeComponent(); - ServerManager.MessageReceived += (msg) => - { - try - { - this.Invoke(new Action(() => - { - if (msg.Name == "user_not_found_in_legion") - { - - ShowLegionInfo(new Legion - { - Name = "No legion", - ShortName = "NONE", - Description = "You are not currently in any legions! You can go to 'Join Legion' and look for a legion to join, however, or create your own.", - Publicity = LegionPublicity.UnlistedInviteOnly, - BannerColor = ConsoleColor.DarkRed - }); - } - else if (msg.Name == "legion_create_ok") - { - SaveSystem.CurrentSave.CurrentLegions.Clear(); - SaveSystem.CurrentSave.CurrentLegions.Add(editingLegion.ShortName); - SaveSystem.SaveGame(); - this.Invoke(new Action(() => - { - myLegionToolStripMenuItem_Click(this, EventArgs.Empty); - })); - } - else if(msg.Name == "chat_all") - { - this.Invoke(new Action(() => - { - this.ListAllChats(JsonConvert.DeserializeObject(msg.Contents)); - })); - } - else if (msg.Name == "user_shop_check_result") - { - if (msg.Contents == "0") - { - ShowCreateShop(); - } - else - { - Infobox.PromptYesNo("Close Shop", "You already own a MUD shop. Would you like to close it and create a new one?", new Action((result) => - { - if (result == true) - { - ServerManager.SendMessage("shop_removeowned", JsonConvert.SerializeObject(new - { - username = SaveSystem.CurrentUser.Username - })); - ShowCreateShop(); - } - })); - } - } - else if (msg.Name == "legion_alreadyexists") - { - 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") - { - lvusers.Items.Clear(); - foreach (var usr in JsonConvert.DeserializeObject(msg.Contents)) - { - lvusers.Items.Add(usr); - } - } - else if (msg.Name == "user_legion") - { - ShowLegionInfo(JsonConvert.DeserializeObject(msg.Contents)); - } - else if (msg.Name == "shop_taken") - { - this.Invoke(new Action(() => - { - Infobox.Show("Shop name taken.", "A shop with the same name already exists."); - })); - } - else if (msg.Name == "shop_added") - { - ServerManager.SendMessage("shop_getall", ""); - } - else if (msg.Name == "legion_all") - { - PopulateJoinLegion(JsonConvert.DeserializeObject>(msg.Contents)); - } - else if(msg.Name == "user_shop") - { - this.Invoke(new Action(() => - { - ShowShop(JsonConvert.DeserializeObject(msg.Contents)); - })); - } - else if(msg.Name == "shop_additem") - { - var contents = JsonConvert.DeserializeObject>(msg.Contents); - if((string)contents["shop"] == CurrentShop.Name) - { - CurrentShop.Items.Add(JsonConvert.DeserializeObject(DownloadManager.Decompress(DownloadManager.Decompress(contents["itemdata"] as string)))); - this.Invoke(new Action(PopulateShopView)); - } - } - else if(msg.Name == "user_noshop") - { - this.Invoke(new Action(() => - { - Infobox.Show("No shop.", "You do not currently own any shops. You must open one to use this screen."); - })); - } - else if (msg.Name == "shop_all") - { - this.Invoke(new Action(() => - { - PopulateShopList(JsonConvert.DeserializeObject(msg.Contents)); - })); - } - })); - } - catch { } - }; - } - - - - internal void ShowClasses() - { - var descriptions = new Dictionary { - - { UserClass.Skinner, "Skinners, otherwise known as \"Shifters\" due to their excessive use of the Shifter application, like to customize ShiftOS to look like other operating systems or even have an entirely different UI. They gain heaps of codepoints from it, and like to sell their skins for even more Codepoints." }, - { UserClass.Hacker, "Hackers are notorious for taking down large groups and individuals of which have many useful documents and Codepoints on their system. Hackers enjoy the rush of typing malicious commands into their terminals and seeing how they affect their target." }, - { UserClass.Investigator, "Much like hackers, investigators are skilled with a terminal and breaching systems, but they don't do it directly for monetary gain. They will search a target's system for any files and clues that may lead to them being guilty of a crime within the digital society. Unlike Hackers, Investigators mostly have higher reputations in society, and go after those with lower reputations."}, - { UserClass.Explorer, "Explorers like to venture the vast regions of the multi-user domain and Shiftnet looking for secrets, hidden tools and software, and finding the hidden truths behind their screen. Explorers don't always know how to hack, but if it involves finding a secret about ShiftOS, they will do it. They typically do not have malicious intent."}, - { UserClass.SafetyActivist, "Safety Activists are skilled with exploitation and hacking, but they only go after the worst there is in the multi-user domain. Crime rings, large hacker groups, you name it. Their primary goal is keeping the multi-user domain safe." }, - { UserClass.PenetrationTester, "Penetration testers go hand-in-hand with Safety Activists. They go after the good guys, but rather than attacking them, they alert them that an exploit was found in their service and that this exploit should be fixed. They are a gray subject though - you never know if you are dealing with a genuine pen-tester or a hacker skilled with social engineering. Be careful." }, - { UserClass.Collector, "Collectors go well with Explorers - however, Collectors are the ones who open shops. They like to find rare objects and sell them for Codepoints." }, - {UserClass.Programmer, "Programmers are the ones who write applications and services for ShiftOS and the multi-user domain. Depending on the code that they write, they can be seen as either morally wrong sentiences or morally correct sentiences, it's up to their decisions." }, - - }; - - lbclasses.Items.Clear(); - lbclasses.SelectedIndexChanged += (o, a) => - { - newClass = (UserClass)Enum.Parse(typeof(UserClass), lbclasses.SelectedItem.ToString()); - lbclassdesc.Text = descriptions[newClass]; - lbclasstitle.Text = newClass.ToString(); - }; - foreach (var kv in descriptions) - { - lbclasses.Items.Add(kv.Key.ToString()); - - } - menuStrip1.Hide(); - pnlclasses.Show(); - pnlclasses.BringToFront(); - } - - UserClass newClass = UserClass.None; - - public void ListAllChats(Channel[] channels) - { - shop_all.BringToFront(); - - flshoplist.Controls.Clear(); - - lblistname.Text = "Chat"; - lblistdesc.Text = "Want to talk with other Shifters on the multi-user domain? Simply select a chatroom below and click 'Join' to join in!"; - - foreach (var shop in channels) - { - var bnr = new Panel(); - bnr.Height = 100; - bnr.Tag = "keepbg"; - - bnr.Width = flshoplist.Width; - - var lTitle = new Label(); - lTitle.AutoSize = true; - lTitle.Tag = "keepbg header2"; - lTitle.Text = shop.Name; - lTitle.Location = new Point(18, 17); - bnr.Controls.Add(lTitle); - lTitle.Show(); - var desc = new Label(); - desc.Text = shop.Topic; - bnr.Controls.Add(desc); - desc.Show(); - - var flButtons = new FlowLayoutPanel(); - flButtons.AutoSize = true; - flButtons.AutoSizeMode = AutoSizeMode.GrowAndShrink; - flButtons.Tag = "keepbg"; - flButtons.FlowDirection = FlowDirection.RightToLeft; - flButtons.Anchor = AnchorStyles.Top | AnchorStyles.Right; - flButtons.Top = 2; - flButtons.Left = bnr.Width - flButtons.Width - 2; - bnr.Controls.Add(flButtons); - flButtons.Show(); - - var btn = new Button(); - btn.Text = "Join"; - btn.Click += (o, a) => - { - OpenChat(shop.ID); - }; - flButtons.Controls.Add(btn); - btn.Show(); - - flshoplist.Controls.Add(bnr); - bnr.Show(); - ControlManager.SetupControls(bnr); - desc.Left = lTitle.Left; - desc.Width = (bnr.Width - desc.Left - desc.Left); - desc.Top = lTitle.Top + lTitle.Height; - desc.Height = (bnr.Height - lTitle.Top); - - } - - } - - [Obsolete("MUD control center is dying! KILL IT!")] - public void OpenChat(string id) - { -// AppearanceManager.SetupWindow(new Chat(id)); - } - - private Shop editingShop = null; - - public void ShowCreateShop() - { - this.Invoke(new Action(() => - { - editingShop = new Shop(); - creatingShop = true; - editingShop.Name = "My shop"; - editingShop.Description = "My shop has lots of awesome items. You should buy from my shop."; - editingShop.Owner = SaveSystem.CurrentUser.Username; - editingShop.Items = new List(); - shop_editor.BringToFront(); - PopulateShopEditor(); - })); - } - - public void PopulateShopEditor() - { - txtshopdescription.Text = editingShop.Description; - txtshopname.Text = editingShop.Name; - lbeditingshopitems.Items.Clear(); - foreach(var item in editingShop.Items) - { - lbeditingshopitems.Items.Add(item.Name); - } - } - - public void PopulateShopList(Shop[] shops) - { - shop_all.BringToFront(); - - flshoplist.Controls.Clear(); - lblistname.Text = "Shops"; - lblistdesc.Text = "The multi-user domain is full of various shops ran by other users. They can contain anything from skins to applications to full system modifications. Just select a shop below to browse its contents!"; - - foreach (var shop in shops) - { - var bnr = new Panel(); - bnr.Height = 100; - bnr.Tag = "keepbg"; - - bnr.Width = flshoplist.Width; - - var lTitle = new Label(); - lTitle.AutoSize = true; - lTitle.Tag = "keepbg header2"; - lTitle.Text = shop.Name; - lTitle.Location = new Point(18, 17); - bnr.Controls.Add(lTitle); - lTitle.Show(); - var desc = new Label(); - desc.Text = shop.Description; - bnr.Controls.Add(desc); - desc.Show(); - - var flButtons = new FlowLayoutPanel(); - flButtons.AutoSize = true; - flButtons.AutoSizeMode = AutoSizeMode.GrowAndShrink; - flButtons.Tag = "keepbg"; - flButtons.FlowDirection = FlowDirection.RightToLeft; - flButtons.Anchor = AnchorStyles.Top | AnchorStyles.Right; - flButtons.Top = 2; - flButtons.Left = bnr.Width - flButtons.Width - 2; - bnr.Controls.Add(flButtons); - flButtons.Show(); - - var btn = new Button(); - btn.Text = "Browse"; - btn.Click += (o, a) => - { - ShowShop(shop); - }; - flButtons.Controls.Add(btn); - btn.Show(); - - flshoplist.Controls.Add(bnr); - bnr.Show(); - ControlManager.SetupControls(bnr); - desc.Left = lTitle.Left; - desc.Width = (bnr.Width - desc.Left - desc.Left); - desc.Top = lTitle.Top + lTitle.Height; - desc.Height = (bnr.Height - lTitle.Top); - - } - - } - - public void PopulateShopView() - { - lbupgrades.Items.Clear(); - shopItems = CurrentShop.Items; - foreach (var item in CurrentShop.Items) - { - lbupgrades.Items.Add(item.Name); - } - - } - - public void ShowShop(Shop shop) - { - shop_view.BringToFront(); - CurrentShop = shop; - lbshopname.Text = shop.Name; - lbupgradetitle.Text = $"Welcome to {shop.Name}."; - lbupgradedesc.Text = shop.Description; - lbprice.Text = "Select an item from the list on the left."; - btnbuy.Hide(); - - ServerManager.SendMessage("shop_getitems", JsonConvert.SerializeObject(new - { - shopname = CurrentShop.Name - })); - - lbupgrades.SelectedIndexChanged += (o, a) => - { - item = shopItems[lbupgrades.SelectedIndex]; - lbupgradetitle.Text = item.Name; - lbupgradedesc.Text = item.Description; - lbprice.Text = $"Cost: {item.Cost} CP"; - btnbuy.Show(); - }; - if(shop.Owner == SaveSystem.CurrentUser.Username) - { - btneditshop.Show(); - } - else - { - btneditshop.Hide(); - } - } - - private ShopItem item = null; - private List shopItems = null; - - public void PopulateJoinLegion(List legions) - { - lgn_join.BringToFront(); - - fllegionlist.Controls.Clear(); - - foreach(var lgn in legions) - { - var bnr = new Panel(); - bnr.Height = 100; - bnr.Tag = "keepbg"; - bnr.BackColor = GetColor(lgn.BannerColor); - - bnr.Width = fllegionlist.Width; - - var lTitle = new Label(); - lTitle.AutoSize = true; - lTitle.Tag = "keepbg header2"; - lTitle.Text = $"[{lgn.ShortName}] {lgn.Name}"; - lTitle.Location = new Point(18, 17); - bnr.Controls.Add(lTitle); - lTitle.Show(); - - - var flButtons = new FlowLayoutPanel(); - flButtons.AutoSize = true; - flButtons.AutoSizeMode = AutoSizeMode.GrowAndShrink; - flButtons.Tag = "keepbg"; - flButtons.FlowDirection = FlowDirection.RightToLeft; - flButtons.Anchor = AnchorStyles.Top | AnchorStyles.Right; - flButtons.Top = 2; - flButtons.Left = bnr.Width - flButtons.Width - 2; - bnr.Controls.Add(flButtons); - flButtons.Show(); - - var btn = new Button(); - btn.Text = "More info"; - btn.Click += (o, a) => - { - ShowLegionInfo(lgn); - }; - flButtons.Controls.Add(btn); - btn.Show(); - - fllegionlist.Controls.Add(bnr); - bnr.Show(); - ControlManager.SetupControls(bnr); - } - } - - public Color GetColor(ConsoleColor color) - { - switch (color) - { - case ConsoleColor.Black: - return Color.Black; - case ConsoleColor.Gray: - return Color.Gray; - case ConsoleColor.DarkGray: - return Color.DarkGray; - case ConsoleColor.Blue: - return Color.Blue; - case ConsoleColor.Cyan: - return Color.Cyan; - case ConsoleColor.DarkBlue: - return Color.DarkBlue; - case ConsoleColor.DarkCyan: - return Color.DarkCyan; - case ConsoleColor.DarkGreen: - return Color.DarkGreen; - case ConsoleColor.DarkMagenta: - return Color.DarkMagenta; - case ConsoleColor.DarkRed: - return Color.DarkRed; - case ConsoleColor.DarkYellow: - return Color.YellowGreen; - case ConsoleColor.Yellow: - return Color.Yellow; - case ConsoleColor.Green: - return Color.Green; - case ConsoleColor.Magenta: - return Color.Magenta; - case ConsoleColor.Red: - return Color.Red; - case ConsoleColor.White: - return Color.White; - default: - return Color.Black; - } - - } - - public void OnLoad() - { - ServerManager.MessageReceived += (msg) => - { - if(msg.Name == "mud_usermemos") - { - try - { - foreach (var memo in JsonConvert.DeserializeObject(msg.Contents)) - { - this.Invoke(new Action(() => - { - var lbtitle = new Label(); - lbtitle.Text = memo.Subject; - lbtitle.Tag = "header3"; - ControlManager.SetupControls(lbtitle); - flmemos.Controls.Add(lbtitle); - - var lbsubject = new Label(); - lbsubject.Text = "From " + memo.UserFrom; - flmemos.Controls.Add(lbsubject); - - var lbbody = new Label(); - lbbody.Margin = new Padding(0, 15, 0, 15); - lbbody.Text = memo.Body; - flmemos.Controls.Add(lbbody); - - lbtitle.Show(); - lbsubject.Show(); - lbbody.Show(); - - })); - } - } - catch { } - } - }; - - SetupSystemStatus(); - } - - public void SetupSystemStatus() - { - int scripts = 0; - string legionname = ""; - - foreach(var lgn in SaveSystem.CurrentSave.CurrentLegions) - { - legionname += Environment.NewLine + " - " + lgn; - } - - you_systemstatus.BringToFront(); - - lblsysstatus.Text = $@"Username: {SaveSystem.CurrentUser.Username} -System name: {SaveSystem.CurrentSave.SystemName} - -Codepoints: {SaveSystem.CurrentSave.Codepoints} -Upgrades: {SaveSystem.CurrentSave.CountUpgrades()}/{Shiftorium.GetDefaults().Count} - -System version: {SaveSystem.CurrentSave.MajorVersion}.{SaveSystem.CurrentSave.MinorVersion}.{SaveSystem.CurrentSave.Revision} - -Shared scripts: {scripts} - -Reputation: {SaveSystem.CurrentSave.RawReputation} ({SaveSystem.CurrentSave.Reputation}) - -Current legions: {legionname}"; - } - - public void OnSkinLoad() - { - } - - public bool OnUnload() - { - return true; - } - - public void OnUpgrade() - { - } - - private void tsMemos_Click(object sender, EventArgs e) - { - ServerManager.SendMessage("get_memos_for_user", $@"{{ - username: ""{SaveSystem.CurrentUser.Username}"" -}}"); - you_memos.BringToFront(); - } - - private void profileToolStripMenuItem_Click(object sender, EventArgs e) - { - SetupSystemStatus(); - } - - private void disconnectFromMuDToolStripMenuItem_Click(object sender, EventArgs e) - { - - - - } - - public void ShowLegionInfo(Legion lgn) - { - lgn_view.BringToFront(); - - lblegiontitle.Text = $"[{lgn.ShortName}] {lgn.Name}"; - lbdescription.Text = lgn.Description; - if(lgn.Publicity == LegionPublicity.PublicInviteOnly || lgn.Publicity == LegionPublicity.UnlistedInviteOnly) - { - btnjoinlegion.Hide(); - } - - banner.BackColor = GetColor(lgn.BannerColor); - - ServerManager.SendMessage("legion_get_users", JsonConvert.SerializeObject(lgn)); - - btnleavelegion.Hide(); - - if(SaveSystem.CurrentSave.CurrentLegions.Contains(lgn.ShortName)) - { - btnjoinlegion.Hide(); - btnleavelegion.Show(); - } - - } - - private void myLegionToolStripMenuItem_Click(object sender, EventArgs e) - { - ServerManager.SendMessage("user_get_legion", JsonConvert.SerializeObject(SaveSystem.CurrentSave)); - } - - private void joinLegionToolStripMenuItem_Click(object sender, EventArgs e) - { - ServerManager.SendMessage("legion_get_all", ""); - } - - public void ShowLegionSelector() - { - ServerManager.SendMessage("legion_get_all", ""); - } - - private void btnjoinlegion_Click(object sender, EventArgs e) - { - string shortname = lblegiontitle.Text.Split(']')[0].Remove(0, 1); - - SaveSystem.CurrentSave.CurrentLegions.Add(shortname); - - SaveSystem.SaveGame(); - ServerManager.SendMessage("user_get_legion", JsonConvert.SerializeObject(SaveSystem.CurrentSave)); - LegionChanged?.Invoke(); - - } - - public event Action LegionChanged; - - private void btnleavelegion_Click(object sender, EventArgs e) - { - string shortname = lblegiontitle.Text.Split(']')[0].Remove(0, 1); - - SaveSystem.CurrentSave.CurrentLegions.Remove(shortname); - - SaveSystem.SaveGame(); - ServerManager.SendMessage("user_get_legion", JsonConvert.SerializeObject(SaveSystem.CurrentSave)); - - } - - Legion newLegion = null; - - private void createLegionToolStripMenuItem_Click(object sender, EventArgs e) - { - newLegion = new Legion(); - - SetupLegionEditor(newLegion); - } - - public void SetupLegionEditor(Legion l) - { - editingLegion = l; - cbcolorchooser.Items.Clear(); - foreach(var name in Enum.GetNames(typeof(ConsoleColor))) - { - cbcolorchooser.Items.Add(name); - } - cbcolorchooser.Text = l.BannerColor.ToString(); - cbcolorchooser.SelectedIndexChanged += (o, a) => - { - panel4.BackColor = GetColor((ConsoleColor)Enum.Parse(typeof(ConsoleColor), cbcolorchooser.Text)); - editingLegion.BannerColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), cbcolorchooser.Text); - }; - - cbpublicity.Items.Clear(); - cbpublicity.SelectedIndexChanged += (o, a) => - { - var pb = (LegionPublicity)Enum.Parse(typeof(LegionPublicity), cbpublicity.Text); - editingLegion.Publicity = pb; - }; - foreach(var pb in Enum.GetNames(typeof(LegionPublicity))) - { - cbpublicity.Items.Add(pb); - } - cbpublicity.Text = editingLegion.Publicity.ToString(); - - if (editingLegion.ShortName == null) - editingLegion.ShortName = "NAME"; - if (editingLegion.Name == null) - editingLegion.Name = "Legion name"; - if (editingLegion.Description == null) - editingLegion.Description = "This is your legion description."; - - txtnewlegionshortname.Text = editingLegion.ShortName; - txtnewlegiondescription.Text = editingLegion.Description; - txtnewlegiontitle.Text = editingLegion.Name; - panel4.BackColor = GetColor(editingLegion.BannerColor); - - lgn_create.BringToFront(); - } - - Legion editingLegion; - - private void txtnewlegionshortname_TextChanged(object sender, EventArgs e) - { - var g = txtnewlegionshortname.CreateGraphics(); - - SizeF sf = g.MeasureString(txtnewlegionshortname.Text, txtnewlegionshortname.Font); - editingLegion.ShortName = txtnewlegionshortname.Text; - txtnewlegionshortname.Size = new Size((int)sf.Width, (int)sf.Height); - } - - private Shop CurrentShop = null; - - private void txtnewlegiontitle_TextChanged(object sender, EventArgs e) - { - var g = txtnewlegiontitle.CreateGraphics(); - - SizeF sf = g.MeasureString(txtnewlegiontitle.Text, txtnewlegiontitle.Font); - editingLegion.Name = txtnewlegiontitle.Text; - txtnewlegiontitle.Size = new Size((int)sf.Width, (int)sf.Height); - - } - - private void flowLayoutPanel3_Paint(object sender, PaintEventArgs e) - { - - } - - private void cbcolorchooser_SelectedIndexChanged(object sender, EventArgs e) - { - } - - private void btncreate_Click(object sender, EventArgs e) - { - ServerManager.SendMessage("legion_createnew", JsonConvert.SerializeObject(editingLegion)); - } - - private void txtnewlegiondescription_TextChanged(object sender, EventArgs e) - { - editingLegion.Description = txtnewlegiondescription.Text; - } - - private void currentTaskToolStripMenuItem_Click(object sender, EventArgs e) - { - this.job_current.BringToFront(); - } - - private void browseToolStripMenuItem_Click(object sender, EventArgs e) - { - ServerManager.SendMessage("shop_getall", ""); - } - - private void btnbuy_Click(object sender, EventArgs e) - { - if (SaveSystem.CurrentSave.Codepoints >= item.Cost) - { - //Send the Codepoints to the shop owner. If they're online, the MUD will tell them to update their Codepoints. - ServerManager.SendMessage("usr_givecp", JsonConvert.SerializeObject(new - { - username = this.CurrentShop.Owner, - amount = item.Cost - })); - - string fileExt = FileSkimmerBackend.GetFileExtension((FileType)item.FileType); - FileSkimmerBackend.GetFile(new[] { fileExt }, FileOpenerStyle.Save, new Action((dest) => - { - var d = new Download - { - ShiftnetUrl = $"{CurrentShop.Name}: {item.Name}", - Destination = dest, - Bytes = item.MUDFile - }; - DownloadManager.StartDownload(d); - })); - - - - } - else - { - Infobox.Show("Not enough Codepoints", "You cannot afford this item. You need at least " + item.Cost.ToString() + "."); - } - } - - private void openAShopToolStripMenuItem_Click(object sender, EventArgs e) - { - ServerManager.SendMessage("user_shop_check", JsonConvert.SerializeObject(new - { - username = SaveSystem.CurrentUser.Username - })); - } - - private void txtshopname_TextChanged(object sender, EventArgs e) - { - try - { - editingShop.Name = txtshopname.Text; - } - catch { } - } - - private void txtshopdescription_TextChanged(object sender, EventArgs e) - { - try - { - editingShop.Description = txtshopdescription.Text; - } - catch { } - } - - bool creatingShop = false; - - private void btnsaveshop_Click(object sender, EventArgs e) - { - if(creatingShop == true) - { - ServerManager.SendMessage("create_shop", JsonConvert.SerializeObject(editingShop)); - } - else - { - ServerManager.SendMessage("update_shop_by_user", JsonConvert.SerializeObject(new - { - username = editingShop.Owner, - shop = editingShop - })); - } - } - - private void btnaddshopitem_Click(object sender, EventArgs e) - { - AppearanceManager.SetupWindow(new ShopItemCreator(new ShopItem(), new Action((item) => - { - editingShop.Items.Add(item); - PopulateShopEditor(); - }))); - } - - private void btnremoveitem_Click(object sender, EventArgs e) - { - try - { - int i = lbeditingshopitems.SelectedIndex; - editingShop.Items.RemoveAt(i); - PopulateShopEditor(); - } - catch - { - - } - } - - private void btnedititem_Click(object sender, EventArgs e) - { - try - { - int i = lbeditingshopitems.SelectedIndex; - AppearanceManager.SetupWindow(new ShopItemCreator(editingShop.Items[i], new Action((item) => - { - editingShop.Items[i] = item; - }))); - - PopulateShopEditor(); - } - catch - { - - } - } - - private void myShopToolStripMenuItem_Click(object sender, EventArgs e) - { - ServerManager.SendMessage("user_get_shop", SaveSystem.CurrentUser.Username); - } - - private void btneditshop_Click(object sender, EventArgs e) - { - editingShop = CurrentShop; - creatingShop = false; - shop_editor.BringToFront(); - PopulateShopEditor(); - } - - private void joinAChatToolStripMenuItem_Click(object sender, EventArgs e) - { - ServerManager.SendMessage("chat_getallchannels", ""); - } - - private void btndeletesave_Click(object sender, EventArgs e) - { - Infobox.PromptYesNo("Delete your system", "Are you SURE you want to delete your system? If you do, you will lose ALL of your Codepoints and file system.", (firstres) => - { - if(firstres == true) - { - Infobox.PromptYesNo("Last chance.", "What you are about to do is IRREVERSABLE. You will lose access to any legions or shops you are a part of. Continue anyway?", (second) => - { - if(second == true) - { - ServerManager.SendMessage("delete_save", JsonConvert.SerializeObject(new ClientSave - { - Username = SaveSystem.CurrentUser.Username, - Password = SaveSystem.CurrentSave.Password - })); - - SaveSystem.CurrentSave = null; - - ShiftOS.Objects.ShiftFS.Utils.Delete(Paths.GetPath("user.dat")); - TerminalBackend.InvokeCommand("sos.shutdown"); - MessageBox.Show("Thank you for playing ShiftOS. Your save data has been deleted successfully. You can come back at anytime, but you will have to restart your game."); - System.IO.File.Delete(Paths.SaveFile); - } - }); - } - }); - } - - public event Action ClassChanged; - - private void btnchooseclass_Click(object sender, EventArgs e) - { - if(newClass != UserClass.None) - { - SaveSystem.CurrentSave.Class = newClass; - SaveSystem.SaveGame(); - ClassChanged?.Invoke(); - menuStrip1.Show(); - pnlclasses.SendToBack(); - this.SetupSystemStatus(); - return; - } - } - } -} diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.resx b/ShiftOS.WinForms/Applications/MUDControlCentre.resx deleted file mode 100644 index 30aab2a..0000000 --- a/ShiftOS.WinForms/Applications/MUDControlCentre.resx +++ /dev/null @@ -1,133 +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 - - - 17, 17 - - - The multi-user domain has many unique shops selling many items such as applications, skins and other things. Just choose a shop, browse for an item you'd like, then pay Codepoints and the download will begin. - - - On this screen you can customize your legion profile. This is how users will see your legion inside the Join Legion screen. - -You can set up a banner color, short and long name, and a description on this screen. The shortname is used to identify your legion. The long name is a more descriptive name for your legion. - -The description will be what explains your legion - what does it do? Why should the user join it? Stuff like that. - - \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/MindBlow.cs b/ShiftOS.WinForms/Applications/MindBlow.cs index 1fec9e6..6cfaea7 100644 --- a/ShiftOS.WinForms/Applications/MindBlow.cs +++ b/ShiftOS.WinForms/Applications/MindBlow.cs @@ -13,8 +13,8 @@ using System.Threading; namespace ShiftOS.WinForms.Applications { - [WinOpen("mindblow")] - [Launcher("MindBlow", false, null, "Utilities")] + [WinOpen("{WO_MINDBLOW}")] + [Launcher("{TITLE_MINDBLOW}", false, null, "{AL_PROGRAMMING}")] [RequiresUpgrade("mindblow")] public partial class MindBlow : UserControl, IShiftOSWindow, IBFListener { diff --git a/ShiftOS.WinForms/Applications/NameChanger.cs b/ShiftOS.WinForms/Applications/NameChanger.cs index 5506aea..25e1475 100644 --- a/ShiftOS.WinForms/Applications/NameChanger.cs +++ b/ShiftOS.WinForms/Applications/NameChanger.cs @@ -39,10 +39,10 @@ using ShiftOS.WinForms.Tools; namespace ShiftOS.WinForms.Applications { [MultiplayerOnly] - [Launcher("Name Changer", false, null, "Customization")] - [AppscapeEntry("Name Changer", "Want to change the names of applications within ShiftOS? This application lets you do just that.", 342, 500, "skinning;file_skimmer;wm_titlebar", "Customization")] - [WinOpen("name_changer")] - [DefaultTitle("Name Changer")] + [Launcher("{TITLE_NAMECHANGER}", false, null, "{AL_CUSTOMIZATION}")] + [AppscapeEntry("{TITLE_NAMECHANGER}", "{DESC_NAMECHANGER}", 342, 500, "skinning;file_skimmer;wm_titlebar", "{AL_CUSTOMIZATION}")] + [WinOpen("{WO_NAMECHANGER}")] + [DefaultTitle("{TITLE_NAMECHANGER}")] [DefaultIcon("iconNameChanger")] public partial class NameChanger : UserControl, IShiftOSWindow { @@ -62,37 +62,41 @@ namespace ShiftOS.WinForms.Applications { public void SetupUI() { flnames.Controls.Clear(); - foreach(var name in names) + foreach(var type in ReflectMan.Types.Where(x => Shiftorium.UpgradeAttributesUnlocked(x) && x.GetInterfaces().Contains(typeof(IShiftOSWindow)))) { - 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) => + var title = type.GetCustomAttributes(false).FirstOrDefault(x => x is DefaultTitleAttribute) as DefaultTitleAttribute; + if(title != null) { - 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(); + var lbl = new Label(); + lbl.AutoSize = true; + lbl.Text = Localization.Parse(title.Title); + lbl.Tag = "header3"; + ControlManager.SetupControl(lbl); + flnames.Controls.Add(lbl); + lbl.Show(); + flnames.SetFlowBreak(lbl, true); + + var txt = new TextBox(); + ControlManager.SetupControl(txt); + if (!names.ContainsKey(type.Name)) + names.Add(type.Name, title.Title); + txt.Text = Localization.Parse(names[type.Name]); + txt.TextChanged += (o, a) => + { + if(txt.Text == Localization.Parse(title.Title)) + { + names[type.Name] = title.Title; + } + else + { + names[type.Name] = txt.Text; + } + }; + flnames.Controls.Add(txt); + txt.Show(); + txt.Width = flnames.Width - 10; + flnames.SetFlowBreak(txt, true); + } } } @@ -121,7 +125,7 @@ namespace ShiftOS.WinForms.Applications { private void btnloaddefault_Click(object sender, EventArgs e) { - names = NameChangerBackend.GetDefault(); + names = new Dictionary(); SetupUI(); } @@ -153,15 +157,7 @@ namespace ShiftOS.WinForms.Applications { { public static Dictionary GetDefault() { - var dict = new Dictionary(); - 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; + return new Dictionary(); } public static Dictionary GetCurrent() @@ -172,12 +168,6 @@ namespace ShiftOS.WinForms.Applications { 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; } @@ -195,7 +185,7 @@ namespace ShiftOS.WinForms.Applications { SkinEngine.LoadedSkin.AppNames = GetDefault(); if (!SkinEngine.LoadedSkin.AppNames.ContainsKey(type.Name)) - SkinEngine.LoadedSkin.AppNames.Add(type.Name, AppearanceManager.GetDefaultTitle(type)); + return Localization.Parse(AppearanceManager.GetDefaultTitle(type)); return SkinEngine.LoadedSkin.AppNames[type.Name]; } diff --git a/ShiftOS.WinForms/Applications/Notifications.Designer.cs b/ShiftOS.WinForms/Applications/Notifications.Designer.cs deleted file mode 100644 index 861795a..0000000 --- a/ShiftOS.WinForms/Applications/Notifications.Designer.cs +++ /dev/null @@ -1,114 +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 Notifications - { - /// - /// 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 Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.lblnotifications = new System.Windows.Forms.Label(); - this.fllist = new System.Windows.Forms.FlowLayoutPanel(); - this.btnmarkallread = new System.Windows.Forms.Button(); - this.SuspendLayout(); - // - // lblnotifications - // - this.lblnotifications.AutoSize = true; - this.lblnotifications.Dock = System.Windows.Forms.DockStyle.Top; - this.lblnotifications.Location = new System.Drawing.Point(0, 0); - this.lblnotifications.Name = "lblnotifications"; - this.lblnotifications.Padding = new System.Windows.Forms.Padding(10); - this.lblnotifications.Size = new System.Drawing.Size(85, 33); - this.lblnotifications.TabIndex = 0; - this.lblnotifications.Tag = "header1"; - this.lblnotifications.Text = "Notifications"; - // - // fllist - // - this.fllist.Dock = System.Windows.Forms.DockStyle.Fill; - this.fllist.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; - this.fllist.Location = new System.Drawing.Point(0, 33); - this.fllist.Name = "fllist"; - this.fllist.Size = new System.Drawing.Size(437, 487); - this.fllist.TabIndex = 1; - // - // btnmarkallread - // - this.btnmarkallread.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnmarkallread.AutoSize = true; - this.btnmarkallread.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnmarkallread.Location = new System.Drawing.Point(356, 4); - this.btnmarkallread.Name = "btnmarkallread"; - this.btnmarkallread.Size = new System.Drawing.Size(78, 23); - this.btnmarkallread.TabIndex = 2; - this.btnmarkallread.Text = "Mark all read"; - this.btnmarkallread.UseVisualStyleBackColor = true; - this.btnmarkallread.Click += new System.EventHandler(this.btnmarkallread_Click); - // - // Notifications - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.btnmarkallread); - this.Controls.Add(this.fllist); - this.Controls.Add(this.lblnotifications); - this.Name = "Notifications"; - this.Size = new System.Drawing.Size(437, 520); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.Label lblnotifications; - private System.Windows.Forms.FlowLayoutPanel fllist; - private System.Windows.Forms.Button btnmarkallread; - } -} diff --git a/ShiftOS.WinForms/Applications/Notifications.cs b/ShiftOS.WinForms/Applications/Notifications.cs deleted file mode 100644 index 30aec3d..0000000 --- a/ShiftOS.WinForms/Applications/Notifications.cs +++ /dev/null @@ -1,275 +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; -using ShiftOS.Engine; -using ShiftOS.WinForms.Tools; - -namespace ShiftOS.WinForms.Applications -{ - [DefaultTitle("Notifications")] - [Launcher("Notifications", true, "al_notifications", "Utilities")] - public partial class Notifications : UserControl, IShiftOSWindow - { - public Notifications() - { - InitializeComponent(); - onMade = (note) => - { - SetupUI(); - }; - } - - Action onMade = null; - - public void SetupUI() - { - fllist.Controls.Clear(); - - bool showNoNotes = true; - foreach (var note in new List(NotificationDaemon.GetAllFromFile()).OrderByDescending(n => n.Timestamp)) - { - if (note.Read == false) - { - try - { - showNoNotes = false; - var headerLabel = new Label(); - headerLabel.Tag = "header2"; - ControlManager.SetupControl(headerLabel); - headerLabel.Text = ParseNotification(note); - headerLabel.Width = fllist.Width - 4; - fllist.Controls.Add(headerLabel); - headerLabel.Show(); - - var markButton = new Button(); - ControlManager.SetupControl(markButton); - markButton.Text = "Mark as read"; - markButton.AutoSize = true; - markButton.AutoSizeMode = AutoSizeMode.GrowAndShrink; - markButton.Click += (o, a) => - { - NotificationDaemon.MarkRead(new List(NotificationDaemon.GetAllFromFile()).IndexOf(note)); - SetupUI(); - }; - fllist.Controls.Add(markButton); - markButton.Show(); - - var dataLabel = new Label(); - dataLabel.Text = ParseNotificationData(note); - dataLabel.MaximumSize = new Size(fllist.Width - 4, 0); - dataLabel.AutoSize = true; - fllist.Controls.Add(dataLabel); - dataLabel.Show(); - } - catch - { - - } - } - } - - if(showNoNotes == true) - { - var lbl = new Label(); - lbl.Tag = "header3"; - ControlManager.SetupControl(lbl); - lbl.AutoSize = true; - lbl.Text = "You have no notifications."; - fllist.Controls.Add(lbl); - lbl.Show(); - } - - - } - - public string ParseNotificationData(Notification note) - { - string data = ""; - data = note.Timestamp.ToString(); - data += Environment.NewLine + Environment.NewLine; - - switch (note.Type) - { - case NotificationType.ChatBan: - data += "You have been banned from " + note.Data.ToString() + "."; - break; - case NotificationType.CodepointsReceived: - data += "You have received " + note.Data.ToString() + " Codepoints."; - break; - case NotificationType.CodepointsSent: - data += "You have lost " + note.Data.ToString() + " Codepoints."; - break; - case NotificationType.CriticalBugwatch: - data += "ShiftOS is in a critical bugwatch state. If you see any bugs, report them to us immediately."; - break; - case NotificationType.DownloadComplete: - data += "Download of file " + note.Data.ToString() + " complete."; - break; - case NotificationType.DownloadStarted: - data += "Download started. Destination: " + note.Data.ToString() + "."; - break; - case NotificationType.Generic: - data += note.Data.ToString(); - break; - case NotificationType.LegionBan: - data += "You have been banned from " + note.Data.ToString(); - break; - case NotificationType.LegionInvite: - data += "You have been invited to a legion. Invite code: " + note.Data.ToString(); - break; - case NotificationType.LegionKick: - data += "You have been kicked out of " + note.Data.ToString() + "."; - break; - case NotificationType.MemoReceived: - data += "New memo received from " + note.Data.ToString() + "!"; - break; - case NotificationType.MemoSent: - data += "Memo successfully sent to " + note.Data.ToString() + "."; - break; - case NotificationType.MUDAnnouncement: - data += note.Data.ToString(); - break; - case NotificationType.MUDMaintenance: - data += "The MUD will be going down for a little while at " + note.Data.ToString() + ". Please beware."; - break; - case NotificationType.NewAppveyor: - data += "A new AppVeyor build of ShiftOS has been released."; - break; - case NotificationType.NewDeveloper: - data += "A new developer, " + note.Data.ToString() + " has been added to the team!"; - break; - case NotificationType.NewShiftOSStable: - data += "The latest ShiftOS stable, " + note.Data.ToString() + " has been released!"; - break; - case NotificationType.NewShiftOSStream: - data += "We're going to be live at http://youtube.com/ShiftOS/live at " + note.Data.ToString() + " (Eastern Standard Time)."; - break; - case NotificationType.NewShiftOSUnstable: - data += "A new unstable version of ShiftOS has been released: " + note.Data.ToString() + "."; - break; - case NotificationType.NewShiftOSVideo: - data += "A new ShiftOS video has been released! Get to it before Victor Tran!"; - break; - case NotificationType.SavePurge: - data += "A purge has occurred inside the multi-user domain. If you have lost your save, it is because it has gone rogue and has been purged."; - break; - case NotificationType.ShopPurchase: - data += "You have successfully purchased " + note.Data.ToString() + "."; - break; - default: - data += "Corrupt notification data."; - break; - } - - return data; - } - - public string ParseNotification(Notification note) - { - switch (note.Type) - { - case NotificationType.ChatBan: - return "Banned from chat"; - case NotificationType.CodepointsReceived: - return "Codepoints received."; - case NotificationType.CodepointsSent: - return "Codepoints sent."; - case NotificationType.CriticalBugwatch: - return "Critical Bugwatch in progress"; - case NotificationType.DownloadComplete: - return "Download complete."; - case NotificationType.DownloadStarted: - return "Download started."; - case NotificationType.Generic: - return "System update"; - case NotificationType.LegionBan: - return "Banned from legion"; - case NotificationType.LegionInvite: - return "Legion invite received."; - case NotificationType.LegionKick: - return "Kicked from legion"; - case NotificationType.MemoReceived: - return "New memo"; - case NotificationType.MemoSent: - return "Memo sent."; - case NotificationType.MUDAnnouncement: - return "MUD Announcement"; - case NotificationType.MUDMaintenance: - return "MUD maintenance warning!"; - case NotificationType.NewAppveyor: - return "New AppVeyor build of ShiftOS"; - case NotificationType.NewDeveloper: - return "Please welcome our newest developer..."; - case NotificationType.NewShiftOSStable: - return "The newest ShiftOS stable is out!"; - case NotificationType.NewShiftOSStream: - return "We're going live soon!"; - case NotificationType.NewShiftOSUnstable: - return "The latest ShiftOS unstable is out!"; - case NotificationType.NewShiftOSVideo: - return "New ShiftOS video is out!"; - case NotificationType.SavePurge: - return "MUD save purge"; - case NotificationType.ShopPurchase: - return "Item purchased from shop."; - default: - return "Unknown"; - } - } - - public void OnLoad() - { - SetupUI(); - NotificationDaemon.NotificationMade += onMade; - } - - public void OnSkinLoad() - { - } - - public bool OnUnload() - { - NotificationDaemon.NotificationMade -= onMade; - return true; - } - - public void OnUpgrade() - { - } - - private void btnmarkallread_Click(object sender, EventArgs e) - { - NotificationDaemon.MarkAllRead(); - } - } -} diff --git a/ShiftOS.WinForms/Applications/Notifications.resx b/ShiftOS.WinForms/Applications/Notifications.resx deleted file mode 100644 index 1af7de1..0000000 --- a/ShiftOS.WinForms/Applications/Notifications.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/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs index 53d410e..5b60fbd 100644 --- a/ShiftOS.WinForms/Applications/Pong.cs +++ b/ShiftOS.WinForms/Applications/Pong.cs @@ -12,9 +12,9 @@ using ShiftOS.WinForms.Tools; namespace ShiftOS.WinForms.Applications { - [Launcher("Pong", true, "al_pong", "Games")] - [WinOpen("pong")] - [DefaultTitle("Pong")] + [Launcher("{TITLE_PONG}", true, "al_pong", "{AL_GAMES}")] + [WinOpen("{WO_PONG}")] + [DefaultTitle("{TITLE_PONG}")] [DefaultIcon("iconPong")] public partial class Pong : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/ShiftLetters.cs b/ShiftOS.WinForms/Applications/ShiftLetters.cs index 0e9f74a..a09830a 100644 --- a/ShiftOS.WinForms/Applications/ShiftLetters.cs +++ b/ShiftOS.WinForms/Applications/ShiftLetters.cs @@ -37,9 +37,9 @@ using System.Windows.Forms; namespace ShiftOS.WinForms.Applications { [MultiplayerOnly] - [Launcher("ShiftLetters", false, null, "Games")] - [AppscapeEntry("ShiftLetters", "Let's see how much you know about ShiftOS by playing this tiny little Hangman game! Shiftorium Upgrades exist to allow you to buy different word sets!", 300, 150, null, "Games")] - [WinOpen("shiftletters")] + [Launcher("{TITLE_SHIFTLETTERS}", false, null, "{AL_GAMES}")] + [AppscapeEntry("{TITLE_SHIFTLETTERS}", "{DESC_SHIFTLETTERS}", 300, 150, null, "{AL_GAMES}")] + [WinOpen("{WO_SHIFTLETTERS}")] [DefaultIcon("iconShiftLetters")] public partial class ShiftLetters : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/ShiftLotto.cs b/ShiftOS.WinForms/Applications/ShiftLotto.cs index 03d051b..125d9e5 100644 --- a/ShiftOS.WinForms/Applications/ShiftLotto.cs +++ b/ShiftOS.WinForms/Applications/ShiftLotto.cs @@ -34,11 +34,11 @@ using ShiftOS.Engine; namespace ShiftOS.WinForms.Applications { - [Launcher("ShiftLotto", true, "al_shiftlotto", "Games")] + [Launcher("{TITLE_SHIFTLOTTO}", true, "al_shiftlotto", "{AL_GAMES}")] [MultiplayerOnly] [DefaultIcon("iconShiftLotto")] [RequiresUpgrade("shiftlotto")] - [WinOpen("shiftlotto")] + [WinOpen("{WO_SHIFTLOTTO}")] public partial class ShiftLotto : UserControl, IShiftOSWindow { public ShiftLotto() diff --git a/ShiftOS.WinForms/Applications/ShiftSweeper.cs b/ShiftOS.WinForms/Applications/ShiftSweeper.cs index 772ec26..9884c60 100644 --- a/ShiftOS.WinForms/Applications/ShiftSweeper.cs +++ b/ShiftOS.WinForms/Applications/ShiftSweeper.cs @@ -34,10 +34,10 @@ using System.Windows.Forms; using ShiftOS.Engine; namespace ShiftOS.WinForms.Applications { - [Launcher("ShiftSweeper", true, "al_shiftsweeper", "Games")] - [AppscapeEntry("ShiftSweeper", "A simple Minesweeper game built for ShiftOS! Careful, it's a hard one.", 1600, 800, "shiftletters", "Games")] + [Launcher("{TITLE_SHIFTSWEEPER}", true, "al_shiftsweeper", "{AL_GAMES}")] + [AppscapeEntry("{TITLE_SHIFTSWEEPER}", "{DESC_SHIFTSWEEPER}", 1600, 800, "shiftletters", "{AL_GAMES}")] [MultiplayerOnly] - [WinOpen("shiftsweeper")] + [WinOpen("{WO_SHIFTSWEEPER}")] [DefaultIcon("iconShiftSweeper")] public partial class ShiftSweeper : UserControl, IShiftOSWindow { int[,] game; diff --git a/ShiftOS.WinForms/Applications/Shifter.cs b/ShiftOS.WinForms/Applications/Shifter.cs index 3b3a4f1..cde0106 100644 --- a/ShiftOS.WinForms/Applications/Shifter.cs +++ b/ShiftOS.WinForms/Applications/Shifter.cs @@ -37,9 +37,10 @@ using System.Threading; namespace ShiftOS.WinForms.Applications { [MultiplayerOnly] - [Launcher("Shifter", true, "al_shifter", "Customization")] + [Launcher("{TITLE_SHIFTER}", true, "al_shifter", "{AL_CUSTOMIZATION}")] [RequiresUpgrade("shifter")] - [WinOpen("shifter")] + [WinOpen("{WO_SHIFTER}")] + [DefaultTitle("{TITLE_SHIFTER}")] [DefaultIcon("iconShifter")] public partial class Shifter : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/Shiftnet.cs b/ShiftOS.WinForms/Applications/Shiftnet.cs index 136f680..7b506eb 100644 --- a/ShiftOS.WinForms/Applications/Shiftnet.cs +++ b/ShiftOS.WinForms/Applications/Shiftnet.cs @@ -46,10 +46,10 @@ namespace ShiftOS.WinForms.Applications // //READ THE DAMN SHIFTOS CODING GUIDELINES. - [Launcher("Shiftnet", true, "al_shiftnet", "Networking")] + [Launcher("{TITLE_SHIFTNET}", true, "al_shiftnet", "{AL_NETWORKING}")] [MultiplayerOnly] - [DefaultTitle("Shiftnet")] - [WinOpen("shiftnet")] + [DefaultTitle("{TITLE_SHIFTNET}")] + [WinOpen("{WO_SHIFTNET}")] [RequiresUpgrade("victortran_shiftnet")] [DefaultIcon("iconShiftnet")] public partial class Shiftnet : UserControl, IShiftOSWindow, IShiftnetClient diff --git a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs index 6886d98..f6f3c7f 100644 --- a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs +++ b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs @@ -38,11 +38,11 @@ using static ShiftOS.Engine.SkinEngine; using backend = ShiftOS.Engine.Shiftorium; namespace ShiftOS.WinForms.Applications { - [Launcher("Shiftorium", true, "al_shiftorium", "Utilities")] + [Launcher("{TITLE_SHIFTORIUM}", true, "al_shiftorium", "{AL_UTILITIES}")] [RequiresUpgrade("shiftorium_gui")] [MultiplayerOnly] - [WinOpen("shiftorium")] - [DefaultTitle("Shiftorium")] + [WinOpen("{WO_SHIFTORIUM}")] + [DefaultTitle("{TITLE_SHIFTORIUM}")] [DefaultIcon("iconShiftorium")] public partial class ShiftoriumFrontend : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/ShopItemCreator.Designer.cs b/ShiftOS.WinForms/Applications/ShopItemCreator.Designer.cs deleted file mode 100644 index 048b7af..0000000 --- a/ShiftOS.WinForms/Applications/ShopItemCreator.Designer.cs +++ /dev/null @@ -1,197 +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 ShopItemCreator - { - /// - /// 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 Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.txtitemname = new System.Windows.Forms.TextBox(); - this.txtfilename = new System.Windows.Forms.TextBox(); - this.btnbrowse = new System.Windows.Forms.Button(); - this.btndone = new System.Windows.Forms.Button(); - this.txtdescription = new System.Windows.Forms.TextBox(); - this.txtcost = new System.Windows.Forms.TextBox(); - this.label1 = new System.Windows.Forms.Label(); - this.label2 = new System.Windows.Forms.Label(); - this.label3 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.SuspendLayout(); - // - // txtitemname - // - this.txtitemname.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtitemname.Location = new System.Drawing.Point(91, 21); - this.txtitemname.Name = "txtitemname"; - this.txtitemname.Size = new System.Drawing.Size(421, 20); - this.txtitemname.TabIndex = 0; - // - // txtfilename - // - this.txtfilename.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.txtfilename.Location = new System.Drawing.Point(91, 47); - this.txtfilename.Name = "txtfilename"; - this.txtfilename.ReadOnly = true; - this.txtfilename.Size = new System.Drawing.Size(334, 20); - this.txtfilename.TabIndex = 1; - // - // btnbrowse - // - this.btnbrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.btnbrowse.Location = new System.Drawing.Point(431, 47); - this.btnbrowse.Name = "btnbrowse"; - this.btnbrowse.Size = new System.Drawing.Size(75, 23); - this.btnbrowse.TabIndex = 2; - this.btnbrowse.Text = "Browse"; - this.btnbrowse.UseVisualStyleBackColor = true; - this.btnbrowse.Click += new System.EventHandler(this.btnbrowse_Click); - // - // btndone - // - this.btndone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.btndone.Location = new System.Drawing.Point(453, 324); - this.btndone.Name = "btndone"; - this.btndone.Size = new System.Drawing.Size(75, 23); - this.btndone.TabIndex = 3; - this.btndone.Text = "Done"; - this.btndone.UseVisualStyleBackColor = true; - this.btndone.Click += new System.EventHandler(this.btndone_Click); - // - // txtdescription - // - this.txtdescription.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.txtdescription.Location = new System.Drawing.Point(91, 86); - this.txtdescription.Multiline = true; - this.txtdescription.Name = "txtdescription"; - this.txtdescription.Size = new System.Drawing.Size(421, 143); - this.txtdescription.TabIndex = 4; - // - // txtcost - // - this.txtcost.Location = new System.Drawing.Point(91, 255); - this.txtcost.Name = "txtcost"; - this.txtcost.Size = new System.Drawing.Size(100, 20); - this.txtcost.TabIndex = 5; - this.txtcost.TextChanged += new System.EventHandler(this.txtcost_TextChanged); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(14, 27); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(59, 13); - this.label1.TabIndex = 6; - this.label1.Text = "Item name:"; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(14, 50); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(26, 13); - this.label2.TabIndex = 7; - this.label2.Text = "File:"; - // - // label3 - // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(14, 89); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(63, 13); - this.label3.TabIndex = 8; - this.label3.Text = "Description:"; - // - // label4 - // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(14, 258); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(54, 13); - this.label4.TabIndex = 9; - this.label4.Text = "Cost (CP):"; - // - // ShopItemCreator - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.label4); - this.Controls.Add(this.label3); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.txtcost); - this.Controls.Add(this.txtdescription); - this.Controls.Add(this.btndone); - this.Controls.Add(this.btnbrowse); - this.Controls.Add(this.txtfilename); - this.Controls.Add(this.txtitemname); - this.Name = "ShopItemCreator"; - this.Size = new System.Drawing.Size(531, 350); - this.ResumeLayout(false); - this.PerformLayout(); - - } - - #endregion - - private System.Windows.Forms.TextBox txtitemname; - private System.Windows.Forms.TextBox txtfilename; - private System.Windows.Forms.Button btnbrowse; - private System.Windows.Forms.Button btndone; - private System.Windows.Forms.TextBox txtdescription; - private System.Windows.Forms.TextBox txtcost; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Label label2; - private System.Windows.Forms.Label label3; - private System.Windows.Forms.Label label4; - } -} diff --git a/ShiftOS.WinForms/Applications/ShopItemCreator.cs b/ShiftOS.WinForms/Applications/ShopItemCreator.cs deleted file mode 100644 index d2836ee..0000000 --- a/ShiftOS.WinForms/Applications/ShopItemCreator.cs +++ /dev/null @@ -1,112 +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; -using ShiftOS.Engine; -using ShiftOS.Objects; -using ShiftOS.Objects.ShiftFS; - -namespace ShiftOS.WinForms.Applications -{ - [DefaultTitle("Shop item editor")] - [MultiplayerOnly] - [DefaultIcon("iconSysInfo")] - public partial class ShopItemCreator : UserControl, IShiftOSWindow - { - public ShopItemCreator(ShopItem item, Action callback) - { - InitializeComponent(); - Callback = callback; - Item = item; - txtitemname.Text = Item.Name; - txtdescription.Text = Item.Description; - txtcost.Text = Item.Cost.ToString(); - txtfilename.Text = "Unselected"; - } - - private Action Callback { get; set; } - public ShopItem Item { get; private set; } - - private void btnbrowse_Click(object sender, EventArgs e) - { - FileSkimmerBackend.GetFile(new[] { "" }, FileOpenerStyle.Open, new Action((result) => - { - txtfilename.Text = result; - Item.MUDFile = Utils.ReadAllBytes(result); - Item.FileType = (int)FileSkimmerBackend.GetFileType(result); - })); - } - - private void btndone_Click(object sender, EventArgs e) - { - if(Item.MUDFile == null) - { - Infobox.Show("No file chosen.", "Please select a file to sell."); - return; - } - Item.Cost = Convert.ToUInt64(txtcost.Text); - Item.Description = txtdescription.Text; - Item.Name = txtitemname.Text; - Callback?.Invoke(Item); - AppearanceManager.Close(this); - } - - public void OnLoad() - { - } - - public void OnSkinLoad() - { - } - - public bool OnUnload() - { - return true; - } - - public void OnUpgrade() - { - } - - private void txtcost_TextChanged(object sender, EventArgs e) - { - try - { - Item.Cost = Convert.ToUInt64(txtcost.Text); - } - catch - { - txtcost.Text = Item.Cost.ToString(); - } - } - } -} diff --git a/ShiftOS.WinForms/Applications/ShopItemCreator.resx b/ShiftOS.WinForms/Applications/ShopItemCreator.resx deleted file mode 100644 index 1af7de1..0000000 --- a/ShiftOS.WinForms/Applications/ShopItemCreator.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/Skin Loader.Designer.cs b/ShiftOS.WinForms/Applications/Skin Loader.Designer.cs index 4a4e669..2370a49 100644 --- a/ShiftOS.WinForms/Applications/Skin Loader.Designer.cs +++ b/ShiftOS.WinForms/Applications/Skin Loader.Designer.cs @@ -153,30 +153,30 @@ namespace ShiftOS.WinForms.Applications // item1ToolStripMenuItem // this.item1ToolStripMenuItem.Name = "item1ToolStripMenuItem"; - this.item1ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.item1ToolStripMenuItem.Size = new System.Drawing.Size(107, 22); this.item1ToolStripMenuItem.Text = "Item 1"; // // item2ToolStripMenuItem // this.item2ToolStripMenuItem.Name = "item2ToolStripMenuItem"; - this.item2ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.item2ToolStripMenuItem.Size = new System.Drawing.Size(107, 22); this.item2ToolStripMenuItem.Text = "Item 2"; // // item3ToolStripMenuItem // this.item3ToolStripMenuItem.Name = "item3ToolStripMenuItem"; - this.item3ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.item3ToolStripMenuItem.Size = new System.Drawing.Size(107, 22); this.item3ToolStripMenuItem.Text = "Item 3"; // // toolStripSeparator1 // this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6); + this.toolStripSeparator1.Size = new System.Drawing.Size(104, 6); // // item4ToolStripMenuItem // this.item4ToolStripMenuItem.Name = "item4ToolStripMenuItem"; - this.item4ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.item4ToolStripMenuItem.Size = new System.Drawing.Size(107, 22); this.item4ToolStripMenuItem.Text = "Item 4"; // // lbtime @@ -363,9 +363,9 @@ namespace ShiftOS.WinForms.Applications 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(60, 23); + this.btnclose.Size = new System.Drawing.Size(89, 23); this.btnclose.TabIndex = 0; - this.btnclose.Text = "{CLOSE}"; + this.btnclose.Text = "{GEN_CLOSE}"; this.btnclose.UseVisualStyleBackColor = true; this.btnclose.Click += new System.EventHandler(this.btnclose_Click); // @@ -374,11 +374,11 @@ namespace ShiftOS.WinForms.Applications this.btnloaddefault.AccessibleRole = System.Windows.Forms.AccessibleRole.None; this.btnloaddefault.AutoSize = true; this.btnloaddefault.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnloaddefault.Location = new System.Drawing.Point(69, 3); + this.btnloaddefault.Location = new System.Drawing.Point(98, 3); this.btnloaddefault.Name = "btnloaddefault"; - this.btnloaddefault.Size = new System.Drawing.Size(109, 23); + this.btnloaddefault.Size = new System.Drawing.Size(132, 23); this.btnloaddefault.TabIndex = 1; - this.btnloaddefault.Text = "{LOAD_DEFAULT}"; + this.btnloaddefault.Text = "{GEN_LOADDEFAULT}"; this.btnloaddefault.UseVisualStyleBackColor = true; this.btnloaddefault.Click += new System.EventHandler(this.btnloaddefault_Click); // @@ -386,11 +386,11 @@ namespace ShiftOS.WinForms.Applications // this.btnexport.AutoSize = true; this.btnexport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnexport.Location = new System.Drawing.Point(184, 3); + this.btnexport.Location = new System.Drawing.Point(236, 3); this.btnexport.Name = "btnexport"; - this.btnexport.Size = new System.Drawing.Size(69, 23); + this.btnexport.Size = new System.Drawing.Size(82, 23); this.btnexport.TabIndex = 2; - this.btnexport.Text = "{EXPORT}"; + this.btnexport.Text = "{GEN_SAVE}"; this.btnexport.UseVisualStyleBackColor = true; this.btnexport.Click += new System.EventHandler(this.btnexport_Click); // @@ -398,11 +398,11 @@ namespace ShiftOS.WinForms.Applications // this.btnimport.AutoSize = true; this.btnimport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnimport.Location = new System.Drawing.Point(259, 3); + this.btnimport.Location = new System.Drawing.Point(324, 3); this.btnimport.Name = "btnimport"; - this.btnimport.Size = new System.Drawing.Size(67, 23); + this.btnimport.Size = new System.Drawing.Size(83, 23); this.btnimport.TabIndex = 3; - this.btnimport.Text = "{IMPORT}"; + this.btnimport.Text = "{GEN_LOAD}"; this.btnimport.UseVisualStyleBackColor = true; this.btnimport.Click += new System.EventHandler(this.btnimport_Click); // @@ -410,11 +410,11 @@ namespace ShiftOS.WinForms.Applications // this.btnapply.AutoSize = true; this.btnapply.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.btnapply.Location = new System.Drawing.Point(332, 3); + this.btnapply.Location = new System.Drawing.Point(413, 3); this.btnapply.Name = "btnapply"; - this.btnapply.Size = new System.Drawing.Size(59, 23); + this.btnapply.Size = new System.Drawing.Size(88, 23); this.btnapply.TabIndex = 4; - this.btnapply.Text = "{APPLY}"; + this.btnapply.Text = "{GEN_APPLY}"; this.btnapply.UseVisualStyleBackColor = true; this.btnapply.Click += new System.EventHandler(this.btnapply_Click); // diff --git a/ShiftOS.WinForms/Applications/Skin Loader.cs b/ShiftOS.WinForms/Applications/Skin Loader.cs index e4f0597..b70d3ea 100644 --- a/ShiftOS.WinForms/Applications/Skin Loader.cs +++ b/ShiftOS.WinForms/Applications/Skin Loader.cs @@ -37,10 +37,10 @@ using ShiftOS.WinForms.Tools; namespace ShiftOS.WinForms.Applications { - [Launcher("Skin Loader", true, "al_skin_loader", "Customization")] + [Launcher("{TITLE_SKINLOADER}", true, "al_skin_loader", "{AL_CUSTOMIZATION}")] [RequiresUpgrade("skinning")] [WinOpen("skin_loader")] - [DefaultTitle("Skin Loader")] + [DefaultTitle("{TITLE_SKINLOADER}")] [DefaultIcon("iconSkinLoader")] public partial class Skin_Loader : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/Terminal.cs b/ShiftOS.WinForms/Applications/Terminal.cs index 54329df..fbd769b 100644 --- a/ShiftOS.WinForms/Applications/Terminal.cs +++ b/ShiftOS.WinForms/Applications/Terminal.cs @@ -47,8 +47,9 @@ using ShiftOS.WinForms.Tools; namespace ShiftOS.WinForms.Applications { - [Launcher("Terminal", false, null, "Utilities")] - [WinOpen("terminal")] + [Launcher("{TITLE_TERMINAL}", false, null, "{AL_UTILITIES}")] + [WinOpen("{WO_TERMINAL}")] + [DefaultTitle("{TITLE_TERMINAL}")] [DefaultIcon("iconTerminal")] public partial class Terminal : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Applications/TextPad.cs b/ShiftOS.WinForms/Applications/TextPad.cs index b70a72c..403b4ef 100644 --- a/ShiftOS.WinForms/Applications/TextPad.cs +++ b/ShiftOS.WinForms/Applications/TextPad.cs @@ -36,9 +36,10 @@ using ShiftOS.Engine; namespace ShiftOS.WinForms.Applications { - [Launcher("TextPad", true, "al_textpad", "Accessories")] + [Launcher("{TITLE_TEXTPAD}", true, "al_textpad", "{AL_ACCESSORIES}")] [RequiresUpgrade("textpad")] - [WinOpen("textpad")] + [WinOpen("{WO_TEXTPAD}")] + [DefaultTitle("{TITLE_TEXTPAD}")] [DefaultIcon("iconTextPad")] public partial class TextPad : UserControl, IShiftOSWindow { diff --git a/ShiftOS.WinForms/Resources/strings_en.txt b/ShiftOS.WinForms/Resources/strings_en.txt index cc7e0fe..d3bbef5 100644 --- a/ShiftOS.WinForms/Resources/strings_en.txt +++ b/ShiftOS.WinForms/Resources/strings_en.txt @@ -20,6 +20,10 @@ "{GEN_CODEPOINTS}": "Codepoints", "{GEN_LOADING}": "Loading...", "{GEN_SAVE}": "Save", + "{GEN_LOAD}": "Load", + "{GEN_APPLY}": "Apply", + "{GEN_RESET}": "Reset", + "{GEN_LOADDEFAULT}": "Load default", "{GEN_CANCEL}": "Cancel", "{GEN_CONTINUE}": "Continue", "{GEN_BACK}": "Back", @@ -29,6 +33,7 @@ "{GEN_SETTINGS}": "Settings", "{GEN_ABOUT}": "About", "{GEN_EXIT}": "Exit", + "{GEN_CLOSE}": "Close", //General errors //Syntax errors, command errors, you name it.. @@ -48,6 +53,7 @@ "{ERR_ACLHIGHERVALUE}": "You can't set a user's permissions to a value higher than your own.", "{ERR_HIGHERPERMS}": "That user has more rights than you!", "{ERR_PASSWD_MISMATCH}": "Passwords don't match!", + "{ERR_SYNTAXERROR}": "Syntax error.", //Command results "{RES_ACLUPDATED}": "User permissions updated.", @@ -97,16 +103,56 @@ "{DESC_USERS}": "Lists all users on your computer.", "{DESC_SU}": "Change your identity to another user's.", "{DESC_PASSWD}": "Change your user account password.", + "{DESC_NAMECHANGER}": "Change the name of virtually any program within ShiftOS!", + "{DESC_FILENOTFOUND}": "The file you requested could not be found.", //Window titles. + "{TITLE_FILENOTFOUND}": "File not found.", "{TITLE_PONG_YOULOSE}": "You lose", "{TITLE_CODEPOINTSTRANSFERRED}": "Codepoints transferred.", "{TITLE_INVALIDPORT}": "Invalid port number.", "{TITLE_ENTERSYSNAME}": "Enter system name", "{TITLE_INVALIDNAME}": "Invalid name", "{TITLE_VALUETOOSMALL}": "Value too small.", + "{TITLE_TEMPLATE}": "Template", + "{TITLE_SKINLOADER}": "Skin loader", + "{TITLE_NAMECHANGER}": "Name Changer", + "{TITLE_ADDRESSBOOK}": "Address Book", + "{TITLE_ARTPAD}": "ArtPad", + "{TITLE_SIMPLESRC}": "SimpleSRC Client", + "{TITLE_INFOBOX}": "Information", + "{TITLE_COLORPICKER}": "Choose color", + "{TITLE_AUDIOPLAYER}": "Audio Player", + "{TITLE_CALCULATOR}": "Calculator", + "{TITLE_DOWNLOADER}": "Downloader", + "{TITLE_ABOUT}": "About ShiftOS", + "{TITLE_FILESKIMMER}": "File Skimmer", + "{TITLE_CHOOSEGRAPHIC}": "Choose graphic", + "{TITLE_ICONMANAGER}": "Icon Manager", + "{TITLE_INSTALLER}": "Installer", + "{TITLE_MINDBLOW}": "MindBlow", + "{TITLE_PONG}": "Pong", + "{TITLE_SHIFTER}": "Shifter", + "{TITLE_SHIFTLETTERS}": "ShiftLetters", + "{TITLE_SHIFTLOTTO}": "ShiftLotto", + "{TITLE_SHIFTNET}": "Shiftnet", + "{TITLE_SHIFTORIUM}": "Shiftorium", + "{TITLE_SHIFTSWEEPER}": "ShiftSweeper", + "{TITLE_TERMINAL}": "Terminal", + "{TITLE_TEXTPAD}": "TextPad", + //App Launcher categories + "{AL_PROGRAMMING}": "Programming", + "{AL_CUSTOMIZATION}": "Customization", + "{AL_NETWORKING}": "Networking", + "{AL_UTILITIES}": "Utilities", + "{AL_GRAPHICS}": "Graphics", + "{AL_ACCESSORIES}": "Accessories", + "{AL_ENTERTAINMENT}": "Entertainment", + "{AL_OFFICE}": "Office", + "{AL_GAMES}": "Games", + //Infobox prompt messages "{PROMPT_PONGLOST}": "You lost this game of Pong. Guess you should've cashed out...", "{PROMPT_CODEPOINTSTRANSFERRED}": "%transferrer has transferred %amount Codepoints to your system.", @@ -190,4 +236,9 @@ "{LOADINGMSG2_8}": "[systemd] Can I at least have a muffin?", "{LOADINGMSG2_9}": "[systemd] System initiated, but I still want a cake.", + //Format editor + "{FORMATEDITOR_COMMAND_LOWER}": "command", + "{FORMATEDITOR_ARGUMENT_LOWER}": "argument", + "{FORMATEDITOR_VALUE_LOWER}": "value", + "{FORMATEDITOR_ENTERSYNTAX}": "Enter syntax here", } \ No newline at end of file diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj index fb6e51f..37a3175 100644 --- a/ShiftOS.WinForms/ShiftOS.WinForms.csproj +++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj @@ -185,24 +185,12 @@ ShiftLetters.cs - - UserControl - - - MUDControlCentre.cs - UserControl NameChanger.cs - - UserControl - - - Notifications.cs - UserControl @@ -239,12 +227,6 @@ ShiftSweeper.cs - - UserControl - - - ShopItemCreator.cs - UserControl @@ -550,15 +532,9 @@ ShiftLetters.cs - - MUDControlCentre.cs - NameChanger.cs - - Notifications.cs - Shifter.cs @@ -577,9 +553,6 @@ ShiftSweeper.cs - - ShopItemCreator.cs - Skin Loader.cs diff --git a/ShiftOS.WinForms/Stories/LegionStory.cs b/ShiftOS.WinForms/Stories/LegionStory.cs index c52732e..168d55c 100644 --- a/ShiftOS.WinForms/Stories/LegionStory.cs +++ b/ShiftOS.WinForms/Stories/LegionStory.cs @@ -182,154 +182,6 @@ namespace ShiftOS.WinForms.Stories //What a way to create unbuyable, engine-managed Shiftorium Upgrades... :P } - [Story("devx_legions")] - public static void DevXLegionStory() - { - CharacterName = "DevX"; - SysName = "mud"; - bool waiting = false; - //Used for DevX dialogue. - //Used for legion selection. - var mud = new Applications.MUDControlCentre(); - //For installing the MCC - var installer = new Applications.Installer(); - installer.InstallCompleted += () => - { - Desktop.InvokeOnWorkerThread(() => - { - AppearanceManager.Close(installer); - }); - waiting = false; - }; - - if (!terminalOpen()) - { - var term = new Applications.Terminal(); - AppearanceManager.SetupWindow(term); - } - - var t = new Thread(() => - { - WriteLine("DevX@mud - user connecting to your system.", false); - Thread.Sleep(2000); - WriteLine($"Hello, {SaveSystem.CurrentUser.Username}. It's been a while."); - WriteLine("My intelligence suggests you've installed all GUI-based Shiftorium upgrades."); - WriteLine("Bet you're liking ShiftOS now that the terminal isn't the only way you can control it."); - WriteLine("Well, now it's time to introduce your next task."); - WriteLine("In the multi-user domain, each user has a reputation value associated with them."); - WriteLine("Right now, you have a reputation of 0, Neutral."); - WriteLine("This means that nobody has an opinion on you, yet."); - WriteLine("What a good time to make your presence known?"); - WriteLine("I have an application for you to try, that will help you out in the multi-user domain, and help you make yourself famous."); - WriteLine("In the digital society, you can't survive long as a lone sentience. You must kongregate with a group, and these groups are called \"legions\"."); - WriteLine("This application will assist you in finding one. A legion is a group of sentiences who carry out actions together. They're like... a pack of wolves, or a family, if you will."); - WriteLine("They share Codepoints, documents, applications, and other things with each other."); - WriteLine("And they all have their own goals."); - WriteLine("Up until now, you've been blindly following my directions, with the goal of upgrading ShiftOS. Now, it's time for you to join a legion, and fulfill their goals, to become known within the digital society."); - - WriteLine("You'll do all of this through the MUD Control Centre."); - WriteLine("I'll set it up on your system now."); - //Set up an Installer. - waiting = true; - Desktop.InvokeOnWorkerThread(() => - { - AppearanceManager.SetupWindow(installer); - installer.InitiateInstall(new MCCInstallation()); - }); - while (waiting == true) - Thread.Sleep(25); - - WriteLine("There, it's all installed, so let's get you set up with a legion, shall we?"); - Desktop.InvokeOnWorkerThread(() => - { - AppearanceManager.SetupWindow(mud); - mud.ShowClasses(); - mud.ClassChanged += () => - { - waiting = false; - }; - }); - WriteLine("First, select a class. A class will help define your personality within the multi-user domain. It'll determine the best legions for you."); - waiting = true; - while (waiting == true) - Thread.Sleep(25); - WriteLine($"Your class has been selected. You are a(n) {SaveSystem.CurrentSave.Class}."); - WriteLine("On this screen, you can see a detailed view of your status within the digital society."); - WriteLine("You'll see this screen everytime you start the MUD Control Centre."); - WriteLine("Like the sos.status command, it shows your Codepoints, the upgrades you've bought and the upgrades available, but it also shows your reputation, legion, shops, and various other details."); - WriteLine("Right now, you are not in any legions. This is about to change."); - WriteLine("I will open the Legion Selector for you. The best legions will be shown at the top of the list."); - WriteLine("Pay attention to their Perdominent Class and their Collective Reputation values. These values will indicate how morally correct the legion is, and may affect your personal reputation."); - Desktop.InvokeOnWorkerThread(() => - { - mud.ShowLegionSelector(); - mud.LegionChanged += () => - { - waiting = false; - }; - }); - waiting = true; - while (waiting == true) - Thread.Sleep(25); - WriteLine($"So, you've joined the [{SaveSystem.CurrentSave.CurrentLegions[0]}] legion."); - WriteLine("Now you can see a more detailed view of the legion - who's inside, how many Codepoints the legion has, and you can also join their private chat."); - WriteLine("It's up to you what you do next. Get acquianted with your new team. I've gotta go work on something."); - WriteLine("I will contact you as you become more well-known."); - WriteLine("OH, one more thing."); - WriteLine("You're probably wondering about your reputation. Well, right now you have a Neutral reputation."); - WriteLine("This means, of course, that people don't have an opinion on you. They don't really know you exist."); - WriteLine("As you start performing large-scale operations within the digital society, your reputation will raise or lower gradually depending on how morally correct that action was."); - WriteLine("For example, if you start performing criminal actions, your reputation will start to drop, and people will start to distrust you."); - WriteLine("And if your rep drops too far, the MUD Safety Task Force, and other safety activists may start going after you and trying to take you off the MUD."); - WriteLine("However, if you perform morally-correct actions, your reputation will rise, and more people will trust you with more sensitive data and operations."); - WriteLine("Be careful though, if you have too high of a reputation, lower-rep groups will try to attack you."); - WriteLine("And, I'd be careful of Investigators. If they suspect anything bad about you, they'll do whatever they can to prove you guilty and dramatically decrease your reputation."); - WriteLine("Anyways, I've got some other sentiences I need to... have a little...word...with. Keep on shifting."); - WriteLine("--user has disconnected from your system.--", false); - TerminalBackend.PrefixEnabled = true; - TerminalBackend.PrintPrompt(); - }); - t.IsBackground = true; - t.Start(); - - TerminalBackend.PrefixEnabled = false; - } - - public class MCCInstallation : Applications.Installation - { - protected override void Run() - { - SetStatus("Beginning installation..."); - Thread.Sleep(1270); - SetProgress(10); - SetStatus("Installing base application..."); - for(int i = 0; i < 45; i++) - { - Thread.Sleep(25); - SetProgress(10 + i); - } - SetStatus("Configuring system..."); - //First, we initialize the user's legion value. - SaveSystem.CurrentSave.CurrentLegions = new List(); - Thread.Sleep(250); - SetProgress(65); - //Now we initialize their shop value. - SaveSystem.CurrentSave.MyShop = null; - Thread.Sleep(200); - SetProgress(75); - //Now for their reputation... - SaveSystem.CurrentSave.RawReputation = 0.000; - Thread.Sleep(250); - SetProgress(90); - //Now their class. - SaveSystem.CurrentSave.Class = Objects.UserClass.None; - Thread.Sleep(200); - Story.Start("mud_control_centre"); - SaveSystem.SaveGame(); - SetProgress(100); - } - } - /// /// Stub: Used for story-driven Shiftorium dependency "installer". /// diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs index 855e66d..b247969 100644 --- a/ShiftOS.WinForms/WinformsDesktop.cs +++ b/ShiftOS.WinForms/WinformsDesktop.cs @@ -1035,11 +1035,6 @@ namespace ShiftOS.WinForms return this.Size; } - private void btnnotifications_Click(object sender, EventArgs e) - { - AppearanceManager.SetupWindow(new Applications.Notifications()); - } - private void desktoppanel_Paint(object sender, PaintEventArgs e) { e.Graphics.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality; diff --git a/ShiftOS_TheReturn/AppLauncherDaemon.cs b/ShiftOS_TheReturn/AppLauncherDaemon.cs index c259556..2d21a8c 100644 --- a/ShiftOS_TheReturn/AppLauncherDaemon.cs +++ b/ShiftOS_TheReturn/AppLauncherDaemon.cs @@ -71,7 +71,12 @@ namespace ShiftOS.Engine { var launch = attr as LauncherAttribute; if (launch.UpgradeInstalled) - win.Add(new LauncherItem { DisplayData = launch, LaunchType = type }); + { + var data = new LauncherItem { DisplayData = launch, LaunchType = type }; + data.DisplayData.Category = Localization.Parse(data.DisplayData.Category); + data.DisplayData.Name = Localization.Parse(data.DisplayData.Name); + win.Add(data); + } } } diff --git a/ShiftOS_TheReturn/CommandParser.cs b/ShiftOS_TheReturn/CommandParser.cs index da1073f..2f0d249 100644 --- a/ShiftOS_TheReturn/CommandParser.cs +++ b/ShiftOS_TheReturn/CommandParser.cs @@ -258,11 +258,7 @@ namespace ShiftOS.Engine } else if (format is CommandFormatMarker) { - if (format is CommandFormatNamespace) - { - type = "namespace"; - } - else if (format is CommandFormatCommand) + if (format is CommandFormatCommand) { type = "command"; } @@ -287,8 +283,6 @@ namespace ShiftOS.Engine return new CommandFormatOptionalText(text); case "regexText": return new CommandFormatRegex(text); - case "namespace": - return new CommandFormatNamespace(); case "command": return new CommandFormatCommand(); case "argument": @@ -303,10 +297,16 @@ namespace ShiftOS.Engine } - public interface CommandFormat + public class CommandFormat { - string CheckValidity(string check); - Control Draw(); + public virtual string CheckValidity(string check) + { + return check; + } + + + //winforms use in engine - coding standard violation. + //Control Draw(); } public class CommandFormatText : CommandFormat { @@ -323,21 +323,11 @@ namespace ShiftOS.Engine this.str = str; } - public virtual string CheckValidity(string check) + public override string CheckValidity(string check) { return check.StartsWith(str) ? str : "+FALSE+"; } - public Control Draw() - { - textBox = new TextBox(); - textBox.TextChanged += new EventHandler(TextChanged); - textBox.Location = new Point(0, 0); - textBox.Text = str; - - return textBox; - } - void TextChanged(object sender, EventArgs e) { str = textBox.Text; @@ -384,11 +374,11 @@ namespace ShiftOS.Engine { } - public virtual string CheckValidity(string check) + public override string CheckValidity(string check) { string res = string.Empty; - string alphanumeric = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm"; // not using regex for performance reasons - + string alphanumeric = "QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm-_0123456789"; // not using regex for performance reasons + //You said "alphanumeric" for that variable name... but it only had the alphabet in it. Rectified. - Michael foreach (char c in check) { if (alphanumeric.IndexOf(c) > -1) @@ -403,45 +393,16 @@ namespace ShiftOS.Engine return res; } - - public virtual Control Draw() - { - button = new Button(); - button.Location = new Point(0, 0); - button.Text = "Marker"; - - return button; - } } public class CommandFormatCommand : CommandFormatMarker { - public override Control Draw() - { - Button draw = (Button)base.Draw(); - draw.Text = "Command"; - return draw; - } - } - - public class CommandFormatNamespace : CommandFormatMarker - { - public override Control Draw() - { - Button draw = (Button)base.Draw(); - draw.Text = "Namespace"; - return draw; - } + //stub } public class CommandFormatArgument : CommandFormatMarker { - public override Control Draw() - { - Button draw = (Button)base.Draw(); - draw.Text = "Argument"; - return draw; - } + //stub } public class CommandFormatValue : CommandFormatMarker @@ -477,12 +438,5 @@ namespace ShiftOS.Engine } return done ? res : "+FALSE+"; } - - public override Control Draw() - { - Button draw = (Button)base.Draw(); - draw.Text = "\"Value\""; - return draw; - } } } diff --git a/ShiftOS_TheReturn/Desktop.cs b/ShiftOS_TheReturn/Desktop.cs index a5e7f43..fac5e6b 100644 --- a/ShiftOS_TheReturn/Desktop.cs +++ b/ShiftOS_TheReturn/Desktop.cs @@ -76,7 +76,7 @@ namespace ShiftOS.Engine /// /// Gets or sets this item's category. /// - public string Category { get; private set; } + public string Category { get; internal set; } /// /// Gets whether or not the required upgrade is installed. diff --git a/ShiftOS_TheReturn/TerminalBackend.cs b/ShiftOS_TheReturn/TerminalBackend.cs index d60b675..c8c6ba9 100644 --- a/ShiftOS_TheReturn/TerminalBackend.cs +++ b/ShiftOS_TheReturn/TerminalBackend.cs @@ -447,19 +447,6 @@ namespace ShiftOS.Engine return true; } - /// - /// Runs a command on the client-side. - /// - /// The command's namespace. - /// The command name. - /// The command's arguments. - /// Whether the command should be ran through RTS. - /// Whether the command ran successfully. - public static bool RunClient(string ns, string cmd, Dictionary args, bool isRemote = false) - { - return RunClient(ns + "." + cmd, args, isRemote); - } - /// /// Runs a command on the client. /// @@ -491,8 +478,7 @@ namespace ShiftOS.Engine //Console.WriteLine(text + " " + "{" + string.Join(",", args.Select(kv => kv.Key + "=" + kv.Value).ToArray()) + "}" + " " + isRemote); - string[] split = text.Split('.'); - var cmd = Commands.FirstOrDefault(x => x.CommandInfo.name == text); + var cmd = Commands.FirstOrDefault(x => Localization.Parse(x.CommandInfo.name) == text); if (cmd == null) return false; if (!Shiftorium.UpgradeInstalled(cmd.Dependencies))