diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/LICENSE b/LICENSE index 58d98d3..0a69ab2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 shiftos-game +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 diff --git a/Libraries/Discoursistency.Base.dll b/Libraries/Discoursistency.Base.dll new file mode 100644 index 0000000..bcff32f Binary files /dev/null and b/Libraries/Discoursistency.Base.dll differ diff --git a/Libraries/Discoursistency.HTTP.dll b/Libraries/Discoursistency.HTTP.dll new file mode 100644 index 0000000..637f7ef Binary files /dev/null and b/Libraries/Discoursistency.HTTP.dll differ diff --git a/Libraries/Discoursistency.Util.dll b/Libraries/Discoursistency.Util.dll new file mode 100644 index 0000000..79aa121 Binary files /dev/null and b/Libraries/Discoursistency.Util.dll differ diff --git a/Libraries/IronPython.Modules.dll b/Libraries/IronPython.Modules.dll new file mode 100644 index 0000000..c67a431 Binary files /dev/null and b/Libraries/IronPython.Modules.dll differ diff --git a/Libraries/NetSockets.dll b/Libraries/NetSockets.dll new file mode 100644 index 0000000..db2db50 Binary files /dev/null and b/Libraries/NetSockets.dll differ diff --git a/ShiftOS.MFSProfiler/App.config b/ShiftOS.MFSProfiler/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/ShiftOS.MFSProfiler/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ShiftOS.MFSProfiler/Form1.Designer.cs b/ShiftOS.MFSProfiler/Form1.Designer.cs new file mode 100644 index 0000000..5abd139 --- /dev/null +++ b/ShiftOS.MFSProfiler/Form1.Designer.cs @@ -0,0 +1,248 @@ +namespace ShiftOS.MFSProfiler +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.tvfiles = new System.Windows.Forms.TreeView(); + this.pnlfileinfo = new System.Windows.Forms.Panel(); + this.pnldirectorylisting = new System.Windows.Forms.Panel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.button1 = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.txtbinary = new System.Windows.Forms.TextBox(); + this.txtascii = new System.Windows.Forms.TextBox(); + this.lbfileinfo = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + this.pnlfileinfo.SuspendLayout(); + this.panel1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.SuspendLayout(); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer1.Location = new System.Drawing.Point(0, 0); + this.splitContainer1.Name = "splitContainer1"; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.tvfiles); + this.splitContainer1.Panel1.Controls.Add(this.panel1); + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.pnlfileinfo); + this.splitContainer1.Panel2.Controls.Add(this.pnldirectorylisting); + this.splitContainer1.Size = new System.Drawing.Size(739, 466); + this.splitContainer1.SplitterDistance = 246; + this.splitContainer1.TabIndex = 0; + // + // tvfiles + // + this.tvfiles.Dock = System.Windows.Forms.DockStyle.Fill; + this.tvfiles.Location = new System.Drawing.Point(0, 30); + this.tvfiles.Name = "tvfiles"; + this.tvfiles.Size = new System.Drawing.Size(246, 436); + this.tvfiles.TabIndex = 0; + this.tvfiles.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvfiles_AfterSelect); + // + // pnlfileinfo + // + this.pnlfileinfo.Controls.Add(this.groupBox2); + this.pnlfileinfo.Controls.Add(this.groupBox1); + this.pnlfileinfo.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlfileinfo.Location = new System.Drawing.Point(0, 0); + this.pnlfileinfo.Name = "pnlfileinfo"; + this.pnlfileinfo.Size = new System.Drawing.Size(489, 466); + this.pnlfileinfo.TabIndex = 0; + // + // pnldirectorylisting + // + this.pnldirectorylisting.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnldirectorylisting.Location = new System.Drawing.Point(0, 0); + this.pnldirectorylisting.Name = "pnldirectorylisting"; + this.pnldirectorylisting.Size = new System.Drawing.Size(489, 466); + this.pnldirectorylisting.TabIndex = 1; + // + // panel1 + // + this.panel1.Controls.Add(this.button1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(246, 30); + this.panel1.TabIndex = 1; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(4, 4); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 23); + this.button1.TabIndex = 0; + this.button1.Text = "Mount file"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.lbfileinfo); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top; + this.groupBox1.Location = new System.Drawing.Point(0, 0); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(489, 164); + this.groupBox1.TabIndex = 0; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "File record information"; + // + // groupBox2 + // + this.groupBox2.Controls.Add(this.tabControl1); + this.groupBox2.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox2.Location = new System.Drawing.Point(0, 164); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(489, 302); + this.groupBox2.TabIndex = 1; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Contents"; + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tabPage2); + this.tabControl1.Controls.Add(this.tabPage1); + this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tabControl1.Location = new System.Drawing.Point(3, 16); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(483, 283); + this.tabControl1.TabIndex = 0; + // + // tabPage2 + // + this.tabPage2.Controls.Add(this.txtascii); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(475, 257); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "ASCII"; + this.tabPage2.UseVisualStyleBackColor = true; + // + // tabPage1 + // + this.tabPage1.Controls.Add(this.txtbinary); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(475, 257); + this.tabPage1.TabIndex = 2; + this.tabPage1.Text = "Binary"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // txtbinary + // + this.txtbinary.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtbinary.Location = new System.Drawing.Point(3, 3); + this.txtbinary.Multiline = true; + this.txtbinary.Name = "txtbinary"; + this.txtbinary.Size = new System.Drawing.Size(469, 251); + this.txtbinary.TabIndex = 0; + // + // txtascii + // + this.txtascii.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtascii.Location = new System.Drawing.Point(3, 3); + this.txtascii.Multiline = true; + this.txtascii.Name = "txtascii"; + this.txtascii.Size = new System.Drawing.Size(469, 251); + this.txtascii.TabIndex = 0; + // + // lbfileinfo + // + this.lbfileinfo.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbfileinfo.Location = new System.Drawing.Point(3, 16); + this.lbfileinfo.Name = "lbfileinfo"; + this.lbfileinfo.Size = new System.Drawing.Size(483, 145); + this.lbfileinfo.TabIndex = 0; + this.lbfileinfo.Text = "label1"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(739, 466); + this.Controls.Add(this.splitContainer1); + this.Name = "Form1"; + this.Text = "Form1"; + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); + this.splitContainer1.ResumeLayout(false); + this.pnlfileinfo.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.groupBox1.ResumeLayout(false); + this.groupBox2.ResumeLayout(false); + this.tabControl1.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + this.tabPage2.PerformLayout(); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.TreeView tvfiles; + private System.Windows.Forms.Panel pnldirectorylisting; + private System.Windows.Forms.Panel pnlfileinfo; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage2; + private System.Windows.Forms.TextBox txtascii; + private System.Windows.Forms.TabPage tabPage1; + private System.Windows.Forms.TextBox txtbinary; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.Label lbfileinfo; + } +} + diff --git a/ShiftOS.MFSProfiler/Form1.cs b/ShiftOS.MFSProfiler/Form1.cs new file mode 100644 index 0000000..75025a9 --- /dev/null +++ b/ShiftOS.MFSProfiler/Form1.cs @@ -0,0 +1,111 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using static ShiftOS.Objects.ShiftFS.Utils; + +using ShiftOS.Engine; +using ShiftOS.Objects.ShiftFS; +using System.Threading; + +namespace ShiftOS.MFSProfiler +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + SetupTree(); + } + + public void SetupTree() + { + tvfiles.Nodes.Clear(); + + foreach(var dir in Mounts) + { + var mountNode = new TreeNode(); + mountNode.Text = dir.Name; + mountNode.Tag = Mounts.IndexOf(dir).ToString() + ":"; + + RecursiveDirectoryAdd(mountNode); + + tvfiles.Nodes.Add(mountNode); + } + } + + public void RecursiveDirectoryAdd(TreeNode node) + { + foreach (var dir in GetDirectories(node.Tag.ToString())) + { + var dirInf = GetDirectoryInfo(dir); + var child = new TreeNode(); + child.Text = dirInf.Name; + child.Tag = dir; + RecursiveDirectoryAdd(child); + node.Nodes.Add(child); + node.Expand(); + } + foreach (var dir in GetFiles(node.Tag.ToString())) + { + var dirInf = GetFileInfo(dir); + var child = new TreeNode(); + child.Text = dirInf.Name; + child.Tag = dir; + node.Nodes.Add(child); + node.Expand(); + } + } + + private void button1_Click(object sender, EventArgs e) + { + var opener = new OpenFileDialog(); + opener.Filter = "Mini Filesystem|*.mfs"; + opener.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); + opener.Title = "Mount filesystem"; + if(opener.ShowDialog() == DialogResult.OK) + { + Mount(System.IO.File.ReadAllText(opener.FileName)); + SetupTree(); + } + } + + private void tvfiles_AfterSelect(object sender, TreeViewEventArgs e) + { + try + { + if (FileExists(tvfiles.SelectedNode.Tag.ToString())) + { + pnlfileinfo.BringToFront(); + + txtascii.Text = ReadAllText(tvfiles.SelectedNode.Tag.ToString()); + txtbinary.Text = ""; + var finf = GetFileInfo(tvfiles.SelectedNode.Tag.ToString()); + var t = new Thread(new ThreadStart(() => + { + foreach (var b in finf.Data) + { + txtbinary.Invoke(new Action(() => + { + txtbinary.Text += b.ToString() + " "; + })); + } + })); + t.IsBackground = true; + t.Start(); + + + lbfileinfo.Text = $@"Name: {finf.Name} +Permissions: {finf.permissions} +Size: {finf.Data.Length} +System path: {tvfiles.SelectedNode.Tag.ToString()}"; + } + } catch { } + } + } +} diff --git a/ShiftOS.MFSProfiler/Form1.resx b/ShiftOS.MFSProfiler/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.MFSProfiler/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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.MFSProfiler/Program.cs b/ShiftOS.MFSProfiler/Program.cs new file mode 100644 index 0000000..b8016f2 --- /dev/null +++ b/ShiftOS.MFSProfiler/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS.MFSProfiler +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/ShiftOS.MFSProfiler/Properties/AssemblyInfo.cs b/ShiftOS.MFSProfiler/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7518f84 --- /dev/null +++ b/ShiftOS.MFSProfiler/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ShiftOS.MFSProfiler")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ShiftOS.MFSProfiler")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("af587f3f-ca85-4183-beeb-acf527b1fff3")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ShiftOS.MFSProfiler/Properties/Resources.Designer.cs b/ShiftOS.MFSProfiler/Properties/Resources.Designer.cs new file mode 100644 index 0000000..762a7d5 --- /dev/null +++ b/ShiftOS.MFSProfiler/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ShiftOS.MFSProfiler.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ShiftOS.MFSProfiler.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ShiftOS.MFSProfiler/Properties/Resources.resx b/ShiftOS.MFSProfiler/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ShiftOS.MFSProfiler/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShiftOS.MFSProfiler/Properties/Settings.Designer.cs b/ShiftOS.MFSProfiler/Properties/Settings.Designer.cs new file mode 100644 index 0000000..bc3f96e --- /dev/null +++ b/ShiftOS.MFSProfiler/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ShiftOS.MFSProfiler.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ShiftOS.MFSProfiler/Properties/Settings.settings b/ShiftOS.MFSProfiler/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ShiftOS.MFSProfiler/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ShiftOS.MFSProfiler/ShiftOS.MFSProfiler.csproj b/ShiftOS.MFSProfiler/ShiftOS.MFSProfiler.csproj new file mode 100644 index 0000000..ce02df2 --- /dev/null +++ b/ShiftOS.MFSProfiler/ShiftOS.MFSProfiler.csproj @@ -0,0 +1,100 @@ + + + + + Debug + AnyCPU + {AF587F3F-CA85-4183-BEEB-ACF527B1FFF3} + WinExe + Properties + ShiftOS.MFSProfiler + ShiftOS.MFSProfiler + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {a069089a-8962-4607-b2b2-4cf4a371066e} + ShiftOS.Objects + + + {7c979b07-0585-4033-a110-e5555b9d6651} + ShiftOS.Engine + + + + + \ No newline at end of file diff --git a/ShiftOS.Objects/DiscourseUser.cs b/ShiftOS.Objects/DiscourseUser.cs new file mode 100644 index 0000000..d91b2e3 --- /dev/null +++ b/ShiftOS.Objects/DiscourseUser.cs @@ -0,0 +1,18 @@ +using Discoursistency.HTTP.Client; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Discoursistency.HTTP.Client.Models; + +namespace ShiftOS.Objects +{ + public class ShiftOSAuthAgent : Discoursistency.Base.Authentication.DiscourseAuthenticationService + { + public ShiftOSAuthAgent(IClient client) : base(client) + { + } + } + +} diff --git a/ShiftOS.Objects/Hack.cs b/ShiftOS.Objects/Hack.cs new file mode 100644 index 0000000..8967715 --- /dev/null +++ b/ShiftOS.Objects/Hack.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Objects +{ + public abstract class Exploit + { + public void BeginExploit(string remote_user, bool isMud) + { + var ctx = new ExploitContext(); + SendToMUD(remote_user, "hack_getcontext"); + MessageReceived += (u, c, j) => + { + + }; + ThisContext = ctx; + } + + public ExploitContext ThisContext { get; internal set; } + + public virtual void SendToMUD(string target_user, string command, string json = "") + { + ThisContext.IsMUDHack = false; + if (command == "hack_getcontext") + { + MessageReceived?.Invoke(target_user, "context_info", ExploitContext.CreateRandom()); + } + } + + public event MUDMessageEventHandler MessageReceived; + + + public abstract void OnRun(ExploitContext ctx); + } + + public delegate void MUDMessageEventHandler(string target_user, string command, string json); + + public class ExploitContext + { + public static string CreateRandom() + { + //We can't use JSON.NET. We must construct the JSON ourselves. + StringBuilder jBuilder = new StringBuilder(); + jBuilder.AppendLine("{"); + jBuilder.Append("\tIsMUDHack: \"false\","); + + jBuilder.AppendLine("}"); + return jBuilder.ToString(); + } + + /// + /// Gets or sets whether or not this exploit context belongs to a MUD hack session. + /// + public bool IsMUDHack { get; set; } + + /// + /// Gets or sets the target username for this exploit context. Used for talking with the MUD about it. + /// + public string TargetUsername { get; set; } + + /// + /// Gets or sets the target's locks. + /// + public List TargetLocks { get; set; } + + } + + public abstract class Lock + { + public abstract bool Unlocked { get; } + public abstract void Unlock(); + } +} diff --git a/ShiftOS.Objects/Objects.cs b/ShiftOS.Objects/Objects.cs new file mode 100644 index 0000000..bb5838e --- /dev/null +++ b/ShiftOS.Objects/Objects.cs @@ -0,0 +1,141 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Objects +{ + public enum LegionRole + { + Admin, + Manager, + Committed, + Trainee, + AwaitingInvite + } + + public enum LegionPublicity + { + Public, //Will display on the 'Join Legion' page, anyone can join + PublicInviteOnly, //Will display on the 'Join Legion' page but you must be invited + Unlisted, //Won't display on 'Join Legion', but anyone can join + UnlistedInviteOnly //Won't display in 'Join Legion', and admin/manager invitation is required. + } + + public class Legion + { + public string Name { get; set; } + public LegionPublicity Publicity { get; set; } + public ConsoleColor BannerColor { get; set; } + public string Description { get; set; } + public string ShortName { get; set; } + + public Dictionary Roles { get; set; } + public Dictionary RoleNames { get; set; } + + + } + + public class MUDMemo + { + public string UserFrom { get; set; } + public string UserTo { get; set; } + public MemoType Type { get; set; } + public string Body { get; set; } + public string Subject { get; set; } + } + + public class ClientSave + { + public string Username { get; set; } + public string Password { get; set; } + } + + public enum MemoType + { + Regular, + Job, + LegionInvite, + } + + + public class PongHighscore + { + public string UserName { get; set; } + public int HighestLevel { get; set; } + public int HighestCodepoints { get; set; } + } + + public class GUIDRequest + { + public string name { get; set; } + public string guid { get; set; } + } + + public class OnlineUser + { + public string Guid { get; set; } + public string Username { get; set; } + public string OnlineChat { get; set; } + } + + public class Channel + { + public string Name { get; set; } + public string ID { get; set; } + public string Topic { get; set; } + public int MaxUsers { get; set; } //0 for unlimited users (or the MUD maximum) + public List Users = new List(); + } + + + [Serializable] + public class ServerMessage + { + public string Name { get; set; } + public string Contents { get; set; } + public string GUID { get; set; } + } + + //Better to store this stuff server-side so we can do some neat stuff with hacking... + public class Save + { + public string Username { get; set; } + public int Codepoints { get; set; } + public Dictionary Upgrades { get; set; } + public int StoryPosition { get; set; } + public string Language { get; set; } + + public List CurrentLegions { get; set; } + + public int MajorVersion { get; set; } + public int MinorVersion { get; set; } + public int Revision { get; set; } + + public string Password { get; set; } + public string SystemName { get; set; } + + public string DiscourseName { get; set; } + + /// + /// If the user has entered their Discourse account into ShiftOS, this is the password they gave. + /// + /// ANY developer caught abusing this property will have their dev status revoked and their account PERMANENTLY SUSPENDED. - Michael + /// + public string DiscoursePass { get; set; } + + + public int CountUpgrades() + { + int count = 0; + foreach (var upg in Upgrades) + { + if (upg.Value == true) + count++; + } + return count; + } + } + +} diff --git a/ShiftOS.Objects/Properties/AssemblyInfo.cs b/ShiftOS.Objects/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6004a95 --- /dev/null +++ b/ShiftOS.Objects/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ShiftOS.Objects")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ShiftOS.Objects")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("a069089a-8962-4607-b2b2-4cf4a371066e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ShiftOS.Objects/ShiftFS.cs b/ShiftOS.Objects/ShiftFS.cs new file mode 100644 index 0000000..c9d87e3 --- /dev/null +++ b/ShiftOS.Objects/ShiftFS.cs @@ -0,0 +1,374 @@ +using System; +using Newtonsoft.Json; +using System.Collections.Generic; +using static ShiftOS.Objects.ShiftFS.Utils; +using System.Text; +using System.Threading; + +namespace ShiftOS.Objects.ShiftFS +{ + + public enum Permissions + { + User, + Administrator, + Superuser, + All + } + public class File + { + public string Name; + public byte[] Data; + public bool ReadAccessToLowUsers; + public Permissions permissions; + public System.IO.Stream GetStream() + { + if ((int)CurrentUser >= (int)permissions || permissions == Permissions.All) + { + return new System.IO.MemoryStream(Data); + } + else if (ReadAccessToLowUsers == true) + { + return new System.IO.MemoryStream(Data, false); + } + return null; + } + + public File(string name, byte[] data, bool ReadAccess_to_low_users, Permissions perm) + { + Name = name; + Data = data; + permissions = perm; + ReadAccessToLowUsers = ReadAccess_to_low_users; + } + } + public class Directory + { + public string Name; + public List Files = new List(); + public List Subdirectories = new List(); + public bool ReadAccessToLowUsers; + public Permissions permissions; + public void AddFile(File file) + { + if ((int)CurrentUser >= (int)permissions || permissions == Permissions.All) + { + Files.Add(file); + } + } + public void RemoveFile(string name) + { + if ((int)CurrentUser >= (int)permissions || permissions == Permissions.All) + { + Files.Remove(Files.Find(x => x.Name == name)); + } + } + public void RemoveFile(File file) + { + if ((int)CurrentUser >= (int)permissions || permissions == Permissions.All) + { + Files.Remove(file); + } + } + public File FindFileByName(string name) + { + if ((int)CurrentUser >= (int)permissions || permissions == Permissions.All) + { + return Files.Find(x => x.Name == name); + } + return null; + } + public void AddDirectory(Directory dir) + { + if ((int)CurrentUser >= (int)permissions || permissions == Permissions.All) + { + Subdirectories.Add(dir); + } + } + public void RemoveDirectory(string name) + { + if ((int)CurrentUser >= (int)permissions || permissions == Permissions.All) + { + Subdirectories.Remove(Subdirectories.Find(x => x.Name == name)); + } + } + public void RemoveDirectory(Directory dir) + { + if ((int)CurrentUser >= (int)permissions || permissions == Permissions.All) + { + Subdirectories.Remove(dir); + } + } + public Directory FindDirectoryByName(string name) + { + if ((int)CurrentUser >= (int)permissions || permissions == Permissions.All) + { + return Subdirectories.Find(x => x.Name == name); + } + return null; + } + } + + public static class Utils + { + public static Permissions CurrentUser { get; set; } + + public static List Mounts { get; set; } + + static Utils() + { + if (Mounts == null) + Mounts = new List(); + + } + + public static void Mount(string json) + { + var dir = JsonConvert.DeserializeObject(json); + Mounts.Add(dir); + } + + public static void MountPersistent(string mfsFile) + { + var dir = JsonConvert.DeserializeObject(ReadAllText(mfsFile)); + Mounts.Add(dir); + string oldJson = JsonConvert.SerializeObject(dir); + var t = new Thread(new ThreadStart(() => + { + while (Mounts != null) + { + if (oldJson != JsonConvert.SerializeObject(dir)) + { + oldJson = JsonConvert.SerializeObject(dir); + WriteAllText(mfsFile, oldJson); + } + } + })); + t.IsBackground = true; + t.Start(); + } + + + public static void CreateDirectory(string path) + { + if (!DirectoryExists(path)) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 2; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + dir.AddDirectory(new Directory + { + Name = pathlist[pathlist.Length - 1], + permissions = CurrentUser, + }); + } + else + { + throw new Exception("The directory \"" + path + "\" already exists."); + } + } + + public static byte[] ReadAllBytes(string path) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 2; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + var file = dir.FindFileByName(pathlist[pathlist.Length - 1]); + + return file.Data; + + } + + public static void WriteAllText(string path, string contents) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 2; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + + if (!FileExists(path)) + { + dir.AddFile(new File(pathlist[pathlist.Length - 1], Encoding.UTF8.GetBytes(contents), false, Permissions.All)); + } + else + { + var f = dir.FindFileByName(pathlist[pathlist.Length - 1]); + f.Data = Encoding.UTF8.GetBytes(contents); + } + + } + + + public static void Delete(string path) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 2; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + + if (FileExists(path)) + { + dir.RemoveFile(pathlist[pathlist.Length - 1]); + } + else + { + dir.RemoveDirectory(pathlist[pathlist.Length - 1]); + } + + } + + + public static void WriteAllBytes(string path, byte[] contents) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 2; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + + if (!FileExists(path)) + { + dir.AddFile(new File(pathlist[pathlist.Length - 1], contents, false, Permissions.All)); + } + else + { + var f = dir.FindFileByName(pathlist[pathlist.Length - 1]); + f.Data = contents; + } + + } + + + + public static string ExportMount(int index) + { + var dir = Mounts[index]; + return JsonConvert.SerializeObject(dir, Formatting.Indented); + } + + public static bool DirectoryExists(string path) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 1; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + return dir != null; + + } + + public static bool FileExists(string path) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 2; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + return dir.FindFileByName(pathlist[pathlist.Length - 1]) != null; + + } + + public static Directory GetDirectoryInfo(string path) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 1; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + if (path.EndsWith("/")) + path = path.Remove(path.Length - 1, 1); + return dir; + } + + public static string ReadAllText(string path) + { + return Encoding.UTF8.GetString(ReadAllBytes(path)); + } + + + + public static File GetFileInfo(string path) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 2; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + return dir.FindFileByName(pathlist[pathlist.Length - 1]); + + } + + public static string[] GetDirectories(string path) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for(int i = 1; i <= pathlist.Length - 1; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + if (path.EndsWith("/")) + path = path.Remove(path.Length - 1, 1); + + List paths = new List(); + + foreach(var subdir in dir.Subdirectories) + { + paths.Add(path + "/" + subdir.Name); + } + paths.Sort(); + return paths.ToArray(); + } + + public static string[] GetFiles(string path) + { + string[] pathlist = path.Split('/'); + int vol = Convert.ToInt32(pathlist[0].Replace(":", "")); + var dir = Mounts[vol]; + for (int i = 1; i <= pathlist.Length - 1; i++) + { + dir = dir.FindDirectoryByName(pathlist[i]); + } + if (path.EndsWith("/")) + path = path.Remove(path.Length - 1, 1); + + List paths = new List(); + + foreach (var subdir in dir.Files) + { + paths.Add(path + "/" + subdir.Name); + } + paths.Sort(); + return paths.ToArray(); + } + + public static void WriteAllText(string v, object p) + { + throw new NotImplementedException(); + } + } +} diff --git a/ShiftOS.Objects/ShiftOS.Objects.csproj b/ShiftOS.Objects/ShiftOS.Objects.csproj new file mode 100644 index 0000000..84d7ea8 --- /dev/null +++ b/ShiftOS.Objects/ShiftOS.Objects.csproj @@ -0,0 +1,75 @@ + + + + + Debug + AnyCPU + {A069089A-8962-4607-B2B2-4CF4A371066E} + Library + Properties + ShiftOS.Objects + ShiftOS.Objects + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\Libraries\Discoursistency.Base.dll + + + ..\Libraries\Discoursistency.HTTP.dll + + + ..\Libraries\Discoursistency.Util.dll + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ShiftOS.Objects/ShiftOSMenuRenderer.cs b/ShiftOS.Objects/ShiftOSMenuRenderer.cs new file mode 100644 index 0000000..0e8fa05 --- /dev/null +++ b/ShiftOS.Objects/ShiftOSMenuRenderer.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS.Objects +{ + class ShiftOSMenuRenderer : ToolStripProfessionalRenderer + { + public ShiftOSMenuRenderer() : base(new ShiftOSColorTable()) + { + + } + + protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) + { + + } + } + + public class ShiftOSColorTable : ProfessionalColorTable + { + + } +} diff --git a/ShiftOS.Objects/packages.config b/ShiftOS.Objects/packages.config new file mode 100644 index 0000000..9d64bf3 --- /dev/null +++ b/ShiftOS.Objects/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ShiftOS.Server/App.config b/ShiftOS.Server/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/ShiftOS.Server/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ShiftOS.Server/Program.cs b/ShiftOS.Server/Program.cs new file mode 100644 index 0000000..768ed08 --- /dev/null +++ b/ShiftOS.Server/Program.cs @@ -0,0 +1,964 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ShiftOS.Objects; +using NetSockets; +using System.IO; +using Newtonsoft.Json; +using System.Net; +using System.Net.Sockets; +using Nancy.Hosting.Self; +using Nancy; +using Nancy.Authentication.Basic; +using Nancy.Security; +using Nancy.TinyIoc; +using Nancy.Bootstrapper; + +namespace ShiftOS.Server +{ + public interface IUserMapper + { + /// + /// Get the real username from an identifier + /// + /// User identifier + /// The current NancyFx context + /// Matching populated IUserIdentity object, or empty + IUserIdentity GetUserFromIdentifier(Guid identifier, NancyContext context); + } + + public class MUDUserValidator : IUserValidator + { + public IUserIdentity Validate(string username, string password) + { + if(username == Program.AdminUsername && password == Program.AdminPassword) + { + return null; + } + else + { + return null; + } + } + } + + public class MUDUserIdentity : IUserIdentity + { + public IEnumerable Claims + { + get + { + return null; + } + } + + public string UserName + { + get + { + return uname; + } + } + + public string uname = ""; + + public MUDUserIdentity(string username) + { + uname = username; + } + } + + public class AuthenticationBootstrapper : DefaultNancyBootstrapper + { + protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) + { + base.ApplicationStartup(container, pipelines); + + pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration( + container.Resolve(), + "MUD", UserPromptBehaviour.NonAjax)); + } + } + + public class Program + { + public static string AdminUsername = "admin"; + public static string AdminPassword = "admin"; + + + + public static NetObjectServer server; + + public delegate void StringEventHandler(string str); + + public static event StringEventHandler ServerStarted; + + public static void SaveChats() + { + List saved = new List(); + foreach(var chat in chats) + { + saved.Add(new Channel + { + ID = chat.ID, + Name = chat.Name, + MaxUsers = chat.MaxUsers, + Topic = chat.Topic, + Users = new List() + }); + } + File.WriteAllText("chats.json", JsonConvert.SerializeObject(saved)); + } + + public static void LoadChats() + { + chats = Newtonsoft.Json.JsonConvert.DeserializeObject>(File.ReadAllText("chats.json")); + } + + public static void Main(string[] args) + { + if (!Directory.Exists("saves")) + { + Directory.CreateDirectory("saves"); + } + + if(!File.Exists("chats.json")) + { + SaveChats(); + } + else + { + LoadChats(); + } + + if(!Directory.Exists("scripts")) + { + Console.WriteLine("Creating scripts directory..."); + Directory.CreateDirectory("scripts"); + Console.WriteLine("NOTE: This MUD is not just gonna generate scripts for you. You're going to need to write them. YOU are DevX."); + } + + Console.WriteLine("Starting server..."); + server = new NetObjectServer(); + + server.OnStarted += (o, a) => + { + Console.WriteLine($"Server started on address {server.Address}, port {server.Port}."); + ServerStarted?.Invoke(server.Address.MapToIPv4().ToString()); + }; + + server.OnStopped += (o, a) => + { + Console.WriteLine("WARNING! Server stopped."); + }; + + server.OnError += (o, a) => + { + Console.WriteLine("ERROR: " + a.Exception.Message); + }; + + server.OnClientAccepted += (o, a) => + { + Console.WriteLine("Client connected."); + server.DispatchTo(a.Guid, new NetObject("welcome", new ServerMessage { Name = "Welcome", Contents = a.Guid.ToString(), GUID = "Server" })); + }; + + server.OnReceived += (o, a) => + { + var obj = a.Data.Object; + + var msg = obj as ServerMessage; + + if(msg != null) + { + Interpret(msg); + } + }; + + IPAddress defaultAddress = null; + + var host = Dns.GetHostEntry(Dns.GetHostName()); + foreach (var ip in host.AddressList) + { + if (ip.AddressFamily == AddressFamily.InterNetwork) + { + defaultAddress = ip; + } + } + + try + { + server.Start(defaultAddress, 13370); + } + catch + { + Console.WriteLine("So we tried to bind the server to your IP address automatically, but your operating system or the .NET environment you are in (possibly Mono on Linux) is preventing us from doing so. We'll try to bind to the loopback IP address (127.0.0.1) and if that doesn't work, the multi-user domain software may not be compatible with this OS or .NET environment."); + server.Stop(); + server.Start(IPAddress.Loopback, 13370); + + } + + var hConf = new HostConfiguration(); + hConf.UrlReservations.CreateAutomatically = true; + + var nancy = new NancyHost(hConf, new Uri("http://localhost:13371/")); + + server.OnStopped += (o, a) => + { + nancy.Stop(); + }; + + nancy.Start(); + } + + public static bool UserInChat(Channel chan, Save user) + { + foreach(var usr in chan.Users) + { + if(usr.Username == user.Username) + { + return true; + } + } + return false; + } + + + + public static void Interpret(ServerMessage msg) + { + Dictionary args = null; + + try + { + Console.WriteLine($@"Message received from {msg.GUID}: {msg.Name} + +Contents: +{msg.Contents}"); + + if (!string.IsNullOrWhiteSpace(msg.Contents)) + { + try + { + //It's gotta be JSON. + if (msg.Contents.StartsWith("{")) + { + args = JsonConvert.DeserializeObject>(msg.Contents); + } + } + catch + { + //Damnit, we were wrong. + args = null; + } + } + + switch (msg.Name) + { + case "mud_login": + if (args["username"] != null && args["password"] != null) + { + foreach(var savefile in Directory.GetFiles("saves")) + { + try + { + var save = JsonConvert.DeserializeObject(File.ReadAllText(savefile)); + + if(save.Username == args["username"].ToString() && save.Password == args["password"].ToString()) + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("mud_savefile", new ServerMessage + { + Name = "mud_savefile", + GUID = "server", + Contents = File.ReadAllText(savefile) + })); + return; + } + } + catch { } + } + server.DispatchTo(new Guid(msg.GUID), new NetObject("auth_failed", new ServerMessage + { + Name = "mud_login_denied", + GUID = "server" + })); + } + else + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("auth_failed", new ServerMessage + { + Name = "mud_login_denied", + GUID = "server" + })); + } + break; + case "legion_create": + List legions = new List(); + if (File.Exists("legions.json")) + legions = JsonConvert.DeserializeObject>(File.ReadAllText("legions.json")); + + var l = JsonConvert.DeserializeObject(msg.Contents); + + legions.Add(l); + + File.WriteAllText("legions.json", JsonConvert.SerializeObject(legions, Formatting.Indented)); + break; + case "legion_get_all": + List allLegions = new List(); + + if (File.Exists("legions.json")) + allLegions = JsonConvert.DeserializeObject>(File.ReadAllText("legions.json")); + + server.DispatchTo(new Guid(msg.GUID), new NetObject("alllegions", new ServerMessage + { + Name = "legion_all", + GUID = "server", + Contents = JsonConvert.SerializeObject(allLegions) + })); + break; + case "legion_get_users": + var lgn = JsonConvert.DeserializeObject(msg.Contents); + + List userIDs = new List(); + + foreach (var savfile in Directory.GetFiles("saves")) + { + try + { + var savefilecontents = JsonConvert.DeserializeObject(File.ReadAllText(savfile)); + if (savefilecontents.CurrentLegions.Contains(lgn.ShortName)) + { + userIDs.Add($"{savefilecontents.Username}@{savefilecontents.SystemName}"); + } + } + catch { } + } + + server.DispatchTo(new Guid(msg.GUID), new NetObject("userlist", new ServerMessage + { + Name = "legion_users_found", + GUID = "server", + Contents = JsonConvert.SerializeObject(userIDs) + })); + break; + case "user_get_legion": + var userSave = JsonConvert.DeserializeObject(msg.Contents); + + if (File.Exists("legions.json")) + { + var legionList = JsonConvert.DeserializeObject>(File.ReadAllText("legions.json")); + foreach (var legion in legionList) + { + if (userSave.CurrentLegions.Contains(legion.ShortName)) + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("reply", new ServerMessage + { + Name = "user_legion", + GUID = "server", + Contents = JsonConvert.SerializeObject(legion) + })); + return; + } + } + } + + server.DispatchTo(new Guid(msg.GUID), new NetObject("fuck", new ServerMessage + { + Name = "user_not_found_in_legion", + GUID = "server" + })); + + break; + case "mud_save": + var sav = JsonConvert.DeserializeObject(msg.Contents); + File.WriteAllText("saves/" + sav.Username + ".save", JsonConvert.SerializeObject(sav, Formatting.Indented)); + + server.DispatchTo(new Guid(msg.GUID), new NetObject("auth_failed", new ServerMessage + { + Name = "mud_saved", + GUID = "server" + })); + + break; + case "mud_checkuserexists": + if (args["username"] != null && args["password"] != null) + { + foreach (var savefile in Directory.GetFiles("saves")) + { + try + { + var save = JsonConvert.DeserializeObject(File.ReadAllText(savefile)); + + if (save.Username == args["username"].ToString() && save.Password == args["password"].ToString()) + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("mud_savefile", new ServerMessage + { + Name = "mud_found", + GUID = "server", + })); + return; + } + } + catch { } + } + server.DispatchTo(new Guid(msg.GUID), new NetObject("auth_failed", new ServerMessage + { + Name = "mud_notfound", + GUID = "server" + })); + } + else + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("auth_failed", new ServerMessage + { + Name = "mud_notfound", + GUID = "server" + })); + } + break; + break; + case "pong_gethighscores": + if (File.Exists("pong_highscores.json")) + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("pongstuff", new ServerMessage + { + Name = "pong_highscores", + GUID = "server", + Contents = File.ReadAllText("pong_highscores.json") + })); + } + break; + case "get_memos_for_user": + if(args["username"] != null) + { + string usrname = args["username"].ToString(); + + List mmos = new List(); + + if (File.Exists("memos.json")) + { + foreach(var mmo in JsonConvert.DeserializeObject(File.ReadAllText("memos.json"))) + { + if(mmo.UserTo == usrname) + { + mmos.Add(mmo); + } + } + } + + server.DispatchTo(new Guid(msg.GUID), new NetObject("mud_memos", new ServerMessage + { + Name = "mud_usermemos", + GUID = "server", + Contents = JsonConvert.SerializeObject(mmos) + })); + } + break; + case "mud_post_memo": + MUDMemo memo = JsonConvert.DeserializeObject(msg.Contents); + List memos = new List(); + + if (File.Exists("memos.json")) + memos = JsonConvert.DeserializeObject>(File.ReadAllText("memos.json")); + + memos.Add(memo); + File.WriteAllText("memos.txt", JsonConvert.SerializeObject(memos)); + + + break; + case "pong_sethighscore": + var hs = new List(); + if (File.Exists("pong_highscores.json")) + hs = JsonConvert.DeserializeObject>(File.ReadAllText("ponghighscores.json")); + + var newHS = JsonConvert.DeserializeObject(msg.Contents); + for (int i = 0; i <= hs.Count; i++) + { + try + { + if (hs[i].UserName == newHS.UserName) + { + if (newHS.HighestLevel > hs[i].HighestLevel) + hs[i].HighestLevel = newHS.HighestLevel; + if (newHS.HighestCodepoints > hs[i].HighestCodepoints) + hs[i].HighestCodepoints = newHS.HighestCodepoints; + File.WriteAllText("pong_highscores.json", JsonConvert.SerializeObject(hs)); + return; + + } + } + catch + { + + } + } + hs.Add(newHS); + File.WriteAllText("pong_highscores.json", JsonConvert.SerializeObject(hs)); + return; + case "getvirusdb": + if (!File.Exists("virus.db")) + File.WriteAllText("virus.db", "{}"); + + server.DispatchTo(new Guid(msg.GUID), new NetObject("vdb", new ServerMessage + { + Name = "virusdb", + GUID = "server", + Contents = File.ReadAllText("virus.db") + })); + break; + case "getvirus": + Dictionary virusDB = new Dictionary(); + + if (File.Exists("virus.db")) + virusDB = JsonConvert.DeserializeObject>(File.ReadAllText("virus.db")); + + foreach (var kv in virusDB) + { + if (kv.Key == msg.Contents) + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("response", new ServerMessage + { + Name = "mud_virus", + GUID = "server", + Contents = kv.Value, + })); + return; + } + } + + + break; + case "mud_scanvirus": + Dictionary _virusDB = new Dictionary(); + + bool addIfNotFound = true; + + if (msg.Contents.Contains("||scanonly")) + addIfNotFound = false; + + msg.Contents = msg.Contents.Replace("||scanonly", ""); + + if(File.Exists("virus.db")) + _virusDB = JsonConvert.DeserializeObject>(File.ReadAllText("virus.db")); + + foreach(var kv in _virusDB) + { + if(kv.Value == msg.Contents) + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("response", new ServerMessage + { + Name = "mud_virus_signature", + GUID = "server", + Contents = kv.Key, + })); + return; + } + } + + if (addIfNotFound == true) + { + string newguid = Guid.NewGuid().ToString(); + _virusDB.Add(newguid, msg.Contents); + File.WriteAllText("virus.db", JsonConvert.SerializeObject(_virusDB, Formatting.Indented)); + server.DispatchTo(new Guid(msg.GUID), new NetObject("response", new ServerMessage + { + Name = "mud_virus_signature", + GUID = "server", + Contents = newguid, + })); + } + else + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("response", new ServerMessage + { + Name = "mud_virus_signature", + GUID = "server", + Contents = "unknown", + })); + } + return; + + case "chat_join": + if (args.ContainsKey("id")) + { + var cuser = new Save(); + if (args.ContainsKey("user")) + { + cuser = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(args["user"])); + + + } + int index = -1; + string chat_id = args["id"] as string; + foreach(var chat in chats) + { + if(chat.ID == chat_id) + { + if(chat.Users.Count < chat.MaxUsers || chat.MaxUsers == 0) + { + //user can join chat. + if(cuser != null) + { + index = chats.IndexOf(chat); + } + } + } + } + if(index > -1) + { + chats[index].Users.Add(cuser); + server.DispatchAll(new NetObject("broadcast", new ServerMessage + { + Name = "cbroadcast", + GUID = "server", + Contents = $"{chat_id}: {cuser.Username} {{CHAT_HAS_JOINED}}" + })); + } + else + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("broadcast", new ServerMessage + { + Name = "cbroadcast", + GUID = "server", + Contents = $"{chat_id}: {{CHAT_NOT_FOUND_OR_TOO_MANY_MEMBERS}}" + })); + } + } + break; + case "chat": + if (args.ContainsKey("id")) + { + var cuser = new Save(); + if (args.ContainsKey("user")) + { + cuser = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(args["user"])); + + + } + string message = ""; + if (args.ContainsKey("msg")) + message = args["msg"] as string; + + int index = -1; + string chat_id = args["id"] as string; + foreach (var chat in chats) + { + if (chat.ID == chat_id) + { + if (cuser != null && !string.IsNullOrWhiteSpace(message) && UserInChat(chat, cuser)) + { + index = chats.IndexOf(chat); + } + } + } + if (index > -1) + { + server.DispatchAll(new NetObject("broadcast", new ServerMessage + { + Name = "cbroadcast", + GUID = "server", + Contents = $"{chat_id}/{cuser.Username}: {message}" + })); + } + else + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("broadcast", new ServerMessage + { + Name = "cbroadcast", + GUID = "server", + Contents = $"{chats[index].ID}: {{CHAT_NOT_FOUND_OR_NOT_IN_CHAT}}" + })); + } + } + + break; + case "chat_leave": + if (args.ContainsKey("id")) + { + var cuser = new Save(); + if (args.ContainsKey("user")) + { + cuser = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(args["user"])); + + + } + int index = -1; + string chat_id = args["id"] as string; + foreach (var chat in chats) + { + if (chat.ID == chat_id) + { + if (cuser != null && UserInChat(chat, cuser)) + { + index = chats.IndexOf(chat); + } + } + } + if (index > -1) + { + server.DispatchAll(new NetObject("broadcast", new ServerMessage + { + Name = "cbroadcast", + GUID = "server", + Contents = $"{chats[index].ID}: {cuser.Username} {{HAS_LEFT_CHAT}}" + })); + } + else + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("broadcast", new ServerMessage + { + Name = "cbroadcast", + GUID = "server", + Contents = $"{chat_id}: {{CHAT_NOT_FOUND_OR_NOT_IN_CHAT}}" + })); + } + } + break; + case "chat_create": + string id = ""; + string topic = ""; + string name = ""; + int max_users = 0; + + if (args.ContainsKey("id")) + id = args["id"] as string; + if (args.ContainsKey("topic")) + name = args["topic"] as string; + if (args.ContainsKey("name")) + topic = args["name"] as string; + if (args.ContainsKey("max_users")) + max_users = Convert.ToInt32(args["max_users"].ToString()); + + bool id_taken = false; + + foreach(var chat in chats) + { + if (chat.ID == id) + id_taken = true; + } + + if (id_taken == false) + { + chats.Add(new Channel + { + ID = id, + Name = name, + Topic = topic, + MaxUsers = max_users, + Users = new List() + }); + SaveChats(); + server.DispatchTo(new Guid(msg.GUID), new NetObject("broadcast", new ServerMessage + { + Name = "cbroadcast", + GUID = "server", + Contents = $"{id}: {{SUCCESSFULLY_CREATED_CHAT}}" + })); + } + else + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("broadcast", new ServerMessage + { + Name = "cbroadcast", + GUID = "server", + Contents = $"{id}: {{ID_TAKEN}}" + })); + } + + break; + case "broadcast": + string text = msg.Contents; + if (!string.IsNullOrWhiteSpace(text)) + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("runme", new ServerMessage + { + Name = "broadcast", + GUID = "Server", + Contents = text + + })); + } + break; + case "lua_up": + string lua = msg.Contents; + string firstLine = lua.Split(new[] { Environment.NewLine }, StringSplitOptions.None)[0]; + firstLine = firstLine.Remove(0, 3); //delete the comment + string[] a = firstLine.Split('.'); + if(!Directory.Exists("scripts/" + a[0])) + { + Directory.CreateDirectory($"scripts/{a[0]}"); + } + File.WriteAllText($"scripts/{a[0]}/{a[1]}.lua", lua); + break; + case "mudhack_init": + if (MUDHackPasswords.ContainsKey(msg.GUID)) + MUDHackPasswords.Remove(msg.GUID); + + MUDHackPasswords.Add(msg.GUID, GenerateRandomPassword()); + + + server.DispatchTo(new Guid(msg.GUID), new NetObject("mudhack_init", new ServerMessage + { + Name = "mudhack_init", + GUID = "SERVER", + Contents = MUDHackPasswords[msg.GUID], + })); + + break; + case "mudhack_verify": + if (!MUDHackPasswords.ContainsKey(msg.GUID)) + { + + server.DispatchTo(new Guid(msg.GUID), new NetObject("mudhack_init", new ServerMessage + { + Name = "server_error", + GUID = "SERVER", + Contents = "{SRV_HACK_NOT_INITIATED}", + })); + return; + } + + string pass = ""; + if (args.ContainsKey("pass")) + pass = args["pass"] as string; + + if(pass == MUDHackPasswords[msg.GUID]) + { + server.DispatchTo(new Guid(msg.GUID), new NetObject("mudhack_init", new ServerMessage + { + Name = "mudhack_granted", + GUID = "SERVER", + })); + + } + else + { + + server.DispatchTo(new Guid(msg.GUID), new NetObject("mudhack_init", new ServerMessage + { + Name = "mudhack_denied", + GUID = "SERVER", + })); + } + break; + case "mudhack_killpass": + if (MUDHackPasswords.ContainsKey(msg.GUID)) + MUDHackPasswords.Remove(msg.GUID); + break; + case "mudhack_getallusers": + List users = new List(); + + foreach (var chat in chats) + { + foreach(var usr in chat.Users) + { + var ousr = new OnlineUser(); + ousr.Username = usr.Username; + ousr.OnlineChat = chat.ID; + users.Add(ousr); + } + } + + server.DispatchTo(new Guid(msg.GUID), new NetObject("mudhack_users", new ServerMessage + { + Name = "mudhack_users", + GUID = "SERVER", + Contents = JsonConvert.SerializeObject(users), + })); + break; + case "getguid_reply": + msg.GUID = "server"; + //The message's GUID was manipulated by the client to send to another client. + //So we can just bounce back the message to the other client. + server.DispatchTo(new Guid(msg.GUID), new NetObject("bounce", msg)); + break; + case "getguid_send": + string username = msg.Contents; + string guid = msg.GUID; + server.DispatchAll(new NetObject("are_you_this_guy", new ServerMessage + { + Name = "getguid_fromserver", + GUID = guid, + Contents = username, + })); + break; + case "script": + string user = ""; + string script = ""; + string sArgs = ""; + + if (!args.ContainsKey("user")) + throw new Exception("No 'user' arg specified in message to server"); + + if (!args.ContainsKey("script")) + throw new Exception("No 'script' arg specified in message to server"); + + if (!args.ContainsKey("args")) + throw new Exception("No 'args' arg specified in message to server"); + + user = args["user"] as string; + script = args["script"] as string; + sArgs = args["args"] as string; + + if(File.Exists($"scripts/{user}/{script}.lua")) + { + var script_arguments = JsonConvert.DeserializeObject>(sArgs); + server.DispatchTo(new Guid(msg.GUID), new NetObject("runme", new ServerMessage { + Name="run", + GUID="Server", + Contents = $@"{{ + script:""{File.ReadAllText($"scripts/{user}/{script}.lua").Replace("\"", "\\\"")}"", + args:""{sArgs}"" +}}" + })); + } + else + { + throw new Exception($"{user}.{script}: Script not found."); + } + break; + default: + throw new Exception($"Server couldn't decipher this message:\n\n{JsonConvert.SerializeObject(msg)}"); + } + } + catch(Exception ex) + { + Console.WriteLine("An error occurred with that one."); + Console.WriteLine(ex); + + server.DispatchTo(new Guid(msg.GUID), new NetObject("error", new ServerMessage { Name = "Error", GUID = "Server", Contents = JsonConvert.SerializeObject(ex) })); + } + } + + public static string GenerateRandomPassword() + { + return Guid.NewGuid().ToString(); + } + + public static Dictionary MUDHackPasswords = new Dictionary(); + + public static void Stop() + { + try + { + if (server.IsOnline) + { + try + { + server.Stop(); + } + catch + { + + } + } + server = null; + } + catch { } + } + + public static List chats = new List(); + } +} diff --git a/ShiftOS.Server/Properties/AssemblyInfo.cs b/ShiftOS.Server/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..631aa86 --- /dev/null +++ b/ShiftOS.Server/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ShiftOS.Server")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ShiftOS.Server")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("226c63b4-e60d-4949-b4e7-7a2ddbb96776")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ShiftOS.Server/Properties/Resources.Designer.cs b/ShiftOS.Server/Properties/Resources.Designer.cs new file mode 100644 index 0000000..4ceddac --- /dev/null +++ b/ShiftOS.Server/Properties/Resources.Designer.cs @@ -0,0 +1,97 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ShiftOS.Server.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ShiftOS.Server.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to <html> + /// <head> + /// <title>ShiftOS Multi-User Domain &bull; Admin Panel</title> + /// </head> + /// <body> + /// <h1>Welcome.</h1> + /// <p>There's nothing here, but hey, it works!</p> + /// </body> + ///</html>. + /// + internal static string Home { + get { + return ResourceManager.GetString("Home", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <html> + /// <head> + /// <title>Multi-User Domain &bull; Administration Panel - Page not found.</title> + /// </head> + /// <body> + /// <h1>This page wasn't found.</h1> + /// <p>We couldn't find this page...</p> + /// </body> + ///</html>. + /// + internal static string NotFound { + get { + return ResourceManager.GetString("NotFound", resourceCulture); + } + } + } +} diff --git a/ShiftOS.Server/Properties/Resources.resx b/ShiftOS.Server/Properties/Resources.resx new file mode 100644 index 0000000..cd10c06 --- /dev/null +++ b/ShiftOS.Server/Properties/Resources.resx @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + ..\Resources\Home.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\NotFound.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + \ No newline at end of file diff --git a/ShiftOS.Server/Resources/Home.txt b/ShiftOS.Server/Resources/Home.txt new file mode 100644 index 0000000..41c8995 --- /dev/null +++ b/ShiftOS.Server/Resources/Home.txt @@ -0,0 +1,31 @@ + + + ShiftOS Multi-User Domain • Admin Panel + + + + + + + + + +
+ + {BODY} + +
+

MUD server on {IP_ADDR}:{PORT}

+
+
+ + \ No newline at end of file diff --git a/ShiftOS.Server/Resources/NotFound.txt b/ShiftOS.Server/Resources/NotFound.txt new file mode 100644 index 0000000..cd65829 --- /dev/null +++ b/ShiftOS.Server/Resources/NotFound.txt @@ -0,0 +1,9 @@ + + + Multi-User Domain • Administration Panel - Page not found. + + +

This page wasn't found.

+

We couldn't find this page...

+ + \ No newline at end of file diff --git a/ShiftOS.Server/ShiftOS.Server.csproj b/ShiftOS.Server/ShiftOS.Server.csproj new file mode 100644 index 0000000..8db678e --- /dev/null +++ b/ShiftOS.Server/ShiftOS.Server.csproj @@ -0,0 +1,108 @@ + + + + + Debug + AnyCPU + {226C63B4-E60D-4949-B4E7-7A2DDBB96776} + Exe + Properties + ShiftOS.Server + ShiftOS.Server + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\DynamicLua.1.1.2.0\lib\net40-Client\DynamicLua.dll + True + + + ..\packages\Nancy.1.4.1\lib\net40\Nancy.dll + True + + + ..\packages\Nancy.Authentication.Basic.1.4.1\lib\net40\Nancy.Authentication.Basic.dll + True + + + ..\packages\Nancy.Hosting.Self.1.4.1\lib\net40\Nancy.Hosting.Self.dll + True + + + ..\Libraries\NetSockets.dll + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + True + True + Resources.resx + + + + + + + + + + {a069089a-8962-4607-b2b2-4cf4a371066e} + ShiftOS.Objects + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + \ No newline at end of file diff --git a/ShiftOS.Server/WebAdmin.cs b/ShiftOS.Server/WebAdmin.cs new file mode 100644 index 0000000..cf21181 --- /dev/null +++ b/ShiftOS.Server/WebAdmin.cs @@ -0,0 +1,91 @@ +using Nancy; +using Nancy.Security; +using NetSockets; +using Newtonsoft.Json; +using ShiftOS.Objects; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.Server +{ + public class WebAdmin : NancyModule + { + private Guid thisGuid { get; set; } + + public WebAdmin() + { + this.RequiresAuthentication(); + + + client = new NetObjectClient(); + + client.OnReceived += (o, a) => + { + var msg = a.Data.Object as ServerMessage; + if (msg.Name == "Welcome") + { + thisGuid = new Guid(msg.Contents); + } + }; + + client.Connect(Program.server.Address.MapToIPv4().ToString(), 13370); + + string template = Properties.Resources.Home; + + Get["/"] = _ => { return GetPage(template, "index.html"); }; + Get["/{page}"] = parameters => + { + return GetPage(template, parameters.page); + }; + } + + public NetObjectClient client = new NetObjectClient(); + + public string GetPage(string template, string page) + { + string pageContents = File.ReadAllText("adm/" + page); + + string page_text = template.Replace("{BODY}", pageContents); + + page_text = page_text.Replace("{IP_ADDR}", client.RemoteHost.ToString()); + page_text = page_text.Replace("{PORT}", client.RemotePort.ToString()); + + return page_text; + } + + public string GrabResource(string page) + { + var type = this.GetType(); + foreach(var property in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + foreach(var attr in property.GetCustomAttributes(false)) + { + if(attr is PageAttribute) + { + if(page == (attr as PageAttribute).Name) + { + return property.GetGetMethod().Invoke(this, null) as string; + } + } + } + } + + return Properties.Resources.NotFound; + } + } + + public class PageAttribute :Attribute + { + public PageAttribute(string name) + { + Name = name; + } + + public string Name { get; set; } + } +} diff --git a/ShiftOS.Server/packages.config b/ShiftOS.Server/packages.config new file mode 100644 index 0000000..3e07118 --- /dev/null +++ b/ShiftOS.Server/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/ShiftOS.Sites/information.txt b/ShiftOS.Sites/information.txt new file mode 100644 index 0000000..1e8c4d9 --- /dev/null +++ b/ShiftOS.Sites/information.txt @@ -0,0 +1,14 @@ +The ShiftOS Site repo was moved to automate deployment. + +However, this also comes at a toll to the rest of you developers: + +To help protect the automated deployment system from griefing, trolling etc. from other developers - nobody will have access to this other repo. + +There are only two people who are allowed access to the website repository: + +- Me (NarodGaming): I own and run the website itself, i even own the hardware it runs on. +- Michael: He owns the damn project, and is trustworthy. + +If you believe that you should have access, just PM me on Discord on the forums, and I'll give it a think. + +Sorry for any inconvinience caused - but I hope you understand. \ No newline at end of file diff --git a/ShiftOS.WinForms/App.config b/ShiftOS.WinForms/App.config new file mode 100644 index 0000000..71a06ba --- /dev/null +++ b/ShiftOS.WinForms/App.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Artpad.Designer.cs b/ShiftOS.WinForms/Applications/Artpad.Designer.cs new file mode 100644 index 0000000..b2e7121 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Artpad.Designer.cs @@ -0,0 +1,3552 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class Artpad + { + /// + /// 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); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.pnldrawingbackground = new System.Windows.Forms.Panel(); + this.pnlinitialcanvassettings = new System.Windows.Forms.Panel(); + this.btncancel = new System.Windows.Forms.Button(); + this.btncreate = new System.Windows.Forms.Button(); + this.Label11 = new System.Windows.Forms.Label(); + this.lbltotalpixels = new System.Windows.Forms.Label(); + this.txtnewcanvasheight = new System.Windows.Forms.TextBox(); + this.Label10 = new System.Windows.Forms.Label(); + this.txtnewcanvaswidth = new System.Windows.Forms.TextBox(); + this.Label9 = new System.Windows.Forms.Label(); + this.pnlpalettesize = new System.Windows.Forms.Panel(); + this.txttopspace = new System.Windows.Forms.TextBox(); + this.Label40 = new System.Windows.Forms.Label(); + this.txtsidespace = new System.Windows.Forms.TextBox(); + this.Label41 = new System.Windows.Forms.Label(); + this.btnchangesizecancel = new System.Windows.Forms.Button(); + this.btnsetsize = new System.Windows.Forms.Button(); + this.txtcolorpalletheight = new System.Windows.Forms.TextBox(); + this.Label42 = new System.Windows.Forms.Label(); + this.txtcolorpalletwidth = new System.Windows.Forms.TextBox(); + this.Label43 = new System.Windows.Forms.Label(); + this.picdrawingdisplay = new System.Windows.Forms.PictureBox(); + this.pnlbottompanel = new System.Windows.Forms.Panel(); + this.pnlpallet = new System.Windows.Forms.Panel(); + this.flowcolours = new System.Windows.Forms.FlowLayoutPanel(); + this.colourpallet1 = new System.Windows.Forms.Panel(); + this.colourpallet2 = new System.Windows.Forms.Panel(); + this.colourpallet3 = new System.Windows.Forms.Panel(); + this.colourpallet4 = new System.Windows.Forms.Panel(); + this.colourpallet5 = new System.Windows.Forms.Panel(); + this.colourpallet6 = new System.Windows.Forms.Panel(); + this.colourpallet7 = new System.Windows.Forms.Panel(); + this.colourpallet8 = new System.Windows.Forms.Panel(); + this.colourpallet9 = new System.Windows.Forms.Panel(); + this.colourpallet10 = new System.Windows.Forms.Panel(); + this.colourpallet11 = new System.Windows.Forms.Panel(); + this.colourpallet12 = new System.Windows.Forms.Panel(); + this.colourpallet13 = new System.Windows.Forms.Panel(); + this.colourpallet14 = new System.Windows.Forms.Panel(); + this.colourpallet15 = new System.Windows.Forms.Panel(); + this.colourpallet16 = new System.Windows.Forms.Panel(); + this.colourpallet17 = new System.Windows.Forms.Panel(); + this.colourpallet18 = new System.Windows.Forms.Panel(); + this.colourpallet19 = new System.Windows.Forms.Panel(); + this.colourpallet20 = new System.Windows.Forms.Panel(); + this.colourpallet21 = new System.Windows.Forms.Panel(); + this.colourpallet22 = new System.Windows.Forms.Panel(); + this.colourpallet23 = new System.Windows.Forms.Panel(); + this.colourpallet24 = new System.Windows.Forms.Panel(); + this.colourpallet25 = new System.Windows.Forms.Panel(); + this.colourpallet26 = new System.Windows.Forms.Panel(); + this.colourpallet27 = new System.Windows.Forms.Panel(); + this.colourpallet28 = new System.Windows.Forms.Panel(); + this.colourpallet29 = new System.Windows.Forms.Panel(); + this.colourpallet30 = new System.Windows.Forms.Panel(); + this.colourpallet31 = new System.Windows.Forms.Panel(); + this.colourpallet32 = new System.Windows.Forms.Panel(); + this.colourpallet33 = new System.Windows.Forms.Panel(); + this.colourpallet34 = new System.Windows.Forms.Panel(); + this.colourpallet35 = new System.Windows.Forms.Panel(); + this.colourpallet36 = new System.Windows.Forms.Panel(); + this.colourpallet37 = new System.Windows.Forms.Panel(); + this.colourpallet38 = new System.Windows.Forms.Panel(); + this.colourpallet39 = new System.Windows.Forms.Panel(); + this.colourpallet40 = new System.Windows.Forms.Panel(); + this.colourpallet41 = new System.Windows.Forms.Panel(); + this.colourpallet42 = new System.Windows.Forms.Panel(); + this.colourpallet43 = new System.Windows.Forms.Panel(); + this.colourpallet44 = new System.Windows.Forms.Panel(); + this.colourpallet45 = new System.Windows.Forms.Panel(); + this.colourpallet46 = new System.Windows.Forms.Panel(); + this.colourpallet47 = new System.Windows.Forms.Panel(); + this.colourpallet48 = new System.Windows.Forms.Panel(); + this.colourpallet49 = new System.Windows.Forms.Panel(); + this.colourpallet50 = new System.Windows.Forms.Panel(); + this.colourpallet51 = new System.Windows.Forms.Panel(); + this.colourpallet52 = new System.Windows.Forms.Panel(); + this.colourpallet53 = new System.Windows.Forms.Panel(); + this.colourpallet54 = new System.Windows.Forms.Panel(); + this.colourpallet55 = new System.Windows.Forms.Panel(); + this.colourpallet56 = new System.Windows.Forms.Panel(); + this.colourpallet57 = new System.Windows.Forms.Panel(); + this.colourpallet58 = new System.Windows.Forms.Panel(); + this.colourpallet59 = new System.Windows.Forms.Panel(); + this.colourpallet60 = new System.Windows.Forms.Panel(); + this.colourpallet61 = new System.Windows.Forms.Panel(); + this.colourpallet62 = new System.Windows.Forms.Panel(); + this.colourpallet63 = new System.Windows.Forms.Panel(); + this.colourpallet64 = new System.Windows.Forms.Panel(); + this.colourpallet65 = new System.Windows.Forms.Panel(); + this.colourpallet66 = new System.Windows.Forms.Panel(); + this.colourpallet67 = new System.Windows.Forms.Panel(); + this.colourpallet68 = new System.Windows.Forms.Panel(); + this.colourpallet69 = new System.Windows.Forms.Panel(); + this.colourpallet70 = new System.Windows.Forms.Panel(); + this.colourpallet71 = new System.Windows.Forms.Panel(); + this.colourpallet72 = new System.Windows.Forms.Panel(); + this.colourpallet73 = new System.Windows.Forms.Panel(); + this.colourpallet74 = new System.Windows.Forms.Panel(); + this.colourpallet75 = new System.Windows.Forms.Panel(); + this.colourpallet76 = new System.Windows.Forms.Panel(); + this.colourpallet77 = new System.Windows.Forms.Panel(); + this.colourpallet78 = new System.Windows.Forms.Panel(); + this.colourpallet79 = new System.Windows.Forms.Panel(); + this.colourpallet80 = new System.Windows.Forms.Panel(); + this.colourpallet81 = new System.Windows.Forms.Panel(); + this.colourpallet82 = new System.Windows.Forms.Panel(); + this.colourpallet83 = new System.Windows.Forms.Panel(); + this.colourpallet84 = new System.Windows.Forms.Panel(); + this.colourpallet85 = new System.Windows.Forms.Panel(); + this.colourpallet86 = new System.Windows.Forms.Panel(); + this.colourpallet87 = new System.Windows.Forms.Panel(); + this.colourpallet88 = new System.Windows.Forms.Panel(); + this.colourpallet89 = new System.Windows.Forms.Panel(); + this.colourpallet90 = new System.Windows.Forms.Panel(); + this.colourpallet91 = new System.Windows.Forms.Panel(); + this.colourpallet92 = new System.Windows.Forms.Panel(); + this.colourpallet93 = new System.Windows.Forms.Panel(); + this.colourpallet94 = new System.Windows.Forms.Panel(); + this.colourpallet95 = new System.Windows.Forms.Panel(); + this.colourpallet96 = new System.Windows.Forms.Panel(); + this.colourpallet97 = new System.Windows.Forms.Panel(); + this.colourpallet98 = new System.Windows.Forms.Panel(); + this.colourpallet99 = new System.Windows.Forms.Panel(); + this.colourpallet100 = new System.Windows.Forms.Panel(); + this.colourpallet101 = new System.Windows.Forms.Panel(); + this.colourpallet102 = new System.Windows.Forms.Panel(); + this.colourpallet103 = new System.Windows.Forms.Panel(); + this.colourpallet104 = new System.Windows.Forms.Panel(); + this.colourpallet105 = new System.Windows.Forms.Panel(); + this.colourpallet106 = new System.Windows.Forms.Panel(); + this.colourpallet107 = new System.Windows.Forms.Panel(); + this.colourpallet108 = new System.Windows.Forms.Panel(); + this.colourpallet109 = new System.Windows.Forms.Panel(); + this.colourpallet110 = new System.Windows.Forms.Panel(); + this.colourpallet111 = new System.Windows.Forms.Panel(); + this.colourpallet112 = new System.Windows.Forms.Panel(); + this.colourpallet113 = new System.Windows.Forms.Panel(); + this.colourpallet114 = new System.Windows.Forms.Panel(); + this.colourpallet115 = new System.Windows.Forms.Panel(); + this.colourpallet116 = new System.Windows.Forms.Panel(); + this.colourpallet117 = new System.Windows.Forms.Panel(); + this.colourpallet118 = new System.Windows.Forms.Panel(); + this.colourpallet119 = new System.Windows.Forms.Panel(); + this.colourpallet120 = new System.Windows.Forms.Panel(); + this.colourpallet121 = new System.Windows.Forms.Panel(); + this.colourpallet122 = new System.Windows.Forms.Panel(); + this.colourpallet123 = new System.Windows.Forms.Panel(); + this.colourpallet124 = new System.Windows.Forms.Panel(); + this.colourpallet125 = new System.Windows.Forms.Panel(); + this.colourpallet126 = new System.Windows.Forms.Panel(); + this.colourpallet127 = new System.Windows.Forms.Panel(); + this.colourpallet128 = new System.Windows.Forms.Panel(); + this.Label4 = new System.Windows.Forms.Label(); + this.line6 = new System.Windows.Forms.Panel(); + this.pnltoolproperties = new System.Windows.Forms.Panel(); + this.pnlpixelplacersettings = new System.Windows.Forms.Panel(); + this.lblpixelplacerhelp = new System.Windows.Forms.Label(); + this.btnpixelplacermovementmode = new System.Windows.Forms.Button(); + this.Label8 = new System.Windows.Forms.Label(); + this.pnlovaltoolsettings = new System.Windows.Forms.Panel(); + this.Label20 = new System.Windows.Forms.Label(); + this.btnovalfillonoff = new System.Windows.Forms.Button(); + this.pnlovalfillcolour = new System.Windows.Forms.Panel(); + this.txtovalborderwidth = new System.Windows.Forms.TextBox(); + this.Label21 = new System.Windows.Forms.Label(); + this.Label22 = new System.Windows.Forms.Label(); + this.Label23 = new System.Windows.Forms.Label(); + this.pnleracertoolsettings = new System.Windows.Forms.Panel(); + this.Label28 = new System.Windows.Forms.Label(); + this.btneracersquare = new System.Windows.Forms.Button(); + this.btneracercircle = new System.Windows.Forms.Button(); + this.Label24 = new System.Windows.Forms.Label(); + this.txteracersize = new System.Windows.Forms.TextBox(); + this.Label26 = new System.Windows.Forms.Label(); + this.Label27 = new System.Windows.Forms.Label(); + this.pnllinetoolsettings = new System.Windows.Forms.Panel(); + this.Label29 = new System.Windows.Forms.Label(); + this.txtlinewidth = new System.Windows.Forms.TextBox(); + this.Label30 = new System.Windows.Forms.Label(); + this.Label31 = new System.Windows.Forms.Label(); + this.pnlpaintbrushtoolsettings = new System.Windows.Forms.Panel(); + this.Label36 = new System.Windows.Forms.Label(); + this.btnpaintsquareshape = new System.Windows.Forms.Button(); + this.btnpaintcircleshape = new System.Windows.Forms.Button(); + this.Label37 = new System.Windows.Forms.Label(); + this.txtpaintbrushsize = new System.Windows.Forms.TextBox(); + this.Label38 = new System.Windows.Forms.Label(); + this.Label39 = new System.Windows.Forms.Label(); + this.pnltexttoolsettings = new System.Windows.Forms.Panel(); + this.Label35 = new System.Windows.Forms.Label(); + this.combofontstyle = new System.Windows.Forms.ComboBox(); + this.txtdrawstringtext = new System.Windows.Forms.TextBox(); + this.combodrawtextfont = new System.Windows.Forms.ComboBox(); + this.Label25 = new System.Windows.Forms.Label(); + this.txtdrawtextsize = new System.Windows.Forms.TextBox(); + this.Label32 = new System.Windows.Forms.Label(); + this.Label33 = new System.Windows.Forms.Label(); + this.Label34 = new System.Windows.Forms.Label(); + this.pnlpixelsettersettings = new System.Windows.Forms.Panel(); + this.btnpixelsettersetpixel = new System.Windows.Forms.Button(); + this.txtpixelsetterycoordinate = new System.Windows.Forms.TextBox(); + this.txtpixelsetterxcoordinate = new System.Windows.Forms.TextBox(); + this.Label3 = new System.Windows.Forms.Label(); + this.Label2 = new System.Windows.Forms.Label(); + this.Label1 = new System.Windows.Forms.Label(); + this.pnlmagnifiersettings = new System.Windows.Forms.Panel(); + this.btnzoomout = new System.Windows.Forms.Button(); + this.btnzoomin = new System.Windows.Forms.Button(); + this.lblzoomlevel = new System.Windows.Forms.Label(); + this.Label7 = new System.Windows.Forms.Label(); + this.pnlfloodfillsettings = new System.Windows.Forms.Panel(); + this.Label12 = new System.Windows.Forms.Label(); + this.Label15 = new System.Windows.Forms.Label(); + this.pnlsquaretoolsettings = new System.Windows.Forms.Panel(); + this.Label19 = new System.Windows.Forms.Label(); + this.btnsquarefillonoff = new System.Windows.Forms.Button(); + this.pnlsquarefillcolour = new System.Windows.Forms.Panel(); + this.txtsquareborderwidth = new System.Windows.Forms.TextBox(); + this.Label16 = new System.Windows.Forms.Label(); + this.Label18 = new System.Windows.Forms.Label(); + this.Label17 = new System.Windows.Forms.Label(); + this.pnlpencilsettings = new System.Windows.Forms.Panel(); + this.btnpencilsize3 = new System.Windows.Forms.Button(); + this.btnpencilsize2 = new System.Windows.Forms.Button(); + this.btnpencilsize1 = new System.Windows.Forms.Button(); + this.Label14 = new System.Windows.Forms.Label(); + this.Label6 = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.line5 = new System.Windows.Forms.Panel(); + this.line3 = new System.Windows.Forms.Panel(); + this.pnltools = new System.Windows.Forms.Panel(); + this.pnltoolpositioner = new System.Windows.Forms.FlowLayoutPanel(); + this.btnpixelsetter = new System.Windows.Forms.Button(); + this.btnpixelplacer = new System.Windows.Forms.Button(); + this.btnpencil = new System.Windows.Forms.Button(); + this.btnfloodfill = new System.Windows.Forms.Button(); + this.btnoval = new System.Windows.Forms.Button(); + this.btnsquare = new System.Windows.Forms.Button(); + this.btnlinetool = new System.Windows.Forms.Button(); + this.btnpaintbrush = new System.Windows.Forms.Button(); + this.btntexttool = new System.Windows.Forms.Button(); + this.btneracer = new System.Windows.Forms.Button(); + this.btnnew = new System.Windows.Forms.Button(); + this.btnmagnify = new System.Windows.Forms.Button(); + this.btnopen = new System.Windows.Forms.Button(); + this.btnsave = new System.Windows.Forms.Button(); + this.btnundo = new System.Windows.Forms.Button(); + this.btnredo = new System.Windows.Forms.Button(); + this.line1 = new System.Windows.Forms.Panel(); + this.pnltoolpreview = new System.Windows.Forms.Panel(); + this.Label13 = new System.Windows.Forms.Label(); + this.picpreview = new System.Windows.Forms.PictureBox(); + this.lbltoolselected = new System.Windows.Forms.Label(); + this.line4 = new System.Windows.Forms.Panel(); + this.line2 = new System.Windows.Forms.Panel(); + this.tmrcodepointcooldown = new System.Windows.Forms.Timer(this.components); + this.tmrshowearnedcodepoints = new System.Windows.Forms.Timer(this.components); + this.pullbs = new System.Windows.Forms.Timer(this.components); + this.pullbottom = new System.Windows.Forms.Timer(this.components); + this.pullside = new System.Windows.Forms.Timer(this.components); + this.tmrsetupui = new System.Windows.Forms.Timer(this.components); + this.pgcontents.SuspendLayout(); + this.pnldrawingbackground.SuspendLayout(); + this.pnlinitialcanvassettings.SuspendLayout(); + this.pnlpalettesize.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picdrawingdisplay)).BeginInit(); + this.pnlbottompanel.SuspendLayout(); + this.pnlpallet.SuspendLayout(); + this.flowcolours.SuspendLayout(); + this.pnltoolproperties.SuspendLayout(); + this.pnlpixelplacersettings.SuspendLayout(); + this.pnlovaltoolsettings.SuspendLayout(); + this.pnleracertoolsettings.SuspendLayout(); + this.pnllinetoolsettings.SuspendLayout(); + this.pnlpaintbrushtoolsettings.SuspendLayout(); + this.pnltexttoolsettings.SuspendLayout(); + this.pnlpixelsettersettings.SuspendLayout(); + this.pnlmagnifiersettings.SuspendLayout(); + this.pnlfloodfillsettings.SuspendLayout(); + this.pnlsquaretoolsettings.SuspendLayout(); + this.pnlpencilsettings.SuspendLayout(); + this.pnltools.SuspendLayout(); + this.pnltoolpositioner.SuspendLayout(); + this.pnltoolpreview.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picpreview)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.pnldrawingbackground); + this.pgcontents.Controls.Add(this.pnlbottompanel); + this.pgcontents.Controls.Add(this.pnltools); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(802, 598); + this.pgcontents.TabIndex = 20; + // + // pnldrawingbackground + // + this.pnldrawingbackground.AutoScroll = true; + this.pnldrawingbackground.BackColor = System.Drawing.Color.Gray; + this.pnldrawingbackground.Controls.Add(this.pnlinitialcanvassettings); + this.pnldrawingbackground.Controls.Add(this.pnlpalettesize); + this.pnldrawingbackground.Controls.Add(this.picdrawingdisplay); + this.pnldrawingbackground.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnldrawingbackground.Location = new System.Drawing.Point(120, 0); + this.pnldrawingbackground.Name = "pnldrawingbackground"; + this.pnldrawingbackground.Size = new System.Drawing.Size(682, 498); + this.pnldrawingbackground.TabIndex = 2; + // + // pnlinitialcanvassettings + // + this.pnlinitialcanvassettings.BackColor = System.Drawing.Color.White; + this.pnlinitialcanvassettings.Controls.Add(this.btncancel); + this.pnlinitialcanvassettings.Controls.Add(this.btncreate); + this.pnlinitialcanvassettings.Controls.Add(this.Label11); + this.pnlinitialcanvassettings.Controls.Add(this.lbltotalpixels); + this.pnlinitialcanvassettings.Controls.Add(this.txtnewcanvasheight); + this.pnlinitialcanvassettings.Controls.Add(this.Label10); + this.pnlinitialcanvassettings.Controls.Add(this.txtnewcanvaswidth); + this.pnlinitialcanvassettings.Controls.Add(this.Label9); + this.pnlinitialcanvassettings.Location = new System.Drawing.Point(223, 178); + this.pnlinitialcanvassettings.Name = "pnlinitialcanvassettings"; + this.pnlinitialcanvassettings.Size = new System.Drawing.Size(223, 100); + this.pnlinitialcanvassettings.TabIndex = 1; + // + // btncancel + // + this.btncancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btncancel.Location = new System.Drawing.Point(7, 66); + this.btncancel.Name = "btncancel"; + this.btncancel.Size = new System.Drawing.Size(102, 28); + this.btncancel.TabIndex = 7; + this.btncancel.Text = "Cancel"; + this.btncancel.UseVisualStyleBackColor = true; + this.btncancel.Click += new System.EventHandler(this.btncancel_Click); + // + // btncreate + // + this.btncreate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btncreate.Location = new System.Drawing.Point(114, 66); + this.btncreate.Name = "btncreate"; + this.btncreate.Size = new System.Drawing.Size(102, 28); + this.btncreate.TabIndex = 6; + this.btncreate.Text = "Create"; + this.btncreate.UseVisualStyleBackColor = true; + this.btncreate.Click += new System.EventHandler(this.btncreate_Click); + // + // Label11 + // + this.Label11.AutoSize = true; + this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label11.Location = new System.Drawing.Point(124, 9); + this.Label11.Name = "Label11"; + this.Label11.Size = new System.Drawing.Size(88, 20); + this.Label11.TabIndex = 5; + this.Label11.Text = "Total Pixels"; + // + // lbltotalpixels + // + this.lbltotalpixels.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltotalpixels.Location = new System.Drawing.Point(114, 30); + this.lbltotalpixels.Name = "lbltotalpixels"; + this.lbltotalpixels.Size = new System.Drawing.Size(106, 29); + this.lbltotalpixels.TabIndex = 4; + this.lbltotalpixels.Text = "0"; + this.lbltotalpixels.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtnewcanvasheight + // + this.txtnewcanvasheight.BackColor = System.Drawing.Color.White; + this.txtnewcanvasheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtnewcanvasheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtnewcanvasheight.Location = new System.Drawing.Point(59, 37); + this.txtnewcanvasheight.MaxLength = 4; + this.txtnewcanvasheight.Name = "txtnewcanvasheight"; + this.txtnewcanvasheight.Size = new System.Drawing.Size(54, 22); + this.txtnewcanvasheight.TabIndex = 3; + this.txtnewcanvasheight.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); + // + // Label10 + // + this.Label10.AutoSize = true; + this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label10.Location = new System.Drawing.Point(8, 40); + this.Label10.Name = "Label10"; + this.Label10.Size = new System.Drawing.Size(50, 16); + this.Label10.TabIndex = 2; + this.Label10.Text = "Height:"; + // + // txtnewcanvaswidth + // + this.txtnewcanvaswidth.BackColor = System.Drawing.Color.White; + this.txtnewcanvaswidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtnewcanvaswidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtnewcanvaswidth.Location = new System.Drawing.Point(59, 9); + this.txtnewcanvaswidth.MaxLength = 4; + this.txtnewcanvaswidth.Name = "txtnewcanvaswidth"; + this.txtnewcanvaswidth.Size = new System.Drawing.Size(54, 22); + this.txtnewcanvaswidth.TabIndex = 1; + this.txtnewcanvaswidth.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); + // + // Label9 + // + this.Label9.AutoSize = true; + this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label9.Location = new System.Drawing.Point(8, 12); + this.Label9.Name = "Label9"; + this.Label9.Size = new System.Drawing.Size(45, 16); + this.Label9.TabIndex = 0; + this.Label9.Text = "Width:"; + // + // pnlpalettesize + // + this.pnlpalettesize.BackColor = System.Drawing.Color.White; + this.pnlpalettesize.Controls.Add(this.txttopspace); + this.pnlpalettesize.Controls.Add(this.Label40); + this.pnlpalettesize.Controls.Add(this.txtsidespace); + this.pnlpalettesize.Controls.Add(this.Label41); + this.pnlpalettesize.Controls.Add(this.btnchangesizecancel); + this.pnlpalettesize.Controls.Add(this.btnsetsize); + this.pnlpalettesize.Controls.Add(this.txtcolorpalletheight); + this.pnlpalettesize.Controls.Add(this.Label42); + this.pnlpalettesize.Controls.Add(this.txtcolorpalletwidth); + this.pnlpalettesize.Controls.Add(this.Label43); + this.pnlpalettesize.Location = new System.Drawing.Point(207, 178); + this.pnlpalettesize.Name = "pnlpalettesize"; + this.pnlpalettesize.Size = new System.Drawing.Size(259, 100); + this.pnlpalettesize.TabIndex = 2; + this.pnlpalettesize.Visible = false; + // + // txttopspace + // + this.txttopspace.BackColor = System.Drawing.Color.White; + this.txttopspace.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttopspace.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttopspace.Location = new System.Drawing.Point(198, 38); + this.txttopspace.Name = "txttopspace"; + this.txttopspace.Size = new System.Drawing.Size(54, 22); + this.txttopspace.TabIndex = 11; + // + // Label40 + // + this.Label40.AutoSize = true; + this.Label40.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label40.Location = new System.Drawing.Point(115, 40); + this.Label40.Name = "Label40"; + this.Label40.Size = new System.Drawing.Size(79, 16); + this.Label40.TabIndex = 10; + this.Label40.Text = "Top Space:"; + // + // txtsidespace + // + this.txtsidespace.BackColor = System.Drawing.Color.White; + this.txtsidespace.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtsidespace.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtsidespace.Location = new System.Drawing.Point(198, 10); + this.txtsidespace.Name = "txtsidespace"; + this.txtsidespace.Size = new System.Drawing.Size(54, 22); + this.txtsidespace.TabIndex = 9; + // + // Label41 + // + this.Label41.AutoSize = true; + this.Label41.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label41.Location = new System.Drawing.Point(115, 12); + this.Label41.Name = "Label41"; + this.Label41.Size = new System.Drawing.Size(82, 16); + this.Label41.TabIndex = 8; + this.Label41.Text = "Side Space:"; + // + // btnchangesizecancel + // + this.btnchangesizecancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnchangesizecancel.Location = new System.Drawing.Point(7, 66); + this.btnchangesizecancel.Name = "btnchangesizecancel"; + this.btnchangesizecancel.Size = new System.Drawing.Size(121, 28); + this.btnchangesizecancel.TabIndex = 7; + this.btnchangesizecancel.Text = "Close"; + this.btnchangesizecancel.UseVisualStyleBackColor = true; + // + // btnsetsize + // + this.btnsetsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsetsize.Location = new System.Drawing.Point(133, 66); + this.btnsetsize.Name = "btnsetsize"; + this.btnsetsize.Size = new System.Drawing.Size(119, 28); + this.btnsetsize.TabIndex = 6; + this.btnsetsize.Text = "Set Size"; + this.btnsetsize.UseVisualStyleBackColor = true; + // + // txtcolorpalletheight + // + this.txtcolorpalletheight.BackColor = System.Drawing.Color.White; + this.txtcolorpalletheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtcolorpalletheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtcolorpalletheight.Location = new System.Drawing.Point(59, 37); + this.txtcolorpalletheight.Name = "txtcolorpalletheight"; + this.txtcolorpalletheight.Size = new System.Drawing.Size(54, 22); + this.txtcolorpalletheight.TabIndex = 3; + // + // Label42 + // + this.Label42.AutoSize = true; + this.Label42.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label42.Location = new System.Drawing.Point(8, 40); + this.Label42.Name = "Label42"; + this.Label42.Size = new System.Drawing.Size(50, 16); + this.Label42.TabIndex = 2; + this.Label42.Text = "Height:"; + // + // txtcolorpalletwidth + // + this.txtcolorpalletwidth.BackColor = System.Drawing.Color.White; + this.txtcolorpalletwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtcolorpalletwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtcolorpalletwidth.Location = new System.Drawing.Point(59, 9); + this.txtcolorpalletwidth.Name = "txtcolorpalletwidth"; + this.txtcolorpalletwidth.Size = new System.Drawing.Size(54, 22); + this.txtcolorpalletwidth.TabIndex = 1; + // + // Label43 + // + this.Label43.AutoSize = true; + this.Label43.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label43.Location = new System.Drawing.Point(8, 12); + this.Label43.Name = "Label43"; + this.Label43.Size = new System.Drawing.Size(45, 16); + this.Label43.TabIndex = 0; + this.Label43.Text = "Width:"; + // + // picdrawingdisplay + // + this.picdrawingdisplay.BackColor = System.Drawing.Color.White; + this.picdrawingdisplay.Location = new System.Drawing.Point(180, 108); + this.picdrawingdisplay.Name = "picdrawingdisplay"; + this.picdrawingdisplay.Size = new System.Drawing.Size(100, 50); + this.picdrawingdisplay.TabIndex = 0; + this.picdrawingdisplay.TabStop = false; + this.picdrawingdisplay.Visible = false; + this.picdrawingdisplay.Paint += new System.Windows.Forms.PaintEventHandler(this.picdrawingdisplay_Paint); + this.picdrawingdisplay.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picdrawingdisplay_MouseDown); + this.picdrawingdisplay.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picdrawingdisplay_MouseMove); + this.picdrawingdisplay.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picdrawingdisplay_MouseUp); + // + // pnlbottompanel + // + this.pnlbottompanel.Controls.Add(this.pnlpallet); + this.pnlbottompanel.Controls.Add(this.pnltoolproperties); + this.pnlbottompanel.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlbottompanel.Location = new System.Drawing.Point(120, 498); + this.pnlbottompanel.Name = "pnlbottompanel"; + this.pnlbottompanel.Size = new System.Drawing.Size(682, 100); + this.pnlbottompanel.TabIndex = 1; + // + // pnlpallet + // + this.pnlpallet.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.pnlpallet.Controls.Add(this.flowcolours); + this.pnlpallet.Controls.Add(this.Label4); + this.pnlpallet.Controls.Add(this.line6); + this.pnlpallet.Location = new System.Drawing.Point(457, 0); + this.pnlpallet.Name = "pnlpallet"; + this.pnlpallet.Size = new System.Drawing.Size(225, 100); + this.pnlpallet.TabIndex = 0; + // + // flowcolours + // + this.flowcolours.Controls.Add(this.colourpallet1); + this.flowcolours.Controls.Add(this.colourpallet2); + this.flowcolours.Controls.Add(this.colourpallet3); + this.flowcolours.Controls.Add(this.colourpallet4); + this.flowcolours.Controls.Add(this.colourpallet5); + this.flowcolours.Controls.Add(this.colourpallet6); + this.flowcolours.Controls.Add(this.colourpallet7); + this.flowcolours.Controls.Add(this.colourpallet8); + this.flowcolours.Controls.Add(this.colourpallet9); + this.flowcolours.Controls.Add(this.colourpallet10); + this.flowcolours.Controls.Add(this.colourpallet11); + this.flowcolours.Controls.Add(this.colourpallet12); + this.flowcolours.Controls.Add(this.colourpallet13); + this.flowcolours.Controls.Add(this.colourpallet14); + this.flowcolours.Controls.Add(this.colourpallet15); + this.flowcolours.Controls.Add(this.colourpallet16); + this.flowcolours.Controls.Add(this.colourpallet17); + this.flowcolours.Controls.Add(this.colourpallet18); + this.flowcolours.Controls.Add(this.colourpallet19); + this.flowcolours.Controls.Add(this.colourpallet20); + this.flowcolours.Controls.Add(this.colourpallet21); + this.flowcolours.Controls.Add(this.colourpallet22); + this.flowcolours.Controls.Add(this.colourpallet23); + this.flowcolours.Controls.Add(this.colourpallet24); + this.flowcolours.Controls.Add(this.colourpallet25); + this.flowcolours.Controls.Add(this.colourpallet26); + this.flowcolours.Controls.Add(this.colourpallet27); + this.flowcolours.Controls.Add(this.colourpallet28); + this.flowcolours.Controls.Add(this.colourpallet29); + this.flowcolours.Controls.Add(this.colourpallet30); + this.flowcolours.Controls.Add(this.colourpallet31); + this.flowcolours.Controls.Add(this.colourpallet32); + this.flowcolours.Controls.Add(this.colourpallet33); + this.flowcolours.Controls.Add(this.colourpallet34); + this.flowcolours.Controls.Add(this.colourpallet35); + this.flowcolours.Controls.Add(this.colourpallet36); + this.flowcolours.Controls.Add(this.colourpallet37); + this.flowcolours.Controls.Add(this.colourpallet38); + this.flowcolours.Controls.Add(this.colourpallet39); + this.flowcolours.Controls.Add(this.colourpallet40); + this.flowcolours.Controls.Add(this.colourpallet41); + this.flowcolours.Controls.Add(this.colourpallet42); + this.flowcolours.Controls.Add(this.colourpallet43); + this.flowcolours.Controls.Add(this.colourpallet44); + this.flowcolours.Controls.Add(this.colourpallet45); + this.flowcolours.Controls.Add(this.colourpallet46); + this.flowcolours.Controls.Add(this.colourpallet47); + this.flowcolours.Controls.Add(this.colourpallet48); + this.flowcolours.Controls.Add(this.colourpallet49); + this.flowcolours.Controls.Add(this.colourpallet50); + this.flowcolours.Controls.Add(this.colourpallet51); + this.flowcolours.Controls.Add(this.colourpallet52); + this.flowcolours.Controls.Add(this.colourpallet53); + this.flowcolours.Controls.Add(this.colourpallet54); + this.flowcolours.Controls.Add(this.colourpallet55); + this.flowcolours.Controls.Add(this.colourpallet56); + this.flowcolours.Controls.Add(this.colourpallet57); + this.flowcolours.Controls.Add(this.colourpallet58); + this.flowcolours.Controls.Add(this.colourpallet59); + this.flowcolours.Controls.Add(this.colourpallet60); + this.flowcolours.Controls.Add(this.colourpallet61); + this.flowcolours.Controls.Add(this.colourpallet62); + this.flowcolours.Controls.Add(this.colourpallet63); + this.flowcolours.Controls.Add(this.colourpallet64); + this.flowcolours.Controls.Add(this.colourpallet65); + this.flowcolours.Controls.Add(this.colourpallet66); + this.flowcolours.Controls.Add(this.colourpallet67); + this.flowcolours.Controls.Add(this.colourpallet68); + this.flowcolours.Controls.Add(this.colourpallet69); + this.flowcolours.Controls.Add(this.colourpallet70); + this.flowcolours.Controls.Add(this.colourpallet71); + this.flowcolours.Controls.Add(this.colourpallet72); + this.flowcolours.Controls.Add(this.colourpallet73); + this.flowcolours.Controls.Add(this.colourpallet74); + this.flowcolours.Controls.Add(this.colourpallet75); + this.flowcolours.Controls.Add(this.colourpallet76); + this.flowcolours.Controls.Add(this.colourpallet77); + this.flowcolours.Controls.Add(this.colourpallet78); + this.flowcolours.Controls.Add(this.colourpallet79); + this.flowcolours.Controls.Add(this.colourpallet80); + this.flowcolours.Controls.Add(this.colourpallet81); + this.flowcolours.Controls.Add(this.colourpallet82); + this.flowcolours.Controls.Add(this.colourpallet83); + this.flowcolours.Controls.Add(this.colourpallet84); + this.flowcolours.Controls.Add(this.colourpallet85); + this.flowcolours.Controls.Add(this.colourpallet86); + this.flowcolours.Controls.Add(this.colourpallet87); + this.flowcolours.Controls.Add(this.colourpallet88); + this.flowcolours.Controls.Add(this.colourpallet89); + this.flowcolours.Controls.Add(this.colourpallet90); + this.flowcolours.Controls.Add(this.colourpallet91); + this.flowcolours.Controls.Add(this.colourpallet92); + this.flowcolours.Controls.Add(this.colourpallet93); + this.flowcolours.Controls.Add(this.colourpallet94); + this.flowcolours.Controls.Add(this.colourpallet95); + this.flowcolours.Controls.Add(this.colourpallet96); + this.flowcolours.Controls.Add(this.colourpallet97); + this.flowcolours.Controls.Add(this.colourpallet98); + this.flowcolours.Controls.Add(this.colourpallet99); + this.flowcolours.Controls.Add(this.colourpallet100); + this.flowcolours.Controls.Add(this.colourpallet101); + this.flowcolours.Controls.Add(this.colourpallet102); + this.flowcolours.Controls.Add(this.colourpallet103); + this.flowcolours.Controls.Add(this.colourpallet104); + this.flowcolours.Controls.Add(this.colourpallet105); + this.flowcolours.Controls.Add(this.colourpallet106); + this.flowcolours.Controls.Add(this.colourpallet107); + this.flowcolours.Controls.Add(this.colourpallet108); + this.flowcolours.Controls.Add(this.colourpallet109); + this.flowcolours.Controls.Add(this.colourpallet110); + this.flowcolours.Controls.Add(this.colourpallet111); + this.flowcolours.Controls.Add(this.colourpallet112); + this.flowcolours.Controls.Add(this.colourpallet113); + this.flowcolours.Controls.Add(this.colourpallet114); + this.flowcolours.Controls.Add(this.colourpallet115); + this.flowcolours.Controls.Add(this.colourpallet116); + this.flowcolours.Controls.Add(this.colourpallet117); + this.flowcolours.Controls.Add(this.colourpallet118); + this.flowcolours.Controls.Add(this.colourpallet119); + this.flowcolours.Controls.Add(this.colourpallet120); + this.flowcolours.Controls.Add(this.colourpallet121); + this.flowcolours.Controls.Add(this.colourpallet122); + this.flowcolours.Controls.Add(this.colourpallet123); + this.flowcolours.Controls.Add(this.colourpallet124); + this.flowcolours.Controls.Add(this.colourpallet125); + this.flowcolours.Controls.Add(this.colourpallet126); + this.flowcolours.Controls.Add(this.colourpallet127); + this.flowcolours.Controls.Add(this.colourpallet128); + this.flowcolours.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flowcolours.Location = new System.Drawing.Point(0, 27); + this.flowcolours.Name = "flowcolours"; + this.flowcolours.Padding = new System.Windows.Forms.Padding(1, 1, 0, 0); + this.flowcolours.Size = new System.Drawing.Size(225, 73); + this.flowcolours.TabIndex = 12; + // + // colourpallet1 + // + this.colourpallet1.BackColor = System.Drawing.Color.Black; + this.colourpallet1.Location = new System.Drawing.Point(2, 1); + this.colourpallet1.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet1.Name = "colourpallet1"; + this.colourpallet1.Size = new System.Drawing.Size(12, 8); + this.colourpallet1.TabIndex = 5; + this.colourpallet1.Visible = false; + // + // colourpallet2 + // + this.colourpallet2.BackColor = System.Drawing.Color.Black; + this.colourpallet2.Location = new System.Drawing.Point(15, 1); + this.colourpallet2.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet2.Name = "colourpallet2"; + this.colourpallet2.Size = new System.Drawing.Size(12, 8); + this.colourpallet2.TabIndex = 9; + this.colourpallet2.Visible = false; + // + // colourpallet3 + // + this.colourpallet3.BackColor = System.Drawing.Color.Black; + this.colourpallet3.Location = new System.Drawing.Point(28, 1); + this.colourpallet3.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet3.Name = "colourpallet3"; + this.colourpallet3.Size = new System.Drawing.Size(12, 8); + this.colourpallet3.TabIndex = 13; + this.colourpallet3.Visible = false; + // + // colourpallet4 + // + this.colourpallet4.BackColor = System.Drawing.Color.Black; + this.colourpallet4.Location = new System.Drawing.Point(41, 1); + this.colourpallet4.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet4.Name = "colourpallet4"; + this.colourpallet4.Size = new System.Drawing.Size(12, 8); + this.colourpallet4.TabIndex = 9; + this.colourpallet4.Visible = false; + // + // colourpallet5 + // + this.colourpallet5.BackColor = System.Drawing.Color.Black; + this.colourpallet5.Location = new System.Drawing.Point(54, 1); + this.colourpallet5.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet5.Name = "colourpallet5"; + this.colourpallet5.Size = new System.Drawing.Size(12, 8); + this.colourpallet5.TabIndex = 18; + this.colourpallet5.Visible = false; + // + // colourpallet6 + // + this.colourpallet6.BackColor = System.Drawing.Color.Black; + this.colourpallet6.Location = new System.Drawing.Point(67, 1); + this.colourpallet6.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet6.Name = "colourpallet6"; + this.colourpallet6.Size = new System.Drawing.Size(12, 8); + this.colourpallet6.TabIndex = 17; + this.colourpallet6.Visible = false; + // + // colourpallet7 + // + this.colourpallet7.BackColor = System.Drawing.Color.Black; + this.colourpallet7.Location = new System.Drawing.Point(80, 1); + this.colourpallet7.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet7.Name = "colourpallet7"; + this.colourpallet7.Size = new System.Drawing.Size(12, 8); + this.colourpallet7.TabIndex = 14; + this.colourpallet7.Visible = false; + // + // colourpallet8 + // + this.colourpallet8.BackColor = System.Drawing.Color.Black; + this.colourpallet8.Location = new System.Drawing.Point(93, 1); + this.colourpallet8.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet8.Name = "colourpallet8"; + this.colourpallet8.Size = new System.Drawing.Size(12, 8); + this.colourpallet8.TabIndex = 13; + this.colourpallet8.Visible = false; + // + // colourpallet9 + // + this.colourpallet9.BackColor = System.Drawing.Color.Black; + this.colourpallet9.Location = new System.Drawing.Point(106, 1); + this.colourpallet9.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet9.Name = "colourpallet9"; + this.colourpallet9.Size = new System.Drawing.Size(12, 8); + this.colourpallet9.TabIndex = 15; + this.colourpallet9.Visible = false; + // + // colourpallet10 + // + this.colourpallet10.BackColor = System.Drawing.Color.Black; + this.colourpallet10.Location = new System.Drawing.Point(119, 1); + this.colourpallet10.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet10.Name = "colourpallet10"; + this.colourpallet10.Size = new System.Drawing.Size(12, 8); + this.colourpallet10.TabIndex = 11; + this.colourpallet10.Visible = false; + // + // colourpallet11 + // + this.colourpallet11.BackColor = System.Drawing.Color.Black; + this.colourpallet11.Location = new System.Drawing.Point(132, 1); + this.colourpallet11.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet11.Name = "colourpallet11"; + this.colourpallet11.Size = new System.Drawing.Size(12, 8); + this.colourpallet11.TabIndex = 12; + this.colourpallet11.Visible = false; + // + // colourpallet12 + // + this.colourpallet12.BackColor = System.Drawing.Color.Black; + this.colourpallet12.Location = new System.Drawing.Point(145, 1); + this.colourpallet12.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet12.Name = "colourpallet12"; + this.colourpallet12.Size = new System.Drawing.Size(12, 8); + this.colourpallet12.TabIndex = 16; + this.colourpallet12.Visible = false; + // + // colourpallet13 + // + this.colourpallet13.BackColor = System.Drawing.Color.Black; + this.colourpallet13.Location = new System.Drawing.Point(158, 1); + this.colourpallet13.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet13.Name = "colourpallet13"; + this.colourpallet13.Size = new System.Drawing.Size(12, 8); + this.colourpallet13.TabIndex = 10; + this.colourpallet13.Visible = false; + // + // colourpallet14 + // + this.colourpallet14.BackColor = System.Drawing.Color.Black; + this.colourpallet14.Location = new System.Drawing.Point(171, 1); + this.colourpallet14.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet14.Name = "colourpallet14"; + this.colourpallet14.Size = new System.Drawing.Size(12, 8); + this.colourpallet14.TabIndex = 20; + this.colourpallet14.Visible = false; + // + // colourpallet15 + // + this.colourpallet15.BackColor = System.Drawing.Color.Black; + this.colourpallet15.Location = new System.Drawing.Point(184, 1); + this.colourpallet15.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet15.Name = "colourpallet15"; + this.colourpallet15.Size = new System.Drawing.Size(12, 8); + this.colourpallet15.TabIndex = 14; + this.colourpallet15.Visible = false; + // + // colourpallet16 + // + this.colourpallet16.BackColor = System.Drawing.Color.Black; + this.colourpallet16.Location = new System.Drawing.Point(197, 1); + this.colourpallet16.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet16.Name = "colourpallet16"; + this.colourpallet16.Size = new System.Drawing.Size(12, 8); + this.colourpallet16.TabIndex = 16; + this.colourpallet16.Visible = false; + // + // colourpallet17 + // + this.colourpallet17.BackColor = System.Drawing.Color.Black; + this.colourpallet17.Location = new System.Drawing.Point(210, 1); + this.colourpallet17.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet17.Name = "colourpallet17"; + this.colourpallet17.Size = new System.Drawing.Size(12, 8); + this.colourpallet17.TabIndex = 11; + this.colourpallet17.Visible = false; + // + // colourpallet18 + // + this.colourpallet18.BackColor = System.Drawing.Color.Black; + this.colourpallet18.Location = new System.Drawing.Point(2, 10); + this.colourpallet18.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet18.Name = "colourpallet18"; + this.colourpallet18.Size = new System.Drawing.Size(12, 8); + this.colourpallet18.TabIndex = 8; + this.colourpallet18.Visible = false; + // + // colourpallet19 + // + this.colourpallet19.BackColor = System.Drawing.Color.Black; + this.colourpallet19.Location = new System.Drawing.Point(15, 10); + this.colourpallet19.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet19.Name = "colourpallet19"; + this.colourpallet19.Size = new System.Drawing.Size(12, 8); + this.colourpallet19.TabIndex = 24; + this.colourpallet19.Visible = false; + // + // colourpallet20 + // + this.colourpallet20.BackColor = System.Drawing.Color.Black; + this.colourpallet20.Location = new System.Drawing.Point(28, 10); + this.colourpallet20.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet20.Name = "colourpallet20"; + this.colourpallet20.Size = new System.Drawing.Size(12, 8); + this.colourpallet20.TabIndex = 12; + this.colourpallet20.Visible = false; + // + // colourpallet21 + // + this.colourpallet21.BackColor = System.Drawing.Color.Black; + this.colourpallet21.Location = new System.Drawing.Point(41, 10); + this.colourpallet21.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet21.Name = "colourpallet21"; + this.colourpallet21.Size = new System.Drawing.Size(12, 8); + this.colourpallet21.TabIndex = 20; + this.colourpallet21.Visible = false; + // + // colourpallet22 + // + this.colourpallet22.BackColor = System.Drawing.Color.Black; + this.colourpallet22.Location = new System.Drawing.Point(54, 10); + this.colourpallet22.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet22.Name = "colourpallet22"; + this.colourpallet22.Size = new System.Drawing.Size(12, 8); + this.colourpallet22.TabIndex = 8; + this.colourpallet22.Visible = false; + // + // colourpallet23 + // + this.colourpallet23.BackColor = System.Drawing.Color.Black; + this.colourpallet23.Location = new System.Drawing.Point(67, 10); + this.colourpallet23.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet23.Name = "colourpallet23"; + this.colourpallet23.Size = new System.Drawing.Size(12, 8); + this.colourpallet23.TabIndex = 19; + this.colourpallet23.Visible = false; + // + // colourpallet24 + // + this.colourpallet24.BackColor = System.Drawing.Color.Black; + this.colourpallet24.Location = new System.Drawing.Point(80, 10); + this.colourpallet24.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet24.Name = "colourpallet24"; + this.colourpallet24.Size = new System.Drawing.Size(12, 8); + this.colourpallet24.TabIndex = 10; + this.colourpallet24.Visible = false; + // + // colourpallet25 + // + this.colourpallet25.BackColor = System.Drawing.Color.Black; + this.colourpallet25.Location = new System.Drawing.Point(93, 10); + this.colourpallet25.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet25.Name = "colourpallet25"; + this.colourpallet25.Size = new System.Drawing.Size(12, 8); + this.colourpallet25.TabIndex = 15; + this.colourpallet25.Visible = false; + // + // colourpallet26 + // + this.colourpallet26.BackColor = System.Drawing.Color.Black; + this.colourpallet26.Location = new System.Drawing.Point(106, 10); + this.colourpallet26.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet26.Name = "colourpallet26"; + this.colourpallet26.Size = new System.Drawing.Size(12, 8); + this.colourpallet26.TabIndex = 23; + this.colourpallet26.Visible = false; + // + // colourpallet27 + // + this.colourpallet27.BackColor = System.Drawing.Color.Black; + this.colourpallet27.Location = new System.Drawing.Point(119, 10); + this.colourpallet27.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet27.Name = "colourpallet27"; + this.colourpallet27.Size = new System.Drawing.Size(12, 8); + this.colourpallet27.TabIndex = 6; + this.colourpallet27.Visible = false; + // + // colourpallet28 + // + this.colourpallet28.BackColor = System.Drawing.Color.Black; + this.colourpallet28.Location = new System.Drawing.Point(132, 10); + this.colourpallet28.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet28.Name = "colourpallet28"; + this.colourpallet28.Size = new System.Drawing.Size(12, 8); + this.colourpallet28.TabIndex = 19; + this.colourpallet28.Visible = false; + // + // colourpallet29 + // + this.colourpallet29.BackColor = System.Drawing.Color.Black; + this.colourpallet29.Location = new System.Drawing.Point(145, 10); + this.colourpallet29.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet29.Name = "colourpallet29"; + this.colourpallet29.Size = new System.Drawing.Size(12, 8); + this.colourpallet29.TabIndex = 22; + this.colourpallet29.Visible = false; + // + // colourpallet30 + // + this.colourpallet30.BackColor = System.Drawing.Color.Black; + this.colourpallet30.Location = new System.Drawing.Point(158, 10); + this.colourpallet30.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet30.Name = "colourpallet30"; + this.colourpallet30.Size = new System.Drawing.Size(12, 8); + this.colourpallet30.TabIndex = 18; + this.colourpallet30.Visible = false; + // + // colourpallet31 + // + this.colourpallet31.BackColor = System.Drawing.Color.Black; + this.colourpallet31.Location = new System.Drawing.Point(171, 10); + this.colourpallet31.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet31.Name = "colourpallet31"; + this.colourpallet31.Size = new System.Drawing.Size(12, 8); + this.colourpallet31.TabIndex = 21; + this.colourpallet31.Visible = false; + // + // colourpallet32 + // + this.colourpallet32.BackColor = System.Drawing.Color.Black; + this.colourpallet32.Location = new System.Drawing.Point(184, 10); + this.colourpallet32.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet32.Name = "colourpallet32"; + this.colourpallet32.Size = new System.Drawing.Size(12, 8); + this.colourpallet32.TabIndex = 17; + this.colourpallet32.Visible = false; + // + // colourpallet33 + // + this.colourpallet33.BackColor = System.Drawing.Color.Black; + this.colourpallet33.Location = new System.Drawing.Point(197, 10); + this.colourpallet33.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet33.Name = "colourpallet33"; + this.colourpallet33.Size = new System.Drawing.Size(12, 8); + this.colourpallet33.TabIndex = 50; + this.colourpallet33.Visible = false; + // + // colourpallet34 + // + this.colourpallet34.BackColor = System.Drawing.Color.Black; + this.colourpallet34.Location = new System.Drawing.Point(210, 10); + this.colourpallet34.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet34.Name = "colourpallet34"; + this.colourpallet34.Size = new System.Drawing.Size(12, 8); + this.colourpallet34.TabIndex = 46; + this.colourpallet34.Visible = false; + // + // colourpallet35 + // + this.colourpallet35.BackColor = System.Drawing.Color.Black; + this.colourpallet35.Location = new System.Drawing.Point(2, 19); + this.colourpallet35.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet35.Name = "colourpallet35"; + this.colourpallet35.Size = new System.Drawing.Size(12, 8); + this.colourpallet35.TabIndex = 53; + this.colourpallet35.Visible = false; + // + // colourpallet36 + // + this.colourpallet36.BackColor = System.Drawing.Color.Black; + this.colourpallet36.Location = new System.Drawing.Point(15, 19); + this.colourpallet36.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet36.Name = "colourpallet36"; + this.colourpallet36.Size = new System.Drawing.Size(12, 8); + this.colourpallet36.TabIndex = 48; + this.colourpallet36.Visible = false; + // + // colourpallet37 + // + this.colourpallet37.BackColor = System.Drawing.Color.Black; + this.colourpallet37.Location = new System.Drawing.Point(28, 19); + this.colourpallet37.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet37.Name = "colourpallet37"; + this.colourpallet37.Size = new System.Drawing.Size(12, 8); + this.colourpallet37.TabIndex = 54; + this.colourpallet37.Visible = false; + // + // colourpallet38 + // + this.colourpallet38.BackColor = System.Drawing.Color.Black; + this.colourpallet38.Location = new System.Drawing.Point(41, 19); + this.colourpallet38.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet38.Name = "colourpallet38"; + this.colourpallet38.Size = new System.Drawing.Size(12, 8); + this.colourpallet38.TabIndex = 26; + this.colourpallet38.Visible = false; + // + // colourpallet39 + // + this.colourpallet39.BackColor = System.Drawing.Color.Black; + this.colourpallet39.Location = new System.Drawing.Point(54, 19); + this.colourpallet39.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet39.Name = "colourpallet39"; + this.colourpallet39.Size = new System.Drawing.Size(12, 8); + this.colourpallet39.TabIndex = 55; + this.colourpallet39.Visible = false; + // + // colourpallet40 + // + this.colourpallet40.BackColor = System.Drawing.Color.Black; + this.colourpallet40.Location = new System.Drawing.Point(67, 19); + this.colourpallet40.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet40.Name = "colourpallet40"; + this.colourpallet40.Size = new System.Drawing.Size(12, 8); + this.colourpallet40.TabIndex = 41; + this.colourpallet40.Visible = false; + // + // colourpallet41 + // + this.colourpallet41.BackColor = System.Drawing.Color.Black; + this.colourpallet41.Location = new System.Drawing.Point(80, 19); + this.colourpallet41.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet41.Name = "colourpallet41"; + this.colourpallet41.Size = new System.Drawing.Size(12, 8); + this.colourpallet41.TabIndex = 31; + this.colourpallet41.Visible = false; + // + // colourpallet42 + // + this.colourpallet42.BackColor = System.Drawing.Color.Black; + this.colourpallet42.Location = new System.Drawing.Point(93, 19); + this.colourpallet42.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet42.Name = "colourpallet42"; + this.colourpallet42.Size = new System.Drawing.Size(12, 8); + this.colourpallet42.TabIndex = 49; + this.colourpallet42.Visible = false; + // + // colourpallet43 + // + this.colourpallet43.BackColor = System.Drawing.Color.Black; + this.colourpallet43.Location = new System.Drawing.Point(106, 19); + this.colourpallet43.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet43.Name = "colourpallet43"; + this.colourpallet43.Size = new System.Drawing.Size(12, 8); + this.colourpallet43.TabIndex = 27; + this.colourpallet43.Visible = false; + // + // colourpallet44 + // + this.colourpallet44.BackColor = System.Drawing.Color.Black; + this.colourpallet44.Location = new System.Drawing.Point(119, 19); + this.colourpallet44.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet44.Name = "colourpallet44"; + this.colourpallet44.Size = new System.Drawing.Size(12, 8); + this.colourpallet44.TabIndex = 51; + this.colourpallet44.Visible = false; + // + // colourpallet45 + // + this.colourpallet45.BackColor = System.Drawing.Color.Black; + this.colourpallet45.Location = new System.Drawing.Point(132, 19); + this.colourpallet45.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet45.Name = "colourpallet45"; + this.colourpallet45.Size = new System.Drawing.Size(12, 8); + this.colourpallet45.TabIndex = 36; + this.colourpallet45.Visible = false; + // + // colourpallet46 + // + this.colourpallet46.BackColor = System.Drawing.Color.Black; + this.colourpallet46.Location = new System.Drawing.Point(145, 19); + this.colourpallet46.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet46.Name = "colourpallet46"; + this.colourpallet46.Size = new System.Drawing.Size(12, 8); + this.colourpallet46.TabIndex = 56; + this.colourpallet46.Visible = false; + // + // colourpallet47 + // + this.colourpallet47.BackColor = System.Drawing.Color.Black; + this.colourpallet47.Location = new System.Drawing.Point(158, 19); + this.colourpallet47.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet47.Name = "colourpallet47"; + this.colourpallet47.Size = new System.Drawing.Size(12, 8); + this.colourpallet47.TabIndex = 28; + this.colourpallet47.Visible = false; + // + // colourpallet48 + // + this.colourpallet48.BackColor = System.Drawing.Color.Black; + this.colourpallet48.Location = new System.Drawing.Point(171, 19); + this.colourpallet48.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet48.Name = "colourpallet48"; + this.colourpallet48.Size = new System.Drawing.Size(12, 8); + this.colourpallet48.TabIndex = 33; + this.colourpallet48.Visible = false; + // + // colourpallet49 + // + this.colourpallet49.BackColor = System.Drawing.Color.Black; + this.colourpallet49.Location = new System.Drawing.Point(184, 19); + this.colourpallet49.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet49.Name = "colourpallet49"; + this.colourpallet49.Size = new System.Drawing.Size(12, 8); + this.colourpallet49.TabIndex = 43; + this.colourpallet49.Visible = false; + // + // colourpallet50 + // + this.colourpallet50.BackColor = System.Drawing.Color.Black; + this.colourpallet50.Location = new System.Drawing.Point(197, 19); + this.colourpallet50.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet50.Name = "colourpallet50"; + this.colourpallet50.Size = new System.Drawing.Size(12, 8); + this.colourpallet50.TabIndex = 40; + this.colourpallet50.Visible = false; + // + // colourpallet51 + // + this.colourpallet51.BackColor = System.Drawing.Color.Black; + this.colourpallet51.Location = new System.Drawing.Point(210, 19); + this.colourpallet51.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet51.Name = "colourpallet51"; + this.colourpallet51.Size = new System.Drawing.Size(12, 8); + this.colourpallet51.TabIndex = 52; + this.colourpallet51.Visible = false; + // + // colourpallet52 + // + this.colourpallet52.BackColor = System.Drawing.Color.Black; + this.colourpallet52.Location = new System.Drawing.Point(2, 28); + this.colourpallet52.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet52.Name = "colourpallet52"; + this.colourpallet52.Size = new System.Drawing.Size(12, 8); + this.colourpallet52.TabIndex = 32; + this.colourpallet52.Visible = false; + // + // colourpallet53 + // + this.colourpallet53.BackColor = System.Drawing.Color.Black; + this.colourpallet53.Location = new System.Drawing.Point(15, 28); + this.colourpallet53.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet53.Name = "colourpallet53"; + this.colourpallet53.Size = new System.Drawing.Size(12, 8); + this.colourpallet53.TabIndex = 44; + this.colourpallet53.Visible = false; + // + // colourpallet54 + // + this.colourpallet54.BackColor = System.Drawing.Color.Black; + this.colourpallet54.Location = new System.Drawing.Point(28, 28); + this.colourpallet54.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet54.Name = "colourpallet54"; + this.colourpallet54.Size = new System.Drawing.Size(12, 8); + this.colourpallet54.TabIndex = 35; + this.colourpallet54.Visible = false; + // + // colourpallet55 + // + this.colourpallet55.BackColor = System.Drawing.Color.Black; + this.colourpallet55.Location = new System.Drawing.Point(41, 28); + this.colourpallet55.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet55.Name = "colourpallet55"; + this.colourpallet55.Size = new System.Drawing.Size(12, 8); + this.colourpallet55.TabIndex = 34; + this.colourpallet55.Visible = false; + // + // colourpallet56 + // + this.colourpallet56.BackColor = System.Drawing.Color.Black; + this.colourpallet56.Location = new System.Drawing.Point(54, 28); + this.colourpallet56.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet56.Name = "colourpallet56"; + this.colourpallet56.Size = new System.Drawing.Size(12, 8); + this.colourpallet56.TabIndex = 42; + this.colourpallet56.Visible = false; + // + // colourpallet57 + // + this.colourpallet57.BackColor = System.Drawing.Color.Black; + this.colourpallet57.Location = new System.Drawing.Point(67, 28); + this.colourpallet57.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet57.Name = "colourpallet57"; + this.colourpallet57.Size = new System.Drawing.Size(12, 8); + this.colourpallet57.TabIndex = 38; + this.colourpallet57.Visible = false; + // + // colourpallet58 + // + this.colourpallet58.BackColor = System.Drawing.Color.Black; + this.colourpallet58.Location = new System.Drawing.Point(80, 28); + this.colourpallet58.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet58.Name = "colourpallet58"; + this.colourpallet58.Size = new System.Drawing.Size(12, 8); + this.colourpallet58.TabIndex = 39; + this.colourpallet58.Visible = false; + // + // colourpallet59 + // + this.colourpallet59.BackColor = System.Drawing.Color.Black; + this.colourpallet59.Location = new System.Drawing.Point(93, 28); + this.colourpallet59.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet59.Name = "colourpallet59"; + this.colourpallet59.Size = new System.Drawing.Size(12, 8); + this.colourpallet59.TabIndex = 45; + this.colourpallet59.Visible = false; + // + // colourpallet60 + // + this.colourpallet60.BackColor = System.Drawing.Color.Black; + this.colourpallet60.Location = new System.Drawing.Point(106, 28); + this.colourpallet60.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet60.Name = "colourpallet60"; + this.colourpallet60.Size = new System.Drawing.Size(12, 8); + this.colourpallet60.TabIndex = 47; + this.colourpallet60.Visible = false; + // + // colourpallet61 + // + this.colourpallet61.BackColor = System.Drawing.Color.Black; + this.colourpallet61.Location = new System.Drawing.Point(119, 28); + this.colourpallet61.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet61.Name = "colourpallet61"; + this.colourpallet61.Size = new System.Drawing.Size(12, 8); + this.colourpallet61.TabIndex = 30; + this.colourpallet61.Visible = false; + // + // colourpallet62 + // + this.colourpallet62.BackColor = System.Drawing.Color.Black; + this.colourpallet62.Location = new System.Drawing.Point(132, 28); + this.colourpallet62.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet62.Name = "colourpallet62"; + this.colourpallet62.Size = new System.Drawing.Size(12, 8); + this.colourpallet62.TabIndex = 37; + this.colourpallet62.Visible = false; + // + // colourpallet63 + // + this.colourpallet63.BackColor = System.Drawing.Color.Black; + this.colourpallet63.Location = new System.Drawing.Point(145, 28); + this.colourpallet63.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet63.Name = "colourpallet63"; + this.colourpallet63.Size = new System.Drawing.Size(12, 8); + this.colourpallet63.TabIndex = 29; + this.colourpallet63.Visible = false; + // + // colourpallet64 + // + this.colourpallet64.BackColor = System.Drawing.Color.Black; + this.colourpallet64.Location = new System.Drawing.Point(158, 28); + this.colourpallet64.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet64.Name = "colourpallet64"; + this.colourpallet64.Size = new System.Drawing.Size(12, 8); + this.colourpallet64.TabIndex = 25; + this.colourpallet64.Visible = false; + // + // colourpallet65 + // + this.colourpallet65.BackColor = System.Drawing.Color.Black; + this.colourpallet65.Location = new System.Drawing.Point(171, 28); + this.colourpallet65.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet65.Name = "colourpallet65"; + this.colourpallet65.Size = new System.Drawing.Size(12, 8); + this.colourpallet65.TabIndex = 57; + this.colourpallet65.Visible = false; + // + // colourpallet66 + // + this.colourpallet66.BackColor = System.Drawing.Color.Black; + this.colourpallet66.Location = new System.Drawing.Point(184, 28); + this.colourpallet66.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet66.Name = "colourpallet66"; + this.colourpallet66.Size = new System.Drawing.Size(12, 8); + this.colourpallet66.TabIndex = 61; + this.colourpallet66.Visible = false; + // + // colourpallet67 + // + this.colourpallet67.BackColor = System.Drawing.Color.Black; + this.colourpallet67.Location = new System.Drawing.Point(197, 28); + this.colourpallet67.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet67.Name = "colourpallet67"; + this.colourpallet67.Size = new System.Drawing.Size(12, 8); + this.colourpallet67.TabIndex = 69; + this.colourpallet67.Visible = false; + // + // colourpallet68 + // + this.colourpallet68.BackColor = System.Drawing.Color.Black; + this.colourpallet68.Location = new System.Drawing.Point(210, 28); + this.colourpallet68.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet68.Name = "colourpallet68"; + this.colourpallet68.Size = new System.Drawing.Size(12, 8); + this.colourpallet68.TabIndex = 62; + this.colourpallet68.Visible = false; + // + // colourpallet69 + // + this.colourpallet69.BackColor = System.Drawing.Color.Black; + this.colourpallet69.Location = new System.Drawing.Point(2, 37); + this.colourpallet69.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet69.Name = "colourpallet69"; + this.colourpallet69.Size = new System.Drawing.Size(12, 8); + this.colourpallet69.TabIndex = 79; + this.colourpallet69.Visible = false; + // + // colourpallet70 + // + this.colourpallet70.BackColor = System.Drawing.Color.Black; + this.colourpallet70.Location = new System.Drawing.Point(15, 37); + this.colourpallet70.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet70.Name = "colourpallet70"; + this.colourpallet70.Size = new System.Drawing.Size(12, 8); + this.colourpallet70.TabIndex = 77; + this.colourpallet70.Visible = false; + // + // colourpallet71 + // + this.colourpallet71.BackColor = System.Drawing.Color.Black; + this.colourpallet71.Location = new System.Drawing.Point(28, 37); + this.colourpallet71.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet71.Name = "colourpallet71"; + this.colourpallet71.Size = new System.Drawing.Size(12, 8); + this.colourpallet71.TabIndex = 71; + this.colourpallet71.Visible = false; + // + // colourpallet72 + // + this.colourpallet72.BackColor = System.Drawing.Color.Black; + this.colourpallet72.Location = new System.Drawing.Point(41, 37); + this.colourpallet72.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet72.Name = "colourpallet72"; + this.colourpallet72.Size = new System.Drawing.Size(12, 8); + this.colourpallet72.TabIndex = 70; + this.colourpallet72.Visible = false; + // + // colourpallet73 + // + this.colourpallet73.BackColor = System.Drawing.Color.Black; + this.colourpallet73.Location = new System.Drawing.Point(54, 37); + this.colourpallet73.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet73.Name = "colourpallet73"; + this.colourpallet73.Size = new System.Drawing.Size(12, 8); + this.colourpallet73.TabIndex = 74; + this.colourpallet73.Visible = false; + // + // colourpallet74 + // + this.colourpallet74.BackColor = System.Drawing.Color.Black; + this.colourpallet74.Location = new System.Drawing.Point(67, 37); + this.colourpallet74.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet74.Name = "colourpallet74"; + this.colourpallet74.Size = new System.Drawing.Size(12, 8); + this.colourpallet74.TabIndex = 66; + this.colourpallet74.Visible = false; + // + // colourpallet75 + // + this.colourpallet75.BackColor = System.Drawing.Color.Black; + this.colourpallet75.Location = new System.Drawing.Point(80, 37); + this.colourpallet75.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet75.Name = "colourpallet75"; + this.colourpallet75.Size = new System.Drawing.Size(12, 8); + this.colourpallet75.TabIndex = 67; + this.colourpallet75.Visible = false; + // + // colourpallet76 + // + this.colourpallet76.BackColor = System.Drawing.Color.Black; + this.colourpallet76.Location = new System.Drawing.Point(93, 37); + this.colourpallet76.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet76.Name = "colourpallet76"; + this.colourpallet76.Size = new System.Drawing.Size(12, 8); + this.colourpallet76.TabIndex = 76; + this.colourpallet76.Visible = false; + // + // colourpallet77 + // + this.colourpallet77.BackColor = System.Drawing.Color.Black; + this.colourpallet77.Location = new System.Drawing.Point(106, 37); + this.colourpallet77.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet77.Name = "colourpallet77"; + this.colourpallet77.Size = new System.Drawing.Size(12, 8); + this.colourpallet77.TabIndex = 64; + this.colourpallet77.Visible = false; + // + // colourpallet78 + // + this.colourpallet78.BackColor = System.Drawing.Color.Black; + this.colourpallet78.Location = new System.Drawing.Point(119, 37); + this.colourpallet78.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet78.Name = "colourpallet78"; + this.colourpallet78.Size = new System.Drawing.Size(12, 8); + this.colourpallet78.TabIndex = 84; + this.colourpallet78.Visible = false; + // + // colourpallet79 + // + this.colourpallet79.BackColor = System.Drawing.Color.Black; + this.colourpallet79.Location = new System.Drawing.Point(132, 37); + this.colourpallet79.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet79.Name = "colourpallet79"; + this.colourpallet79.Size = new System.Drawing.Size(12, 8); + this.colourpallet79.TabIndex = 72; + this.colourpallet79.Visible = false; + // + // colourpallet80 + // + this.colourpallet80.BackColor = System.Drawing.Color.Black; + this.colourpallet80.Location = new System.Drawing.Point(145, 37); + this.colourpallet80.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet80.Name = "colourpallet80"; + this.colourpallet80.Size = new System.Drawing.Size(12, 8); + this.colourpallet80.TabIndex = 75; + this.colourpallet80.Visible = false; + // + // colourpallet81 + // + this.colourpallet81.BackColor = System.Drawing.Color.Black; + this.colourpallet81.Location = new System.Drawing.Point(158, 37); + this.colourpallet81.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet81.Name = "colourpallet81"; + this.colourpallet81.Size = new System.Drawing.Size(12, 8); + this.colourpallet81.TabIndex = 65; + this.colourpallet81.Visible = false; + // + // colourpallet82 + // + this.colourpallet82.BackColor = System.Drawing.Color.Black; + this.colourpallet82.Location = new System.Drawing.Point(171, 37); + this.colourpallet82.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet82.Name = "colourpallet82"; + this.colourpallet82.Size = new System.Drawing.Size(12, 8); + this.colourpallet82.TabIndex = 60; + this.colourpallet82.Visible = false; + // + // colourpallet83 + // + this.colourpallet83.BackColor = System.Drawing.Color.Black; + this.colourpallet83.Location = new System.Drawing.Point(184, 37); + this.colourpallet83.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet83.Name = "colourpallet83"; + this.colourpallet83.Size = new System.Drawing.Size(12, 8); + this.colourpallet83.TabIndex = 88; + this.colourpallet83.Visible = false; + // + // colourpallet84 + // + this.colourpallet84.BackColor = System.Drawing.Color.Black; + this.colourpallet84.Location = new System.Drawing.Point(197, 37); + this.colourpallet84.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet84.Name = "colourpallet84"; + this.colourpallet84.Size = new System.Drawing.Size(12, 8); + this.colourpallet84.TabIndex = 68; + this.colourpallet84.Visible = false; + // + // colourpallet85 + // + this.colourpallet85.BackColor = System.Drawing.Color.Black; + this.colourpallet85.Location = new System.Drawing.Point(210, 37); + this.colourpallet85.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet85.Name = "colourpallet85"; + this.colourpallet85.Size = new System.Drawing.Size(12, 8); + this.colourpallet85.TabIndex = 83; + this.colourpallet85.Visible = false; + // + // colourpallet86 + // + this.colourpallet86.BackColor = System.Drawing.Color.Black; + this.colourpallet86.Location = new System.Drawing.Point(2, 46); + this.colourpallet86.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet86.Name = "colourpallet86"; + this.colourpallet86.Size = new System.Drawing.Size(12, 8); + this.colourpallet86.TabIndex = 59; + this.colourpallet86.Visible = false; + // + // colourpallet87 + // + this.colourpallet87.BackColor = System.Drawing.Color.Black; + this.colourpallet87.Location = new System.Drawing.Point(15, 46); + this.colourpallet87.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet87.Name = "colourpallet87"; + this.colourpallet87.Size = new System.Drawing.Size(12, 8); + this.colourpallet87.TabIndex = 81; + this.colourpallet87.Visible = false; + // + // colourpallet88 + // + this.colourpallet88.BackColor = System.Drawing.Color.Black; + this.colourpallet88.Location = new System.Drawing.Point(28, 46); + this.colourpallet88.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet88.Name = "colourpallet88"; + this.colourpallet88.Size = new System.Drawing.Size(12, 8); + this.colourpallet88.TabIndex = 63; + this.colourpallet88.Visible = false; + // + // colourpallet89 + // + this.colourpallet89.BackColor = System.Drawing.Color.Black; + this.colourpallet89.Location = new System.Drawing.Point(41, 46); + this.colourpallet89.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet89.Name = "colourpallet89"; + this.colourpallet89.Size = new System.Drawing.Size(12, 8); + this.colourpallet89.TabIndex = 73; + this.colourpallet89.Visible = false; + // + // colourpallet90 + // + this.colourpallet90.BackColor = System.Drawing.Color.Black; + this.colourpallet90.Location = new System.Drawing.Point(54, 46); + this.colourpallet90.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet90.Name = "colourpallet90"; + this.colourpallet90.Size = new System.Drawing.Size(12, 8); + this.colourpallet90.TabIndex = 87; + this.colourpallet90.Visible = false; + // + // colourpallet91 + // + this.colourpallet91.BackColor = System.Drawing.Color.Black; + this.colourpallet91.Location = new System.Drawing.Point(67, 46); + this.colourpallet91.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet91.Name = "colourpallet91"; + this.colourpallet91.Size = new System.Drawing.Size(12, 8); + this.colourpallet91.TabIndex = 58; + this.colourpallet91.Visible = false; + // + // colourpallet92 + // + this.colourpallet92.BackColor = System.Drawing.Color.Black; + this.colourpallet92.Location = new System.Drawing.Point(80, 46); + this.colourpallet92.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet92.Name = "colourpallet92"; + this.colourpallet92.Size = new System.Drawing.Size(12, 8); + this.colourpallet92.TabIndex = 82; + this.colourpallet92.Visible = false; + // + // colourpallet93 + // + this.colourpallet93.BackColor = System.Drawing.Color.Black; + this.colourpallet93.Location = new System.Drawing.Point(93, 46); + this.colourpallet93.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet93.Name = "colourpallet93"; + this.colourpallet93.Size = new System.Drawing.Size(12, 8); + this.colourpallet93.TabIndex = 86; + this.colourpallet93.Visible = false; + // + // colourpallet94 + // + this.colourpallet94.BackColor = System.Drawing.Color.Black; + this.colourpallet94.Location = new System.Drawing.Point(106, 46); + this.colourpallet94.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet94.Name = "colourpallet94"; + this.colourpallet94.Size = new System.Drawing.Size(12, 8); + this.colourpallet94.TabIndex = 80; + this.colourpallet94.Visible = false; + // + // colourpallet95 + // + this.colourpallet95.BackColor = System.Drawing.Color.Black; + this.colourpallet95.Location = new System.Drawing.Point(119, 46); + this.colourpallet95.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet95.Name = "colourpallet95"; + this.colourpallet95.Size = new System.Drawing.Size(12, 8); + this.colourpallet95.TabIndex = 85; + this.colourpallet95.Visible = false; + // + // colourpallet96 + // + this.colourpallet96.BackColor = System.Drawing.Color.Black; + this.colourpallet96.Location = new System.Drawing.Point(132, 46); + this.colourpallet96.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet96.Name = "colourpallet96"; + this.colourpallet96.Size = new System.Drawing.Size(12, 8); + this.colourpallet96.TabIndex = 78; + this.colourpallet96.Visible = false; + // + // colourpallet97 + // + this.colourpallet97.BackColor = System.Drawing.Color.Black; + this.colourpallet97.Location = new System.Drawing.Point(145, 46); + this.colourpallet97.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet97.Name = "colourpallet97"; + this.colourpallet97.Size = new System.Drawing.Size(12, 8); + this.colourpallet97.TabIndex = 89; + this.colourpallet97.Visible = false; + // + // colourpallet98 + // + this.colourpallet98.BackColor = System.Drawing.Color.Black; + this.colourpallet98.Location = new System.Drawing.Point(158, 46); + this.colourpallet98.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet98.Name = "colourpallet98"; + this.colourpallet98.Size = new System.Drawing.Size(12, 8); + this.colourpallet98.TabIndex = 93; + this.colourpallet98.Visible = false; + // + // colourpallet99 + // + this.colourpallet99.BackColor = System.Drawing.Color.Black; + this.colourpallet99.Location = new System.Drawing.Point(171, 46); + this.colourpallet99.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet99.Name = "colourpallet99"; + this.colourpallet99.Size = new System.Drawing.Size(12, 8); + this.colourpallet99.TabIndex = 101; + this.colourpallet99.Visible = false; + // + // colourpallet100 + // + this.colourpallet100.BackColor = System.Drawing.Color.Black; + this.colourpallet100.Location = new System.Drawing.Point(184, 46); + this.colourpallet100.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet100.Name = "colourpallet100"; + this.colourpallet100.Size = new System.Drawing.Size(12, 8); + this.colourpallet100.TabIndex = 94; + this.colourpallet100.Visible = false; + // + // colourpallet101 + // + this.colourpallet101.BackColor = System.Drawing.Color.Black; + this.colourpallet101.Location = new System.Drawing.Point(197, 46); + this.colourpallet101.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet101.Name = "colourpallet101"; + this.colourpallet101.Size = new System.Drawing.Size(12, 8); + this.colourpallet101.TabIndex = 111; + this.colourpallet101.Visible = false; + // + // colourpallet102 + // + this.colourpallet102.BackColor = System.Drawing.Color.Black; + this.colourpallet102.Location = new System.Drawing.Point(210, 46); + this.colourpallet102.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet102.Name = "colourpallet102"; + this.colourpallet102.Size = new System.Drawing.Size(12, 8); + this.colourpallet102.TabIndex = 110; + this.colourpallet102.Visible = false; + // + // colourpallet103 + // + this.colourpallet103.BackColor = System.Drawing.Color.Black; + this.colourpallet103.Location = new System.Drawing.Point(2, 55); + this.colourpallet103.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet103.Name = "colourpallet103"; + this.colourpallet103.Size = new System.Drawing.Size(12, 8); + this.colourpallet103.TabIndex = 117; + this.colourpallet103.Visible = false; + // + // colourpallet104 + // + this.colourpallet104.BackColor = System.Drawing.Color.Black; + this.colourpallet104.Location = new System.Drawing.Point(15, 55); + this.colourpallet104.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet104.Name = "colourpallet104"; + this.colourpallet104.Size = new System.Drawing.Size(12, 8); + this.colourpallet104.TabIndex = 112; + this.colourpallet104.Visible = false; + // + // colourpallet105 + // + this.colourpallet105.BackColor = System.Drawing.Color.Black; + this.colourpallet105.Location = new System.Drawing.Point(28, 55); + this.colourpallet105.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet105.Name = "colourpallet105"; + this.colourpallet105.Size = new System.Drawing.Size(12, 8); + this.colourpallet105.TabIndex = 109; + this.colourpallet105.Visible = false; + // + // colourpallet106 + // + this.colourpallet106.BackColor = System.Drawing.Color.Black; + this.colourpallet106.Location = new System.Drawing.Point(41, 55); + this.colourpallet106.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet106.Name = "colourpallet106"; + this.colourpallet106.Size = new System.Drawing.Size(12, 8); + this.colourpallet106.TabIndex = 103; + this.colourpallet106.Visible = false; + // + // colourpallet107 + // + this.colourpallet107.BackColor = System.Drawing.Color.Black; + this.colourpallet107.Location = new System.Drawing.Point(54, 55); + this.colourpallet107.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet107.Name = "colourpallet107"; + this.colourpallet107.Size = new System.Drawing.Size(12, 8); + this.colourpallet107.TabIndex = 102; + this.colourpallet107.Visible = false; + // + // colourpallet108 + // + this.colourpallet108.BackColor = System.Drawing.Color.Black; + this.colourpallet108.Location = new System.Drawing.Point(67, 55); + this.colourpallet108.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet108.Name = "colourpallet108"; + this.colourpallet108.Size = new System.Drawing.Size(12, 8); + this.colourpallet108.TabIndex = 106; + this.colourpallet108.Visible = false; + // + // colourpallet109 + // + this.colourpallet109.BackColor = System.Drawing.Color.Black; + this.colourpallet109.Location = new System.Drawing.Point(80, 55); + this.colourpallet109.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet109.Name = "colourpallet109"; + this.colourpallet109.Size = new System.Drawing.Size(12, 8); + this.colourpallet109.TabIndex = 98; + this.colourpallet109.Visible = false; + // + // colourpallet110 + // + this.colourpallet110.BackColor = System.Drawing.Color.Black; + this.colourpallet110.Location = new System.Drawing.Point(93, 55); + this.colourpallet110.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet110.Name = "colourpallet110"; + this.colourpallet110.Size = new System.Drawing.Size(12, 8); + this.colourpallet110.TabIndex = 99; + this.colourpallet110.Visible = false; + // + // colourpallet111 + // + this.colourpallet111.BackColor = System.Drawing.Color.Black; + this.colourpallet111.Location = new System.Drawing.Point(106, 55); + this.colourpallet111.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet111.Name = "colourpallet111"; + this.colourpallet111.Size = new System.Drawing.Size(12, 8); + this.colourpallet111.TabIndex = 108; + this.colourpallet111.Visible = false; + // + // colourpallet112 + // + this.colourpallet112.BackColor = System.Drawing.Color.Black; + this.colourpallet112.Location = new System.Drawing.Point(119, 55); + this.colourpallet112.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet112.Name = "colourpallet112"; + this.colourpallet112.Size = new System.Drawing.Size(12, 8); + this.colourpallet112.TabIndex = 96; + this.colourpallet112.Visible = false; + // + // colourpallet113 + // + this.colourpallet113.BackColor = System.Drawing.Color.Black; + this.colourpallet113.Location = new System.Drawing.Point(132, 55); + this.colourpallet113.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet113.Name = "colourpallet113"; + this.colourpallet113.Size = new System.Drawing.Size(12, 8); + this.colourpallet113.TabIndex = 116; + this.colourpallet113.Visible = false; + // + // colourpallet114 + // + this.colourpallet114.BackColor = System.Drawing.Color.Black; + this.colourpallet114.Location = new System.Drawing.Point(145, 55); + this.colourpallet114.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet114.Name = "colourpallet114"; + this.colourpallet114.Size = new System.Drawing.Size(12, 8); + this.colourpallet114.TabIndex = 104; + this.colourpallet114.Visible = false; + // + // colourpallet115 + // + this.colourpallet115.BackColor = System.Drawing.Color.Black; + this.colourpallet115.Location = new System.Drawing.Point(158, 55); + this.colourpallet115.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet115.Name = "colourpallet115"; + this.colourpallet115.Size = new System.Drawing.Size(12, 8); + this.colourpallet115.TabIndex = 107; + this.colourpallet115.Visible = false; + // + // colourpallet116 + // + this.colourpallet116.BackColor = System.Drawing.Color.Black; + this.colourpallet116.Location = new System.Drawing.Point(171, 55); + this.colourpallet116.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet116.Name = "colourpallet116"; + this.colourpallet116.Size = new System.Drawing.Size(12, 8); + this.colourpallet116.TabIndex = 97; + this.colourpallet116.Visible = false; + // + // colourpallet117 + // + this.colourpallet117.BackColor = System.Drawing.Color.Black; + this.colourpallet117.Location = new System.Drawing.Point(184, 55); + this.colourpallet117.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet117.Name = "colourpallet117"; + this.colourpallet117.Size = new System.Drawing.Size(12, 8); + this.colourpallet117.TabIndex = 92; + this.colourpallet117.Visible = false; + // + // colourpallet118 + // + this.colourpallet118.BackColor = System.Drawing.Color.Black; + this.colourpallet118.Location = new System.Drawing.Point(197, 55); + this.colourpallet118.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet118.Name = "colourpallet118"; + this.colourpallet118.Size = new System.Drawing.Size(12, 8); + this.colourpallet118.TabIndex = 120; + this.colourpallet118.Visible = false; + // + // colourpallet119 + // + this.colourpallet119.BackColor = System.Drawing.Color.Black; + this.colourpallet119.Location = new System.Drawing.Point(210, 55); + this.colourpallet119.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet119.Name = "colourpallet119"; + this.colourpallet119.Size = new System.Drawing.Size(12, 8); + this.colourpallet119.TabIndex = 100; + this.colourpallet119.Visible = false; + // + // colourpallet120 + // + this.colourpallet120.BackColor = System.Drawing.Color.Black; + this.colourpallet120.Location = new System.Drawing.Point(2, 64); + this.colourpallet120.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet120.Name = "colourpallet120"; + this.colourpallet120.Size = new System.Drawing.Size(12, 8); + this.colourpallet120.TabIndex = 115; + this.colourpallet120.Visible = false; + // + // colourpallet121 + // + this.colourpallet121.BackColor = System.Drawing.Color.Black; + this.colourpallet121.Location = new System.Drawing.Point(15, 64); + this.colourpallet121.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet121.Name = "colourpallet121"; + this.colourpallet121.Size = new System.Drawing.Size(12, 8); + this.colourpallet121.TabIndex = 91; + this.colourpallet121.Visible = false; + // + // colourpallet122 + // + this.colourpallet122.BackColor = System.Drawing.Color.Black; + this.colourpallet122.Location = new System.Drawing.Point(28, 64); + this.colourpallet122.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet122.Name = "colourpallet122"; + this.colourpallet122.Size = new System.Drawing.Size(12, 8); + this.colourpallet122.TabIndex = 113; + this.colourpallet122.Visible = false; + // + // colourpallet123 + // + this.colourpallet123.BackColor = System.Drawing.Color.Black; + this.colourpallet123.Location = new System.Drawing.Point(41, 64); + this.colourpallet123.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet123.Name = "colourpallet123"; + this.colourpallet123.Size = new System.Drawing.Size(12, 8); + this.colourpallet123.TabIndex = 95; + this.colourpallet123.Visible = false; + // + // colourpallet124 + // + this.colourpallet124.BackColor = System.Drawing.Color.Black; + this.colourpallet124.Location = new System.Drawing.Point(54, 64); + this.colourpallet124.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet124.Name = "colourpallet124"; + this.colourpallet124.Size = new System.Drawing.Size(12, 8); + this.colourpallet124.TabIndex = 105; + this.colourpallet124.Visible = false; + // + // colourpallet125 + // + this.colourpallet125.BackColor = System.Drawing.Color.Black; + this.colourpallet125.Location = new System.Drawing.Point(67, 64); + this.colourpallet125.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet125.Name = "colourpallet125"; + this.colourpallet125.Size = new System.Drawing.Size(12, 8); + this.colourpallet125.TabIndex = 119; + this.colourpallet125.Visible = false; + // + // colourpallet126 + // + this.colourpallet126.BackColor = System.Drawing.Color.Black; + this.colourpallet126.Location = new System.Drawing.Point(80, 64); + this.colourpallet126.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet126.Name = "colourpallet126"; + this.colourpallet126.Size = new System.Drawing.Size(12, 8); + this.colourpallet126.TabIndex = 90; + this.colourpallet126.Visible = false; + // + // colourpallet127 + // + this.colourpallet127.BackColor = System.Drawing.Color.Black; + this.colourpallet127.Location = new System.Drawing.Point(93, 64); + this.colourpallet127.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet127.Name = "colourpallet127"; + this.colourpallet127.Size = new System.Drawing.Size(12, 8); + this.colourpallet127.TabIndex = 114; + this.colourpallet127.Visible = false; + // + // colourpallet128 + // + this.colourpallet128.BackColor = System.Drawing.Color.Black; + this.colourpallet128.Location = new System.Drawing.Point(106, 64); + this.colourpallet128.Margin = new System.Windows.Forms.Padding(1, 0, 0, 1); + this.colourpallet128.Name = "colourpallet128"; + this.colourpallet128.Size = new System.Drawing.Size(12, 8); + this.colourpallet128.TabIndex = 118; + this.colourpallet128.Visible = false; + // + // Label4 + // + this.Label4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(11, 2); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(204, 23); + this.Label4.TabIndex = 11; + this.Label4.Text = "Colours"; + this.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // line6 + // + this.line6.BackColor = System.Drawing.Color.Black; + this.line6.Dock = System.Windows.Forms.DockStyle.Top; + this.line6.Location = new System.Drawing.Point(0, 0); + this.line6.Name = "line6"; + this.line6.Size = new System.Drawing.Size(225, 1); + this.line6.TabIndex = 4; + // + // pnltoolproperties + // + this.pnltoolproperties.Controls.Add(this.pnleracertoolsettings); + this.pnltoolproperties.Controls.Add(this.pnlpixelplacersettings); + this.pnltoolproperties.Controls.Add(this.pnlovaltoolsettings); + this.pnltoolproperties.Controls.Add(this.pnllinetoolsettings); + this.pnltoolproperties.Controls.Add(this.pnlpaintbrushtoolsettings); + this.pnltoolproperties.Controls.Add(this.pnltexttoolsettings); + this.pnltoolproperties.Controls.Add(this.pnlpixelsettersettings); + this.pnltoolproperties.Controls.Add(this.pnlmagnifiersettings); + this.pnltoolproperties.Controls.Add(this.pnlfloodfillsettings); + this.pnltoolproperties.Controls.Add(this.pnlsquaretoolsettings); + this.pnltoolproperties.Controls.Add(this.pnlpencilsettings); + this.pnltoolproperties.Controls.Add(this.Label6); + this.pnltoolproperties.Controls.Add(this.Label5); + this.pnltoolproperties.Controls.Add(this.line5); + this.pnltoolproperties.Controls.Add(this.line3); + this.pnltoolproperties.Location = new System.Drawing.Point(0, 0); + this.pnltoolproperties.Name = "pnltoolproperties"; + this.pnltoolproperties.Size = new System.Drawing.Size(457, 100); + this.pnltoolproperties.TabIndex = 1; + // + // pnlpixelplacersettings + // + this.pnlpixelplacersettings.Controls.Add(this.lblpixelplacerhelp); + this.pnlpixelplacersettings.Controls.Add(this.btnpixelplacermovementmode); + this.pnlpixelplacersettings.Controls.Add(this.Label8); + this.pnlpixelplacersettings.Location = new System.Drawing.Point(0, 1); + this.pnlpixelplacersettings.Name = "pnlpixelplacersettings"; + this.pnlpixelplacersettings.Size = new System.Drawing.Size(454, 98); + this.pnlpixelplacersettings.TabIndex = 7; + this.pnlpixelplacersettings.Visible = false; + // + // lblpixelplacerhelp + // + this.lblpixelplacerhelp.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblpixelplacerhelp.Location = new System.Drawing.Point(3, 26); + this.lblpixelplacerhelp.Name = "lblpixelplacerhelp"; + this.lblpixelplacerhelp.Size = new System.Drawing.Size(307, 67); + this.lblpixelplacerhelp.TabIndex = 11; + this.lblpixelplacerhelp.Text = "This tool does not contain any alterable settings. Simply click on the canvas and" + + " a pixel will be placed in the spot you click."; + this.lblpixelplacerhelp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnpixelplacermovementmode + // + this.btnpixelplacermovementmode.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpixelplacermovementmode.Location = new System.Drawing.Point(312, 26); + this.btnpixelplacermovementmode.Name = "btnpixelplacermovementmode"; + this.btnpixelplacermovementmode.Size = new System.Drawing.Size(138, 67); + this.btnpixelplacermovementmode.TabIndex = 10; + this.btnpixelplacermovementmode.Text = "Activate Movement Mode"; + this.btnpixelplacermovementmode.UseVisualStyleBackColor = true; + this.btnpixelplacermovementmode.Click += new System.EventHandler(this.btnpixelplacermovementmode_Click); + // + // Label8 + // + this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label8.Location = new System.Drawing.Point(6, 3); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(444, 23); + this.Label8.TabIndex = 0; + this.Label8.Text = "Pixel Placer Settings"; + this.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlovaltoolsettings + // + this.pnlovaltoolsettings.Controls.Add(this.Label20); + this.pnlovaltoolsettings.Controls.Add(this.btnovalfillonoff); + this.pnlovaltoolsettings.Controls.Add(this.pnlovalfillcolour); + this.pnlovaltoolsettings.Controls.Add(this.txtovalborderwidth); + this.pnlovaltoolsettings.Controls.Add(this.Label21); + this.pnlovaltoolsettings.Controls.Add(this.Label22); + this.pnlovaltoolsettings.Controls.Add(this.Label23); + this.pnlovaltoolsettings.Location = new System.Drawing.Point(0, 1); + this.pnlovaltoolsettings.Name = "pnlovaltoolsettings"; + this.pnlovaltoolsettings.Size = new System.Drawing.Size(459, 96); + this.pnlovaltoolsettings.TabIndex = 15; + this.pnlovaltoolsettings.Visible = false; + // + // Label20 + // + this.Label20.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label20.Location = new System.Drawing.Point(211, 29); + this.Label20.Name = "Label20"; + this.Label20.Size = new System.Drawing.Size(244, 65); + this.Label20.TabIndex = 15; + this.Label20.Text = "Set a border width and turn fill on or off then draw the square on the canvas wit" + + "h the mouse. Click the fill colour box to set it to your currently selected colo" + + "ur."; + // + // btnovalfillonoff + // + this.btnovalfillonoff.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnovalfillonoff.Location = new System.Drawing.Point(150, 64); + this.btnovalfillonoff.Name = "btnovalfillonoff"; + this.btnovalfillonoff.Size = new System.Drawing.Size(56, 28); + this.btnovalfillonoff.TabIndex = 14; + this.btnovalfillonoff.Text = "Fill OFF"; + this.btnovalfillonoff.UseVisualStyleBackColor = true; + this.btnovalfillonoff.Click += new System.EventHandler(this.btnovalfillonoff_Click); + // + // pnlovalfillcolour + // + this.pnlovalfillcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlovalfillcolour.Location = new System.Drawing.Point(109, 64); + this.pnlovalfillcolour.Name = "pnlovalfillcolour"; + this.pnlovalfillcolour.Size = new System.Drawing.Size(34, 28); + this.pnlovalfillcolour.TabIndex = 13; + this.pnlovalfillcolour.Click += new System.EventHandler(this.pnlovalfillcolour_Click); + // + // txtovalborderwidth + // + this.txtovalborderwidth.BackColor = System.Drawing.Color.White; + this.txtovalborderwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtovalborderwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtovalborderwidth.ForeColor = System.Drawing.Color.Black; + this.txtovalborderwidth.Location = new System.Drawing.Point(133, 33); + this.txtovalborderwidth.Name = "txtovalborderwidth"; + this.txtovalborderwidth.Size = new System.Drawing.Size(73, 26); + this.txtovalborderwidth.TabIndex = 12; + this.txtovalborderwidth.TextChanged += new System.EventHandler(this.txtovalborderwidth_TextChanged); + // + // Label21 + // + this.Label21.AutoSize = true; + this.Label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label21.Location = new System.Drawing.Point(4, 66); + this.Label21.Name = "Label21"; + this.Label21.Size = new System.Drawing.Size(100, 24); + this.Label21.TabIndex = 11; + this.Label21.Text = "Fill Colour:"; + // + // Label22 + // + this.Label22.AutoSize = true; + this.Label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label22.Location = new System.Drawing.Point(4, 33); + this.Label22.Name = "Label22"; + this.Label22.Size = new System.Drawing.Size(125, 24); + this.Label22.TabIndex = 10; + this.Label22.Text = "Border Width:"; + // + // Label23 + // + this.Label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label23.Location = new System.Drawing.Point(6, 3); + this.Label23.Name = "Label23"; + this.Label23.Size = new System.Drawing.Size(444, 23); + this.Label23.TabIndex = 0; + this.Label23.Text = "Oval Tool Settings"; + this.Label23.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnleracertoolsettings + // + this.pnleracertoolsettings.Controls.Add(this.Label28); + this.pnleracertoolsettings.Controls.Add(this.btneracersquare); + this.pnleracertoolsettings.Controls.Add(this.btneracercircle); + this.pnleracertoolsettings.Controls.Add(this.Label24); + this.pnleracertoolsettings.Controls.Add(this.txteracersize); + this.pnleracertoolsettings.Controls.Add(this.Label26); + this.pnleracertoolsettings.Controls.Add(this.Label27); + this.pnleracertoolsettings.Location = new System.Drawing.Point(0, 1); + this.pnleracertoolsettings.Name = "pnleracertoolsettings"; + this.pnleracertoolsettings.Size = new System.Drawing.Size(459, 96); + this.pnleracertoolsettings.TabIndex = 16; + this.pnleracertoolsettings.Visible = false; + // + // Label28 + // + this.Label28.AutoSize = true; + this.Label28.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label28.Location = new System.Drawing.Point(40, 71); + this.Label28.Name = "Label28"; + this.Label28.Size = new System.Drawing.Size(65, 24); + this.Label28.TabIndex = 19; + this.Label28.Text = "Shape"; + // + // btneracersquare + // + this.btneracersquare.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadsquarerubberselected; + this.btneracersquare.FlatAppearance.BorderSize = 0; + this.btneracersquare.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btneracersquare.Location = new System.Drawing.Point(75, 21); + this.btneracersquare.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btneracersquare.Name = "btneracersquare"; + this.btneracersquare.Size = new System.Drawing.Size(60, 50); + this.btneracersquare.TabIndex = 17; + this.btneracersquare.Text = " "; + this.btneracersquare.UseVisualStyleBackColor = true; + this.btneracersquare.Click += new System.EventHandler(this.btneracersquare_Click); + // + // btneracercircle + // + this.btneracercircle.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadcirclerubber; + this.btneracercircle.FlatAppearance.BorderSize = 0; + this.btneracercircle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btneracercircle.Location = new System.Drawing.Point(9, 21); + this.btneracercircle.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btneracercircle.Name = "btneracercircle"; + this.btneracercircle.Size = new System.Drawing.Size(60, 50); + this.btneracercircle.TabIndex = 16; + this.btneracercircle.Text = " "; + this.btneracercircle.UseVisualStyleBackColor = true; + this.btneracercircle.Click += new System.EventHandler(this.btneracercircle_Click); + // + // Label24 + // + this.Label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label24.Location = new System.Drawing.Point(141, 29); + this.Label24.Name = "Label24"; + this.Label24.Size = new System.Drawing.Size(314, 38); + this.Label24.TabIndex = 15; + this.Label24.Text = "Choose a shape and size for your eracer then rub out unwanted parts of your drawi" + + "ng with the mouse."; + // + // txteracersize + // + this.txteracersize.BackColor = System.Drawing.Color.White; + this.txteracersize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txteracersize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txteracersize.ForeColor = System.Drawing.Color.Black; + this.txteracersize.Location = new System.Drawing.Point(198, 70); + this.txteracersize.Name = "txteracersize"; + this.txteracersize.Size = new System.Drawing.Size(73, 26); + this.txteracersize.TabIndex = 12; + this.txteracersize.TextChanged += new System.EventHandler(this.txteracersize_TextChanged); + // + // Label26 + // + this.Label26.AutoSize = true; + this.Label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label26.Location = new System.Drawing.Point(141, 71); + this.Label26.Name = "Label26"; + this.Label26.Size = new System.Drawing.Size(51, 24); + this.Label26.TabIndex = 10; + this.Label26.Text = "Size:"; + // + // Label27 + // + this.Label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label27.Location = new System.Drawing.Point(6, 3); + this.Label27.Name = "Label27"; + this.Label27.Size = new System.Drawing.Size(444, 23); + this.Label27.TabIndex = 0; + this.Label27.Text = "Eraser Tool Settings"; + this.Label27.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnllinetoolsettings + // + this.pnllinetoolsettings.Controls.Add(this.Label29); + this.pnllinetoolsettings.Controls.Add(this.txtlinewidth); + this.pnllinetoolsettings.Controls.Add(this.Label30); + this.pnllinetoolsettings.Controls.Add(this.Label31); + this.pnllinetoolsettings.Location = new System.Drawing.Point(168, 32); + this.pnllinetoolsettings.Name = "pnllinetoolsettings"; + this.pnllinetoolsettings.Size = new System.Drawing.Size(60, 28); + this.pnllinetoolsettings.TabIndex = 20; + this.pnllinetoolsettings.Visible = false; + // + // Label29 + // + this.Label29.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label29.Location = new System.Drawing.Point(196, 29); + this.Label29.Name = "Label29"; + this.Label29.Size = new System.Drawing.Size(257, 38); + this.Label29.TabIndex = 15; + this.Label29.Text = "Enter a line width then use the mouse to draw a straight line on the canvas."; + // + // txtlinewidth + // + this.txtlinewidth.BackColor = System.Drawing.Color.White; + this.txtlinewidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtlinewidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtlinewidth.ForeColor = System.Drawing.Color.Black; + this.txtlinewidth.Location = new System.Drawing.Point(114, 33); + this.txtlinewidth.Name = "txtlinewidth"; + this.txtlinewidth.Size = new System.Drawing.Size(73, 26); + this.txtlinewidth.TabIndex = 12; + this.txtlinewidth.TextAlignChanged += new System.EventHandler(this.txtlinewidth_TextChanged); + // + // Label30 + // + this.Label30.AutoSize = true; + this.Label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label30.Location = new System.Drawing.Point(8, 34); + this.Label30.Name = "Label30"; + this.Label30.Size = new System.Drawing.Size(104, 24); + this.Label30.TabIndex = 10; + this.Label30.Text = "Line Width:"; + // + // Label31 + // + this.Label31.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label31.Location = new System.Drawing.Point(6, 3); + this.Label31.Name = "Label31"; + this.Label31.Size = new System.Drawing.Size(444, 23); + this.Label31.TabIndex = 0; + this.Label31.Text = "Line Tool Settings"; + this.Label31.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlpaintbrushtoolsettings + // + this.pnlpaintbrushtoolsettings.Controls.Add(this.Label36); + this.pnlpaintbrushtoolsettings.Controls.Add(this.btnpaintsquareshape); + this.pnlpaintbrushtoolsettings.Controls.Add(this.btnpaintcircleshape); + this.pnlpaintbrushtoolsettings.Controls.Add(this.Label37); + this.pnlpaintbrushtoolsettings.Controls.Add(this.txtpaintbrushsize); + this.pnlpaintbrushtoolsettings.Controls.Add(this.Label38); + this.pnlpaintbrushtoolsettings.Controls.Add(this.Label39); + this.pnlpaintbrushtoolsettings.Location = new System.Drawing.Point(0, 1); + this.pnlpaintbrushtoolsettings.Name = "pnlpaintbrushtoolsettings"; + this.pnlpaintbrushtoolsettings.Size = new System.Drawing.Size(457, 97); + this.pnlpaintbrushtoolsettings.TabIndex = 21; + this.pnlpaintbrushtoolsettings.Visible = false; + // + // Label36 + // + this.Label36.AutoSize = true; + this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label36.Location = new System.Drawing.Point(32, 69); + this.Label36.Name = "Label36"; + this.Label36.Size = new System.Drawing.Size(65, 24); + this.Label36.TabIndex = 19; + this.Label36.Text = "Shape"; + // + // btnpaintsquareshape + // + this.btnpaintsquareshape.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadsquarerubber; + this.btnpaintsquareshape.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnpaintsquareshape.FlatAppearance.BorderSize = 0; + this.btnpaintsquareshape.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpaintsquareshape.Location = new System.Drawing.Point(69, 27); + this.btnpaintsquareshape.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpaintsquareshape.Name = "btnpaintsquareshape"; + this.btnpaintsquareshape.Size = new System.Drawing.Size(48, 40); + this.btnpaintsquareshape.TabIndex = 17; + this.btnpaintsquareshape.Text = " "; + this.btnpaintsquareshape.UseVisualStyleBackColor = true; + this.btnpaintsquareshape.Click += new System.EventHandler(this.btnpaintsquareshape_Click); + // + // btnpaintcircleshape + // + this.btnpaintcircleshape.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadcirclerubberselected; + this.btnpaintcircleshape.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnpaintcircleshape.FlatAppearance.BorderSize = 0; + this.btnpaintcircleshape.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpaintcircleshape.Location = new System.Drawing.Point(16, 27); + this.btnpaintcircleshape.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpaintcircleshape.Name = "btnpaintcircleshape"; + this.btnpaintcircleshape.Size = new System.Drawing.Size(48, 40); + this.btnpaintcircleshape.TabIndex = 16; + this.btnpaintcircleshape.Text = " "; + this.btnpaintcircleshape.UseVisualStyleBackColor = true; + this.btnpaintcircleshape.Click += new System.EventHandler(this.btnpaintcircleshape_Click); + // + // Label37 + // + this.Label37.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label37.Location = new System.Drawing.Point(137, 29); + this.Label37.Name = "Label37"; + this.Label37.Size = new System.Drawing.Size(314, 38); + this.Label37.TabIndex = 15; + this.Label37.Text = "Choose a shape and size for your paint brush then paint on the canvas by drawing " + + "with the mouse."; + // + // txtpaintbrushsize + // + this.txtpaintbrushsize.BackColor = System.Drawing.Color.White; + this.txtpaintbrushsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpaintbrushsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpaintbrushsize.ForeColor = System.Drawing.Color.Black; + this.txtpaintbrushsize.Location = new System.Drawing.Point(194, 68); + this.txtpaintbrushsize.Name = "txtpaintbrushsize"; + this.txtpaintbrushsize.Size = new System.Drawing.Size(73, 26); + this.txtpaintbrushsize.TabIndex = 12; + this.txtpaintbrushsize.TextChanged += new System.EventHandler(this.txtpaintbrushsize_TextChanged); + // + // Label38 + // + this.Label38.AutoSize = true; + this.Label38.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label38.Location = new System.Drawing.Point(137, 69); + this.Label38.Name = "Label38"; + this.Label38.Size = new System.Drawing.Size(51, 24); + this.Label38.TabIndex = 10; + this.Label38.Text = "Size:"; + // + // Label39 + // + this.Label39.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label39.Location = new System.Drawing.Point(6, 3); + this.Label39.Name = "Label39"; + this.Label39.Size = new System.Drawing.Size(444, 23); + this.Label39.TabIndex = 0; + this.Label39.Text = "Paint Brush Tool Settings"; + this.Label39.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnltexttoolsettings + // + this.pnltexttoolsettings.Controls.Add(this.Label35); + this.pnltexttoolsettings.Controls.Add(this.combofontstyle); + this.pnltexttoolsettings.Controls.Add(this.txtdrawstringtext); + this.pnltexttoolsettings.Controls.Add(this.combodrawtextfont); + this.pnltexttoolsettings.Controls.Add(this.Label25); + this.pnltexttoolsettings.Controls.Add(this.txtdrawtextsize); + this.pnltexttoolsettings.Controls.Add(this.Label32); + this.pnltexttoolsettings.Controls.Add(this.Label33); + this.pnltexttoolsettings.Controls.Add(this.Label34); + this.pnltexttoolsettings.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnltexttoolsettings.Location = new System.Drawing.Point(0, 1); + this.pnltexttoolsettings.Name = "pnltexttoolsettings"; + this.pnltexttoolsettings.Size = new System.Drawing.Size(456, 99); + this.pnltexttoolsettings.TabIndex = 17; + this.pnltexttoolsettings.Visible = false; + // + // Label35 + // + this.Label35.AutoSize = true; + this.Label35.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label35.Location = new System.Drawing.Point(117, 33); + this.Label35.Name = "Label35"; + this.Label35.Size = new System.Drawing.Size(55, 24); + this.Label35.TabIndex = 19; + this.Label35.Text = "Style:"; + // + // combofontstyle + // + this.combofontstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combofontstyle.FormattingEnabled = true; + this.combofontstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.combofontstyle.Location = new System.Drawing.Point(178, 34); + this.combofontstyle.Name = "combofontstyle"; + this.combofontstyle.Size = new System.Drawing.Size(78, 24); + this.combofontstyle.TabIndex = 18; + this.combofontstyle.SelectedIndexChanged += new System.EventHandler(this.combofontstyle_SelectedIndexChanged); + // + // txtdrawstringtext + // + this.txtdrawstringtext.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdrawstringtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtdrawstringtext.Location = new System.Drawing.Point(265, 52); + this.txtdrawstringtext.Multiline = true; + this.txtdrawstringtext.Name = "txtdrawstringtext"; + this.txtdrawstringtext.Size = new System.Drawing.Size(185, 41); + this.txtdrawstringtext.TabIndex = 17; + this.txtdrawstringtext.Text = "Enter Words Here"; + this.txtdrawstringtext.TextChanged += new System.EventHandler(this.txtdrawstringtext_TextChanged); + // + // combodrawtextfont + // + this.combodrawtextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combodrawtextfont.FormattingEnabled = true; + this.combodrawtextfont.Location = new System.Drawing.Point(64, 68); + this.combodrawtextfont.Name = "combodrawtextfont"; + this.combodrawtextfont.Size = new System.Drawing.Size(192, 24); + this.combodrawtextfont.TabIndex = 16; + this.combodrawtextfont.SelectedIndexChanged += new System.EventHandler(this.combodrawtextfont_SelectedIndexChanged); + // + // Label25 + // + this.Label25.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label25.Location = new System.Drawing.Point(262, 26); + this.Label25.Name = "Label25"; + this.Label25.Size = new System.Drawing.Size(189, 23); + this.Label25.TabIndex = 15; + this.Label25.Text = "Click and drag on the canvas!"; + this.Label25.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtdrawtextsize + // + this.txtdrawtextsize.BackColor = System.Drawing.Color.White; + this.txtdrawtextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdrawtextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtdrawtextsize.ForeColor = System.Drawing.Color.Black; + this.txtdrawtextsize.Location = new System.Drawing.Point(61, 33); + this.txtdrawtextsize.Name = "txtdrawtextsize"; + this.txtdrawtextsize.Size = new System.Drawing.Size(43, 26); + this.txtdrawtextsize.TabIndex = 12; + this.txtdrawtextsize.TextChanged += new System.EventHandler(this.txtdrawtextsize_TextChanged); + // + // Label32 + // + this.Label32.AutoSize = true; + this.Label32.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label32.Location = new System.Drawing.Point(4, 66); + this.Label32.Name = "Label32"; + this.Label32.Size = new System.Drawing.Size(53, 24); + this.Label32.TabIndex = 11; + this.Label32.Text = "Font:"; + // + // Label33 + // + this.Label33.AutoSize = true; + this.Label33.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label33.Location = new System.Drawing.Point(4, 33); + this.Label33.Name = "Label33"; + this.Label33.Size = new System.Drawing.Size(51, 24); + this.Label33.TabIndex = 10; + this.Label33.Text = "Size:"; + // + // Label34 + // + this.Label34.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label34.Location = new System.Drawing.Point(6, 3); + this.Label34.Name = "Label34"; + this.Label34.Size = new System.Drawing.Size(444, 23); + this.Label34.TabIndex = 0; + this.Label34.Text = "Text Tool Settings"; + this.Label34.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlpixelsettersettings + // + this.pnlpixelsettersettings.Controls.Add(this.btnpixelsettersetpixel); + this.pnlpixelsettersettings.Controls.Add(this.txtpixelsetterycoordinate); + this.pnlpixelsettersettings.Controls.Add(this.txtpixelsetterxcoordinate); + this.pnlpixelsettersettings.Controls.Add(this.Label3); + this.pnlpixelsettersettings.Controls.Add(this.Label2); + this.pnlpixelsettersettings.Controls.Add(this.Label1); + this.pnlpixelsettersettings.Location = new System.Drawing.Point(0, 1); + this.pnlpixelsettersettings.Name = "pnlpixelsettersettings"; + this.pnlpixelsettersettings.Size = new System.Drawing.Size(457, 99); + this.pnlpixelsettersettings.TabIndex = 5; + this.pnlpixelsettersettings.Visible = false; + // + // btnpixelsettersetpixel + // + this.btnpixelsettersetpixel.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpixelsettersetpixel.Location = new System.Drawing.Point(215, 34); + this.btnpixelsettersetpixel.Name = "btnpixelsettersetpixel"; + this.btnpixelsettersetpixel.Size = new System.Drawing.Size(228, 56); + this.btnpixelsettersetpixel.TabIndex = 10; + this.btnpixelsettersetpixel.Text = "Set Pixel"; + this.btnpixelsettersetpixel.UseVisualStyleBackColor = true; + this.btnpixelsettersetpixel.Click += new System.EventHandler(this.btnpixelsettersetpixel_Click); + // + // txtpixelsetterycoordinate + // + this.txtpixelsetterycoordinate.BackColor = System.Drawing.Color.White; + this.txtpixelsetterycoordinate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpixelsetterycoordinate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpixelsetterycoordinate.ForeColor = System.Drawing.Color.Black; + this.txtpixelsetterycoordinate.Location = new System.Drawing.Point(136, 64); + this.txtpixelsetterycoordinate.Name = "txtpixelsetterycoordinate"; + this.txtpixelsetterycoordinate.Size = new System.Drawing.Size(73, 26); + this.txtpixelsetterycoordinate.TabIndex = 9; + // + // txtpixelsetterxcoordinate + // + this.txtpixelsetterxcoordinate.BackColor = System.Drawing.Color.White; + this.txtpixelsetterxcoordinate.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpixelsetterxcoordinate.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpixelsetterxcoordinate.ForeColor = System.Drawing.Color.Black; + this.txtpixelsetterxcoordinate.Location = new System.Drawing.Point(136, 34); + this.txtpixelsetterxcoordinate.Name = "txtpixelsetterxcoordinate"; + this.txtpixelsetterxcoordinate.Size = new System.Drawing.Size(73, 26); + this.txtpixelsetterxcoordinate.TabIndex = 8; + // + // Label3 + // + this.Label3.AutoSize = true; + this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(8, 63); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(124, 24); + this.Label3.TabIndex = 2; + this.Label3.Text = "Y Coordinate:"; + // + // Label2 + // + this.Label2.AutoSize = true; + this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(7, 34); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(126, 24); + this.Label2.TabIndex = 1; + this.Label2.Text = "X Coordinate:"; + // + // Label1 + // + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(6, 3); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(444, 23); + this.Label1.TabIndex = 0; + this.Label1.Text = "Pixel Setter Settings"; + this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlmagnifiersettings + // + this.pnlmagnifiersettings.Controls.Add(this.btnzoomout); + this.pnlmagnifiersettings.Controls.Add(this.btnzoomin); + this.pnlmagnifiersettings.Controls.Add(this.lblzoomlevel); + this.pnlmagnifiersettings.Controls.Add(this.Label7); + this.pnlmagnifiersettings.Location = new System.Drawing.Point(78, 50); + this.pnlmagnifiersettings.Name = "pnlmagnifiersettings"; + this.pnlmagnifiersettings.Size = new System.Drawing.Size(67, 44); + this.pnlmagnifiersettings.TabIndex = 6; + this.pnlmagnifiersettings.Visible = false; + // + // btnzoomout + // + this.btnzoomout.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnzoomout.Location = new System.Drawing.Point(16, 33); + this.btnzoomout.Name = "btnzoomout"; + this.btnzoomout.Size = new System.Drawing.Size(129, 56); + this.btnzoomout.TabIndex = 11; + this.btnzoomout.Text = "-"; + this.btnzoomout.UseVisualStyleBackColor = true; + this.btnzoomout.Click += new System.EventHandler(this.btnzoomout_Click); + // + // btnzoomin + // + this.btnzoomin.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnzoomin.Location = new System.Drawing.Point(313, 33); + this.btnzoomin.Name = "btnzoomin"; + this.btnzoomin.Size = new System.Drawing.Size(129, 56); + this.btnzoomin.TabIndex = 10; + this.btnzoomin.Text = "+"; + this.btnzoomin.UseVisualStyleBackColor = true; + this.btnzoomin.Click += new System.EventHandler(this.btnzoomin_Click); + // + // lblzoomlevel + // + this.lblzoomlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblzoomlevel.Location = new System.Drawing.Point(151, 33); + this.lblzoomlevel.Name = "lblzoomlevel"; + this.lblzoomlevel.Size = new System.Drawing.Size(156, 56); + this.lblzoomlevel.TabIndex = 1; + this.lblzoomlevel.Text = "1X"; + this.lblzoomlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label7 + // + this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(6, 3); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(444, 23); + this.Label7.TabIndex = 0; + this.Label7.Text = "Magnifier Settings"; + this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlfloodfillsettings + // + this.pnlfloodfillsettings.Controls.Add(this.Label12); + this.pnlfloodfillsettings.Controls.Add(this.Label15); + this.pnlfloodfillsettings.Location = new System.Drawing.Point(162, 65); + this.pnlfloodfillsettings.Name = "pnlfloodfillsettings"; + this.pnlfloodfillsettings.Size = new System.Drawing.Size(71, 31); + this.pnlfloodfillsettings.TabIndex = 13; + this.pnlfloodfillsettings.Visible = false; + // + // Label12 + // + this.Label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label12.Location = new System.Drawing.Point(3, 28); + this.Label12.Name = "Label12"; + this.Label12.Size = new System.Drawing.Size(450, 51); + this.Label12.TabIndex = 11; + this.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label15 + // + this.Label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label15.Location = new System.Drawing.Point(6, 3); + this.Label15.Name = "Label15"; + this.Label15.Size = new System.Drawing.Size(444, 23); + this.Label15.TabIndex = 0; + this.Label15.Text = "Flood Fill Settings"; + this.Label15.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlsquaretoolsettings + // + this.pnlsquaretoolsettings.Controls.Add(this.Label19); + this.pnlsquaretoolsettings.Controls.Add(this.btnsquarefillonoff); + this.pnlsquaretoolsettings.Controls.Add(this.pnlsquarefillcolour); + this.pnlsquaretoolsettings.Controls.Add(this.txtsquareborderwidth); + this.pnlsquaretoolsettings.Controls.Add(this.Label16); + this.pnlsquaretoolsettings.Controls.Add(this.Label18); + this.pnlsquaretoolsettings.Controls.Add(this.Label17); + this.pnlsquaretoolsettings.Location = new System.Drawing.Point(16, 39); + this.pnlsquaretoolsettings.Name = "pnlsquaretoolsettings"; + this.pnlsquaretoolsettings.Size = new System.Drawing.Size(42, 31); + this.pnlsquaretoolsettings.TabIndex = 14; + this.pnlsquaretoolsettings.Visible = false; + // + // Label19 + // + this.Label19.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label19.Location = new System.Drawing.Point(211, 29); + this.Label19.Name = "Label19"; + this.Label19.Size = new System.Drawing.Size(244, 65); + this.Label19.TabIndex = 15; + this.Label19.Text = "Set a border width and turn fill on or off then draw the square on the canvas wit" + + "h the mouse. Click the fill colour box to set it to your currently selected colo" + + "ur."; + // + // btnsquarefillonoff + // + this.btnsquarefillonoff.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnsquarefillonoff.Location = new System.Drawing.Point(150, 64); + this.btnsquarefillonoff.Name = "btnsquarefillonoff"; + this.btnsquarefillonoff.Size = new System.Drawing.Size(56, 28); + this.btnsquarefillonoff.TabIndex = 14; + this.btnsquarefillonoff.Text = "Fill OFF"; + this.btnsquarefillonoff.UseVisualStyleBackColor = true; + this.btnsquarefillonoff.Click += new System.EventHandler(this.btnsquarefillonoff_Click); + // + // pnlsquarefillcolour + // + this.pnlsquarefillcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlsquarefillcolour.Location = new System.Drawing.Point(109, 64); + this.pnlsquarefillcolour.Name = "pnlsquarefillcolour"; + this.pnlsquarefillcolour.Size = new System.Drawing.Size(34, 28); + this.pnlsquarefillcolour.TabIndex = 13; + this.pnlsquarefillcolour.Click += new System.EventHandler(this.pnlsquarefillcolour_Click); + // + // txtsquareborderwidth + // + this.txtsquareborderwidth.BackColor = System.Drawing.Color.White; + this.txtsquareborderwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtsquareborderwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtsquareborderwidth.ForeColor = System.Drawing.Color.Black; + this.txtsquareborderwidth.Location = new System.Drawing.Point(133, 33); + this.txtsquareborderwidth.Name = "txtsquareborderwidth"; + this.txtsquareborderwidth.Size = new System.Drawing.Size(73, 26); + this.txtsquareborderwidth.TabIndex = 12; + this.txtsquareborderwidth.TextChanged += new System.EventHandler(this.txtsquareborderwidth_TextChanged); + // + // Label16 + // + this.Label16.AutoSize = true; + this.Label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label16.Location = new System.Drawing.Point(4, 66); + this.Label16.Name = "Label16"; + this.Label16.Size = new System.Drawing.Size(100, 24); + this.Label16.TabIndex = 11; + this.Label16.Text = "Fill Colour:"; + // + // Label18 + // + this.Label18.AutoSize = true; + this.Label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label18.Location = new System.Drawing.Point(4, 33); + this.Label18.Name = "Label18"; + this.Label18.Size = new System.Drawing.Size(125, 24); + this.Label18.TabIndex = 10; + this.Label18.Text = "Border Width:"; + // + // Label17 + // + this.Label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label17.Location = new System.Drawing.Point(6, 3); + this.Label17.Name = "Label17"; + this.Label17.Size = new System.Drawing.Size(444, 23); + this.Label17.TabIndex = 0; + this.Label17.Text = "Rectangle Tool Settings"; + this.Label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlpencilsettings + // + this.pnlpencilsettings.Controls.Add(this.btnpencilsize3); + this.pnlpencilsettings.Controls.Add(this.btnpencilsize2); + this.pnlpencilsettings.Controls.Add(this.btnpencilsize1); + this.pnlpencilsettings.Controls.Add(this.Label14); + this.pnlpencilsettings.Location = new System.Drawing.Point(422, 13); + this.pnlpencilsettings.Name = "pnlpencilsettings"; + this.pnlpencilsettings.Size = new System.Drawing.Size(28, 22); + this.pnlpencilsettings.TabIndex = 12; + this.pnlpencilsettings.Visible = false; + // + // btnpencilsize3 + // + this.btnpencilsize3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpencilsize3.Location = new System.Drawing.Point(298, 30); + this.btnpencilsize3.Name = "btnpencilsize3"; + this.btnpencilsize3.Size = new System.Drawing.Size(127, 54); + this.btnpencilsize3.TabIndex = 12; + this.btnpencilsize3.Text = "Thickest"; + this.btnpencilsize3.UseVisualStyleBackColor = true; + this.btnpencilsize3.Click += new System.EventHandler(this.ChangePencilSize); + // + // btnpencilsize2 + // + this.btnpencilsize2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpencilsize2.Location = new System.Drawing.Point(165, 30); + this.btnpencilsize2.Name = "btnpencilsize2"; + this.btnpencilsize2.Size = new System.Drawing.Size(127, 54); + this.btnpencilsize2.TabIndex = 11; + this.btnpencilsize2.Text = "Thicker"; + this.btnpencilsize2.UseVisualStyleBackColor = true; + this.btnpencilsize2.Click += new System.EventHandler(this.ChangePencilSize); + // + // btnpencilsize1 + // + this.btnpencilsize1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpencilsize1.Location = new System.Drawing.Point(30, 30); + this.btnpencilsize1.Name = "btnpencilsize1"; + this.btnpencilsize1.Size = new System.Drawing.Size(127, 54); + this.btnpencilsize1.TabIndex = 10; + this.btnpencilsize1.Text = "Thin"; + this.btnpencilsize1.UseVisualStyleBackColor = true; + this.btnpencilsize1.Click += new System.EventHandler(this.ChangePencilSize); + // + // Label14 + // + this.Label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label14.Location = new System.Drawing.Point(6, 3); + this.Label14.Name = "Label14"; + this.Label14.Size = new System.Drawing.Size(444, 23); + this.Label14.TabIndex = 0; + this.Label14.Text = "Pencil Settings"; + this.Label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label6 + // + this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label6.Location = new System.Drawing.Point(13, 40); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(437, 49); + this.Label6.TabIndex = 9; + this.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(110, 13); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(269, 24); + this.Label5.TabIndex = 8; + this.Label5.Text = "No Tool Currently Selected!"; + // + // line5 + // + this.line5.BackColor = System.Drawing.Color.Black; + this.line5.Dock = System.Windows.Forms.DockStyle.Top; + this.line5.Location = new System.Drawing.Point(0, 0); + this.line5.Name = "line5"; + this.line5.Size = new System.Drawing.Size(456, 1); + this.line5.TabIndex = 4; + // + // line3 + // + this.line3.BackColor = System.Drawing.Color.Black; + this.line3.Dock = System.Windows.Forms.DockStyle.Right; + this.line3.Location = new System.Drawing.Point(456, 0); + this.line3.Name = "line3"; + this.line3.Size = new System.Drawing.Size(1, 100); + this.line3.TabIndex = 2; + // + // pnltools + // + this.pnltools.BackColor = System.Drawing.Color.White; + this.pnltools.Controls.Add(this.pnltoolpositioner); + this.pnltools.Controls.Add(this.line1); + this.pnltools.Controls.Add(this.pnltoolpreview); + this.pnltools.Dock = System.Windows.Forms.DockStyle.Left; + this.pnltools.Location = new System.Drawing.Point(0, 0); + this.pnltools.Name = "pnltools"; + this.pnltools.Size = new System.Drawing.Size(120, 598); + this.pnltools.TabIndex = 0; + // + // pnltoolpositioner + // + this.pnltoolpositioner.Controls.Add(this.btnpixelsetter); + this.pnltoolpositioner.Controls.Add(this.btnpixelplacer); + this.pnltoolpositioner.Controls.Add(this.btnpencil); + this.pnltoolpositioner.Controls.Add(this.btnfloodfill); + this.pnltoolpositioner.Controls.Add(this.btnoval); + this.pnltoolpositioner.Controls.Add(this.btnsquare); + this.pnltoolpositioner.Controls.Add(this.btnlinetool); + this.pnltoolpositioner.Controls.Add(this.btnpaintbrush); + this.pnltoolpositioner.Controls.Add(this.btntexttool); + this.pnltoolpositioner.Controls.Add(this.btneracer); + this.pnltoolpositioner.Controls.Add(this.btnnew); + this.pnltoolpositioner.Controls.Add(this.btnmagnify); + this.pnltoolpositioner.Controls.Add(this.btnopen); + this.pnltoolpositioner.Controls.Add(this.btnsave); + this.pnltoolpositioner.Controls.Add(this.btnundo); + this.pnltoolpositioner.Controls.Add(this.btnredo); + this.pnltoolpositioner.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnltoolpositioner.Location = new System.Drawing.Point(0, 0); + this.pnltoolpositioner.Name = "pnltoolpositioner"; + this.pnltoolpositioner.Size = new System.Drawing.Size(119, 498); + this.pnltoolpositioner.TabIndex = 2; + // + // btnpixelsetter + // + this.btnpixelsetter.FlatAppearance.BorderSize = 0; + this.btnpixelsetter.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpixelsetter.Location = new System.Drawing.Point(6, 6); + this.btnpixelsetter.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpixelsetter.Name = "btnpixelsetter"; + this.btnpixelsetter.Size = new System.Drawing.Size(50, 50); + this.btnpixelsetter.TabIndex = 2; + this.btnpixelsetter.UseVisualStyleBackColor = true; + this.btnpixelsetter.Click += new System.EventHandler(this.btnpixelsetter_Click); + // + // btnpixelplacer + // + this.btnpixelplacer.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadpixelplacer; + this.btnpixelplacer.FlatAppearance.BorderSize = 0; + this.btnpixelplacer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpixelplacer.Location = new System.Drawing.Point(62, 6); + this.btnpixelplacer.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpixelplacer.Name = "btnpixelplacer"; + this.btnpixelplacer.Size = new System.Drawing.Size(50, 50); + this.btnpixelplacer.TabIndex = 4; + this.btnpixelplacer.UseVisualStyleBackColor = true; + this.btnpixelplacer.Click += new System.EventHandler(this.btnpixelplacer_Click); + // + // btnpencil + // + this.btnpencil.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadpencil; + this.btnpencil.FlatAppearance.BorderSize = 0; + this.btnpencil.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpencil.Location = new System.Drawing.Point(6, 62); + this.btnpencil.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpencil.Name = "btnpencil"; + this.btnpencil.Size = new System.Drawing.Size(50, 50); + this.btnpencil.TabIndex = 7; + this.btnpencil.Text = " "; + this.btnpencil.UseVisualStyleBackColor = true; + this.btnpencil.Click += new System.EventHandler(this.btnpencil_Click); + // + // btnfloodfill + // + this.btnfloodfill.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadfloodfill; + this.btnfloodfill.FlatAppearance.BorderSize = 0; + this.btnfloodfill.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnfloodfill.Location = new System.Drawing.Point(62, 62); + this.btnfloodfill.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnfloodfill.Name = "btnfloodfill"; + this.btnfloodfill.Size = new System.Drawing.Size(50, 50); + this.btnfloodfill.TabIndex = 11; + this.btnfloodfill.UseVisualStyleBackColor = true; + this.btnfloodfill.Click += new System.EventHandler(this.btnfill_Click); + // + // btnoval + // + this.btnoval.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadOval; + this.btnoval.FlatAppearance.BorderSize = 0; + this.btnoval.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnoval.Location = new System.Drawing.Point(6, 118); + this.btnoval.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnoval.Name = "btnoval"; + this.btnoval.Size = new System.Drawing.Size(50, 50); + this.btnoval.TabIndex = 13; + this.btnoval.Text = " "; + this.btnoval.UseVisualStyleBackColor = true; + this.btnoval.Click += new System.EventHandler(this.btnoval_Click); + // + // btnsquare + // + this.btnsquare.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadRectangle; + this.btnsquare.FlatAppearance.BorderSize = 0; + this.btnsquare.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsquare.Location = new System.Drawing.Point(62, 118); + this.btnsquare.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnsquare.Name = "btnsquare"; + this.btnsquare.Size = new System.Drawing.Size(50, 50); + this.btnsquare.TabIndex = 12; + this.btnsquare.Text = " "; + this.btnsquare.UseVisualStyleBackColor = true; + this.btnsquare.Click += new System.EventHandler(this.btnsquare_Click); + // + // btnlinetool + // + this.btnlinetool.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadlinetool; + this.btnlinetool.FlatAppearance.BorderSize = 0; + this.btnlinetool.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnlinetool.Location = new System.Drawing.Point(6, 174); + this.btnlinetool.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnlinetool.Name = "btnlinetool"; + this.btnlinetool.Size = new System.Drawing.Size(50, 50); + this.btnlinetool.TabIndex = 15; + this.btnlinetool.Text = " "; + this.btnlinetool.UseVisualStyleBackColor = true; + this.btnlinetool.Click += new System.EventHandler(this.btnlinetool_Click); + // + // btnpaintbrush + // + this.btnpaintbrush.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadpaintbrush; + this.btnpaintbrush.FlatAppearance.BorderSize = 0; + this.btnpaintbrush.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpaintbrush.Location = new System.Drawing.Point(62, 174); + this.btnpaintbrush.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnpaintbrush.Name = "btnpaintbrush"; + this.btnpaintbrush.Size = new System.Drawing.Size(50, 50); + this.btnpaintbrush.TabIndex = 17; + this.btnpaintbrush.Text = " "; + this.btnpaintbrush.UseVisualStyleBackColor = true; + this.btnpaintbrush.Click += new System.EventHandler(this.btnpaintbrush_Click); + // + // btntexttool + // + this.btntexttool.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadtexttool; + this.btntexttool.FlatAppearance.BorderSize = 0; + this.btntexttool.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btntexttool.Location = new System.Drawing.Point(6, 230); + this.btntexttool.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btntexttool.Name = "btntexttool"; + this.btntexttool.Size = new System.Drawing.Size(50, 50); + this.btntexttool.TabIndex = 16; + this.btntexttool.Text = " "; + this.btntexttool.UseVisualStyleBackColor = true; + this.btntexttool.Click += new System.EventHandler(this.btntexttool_Click); + // + // btneracer + // + this.btneracer.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPaderacer; + this.btneracer.FlatAppearance.BorderSize = 0; + this.btneracer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btneracer.Location = new System.Drawing.Point(62, 230); + this.btneracer.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btneracer.Name = "btneracer"; + this.btneracer.Size = new System.Drawing.Size(50, 50); + this.btneracer.TabIndex = 14; + this.btneracer.Text = " "; + this.btneracer.UseVisualStyleBackColor = true; + this.btneracer.Click += new System.EventHandler(this.btneracer_Click); + // + // btnnew + // + this.btnnew.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadnew; + this.btnnew.FlatAppearance.BorderSize = 0; + this.btnnew.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnnew.Location = new System.Drawing.Point(6, 286); + this.btnnew.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnnew.Name = "btnnew"; + this.btnnew.Size = new System.Drawing.Size(50, 50); + this.btnnew.TabIndex = 6; + this.btnnew.Text = " "; + this.btnnew.UseVisualStyleBackColor = true; + this.btnnew.Click += new System.EventHandler(this.btnnew_Click); + // + // btnmagnify + // + this.btnmagnify.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadmagnify; + this.btnmagnify.FlatAppearance.BorderSize = 0; + this.btnmagnify.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnmagnify.Location = new System.Drawing.Point(62, 286); + this.btnmagnify.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnmagnify.Name = "btnmagnify"; + this.btnmagnify.Size = new System.Drawing.Size(50, 50); + this.btnmagnify.TabIndex = 3; + this.btnmagnify.Text = " "; + this.btnmagnify.UseVisualStyleBackColor = true; + this.btnmagnify.Click += new System.EventHandler(this.btnmagnify_Click); + // + // btnopen + // + this.btnopen.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadopen; + this.btnopen.FlatAppearance.BorderSize = 0; + this.btnopen.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnopen.Location = new System.Drawing.Point(6, 342); + this.btnopen.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnopen.Name = "btnopen"; + this.btnopen.Size = new System.Drawing.Size(50, 50); + this.btnopen.TabIndex = 10; + this.btnopen.Text = " "; + this.btnopen.UseVisualStyleBackColor = true; + this.btnopen.Click += new System.EventHandler(this.btnopen_Click); + // + // btnsave + // + this.btnsave.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadsave; + this.btnsave.FlatAppearance.BorderSize = 0; + this.btnsave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsave.Location = new System.Drawing.Point(62, 342); + this.btnsave.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(50, 50); + this.btnsave.TabIndex = 5; + this.btnsave.Text = " "; + this.btnsave.UseVisualStyleBackColor = true; + this.btnsave.Click += new System.EventHandler(this.btnsave_Click); + // + // btnundo + // + this.btnundo.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadundo; + this.btnundo.FlatAppearance.BorderSize = 0; + this.btnundo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnundo.Location = new System.Drawing.Point(6, 398); + this.btnundo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnundo.Name = "btnundo"; + this.btnundo.Size = new System.Drawing.Size(50, 50); + this.btnundo.TabIndex = 8; + this.btnundo.Text = " "; + this.btnundo.UseVisualStyleBackColor = true; + this.btnundo.Click += new System.EventHandler(this.btnundo_Click); + // + // btnredo + // + this.btnredo.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadredo; + this.btnredo.FlatAppearance.BorderSize = 0; + this.btnredo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnredo.Location = new System.Drawing.Point(62, 398); + this.btnredo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); + this.btnredo.Name = "btnredo"; + this.btnredo.Size = new System.Drawing.Size(50, 50); + this.btnredo.TabIndex = 9; + this.btnredo.Text = " "; + this.btnredo.UseVisualStyleBackColor = true; + this.btnredo.Click += new System.EventHandler(this.btnredo_Click); + // + // line1 + // + this.line1.BackColor = System.Drawing.Color.Black; + this.line1.Dock = System.Windows.Forms.DockStyle.Right; + this.line1.Location = new System.Drawing.Point(119, 0); + this.line1.Name = "line1"; + this.line1.Size = new System.Drawing.Size(1, 498); + this.line1.TabIndex = 1; + // + // pnltoolpreview + // + this.pnltoolpreview.Controls.Add(this.Label13); + this.pnltoolpreview.Controls.Add(this.picpreview); + this.pnltoolpreview.Controls.Add(this.lbltoolselected); + this.pnltoolpreview.Controls.Add(this.line4); + this.pnltoolpreview.Controls.Add(this.line2); + this.pnltoolpreview.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnltoolpreview.Location = new System.Drawing.Point(0, 498); + this.pnltoolpreview.Name = "pnltoolpreview"; + this.pnltoolpreview.Size = new System.Drawing.Size(120, 100); + this.pnltoolpreview.TabIndex = 0; + // + // Label13 + // + this.Label13.BackColor = System.Drawing.Color.Transparent; + this.Label13.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label13.Location = new System.Drawing.Point(3, 79); + this.Label13.Name = "Label13"; + this.Label13.Size = new System.Drawing.Size(113, 21); + this.Label13.TabIndex = 6; + this.Label13.Text = "Preview"; + this.Label13.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // picpreview + // + this.picpreview.Location = new System.Drawing.Point(24, 27); + this.picpreview.Name = "picpreview"; + this.picpreview.Size = new System.Drawing.Size(70, 50); + this.picpreview.TabIndex = 5; + this.picpreview.TabStop = false; + // + // lbltoolselected + // + this.lbltoolselected.BackColor = System.Drawing.Color.Transparent; + this.lbltoolselected.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltoolselected.Location = new System.Drawing.Point(3, 3); + this.lbltoolselected.Name = "lbltoolselected"; + this.lbltoolselected.Size = new System.Drawing.Size(113, 21); + this.lbltoolselected.TabIndex = 4; + this.lbltoolselected.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // line4 + // + this.line4.BackColor = System.Drawing.Color.Black; + this.line4.Dock = System.Windows.Forms.DockStyle.Top; + this.line4.Location = new System.Drawing.Point(0, 0); + this.line4.Name = "line4"; + this.line4.Size = new System.Drawing.Size(119, 1); + this.line4.TabIndex = 3; + // + // line2 + // + this.line2.BackColor = System.Drawing.Color.Black; + this.line2.Dock = System.Windows.Forms.DockStyle.Right; + this.line2.Location = new System.Drawing.Point(119, 0); + this.line2.Name = "line2"; + this.line2.Size = new System.Drawing.Size(1, 100); + this.line2.TabIndex = 2; + // + // tmrcodepointcooldown + // + this.tmrcodepointcooldown.Interval = 10000; + // + // tmrshowearnedcodepoints + // + this.tmrshowearnedcodepoints.Interval = 3000; + // + // pullbs + // + this.pullbs.Interval = 1; + // + // pullbottom + // + this.pullbottom.Interval = 1; + // + // pullside + // + this.pullside.Interval = 1; + // + // tmrsetupui + // + this.tmrsetupui.Tick += new System.EventHandler(this.tmrsetupui_Tick); + // + // Artpad + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pgcontents); + this.MinimumSize = new System.Drawing.Size(502, 398); + this.Name = "Artpad"; + this.Text = "{ARTPAD_NAME}"; + this.Size = new System.Drawing.Size(802, 598); + this.Load += new System.EventHandler(this.Template_Load); + this.pgcontents.ResumeLayout(false); + this.pnldrawingbackground.ResumeLayout(false); + this.pnlinitialcanvassettings.ResumeLayout(false); + this.pnlinitialcanvassettings.PerformLayout(); + this.pnlpalettesize.ResumeLayout(false); + this.pnlpalettesize.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picdrawingdisplay)).EndInit(); + this.pnlbottompanel.ResumeLayout(false); + this.pnlpallet.ResumeLayout(false); + this.flowcolours.ResumeLayout(false); + this.pnltoolproperties.ResumeLayout(false); + this.pnltoolproperties.PerformLayout(); + this.pnlpixelplacersettings.ResumeLayout(false); + this.pnlovaltoolsettings.ResumeLayout(false); + this.pnlovaltoolsettings.PerformLayout(); + this.pnleracertoolsettings.ResumeLayout(false); + this.pnleracertoolsettings.PerformLayout(); + this.pnllinetoolsettings.ResumeLayout(false); + this.pnllinetoolsettings.PerformLayout(); + this.pnlpaintbrushtoolsettings.ResumeLayout(false); + this.pnlpaintbrushtoolsettings.PerformLayout(); + this.pnltexttoolsettings.ResumeLayout(false); + this.pnltexttoolsettings.PerformLayout(); + this.pnlpixelsettersettings.ResumeLayout(false); + this.pnlpixelsettersettings.PerformLayout(); + this.pnlmagnifiersettings.ResumeLayout(false); + this.pnlfloodfillsettings.ResumeLayout(false); + this.pnlsquaretoolsettings.ResumeLayout(false); + this.pnlsquaretoolsettings.PerformLayout(); + this.pnlpencilsettings.ResumeLayout(false); + this.pnltools.ResumeLayout(false); + this.pnltoolpositioner.ResumeLayout(false); + this.pnltoolpreview.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.picpreview)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Panel pnlbottompanel; + internal System.Windows.Forms.Panel pnltoolproperties; + internal System.Windows.Forms.Panel pnlpallet; + internal System.Windows.Forms.Panel line3; + internal System.Windows.Forms.Panel line5; + internal System.Windows.Forms.Panel line6; + internal System.Windows.Forms.Panel pnldrawingbackground; + internal System.Windows.Forms.PictureBox picdrawingdisplay; + internal System.Windows.Forms.Button btnpixelsetter; + internal System.Windows.Forms.Panel pnlpixelsettersettings; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Button btnpixelsettersetpixel; + internal System.Windows.Forms.TextBox txtpixelsetterycoordinate; + internal System.Windows.Forms.TextBox txtpixelsetterxcoordinate; + internal System.Windows.Forms.Button btnmagnify; + internal System.Windows.Forms.Panel colourpallet32; + internal System.Windows.Forms.Panel colourpallet31; + internal System.Windows.Forms.Panel colourpallet30; + internal System.Windows.Forms.Panel colourpallet29; + internal System.Windows.Forms.Panel colourpallet28; + internal System.Windows.Forms.Panel colourpallet26; + internal System.Windows.Forms.Panel colourpallet25; + internal System.Windows.Forms.Panel colourpallet23; + internal System.Windows.Forms.Panel colourpallet21; + internal System.Windows.Forms.Panel colourpallet19; + internal System.Windows.Forms.Panel colourpallet8; + internal System.Windows.Forms.Panel colourpallet6; + internal System.Windows.Forms.Panel colourpallet16; + internal System.Windows.Forms.Panel colourpallet14; + internal System.Windows.Forms.Panel colourpallet7; + internal System.Windows.Forms.Panel colourpallet5; + internal System.Windows.Forms.Panel colourpallet10; + internal System.Windows.Forms.Panel colourpallet9; + internal System.Windows.Forms.Panel colourpallet11; + internal System.Windows.Forms.Panel colourpallet12; + internal System.Windows.Forms.Panel colourpallet13; + internal System.Windows.Forms.Panel colourpallet15; + internal System.Windows.Forms.Panel colourpallet4; + internal System.Windows.Forms.Panel colourpallet3; + internal System.Windows.Forms.Panel colourpallet17; + internal System.Windows.Forms.Panel colourpallet18; + internal System.Windows.Forms.Panel colourpallet20; + internal System.Windows.Forms.Panel colourpallet22; + internal System.Windows.Forms.Panel colourpallet24; + internal System.Windows.Forms.Panel colourpallet2; + internal System.Windows.Forms.Panel colourpallet27; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.Panel colourpallet1; + internal System.Windows.Forms.Panel pnlmagnifiersettings; + internal System.Windows.Forms.Button btnzoomin; + internal System.Windows.Forms.Label lblzoomlevel; + internal System.Windows.Forms.Label Label7; + internal System.Windows.Forms.Button btnzoomout; + internal System.Windows.Forms.Button btnpixelplacer; + internal System.Windows.Forms.Panel pnlpixelplacersettings; + internal System.Windows.Forms.Button btnpixelplacermovementmode; + internal System.Windows.Forms.Label Label8; + internal System.Windows.Forms.Label lblpixelplacerhelp; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Button btnnew; + internal System.Windows.Forms.FlowLayoutPanel flowcolours; + internal System.Windows.Forms.Button btnpencil; + internal System.Windows.Forms.Panel pnlpencilsettings; + internal System.Windows.Forms.Button btnpencilsize3; + internal System.Windows.Forms.Button btnpencilsize2; + internal System.Windows.Forms.Button btnpencilsize1; + internal System.Windows.Forms.Label Label14; + internal System.Windows.Forms.Button btnfloodfill; + internal System.Windows.Forms.Panel pnlfloodfillsettings; + internal System.Windows.Forms.Label Label12; + internal System.Windows.Forms.Label Label15; + internal System.Windows.Forms.Button btnsquare; + internal System.Windows.Forms.Panel pnlsquaretoolsettings; + internal System.Windows.Forms.TextBox txtsquareborderwidth; + internal System.Windows.Forms.Label Label16; + internal System.Windows.Forms.Label Label18; + internal System.Windows.Forms.Label Label17; + internal System.Windows.Forms.Button btnsquarefillonoff; + internal System.Windows.Forms.Panel pnlsquarefillcolour; + internal System.Windows.Forms.Label Label19; + internal System.Windows.Forms.Button btnoval; + internal System.Windows.Forms.Panel pnlovaltoolsettings; + internal System.Windows.Forms.Label Label20; + internal System.Windows.Forms.Button btnovalfillonoff; + internal System.Windows.Forms.Panel pnlovalfillcolour; + internal System.Windows.Forms.TextBox txtovalborderwidth; + internal System.Windows.Forms.Label Label21; + internal System.Windows.Forms.Label Label22; + internal System.Windows.Forms.Label Label23; + internal System.Windows.Forms.Panel pnltools; + internal System.Windows.Forms.FlowLayoutPanel pnltoolpositioner; + internal System.Windows.Forms.Panel line1; + internal System.Windows.Forms.Panel pnltoolpreview; + internal System.Windows.Forms.Label Label13; + internal System.Windows.Forms.PictureBox picpreview; + internal System.Windows.Forms.Label lbltoolselected; + internal System.Windows.Forms.Panel line4; + internal System.Windows.Forms.Panel line2; + internal System.Windows.Forms.Button btnopen; + internal System.Windows.Forms.Button btnsave; + internal System.Windows.Forms.Button btnundo; + internal System.Windows.Forms.Button btnredo; + internal System.Windows.Forms.Button btneracer; + internal System.Windows.Forms.Button btnlinetool; + internal System.Windows.Forms.Panel pnllinetoolsettings; + internal System.Windows.Forms.Label Label29; + internal System.Windows.Forms.TextBox txtlinewidth; + internal System.Windows.Forms.Label Label30; + internal System.Windows.Forms.Label Label31; + internal System.Windows.Forms.Panel pnleracertoolsettings; + internal System.Windows.Forms.Label Label28; + internal System.Windows.Forms.Button btneracersquare; + internal System.Windows.Forms.Button btneracercircle; + internal System.Windows.Forms.Label Label24; + internal System.Windows.Forms.TextBox txteracersize; + internal System.Windows.Forms.Label Label26; + internal System.Windows.Forms.Label Label27; + internal System.Windows.Forms.Button btntexttool; + internal System.Windows.Forms.Button btnpaintbrush; + internal System.Windows.Forms.Panel pnltexttoolsettings; + internal System.Windows.Forms.Label Label25; + internal System.Windows.Forms.TextBox txtdrawtextsize; + internal System.Windows.Forms.Label Label32; + internal System.Windows.Forms.Label Label33; + internal System.Windows.Forms.Label Label34; + internal System.Windows.Forms.ComboBox combodrawtextfont; + internal System.Windows.Forms.TextBox txtdrawstringtext; + internal System.Windows.Forms.ComboBox combofontstyle; + internal System.Windows.Forms.Label Label35; + internal System.Windows.Forms.Panel pnlpaintbrushtoolsettings; + internal System.Windows.Forms.Label Label36; + internal System.Windows.Forms.Button btnpaintsquareshape; + internal System.Windows.Forms.Button btnpaintcircleshape; + internal System.Windows.Forms.Label Label37; + internal System.Windows.Forms.TextBox txtpaintbrushsize; + internal System.Windows.Forms.Label Label38; + internal System.Windows.Forms.Label Label39; + internal System.Windows.Forms.Timer tmrcodepointcooldown; + internal System.Windows.Forms.Timer tmrshowearnedcodepoints; + internal System.Windows.Forms.Panel pnlpalettesize; + internal System.Windows.Forms.Button btnchangesizecancel; + internal System.Windows.Forms.Button btnsetsize; + internal System.Windows.Forms.TextBox txtcolorpalletheight; + internal System.Windows.Forms.Label Label42; + internal System.Windows.Forms.TextBox txtcolorpalletwidth; + internal System.Windows.Forms.Label Label43; + internal System.Windows.Forms.Panel pnlinitialcanvassettings; + internal System.Windows.Forms.Button btncancel; + internal System.Windows.Forms.Button btncreate; + internal System.Windows.Forms.Label Label11; + internal System.Windows.Forms.Label lbltotalpixels; + internal System.Windows.Forms.TextBox txtnewcanvasheight; + internal System.Windows.Forms.Label Label10; + internal System.Windows.Forms.TextBox txtnewcanvaswidth; + internal System.Windows.Forms.Label Label9; + internal System.Windows.Forms.Panel colourpallet33; + internal System.Windows.Forms.Panel colourpallet34; + internal System.Windows.Forms.Panel colourpallet35; + internal System.Windows.Forms.Panel colourpallet36; + internal System.Windows.Forms.Panel colourpallet37; + internal System.Windows.Forms.Panel colourpallet38; + internal System.Windows.Forms.Panel colourpallet39; + internal System.Windows.Forms.Panel colourpallet40; + internal System.Windows.Forms.Panel colourpallet41; + internal System.Windows.Forms.Panel colourpallet42; + internal System.Windows.Forms.Panel colourpallet43; + internal System.Windows.Forms.Panel colourpallet44; + internal System.Windows.Forms.Panel colourpallet45; + internal System.Windows.Forms.Panel colourpallet46; + internal System.Windows.Forms.Panel colourpallet47; + internal System.Windows.Forms.Panel colourpallet48; + internal System.Windows.Forms.Panel colourpallet49; + internal System.Windows.Forms.Panel colourpallet50; + internal System.Windows.Forms.Panel colourpallet51; + internal System.Windows.Forms.Panel colourpallet52; + internal System.Windows.Forms.Panel colourpallet53; + internal System.Windows.Forms.Panel colourpallet54; + internal System.Windows.Forms.Panel colourpallet55; + internal System.Windows.Forms.Panel colourpallet56; + internal System.Windows.Forms.Panel colourpallet57; + internal System.Windows.Forms.Panel colourpallet58; + internal System.Windows.Forms.Panel colourpallet59; + internal System.Windows.Forms.Panel colourpallet60; + internal System.Windows.Forms.Panel colourpallet61; + internal System.Windows.Forms.Panel colourpallet62; + internal System.Windows.Forms.Panel colourpallet63; + internal System.Windows.Forms.Panel colourpallet64; + internal System.Windows.Forms.Panel colourpallet65; + internal System.Windows.Forms.Panel colourpallet66; + internal System.Windows.Forms.Panel colourpallet67; + internal System.Windows.Forms.Panel colourpallet68; + internal System.Windows.Forms.Panel colourpallet69; + internal System.Windows.Forms.Panel colourpallet70; + internal System.Windows.Forms.Panel colourpallet71; + internal System.Windows.Forms.Panel colourpallet72; + internal System.Windows.Forms.Panel colourpallet73; + internal System.Windows.Forms.Panel colourpallet74; + internal System.Windows.Forms.Panel colourpallet75; + internal System.Windows.Forms.Panel colourpallet76; + internal System.Windows.Forms.Panel colourpallet77; + internal System.Windows.Forms.Panel colourpallet78; + internal System.Windows.Forms.Panel colourpallet79; + internal System.Windows.Forms.Panel colourpallet80; + internal System.Windows.Forms.Panel colourpallet81; + internal System.Windows.Forms.Panel colourpallet82; + internal System.Windows.Forms.Panel colourpallet83; + internal System.Windows.Forms.Panel colourpallet84; + internal System.Windows.Forms.Panel colourpallet85; + internal System.Windows.Forms.Panel colourpallet86; + internal System.Windows.Forms.Panel colourpallet87; + internal System.Windows.Forms.Panel colourpallet88; + internal System.Windows.Forms.Panel colourpallet89; + internal System.Windows.Forms.Panel colourpallet90; + internal System.Windows.Forms.Panel colourpallet91; + internal System.Windows.Forms.Panel colourpallet92; + internal System.Windows.Forms.Panel colourpallet93; + internal System.Windows.Forms.Panel colourpallet94; + internal System.Windows.Forms.Panel colourpallet95; + internal System.Windows.Forms.Panel colourpallet96; + internal System.Windows.Forms.Panel colourpallet97; + internal System.Windows.Forms.Panel colourpallet98; + internal System.Windows.Forms.Panel colourpallet99; + internal System.Windows.Forms.Panel colourpallet100; + internal System.Windows.Forms.Panel colourpallet101; + internal System.Windows.Forms.Panel colourpallet102; + internal System.Windows.Forms.Panel colourpallet103; + internal System.Windows.Forms.Panel colourpallet104; + internal System.Windows.Forms.Panel colourpallet105; + internal System.Windows.Forms.Panel colourpallet106; + internal System.Windows.Forms.Panel colourpallet107; + internal System.Windows.Forms.Panel colourpallet108; + internal System.Windows.Forms.Panel colourpallet109; + internal System.Windows.Forms.Panel colourpallet110; + internal System.Windows.Forms.Panel colourpallet111; + internal System.Windows.Forms.Panel colourpallet112; + internal System.Windows.Forms.Panel colourpallet113; + internal System.Windows.Forms.Panel colourpallet114; + internal System.Windows.Forms.Panel colourpallet115; + internal System.Windows.Forms.Panel colourpallet116; + internal System.Windows.Forms.Panel colourpallet117; + internal System.Windows.Forms.Panel colourpallet118; + internal System.Windows.Forms.Panel colourpallet119; + internal System.Windows.Forms.Panel colourpallet120; + internal System.Windows.Forms.Panel colourpallet121; + internal System.Windows.Forms.Panel colourpallet122; + internal System.Windows.Forms.Panel colourpallet123; + internal System.Windows.Forms.Panel colourpallet124; + internal System.Windows.Forms.Panel colourpallet125; + internal System.Windows.Forms.Panel colourpallet126; + internal System.Windows.Forms.Panel colourpallet127; + internal System.Windows.Forms.Panel colourpallet128; + internal System.Windows.Forms.TextBox txttopspace; + internal System.Windows.Forms.Label Label40; + internal System.Windows.Forms.TextBox txtsidespace; + internal System.Windows.Forms.Label Label41; + internal System.Windows.Forms.Timer pullbs; + internal System.Windows.Forms.Timer pullbottom; + internal System.Windows.Forms.Timer pullside; + private System.Windows.Forms.Timer tmrsetupui; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Artpad.cs b/ShiftOS.WinForms/Applications/Artpad.cs new file mode 100644 index 0000000..0d80094 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Artpad.cs @@ -0,0 +1,1853 @@ +using ShiftOS.Objects.ShiftFS; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Drawing.Imaging; +using System.Drawing.Text; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.WinForms.Tools; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications +{ + [Launcher("Artpad", true, "al_artpad")] + [RequiresUpgrade("artpad")] + [WinOpen("artpad")] + public partial class Artpad : UserControl, IShiftOSWindow + { + /// + /// artpad_'s GUI. + /// + public Artpad() + { + try + { + InitializeComponent(); + } + catch (Exception ex) + { + CrashHandler.Start(ex); + this.Close(); + } + } + + public void LoadPicture(string pic) + { + savelocation = pic; + this.openpic(); + } + + #region Variables + + public int rolldownsize; + public int oldbordersize; + public int oldtitlebarheight; + public bool justopened = false; + public bool needtorollback = false; + public int minimumsizewidth = 502; + + public int minimumsizeheight = 398; + public int codepointsearned; + public bool codepointscooldown = false; + + public bool needtosave = false; + int canvaswidth = 150; + int canvasheight = 100; + public Bitmap canvasbitmap; + + Color canvascolor = Color.White; + + Bitmap previewcanvasbitmap; + int magnificationlevel = 1; + Rectangle magnifyRect; + Graphics graphicsbitmap; + public Color drawingcolour = Color.Black; + string selectedtool = "Pixel Setter"; + bool pixalplacermovable = false; + public string savelocation; + System.Drawing.Drawing2D.GraphicsPath mousePath = new System.Drawing.Drawing2D.GraphicsPath(); + int pencilwidth = 1; + undo undo = new undo(); + Point thisPoint; + int eracerwidth = 15; + + string eracertype = "square"; + int paintbrushwidth = 15; + + string paintbrushtype = "circle"; + float rectanglestartpointx; + float rectanglestartpointy; + bool currentlydrawingsquare; + int squarewidth = 1; + bool squarefillon = false; + + Color fillsquarecolor = Color.Black; + float ovalstartpointx; + float ovalstartpointy; + bool currentlydrawingoval; + int ovalwidth = 2; + bool ovalfillon = false; + + Color fillovalcolor = Color.Black; + float linestartpointx; + float linestartpointy; + bool currentlydrawingline; + + int linewidth = 2; + bool currentlydrawingtext; + System.Drawing.Font drawtextfont = new System.Drawing.Font("Microsoft Sans Serif", 16); + int drawtextsize; + string drawtextfontname; + + FontStyle drawtextfontstyle; + + #endregion + + #region Setup + + private void Template_Load(object sender, EventArgs e) + { + justopened = true; + this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2; + this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2; + + setuppreview(); + settoolcolours(); + loadcolors(); + AddFonts(); + setuptoolbox(); + determinevisiblepalettes(); + tmrsetupui.Start(); + } + + + + public void setupcanvas() + { + canvasbitmap = new Bitmap(canvaswidth, canvasheight); + previewcanvasbitmap = new Bitmap(canvaswidth, canvasheight); + picdrawingdisplay.Size = new Size(canvaswidth, canvasheight); + picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth) / 2, (pnldrawingbackground.Height - canvasheight) / 2); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + SolidBrush canvasbrush = new SolidBrush(canvascolor); + graphicsbitmap.FillRectangle(canvasbrush, 0, 0, canvaswidth, canvasheight); + magnificationlevel = 1; + lblzoomlevel.Text = magnificationlevel + "X"; + setuppreview(); + needtosave = false; + } + + public void setuptoolbox() + { + btnpixelplacer.Hide(); + btnpencil.Hide(); + btnfloodfill.Hide(); + btnoval.Hide(); + btnsquare.Hide(); + btnlinetool.Hide(); + btnpaintbrush.Hide(); + btntexttool.Hide(); + btneracer.Hide(); + btnnew.Hide(); + btnopen.Hide(); + btnsave.Hide(); + btnundo.Hide(); + btnredo.Hide(); + btnpixelplacermovementmode.Hide(); + + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_placer") == true) + btnpixelplacer.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pencil") == true) + btnpencil.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_fill_tool") == true) + btnfloodfill.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_oval_tool") == true) + btnoval.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_rectangle_tool") == true) + btnsquare.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_line_tool") == true) + btnlinetool.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_paintbrush") == true) + btnpaintbrush.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_text_tool") == true) + btntexttool.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_eraser") == true) + btneracer.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_new") == true) + btnnew.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_load") == true) + btnopen.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_save") == true) + btnsave.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_undo") == true) + btnundo.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_redo") == true) + btnredo.Show(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pp_movement_mode") == true) + btnpixelplacermovementmode.Show(); + + } + + private void AddFonts() + { + // Get the installed fonts collection. + InstalledFontCollection allFonts = new InstalledFontCollection(); + + // Get an array of the system's font familiies. + FontFamily[] fontFamilies = allFonts.Families; + + // Display the font families. + foreach (FontFamily myFont in fontFamilies) + { + combodrawtextfont.Items.Add(myFont.Name); + } + //font_family + + combodrawtextfont.SelectedItem = combodrawtextfont.Items[1]; + combofontstyle.Text = "Regular"; + txtdrawtextsize.Text = "16"; + } + + #endregion + + #region General + + // ERROR: Handles clauses are not supported in C# + private void btnpixelsetter_Click(object sender, EventArgs e) + { + selectedtool = "Pixel Setter"; + gettoolsettings(pnlpixelsettersettings); + } + + private void gettoolsettings(Panel toolpanel) + { + //hide all properties panels + pnlpixelsettersettings.Hide(); + pnlmagnifiersettings.Hide(); + + //show chosen panel + toolpanel.Dock = DockStyle.Fill; + toolpanel.BringToFront(); + toolpanel.Show(); + + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpixelsettersetpixel_Click(object sender, EventArgs e) + { + try + { + undo.undoStack.Push((Image)canvasbitmap.Clone()); + undo.redoStack.Clear(); + canvasbitmap.SetPixel(Convert.ToInt32(txtpixelsetterxcoordinate.Text), Convert.ToInt32(txtpixelsetterycoordinate.Text), drawingcolour); + picdrawingdisplay.Invalidate(); + } + catch + { + Infobox.Show("{ARTPAD_PLACEMENT_ERROR}", "{ARTPAD_PLACEMENT_ERROR_EXP}"); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnmagnify_Click(object sender, EventArgs e) + { + selectedtool = "Magnifier"; + gettoolsettings(pnlmagnifiersettings); + } + + #endregion + + #region Drawing Display + + // ERROR: Handles clauses are not supported in C# + private void picdrawingdisplay_Paint(object sender, System.Windows.Forms.PaintEventArgs e) + { + e.Graphics.FillRectangle(Brushes.White, 0, 0, canvaswidth * magnificationlevel, canvasheight * magnificationlevel); + e.Graphics.InterpolationMode = InterpolationMode.NearestNeighbor; + e.Graphics.PixelOffsetMode = PixelOffsetMode.Half; + e.Graphics.ScaleTransform(magnificationlevel, magnificationlevel); + + if (currentlydrawingsquare == true) + { + GC.Collect(); + Graphics g = Graphics.FromImage(previewcanvasbitmap); + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + g = Graphics.FromImage(previewcanvasbitmap); + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), squarewidth); + var CurrentBrush = new SolidBrush(Color.FromArgb(255, fillsquarecolor)); + RectangleF rectdraw = new RectangleF(rectanglestartpointx, rectanglestartpointy, thisPoint.X - rectanglestartpointx, thisPoint.Y - rectanglestartpointy); + int heightamount; + int widthamount; + if (rectdraw.Height < 0) + heightamount = (int)Math.Abs(rectdraw.Height); + else + heightamount = 0; + if (rectdraw.Width < 0) + widthamount = (int)Math.Abs(rectdraw.Width); + else + widthamount = 0; + if (squarewidth > 0) + { + g.DrawRectangle(CurrentPen, rectdraw.X - widthamount, rectdraw.Y - heightamount, Math.Abs(rectdraw.Width), Math.Abs(rectdraw.Height)); + } + if (squarefillon == true) + { + float correctionamount = squarewidth / 2; + int addfillamount; + if (squarewidth > 0) + addfillamount = squarewidth; + else + addfillamount = -1; + g.FillRectangle(CurrentBrush, (rectdraw.X - widthamount) + correctionamount, (rectdraw.Y - heightamount) + correctionamount, Math.Abs(rectdraw.Width) - addfillamount, Math.Abs(rectdraw.Height) - addfillamount); + } + } + + if (currentlydrawingoval == true) + { + GC.Collect(); + Graphics g = Graphics.FromImage(previewcanvasbitmap); + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + g = Graphics.FromImage(previewcanvasbitmap); + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), ovalwidth); + var CurrentBrush = new SolidBrush(Color.FromArgb(255, fillovalcolor)); + RectangleF ovaldraw = new RectangleF(ovalstartpointx, ovalstartpointy, thisPoint.X - ovalstartpointx, thisPoint.Y - ovalstartpointy); + int heightamount; + int widthamount; + if (ovaldraw.Height < 0) + heightamount = (int)Math.Abs(ovaldraw.Height); + else + heightamount = 0; + if (ovaldraw.Width < 0) + widthamount = (int)Math.Abs(ovaldraw.Width); + else + widthamount = 0; + if (ovalwidth > 0) + { + g.DrawEllipse(CurrentPen, ovaldraw.X - widthamount, ovaldraw.Y - heightamount, Math.Abs(ovaldraw.Width), Math.Abs(ovaldraw.Height)); + } + if (ovalfillon == true) + { + g.FillEllipse(CurrentBrush, (ovaldraw.X - widthamount), (ovaldraw.Y - heightamount), Math.Abs(ovaldraw.Width), Math.Abs(ovaldraw.Height)); + } + } + + if (currentlydrawingline == true) + { + GC.Collect(); + Graphics g = Graphics.FromImage(previewcanvasbitmap); + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + g = Graphics.FromImage(previewcanvasbitmap); + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), linewidth); + g.DrawLine(CurrentPen, linestartpointx, linestartpointy, thisPoint.X, thisPoint.Y); + } + + if (currentlydrawingtext == true) + { + GC.Collect(); + Graphics g = Graphics.FromImage(previewcanvasbitmap); + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + g = Graphics.FromImage(previewcanvasbitmap); + var CurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + g.TextRenderingHint = TextRenderingHint.SingleBitPerPixelGridFit; + drawtextfont = new System.Drawing.Font(drawtextfontname, drawtextsize, drawtextfontstyle); + g.DrawString(txtdrawstringtext.Text, drawtextfont, CurrentBrush, thisPoint.X, thisPoint.Y); + } + try + { + e.Graphics.DrawImage(canvasbitmap, 0, 0); + e.Graphics.DrawImage(previewcanvasbitmap, 0, 0); + } + catch + { + + } + } + + + + // ERROR: Handles clauses are not supported in C# + private void picdrawingdisplay_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) + { + undo.undoStack.Push((Image)canvasbitmap.Clone()); + undo.redoStack.Clear(); + + + thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; + + if (selectedtool == "Pixel Placer") + { + if (e.Button == MouseButtons.Left) + { + if (thisPoint.X < canvasbitmap.Width && thisPoint.X > -1) + { + if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) + { + canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour); + //set the pixel on the canvas + picdrawingdisplay.Invalidate(); + //refresh the picture from the canvas + } + } + } + } + + if (selectedtool == "Pencil") + { + if (e.Button == MouseButtons.Left) + { + mousePath.StartFigure(); + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Flood Fill") + { + if (e.Button == MouseButtons.Left) + { + if (thisPoint.X < canvasbitmap.Width && thisPoint.X > -1) + { + if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) + { + SafeFloodFill(canvasbitmap, thisPoint.X, thisPoint.Y, drawingcolour); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + picdrawingdisplay.Invalidate(); + } + } + } + } + + if (selectedtool == "Square _tool") + { + if (e.Button == MouseButtons.Left) + { + rectanglestartpointx = thisPoint.X; + rectanglestartpointy = thisPoint.Y; + currentlydrawingsquare = true; + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Oval _tool") + { + if (e.Button == MouseButtons.Left) + { + ovalstartpointx = thisPoint.X; + ovalstartpointy = thisPoint.Y; + currentlydrawingoval = true; + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Line _tool") + { + if (e.Button == MouseButtons.Left) + { + linestartpointx = thisPoint.X; + linestartpointy = thisPoint.Y; + currentlydrawingline = true; + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Text _tool") + { + if (e.Button == MouseButtons.Left) + { + currentlydrawingtext = true; + picdrawingdisplay.Invalidate(); + } + } + + if (selectedtool == "Eracer") + { + var CurrentPen = new Pen(Color.FromArgb(255, canvascolor), eracerwidth); + float halfsize = eracerwidth / 2; + if (eracertype == "circle") + { + graphicsbitmap.DrawEllipse(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); + } + else + { + graphicsbitmap.DrawRectangle(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); + } + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Paint Brush") + { + var CurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + float halfsize = paintbrushwidth / 2; + if (paintbrushtype == "circle") + { + graphicsbitmap.FillEllipse(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); + } + else + { + graphicsbitmap.FillRectangle(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); + } + picdrawingdisplay.Invalidate(); + CurrentBrush.Dispose(); + } + preparecooldown(); + } + + // ERROR: Handles clauses are not supported in C# + private void picdrawingdisplay_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) + { + Point lastpoint; + + thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; + + + if (e.Button == MouseButtons.Left) + { + undo.redoStack.Clear(); + lastpoint = thisPoint; + preparecooldown(); + + if (selectedtool == "Pixel Placer" && pixalplacermovable == true) + { + if (thisPoint.X < canvasbitmap.Width && thisPoint.X > -1) + { + if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) + { + canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour); + //set the pixel on the canvas + picdrawingdisplay.Invalidate(); + //refresh the picture from the canvas + } + } + } + + if (selectedtool == "Pencil") + { + mousePath.AddLine(thisPoint.X, thisPoint.Y, thisPoint.X, thisPoint.Y); + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), pencilwidth); + graphicsbitmap.DrawPath(CurrentPen, mousePath); + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Square _tool") + { + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Oval _tool") + { + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Line _tool") + { + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Text _tool") + { + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Eracer") + { + var CurrentPen = new Pen(Color.FromArgb(255, canvascolor), eracerwidth); + float halfsize = eracerwidth / 2; + if (eracertype == "circle") + { + graphicsbitmap.DrawEllipse(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); + } + else + { + graphicsbitmap.DrawRectangle(CurrentPen, thisPoint.X - halfsize, thisPoint.Y - halfsize, eracerwidth, eracerwidth); + } + picdrawingdisplay.Invalidate(); + } + + if (selectedtool == "Paint Brush") + { + var CurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + float halfsize = paintbrushwidth / 2; + if (paintbrushtype == "circle") + { + graphicsbitmap.FillEllipse(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); + } + else + { + graphicsbitmap.FillRectangle(CurrentBrush, thisPoint.X - halfsize, thisPoint.Y - halfsize, paintbrushwidth, paintbrushwidth); + } + picdrawingdisplay.Invalidate(); + } + } + + } + + + // ERROR: Handles clauses are not supported in C# + private void picdrawingdisplay_MouseUp(object sender, MouseEventArgs e) + { + thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; + + if (selectedtool == "Pencil") + { + if (e.Button == MouseButtons.Left) + { + mousePath.Reset(); + } + } + + if (selectedtool == "Square _tool") + { + picdrawingdisplay.Invalidate(); + currentlydrawingsquare = false; + } + + if (selectedtool == "Oval _tool") + { + picdrawingdisplay.Invalidate(); + currentlydrawingoval = false; + } + + + if (selectedtool == "Line _tool") + { + picdrawingdisplay.Invalidate(); + currentlydrawingline = false; + } + + if (selectedtool == "Text _tool") + { + picdrawingdisplay.Invalidate(); + currentlydrawingtext = false; + } + + using (Graphics g = Graphics.FromImage(canvasbitmap)) + { + g.DrawImage(previewcanvasbitmap, 0, 0); + } + previewcanvasbitmap = new Bitmap(canvasbitmap.Width, canvasbitmap.Height); + picdrawingdisplay.Invalidate(); + preparecooldown(); + + } + + #endregion + + #region Color Palettes + // ERROR: Handles clauses are not supported in C# + private void colourpalette1_MouseClick(object sender, MouseEventArgs e) + { + var s = (Control)sender; + if (e.Button == MouseButtons.Left) + { + drawingcolour = s.BackColor; + setuppreview(); + settoolcolours(); + } + else + { + AppearanceManager.SetupDialog(new ColorPicker(s.BackColor, "artpad_ Color", new Action((color) => { + s.BackColor = color; + }))); + } + } + + // + public void loadcolors() + { + /*bool allwhite = true; + for (int i = 0; i <= 127; i++) + { + if (ShiftOSDesktop.artpad_colour_palettes(i) == null) + { + } + else { + allwhite = false; + } + } + if (allwhite == true) + { + for (i = 0; i <= 127; i++) + { + ShiftOSDesktop.artpad_colour_palettes(i) = Color.Black; + } + } + colourpalette1.BackColor = ShiftOSDesktop.artpad_colour_palettes(0); + colourpalette2.BackColor = ShiftOSDesktop.artpad_colour_palettes(1); + colourpalette3.BackColor = ShiftOSDesktop.artpad_colour_palettes(2); + colourpalette4.BackColor = ShiftOSDesktop.artpad_colour_palettes(3); + colourpalette5.BackColor = ShiftOSDesktop.artpad_colour_palettes(4); + colourpalette6.BackColor = ShiftOSDesktop.artpad_colour_palettes(5); + colourpalette7.BackColor = ShiftOSDesktop.artpad_colour_palettes(6); + colourpalette8.BackColor = ShiftOSDesktop.artpad_colour_palettes(7); + colourpalette9.BackColor = ShiftOSDesktop.artpad_colour_palettes(8); + colourpalette10.BackColor = ShiftOSDesktop.artpad_colour_palettes(9); + colourpalette11.BackColor = ShiftOSDesktop.artpad_colour_palettes(10); + colourpalette12.BackColor = ShiftOSDesktop.artpad_colour_palettes(11); + colourpalette13.BackColor = ShiftOSDesktop.artpad_colour_palettes(12); + colourpalette14.BackColor = ShiftOSDesktop.artpad_colour_palettes(13); + colourpalette15.BackColor = ShiftOSDesktop.artpad_colour_palettes(14); + colourpalette16.BackColor = ShiftOSDesktop.artpad_colour_palettes(15); + colourpalette17.BackColor = ShiftOSDesktop.artpad_colour_palettes(16); + colourpalette18.BackColor = ShiftOSDesktop.artpad_colour_palettes(17); + colourpalette19.BackColor = ShiftOSDesktop.artpad_colour_palettes(18); + colourpalette20.BackColor = ShiftOSDesktop.artpad_colour_palettes(19); + colourpalette21.BackColor = ShiftOSDesktop.artpad_colour_palettes(20); + colourpalette22.BackColor = ShiftOSDesktop.artpad_colour_palettes(21); + colourpalette23.BackColor = ShiftOSDesktop.artpad_colour_palettes(22); + colourpalette24.BackColor = ShiftOSDesktop.artpad_colour_palettes(23); + colourpalette25.BackColor = ShiftOSDesktop.artpad_colour_palettes(24); + colourpalette26.BackColor = ShiftOSDesktop.artpad_colour_palettes(25); + colourpalette27.BackColor = ShiftOSDesktop.artpad_colour_palettes(26); + colourpalette28.BackColor = ShiftOSDesktop.artpad_colour_palettes(27); + colourpalette29.BackColor = ShiftOSDesktop.artpad_colour_palettes(28); + colourpalette30.BackColor = ShiftOSDesktop.artpad_colour_palettes(29); + colourpalette31.BackColor = ShiftOSDesktop.artpad_colour_palettes(30); + colourpalette32.BackColor = ShiftOSDesktop.artpad_colour_palettes(31); + colourpalette33.BackColor = ShiftOSDesktop.artpad_colour_palettes(32); + colourpalette34.BackColor = ShiftOSDesktop.artpad_colour_palettes(33); + colourpalette35.BackColor = ShiftOSDesktop.artpad_colour_palettes(34); + colourpalette36.BackColor = ShiftOSDesktop.artpad_colour_palettes(35); + colourpalette37.BackColor = ShiftOSDesktop.artpad_colour_palettes(36); + colourpalette38.BackColor = ShiftOSDesktop.artpad_colour_palettes(37); + colourpalette39.BackColor = ShiftOSDesktop.artpad_colour_palettes(38); + colourpalette40.BackColor = ShiftOSDesktop.artpad_colour_palettes(39); + colourpalette41.BackColor = ShiftOSDesktop.artpad_colour_palettes(40); + colourpalette42.BackColor = ShiftOSDesktop.artpad_colour_palettes(41); + colourpalette43.BackColor = ShiftOSDesktop.artpad_colour_palettes(42); + colourpalette44.BackColor = ShiftOSDesktop.artpad_colour_palettes(43); + colourpalette45.BackColor = ShiftOSDesktop.artpad_colour_palettes(44); + colourpalette46.BackColor = ShiftOSDesktop.artpad_colour_palettes(45); + colourpalette47.BackColor = ShiftOSDesktop.artpad_colour_palettes(46); + colourpalette48.BackColor = ShiftOSDesktop.artpad_colour_palettes(47); + colourpalette49.BackColor = ShiftOSDesktop.artpad_colour_palettes(48); + colourpalette50.BackColor = ShiftOSDesktop.artpad_colour_palettes(49); + colourpalette51.BackColor = ShiftOSDesktop.artpad_colour_palettes(50); + colourpalette52.BackColor = ShiftOSDesktop.artpad_colour_palettes(51); + colourpalette53.BackColor = ShiftOSDesktop.artpad_colour_palettes(52); + colourpalette54.BackColor = ShiftOSDesktop.artpad_colour_palettes(53); + colourpalette55.BackColor = ShiftOSDesktop.artpad_colour_palettes(54); + colourpalette56.BackColor = ShiftOSDesktop.artpad_colour_palettes(55); + colourpalette57.BackColor = ShiftOSDesktop.artpad_colour_palettes(56); + colourpalette58.BackColor = ShiftOSDesktop.artpad_colour_palettes(57); + colourpalette59.BackColor = ShiftOSDesktop.artpad_colour_palettes(58); + colourpalette60.BackColor = ShiftOSDesktop.artpad_colour_palettes(59); + colourpalette61.BackColor = ShiftOSDesktop.artpad_colour_palettes(60); + colourpalette62.BackColor = ShiftOSDesktop.artpad_colour_palettes(61); + colourpalette63.BackColor = ShiftOSDesktop.artpad_colour_palettes(62); + colourpalette64.BackColor = ShiftOSDesktop.artpad_colour_palettes(63); + colourpalette65.BackColor = ShiftOSDesktop.artpad_colour_palettes(64); + colourpalette66.BackColor = ShiftOSDesktop.artpad_colour_palettes(65); + colourpalette67.BackColor = ShiftOSDesktop.artpad_colour_palettes(66); + colourpalette68.BackColor = ShiftOSDesktop.artpad_colour_palettes(67); + colourpalette69.BackColor = ShiftOSDesktop.artpad_colour_palettes(68); + colourpalette70.BackColor = ShiftOSDesktop.artpad_colour_palettes(69); + colourpalette71.BackColor = ShiftOSDesktop.artpad_colour_palettes(70); + colourpalette72.BackColor = ShiftOSDesktop.artpad_colour_palettes(71); + colourpalette73.BackColor = ShiftOSDesktop.artpad_colour_palettes(72); + colourpalette74.BackColor = ShiftOSDesktop.artpad_colour_palettes(73); + colourpalette75.BackColor = ShiftOSDesktop.artpad_colour_palettes(74); + colourpalette76.BackColor = ShiftOSDesktop.artpad_colour_palettes(75); + colourpalette77.BackColor = ShiftOSDesktop.artpad_colour_palettes(76); + colourpalette78.BackColor = ShiftOSDesktop.artpad_colour_palettes(77); + colourpalette79.BackColor = ShiftOSDesktop.artpad_colour_palettes(78); + colourpalette80.BackColor = ShiftOSDesktop.artpad_colour_palettes(79); + colourpalette81.BackColor = ShiftOSDesktop.artpad_colour_palettes(80); + colourpalette82.BackColor = ShiftOSDesktop.artpad_colour_palettes(81); + colourpalette83.BackColor = ShiftOSDesktop.artpad_colour_palettes(82); + colourpalette84.BackColor = ShiftOSDesktop.artpad_colour_palettes(83); + colourpalette85.BackColor = ShiftOSDesktop.artpad_colour_palettes(84); + colourpalette86.BackColor = ShiftOSDesktop.artpad_colour_palettes(85); + colourpalette87.BackColor = ShiftOSDesktop.artpad_colour_palettes(86); + colourpalette88.BackColor = ShiftOSDesktop.artpad_colour_palettes(87); + colourpalette89.BackColor = ShiftOSDesktop.artpad_colour_palettes(88); + colourpalette90.BackColor = ShiftOSDesktop.artpad_colour_palettes(89); + colourpalette91.BackColor = ShiftOSDesktop.artpad_colour_palettes(90); + colourpalette92.BackColor = ShiftOSDesktop.artpad_colour_palettes(91); + colourpalette93.BackColor = ShiftOSDesktop.artpad_colour_palettes(92); + colourpalette94.BackColor = ShiftOSDesktop.artpad_colour_palettes(93); + colourpalette95.BackColor = ShiftOSDesktop.artpad_colour_palettes(94); + colourpalette96.BackColor = ShiftOSDesktop.artpad_colour_palettes(95); + colourpalette97.BackColor = ShiftOSDesktop.artpad_colour_palettes(96); + colourpalette98.BackColor = ShiftOSDesktop.artpad_colour_palettes(97); + colourpalette99.BackColor = ShiftOSDesktop.artpad_colour_palettes(98); + colourpalette100.BackColor = ShiftOSDesktop.artpad_colour_palettes(99); + colourpalette101.BackColor = ShiftOSDesktop.artpad_colour_palettes(100); + colourpalette102.BackColor = ShiftOSDesktop.artpad_colour_palettes(101); + colourpalette103.BackColor = ShiftOSDesktop.artpad_colour_palettes(102); + colourpalette104.BackColor = ShiftOSDesktop.artpad_colour_palettes(103); + colourpalette105.BackColor = ShiftOSDesktop.artpad_colour_palettes(104); + colourpalette106.BackColor = ShiftOSDesktop.artpad_colour_palettes(105); + colourpalette107.BackColor = ShiftOSDesktop.artpad_colour_palettes(106); + colourpalette108.BackColor = ShiftOSDesktop.artpad_colour_palettes(107); + colourpalette109.BackColor = ShiftOSDesktop.artpad_colour_palettes(108); + colourpalette110.BackColor = ShiftOSDesktop.artpad_colour_palettes(109); + colourpalette111.BackColor = ShiftOSDesktop.artpad_colour_palettes(110); + colourpalette112.BackColor = ShiftOSDesktop.artpad_colour_palettes(111); + colourpalette113.BackColor = ShiftOSDesktop.artpad_colour_palettes(112); + colourpalette114.BackColor = ShiftOSDesktop.artpad_colour_palettes(113); + colourpalette115.BackColor = ShiftOSDesktop.artpad_colour_palettes(114); + colourpalette116.BackColor = ShiftOSDesktop.artpad_colour_palettes(115); + colourpalette117.BackColor = ShiftOSDesktop.artpad_colour_palettes(116); + colourpalette118.BackColor = ShiftOSDesktop.artpad_colour_palettes(117); + colourpalette119.BackColor = ShiftOSDesktop.artpad_colour_palettes(118); + colourpalette120.BackColor = ShiftOSDesktop.artpad_colour_palettes(119); + colourpalette121.BackColor = ShiftOSDesktop.artpad_colour_palettes(120); + colourpalette122.BackColor = ShiftOSDesktop.artpad_colour_palettes(121); + colourpalette123.BackColor = ShiftOSDesktop.artpad_colour_palettes(122); + colourpalette124.BackColor = ShiftOSDesktop.artpad_colour_palettes(123); + colourpalette125.BackColor = ShiftOSDesktop.artpad_colour_palettes(124); + colourpalette126.BackColor = ShiftOSDesktop.artpad_colour_palettes(125); + colourpalette127.BackColor = ShiftOSDesktop.artpad_colour_palettes(126); + colourpalette128.BackColor = ShiftOSDesktop.artpad_colour_palettes(127); + */ + } + + public void savecolors() + {/* + ShiftOSDesktop.artpad_colour_palettes(0) = colourpalette1.BackColor; + ShiftOSDesktop.artpad_colour_palettes(1) = colourpalette2.BackColor; + ShiftOSDesktop.artpad_colour_palettes(2) = colourpalette3.BackColor; + ShiftOSDesktop.artpad_colour_palettes(3) = colourpalette4.BackColor; + ShiftOSDesktop.artpad_colour_palettes(4) = colourpalette5.BackColor; + ShiftOSDesktop.artpad_colour_palettes(5) = colourpalette6.BackColor; + ShiftOSDesktop.artpad_colour_palettes(6) = colourpalette7.BackColor; + ShiftOSDesktop.artpad_colour_palettes(7) = colourpalette8.BackColor; + ShiftOSDesktop.artpad_colour_palettes(8) = colourpalette9.BackColor; + ShiftOSDesktop.artpad_colour_palettes(9) = colourpalette10.BackColor; + ShiftOSDesktop.artpad_colour_palettes(10) = colourpalette11.BackColor; + ShiftOSDesktop.artpad_colour_palettes(11) = colourpalette12.BackColor; + ShiftOSDesktop.artpad_colour_palettes(12) = colourpalette13.BackColor; + ShiftOSDesktop.artpad_colour_palettes(13) = colourpalette14.BackColor; + ShiftOSDesktop.artpad_colour_palettes(14) = colourpalette15.BackColor; + ShiftOSDesktop.artpad_colour_palettes(15) = colourpalette16.BackColor; + ShiftOSDesktop.artpad_colour_palettes(16) = colourpalette17.BackColor; + ShiftOSDesktop.artpad_colour_palettes(17) = colourpalette18.BackColor; + ShiftOSDesktop.artpad_colour_palettes(18) = colourpalette19.BackColor; + ShiftOSDesktop.artpad_colour_palettes(19) = colourpalette20.BackColor; + ShiftOSDesktop.artpad_colour_palettes(20) = colourpalette21.BackColor; + ShiftOSDesktop.artpad_colour_palettes(21) = colourpalette22.BackColor; + ShiftOSDesktop.artpad_colour_palettes(22) = colourpalette23.BackColor; + ShiftOSDesktop.artpad_colour_palettes(23) = colourpalette24.BackColor; + ShiftOSDesktop.artpad_colour_palettes(24) = colourpalette25.BackColor; + ShiftOSDesktop.artpad_colour_palettes(25) = colourpalette26.BackColor; + ShiftOSDesktop.artpad_colour_palettes(26) = colourpalette27.BackColor; + ShiftOSDesktop.artpad_colour_palettes(27) = colourpalette28.BackColor; + ShiftOSDesktop.artpad_colour_palettes(28) = colourpalette29.BackColor; + ShiftOSDesktop.artpad_colour_palettes(29) = colourpalette30.BackColor; + ShiftOSDesktop.artpad_colour_palettes(30) = colourpalette31.BackColor; + ShiftOSDesktop.artpad_colour_palettes(31) = colourpalette32.BackColor; + ShiftOSDesktop.artpad_colour_palettes(32) = colourpalette33.BackColor; + ShiftOSDesktop.artpad_colour_palettes(33) = colourpalette34.BackColor; + ShiftOSDesktop.artpad_colour_palettes(34) = colourpalette35.BackColor; + ShiftOSDesktop.artpad_colour_palettes(35) = colourpalette36.BackColor; + ShiftOSDesktop.artpad_colour_palettes(36) = colourpalette37.BackColor; + ShiftOSDesktop.artpad_colour_palettes(37) = colourpalette38.BackColor; + ShiftOSDesktop.artpad_colour_palettes(38) = colourpalette39.BackColor; + ShiftOSDesktop.artpad_colour_palettes(39) = colourpalette40.BackColor; + ShiftOSDesktop.artpad_colour_palettes(40) = colourpalette41.BackColor; + ShiftOSDesktop.artpad_colour_palettes(41) = colourpalette42.BackColor; + ShiftOSDesktop.artpad_colour_palettes(42) = colourpalette43.BackColor; + ShiftOSDesktop.artpad_colour_palettes(43) = colourpalette44.BackColor; + ShiftOSDesktop.artpad_colour_palettes(44) = colourpalette45.BackColor; + ShiftOSDesktop.artpad_colour_palettes(45) = colourpalette46.BackColor; + ShiftOSDesktop.artpad_colour_palettes(46) = colourpalette47.BackColor; + ShiftOSDesktop.artpad_colour_palettes(47) = colourpalette48.BackColor; + ShiftOSDesktop.artpad_colour_palettes(48) = colourpalette49.BackColor; + ShiftOSDesktop.artpad_colour_palettes(49) = colourpalette50.BackColor; + ShiftOSDesktop.artpad_colour_palettes(50) = colourpalette51.BackColor; + ShiftOSDesktop.artpad_colour_palettes(51) = colourpalette52.BackColor; + ShiftOSDesktop.artpad_colour_palettes(52) = colourpalette53.BackColor; + ShiftOSDesktop.artpad_colour_palettes(53) = colourpalette54.BackColor; + ShiftOSDesktop.artpad_colour_palettes(54) = colourpalette55.BackColor; + ShiftOSDesktop.artpad_colour_palettes(55) = colourpalette56.BackColor; + ShiftOSDesktop.artpad_colour_palettes(56) = colourpalette57.BackColor; + ShiftOSDesktop.artpad_colour_palettes(57) = colourpalette58.BackColor; + ShiftOSDesktop.artpad_colour_palettes(58) = colourpalette59.BackColor; + ShiftOSDesktop.artpad_colour_palettes(59) = colourpalette60.BackColor; + ShiftOSDesktop.artpad_colour_palettes(60) = colourpalette61.BackColor; + ShiftOSDesktop.artpad_colour_palettes(61) = colourpalette62.BackColor; + ShiftOSDesktop.artpad_colour_palettes(62) = colourpalette63.BackColor; + ShiftOSDesktop.artpad_colour_palettes(63) = colourpalette64.BackColor; + ShiftOSDesktop.artpad_colour_palettes(64) = colourpalette65.BackColor; + ShiftOSDesktop.artpad_colour_palettes(65) = colourpalette66.BackColor; + ShiftOSDesktop.artpad_colour_palettes(66) = colourpalette67.BackColor; + ShiftOSDesktop.artpad_colour_palettes(67) = colourpalette68.BackColor; + ShiftOSDesktop.artpad_colour_palettes(68) = colourpalette69.BackColor; + ShiftOSDesktop.artpad_colour_palettes(69) = colourpalette70.BackColor; + ShiftOSDesktop.artpad_colour_palettes(70) = colourpalette71.BackColor; + ShiftOSDesktop.artpad_colour_palettes(71) = colourpalette72.BackColor; + ShiftOSDesktop.artpad_colour_palettes(72) = colourpalette73.BackColor; + ShiftOSDesktop.artpad_colour_palettes(73) = colourpalette74.BackColor; + ShiftOSDesktop.artpad_colour_palettes(74) = colourpalette75.BackColor; + ShiftOSDesktop.artpad_colour_palettes(75) = colourpalette76.BackColor; + ShiftOSDesktop.artpad_colour_palettes(76) = colourpalette77.BackColor; + ShiftOSDesktop.artpad_colour_palettes(77) = colourpalette78.BackColor; + ShiftOSDesktop.artpad_colour_palettes(78) = colourpalette79.BackColor; + ShiftOSDesktop.artpad_colour_palettes(79) = colourpalette80.BackColor; + ShiftOSDesktop.artpad_colour_palettes(80) = colourpalette81.BackColor; + ShiftOSDesktop.artpad_colour_palettes(81) = colourpalette82.BackColor; + ShiftOSDesktop.artpad_colour_palettes(82) = colourpalette83.BackColor; + ShiftOSDesktop.artpad_colour_palettes(83) = colourpalette84.BackColor; + ShiftOSDesktop.artpad_colour_palettes(84) = colourpalette85.BackColor; + ShiftOSDesktop.artpad_colour_palettes(85) = colourpalette86.BackColor; + ShiftOSDesktop.artpad_colour_palettes(86) = colourpalette87.BackColor; + ShiftOSDesktop.artpad_colour_palettes(87) = colourpalette88.BackColor; + ShiftOSDesktop.artpad_colour_palettes(88) = colourpalette89.BackColor; + ShiftOSDesktop.artpad_colour_palettes(89) = colourpalette90.BackColor; + ShiftOSDesktop.artpad_colour_palettes(90) = colourpalette91.BackColor; + ShiftOSDesktop.artpad_colour_palettes(91) = colourpalette92.BackColor; + ShiftOSDesktop.artpad_colour_palettes(92) = colourpalette93.BackColor; + ShiftOSDesktop.artpad_colour_palettes(93) = colourpalette94.BackColor; + ShiftOSDesktop.artpad_colour_palettes(94) = colourpalette95.BackColor; + ShiftOSDesktop.artpad_colour_palettes(95) = colourpalette96.BackColor; + ShiftOSDesktop.artpad_colour_palettes(96) = colourpalette97.BackColor; + ShiftOSDesktop.artpad_colour_palettes(97) = colourpalette98.BackColor; + ShiftOSDesktop.artpad_colour_palettes(98) = colourpalette99.BackColor; + ShiftOSDesktop.artpad_colour_palettes(99) = colourpalette100.BackColor; + ShiftOSDesktop.artpad_colour_palettes(100) = colourpalette101.BackColor; + ShiftOSDesktop.artpad_colour_palettes(101) = colourpalette102.BackColor; + ShiftOSDesktop.artpad_colour_palettes(102) = colourpalette103.BackColor; + ShiftOSDesktop.artpad_colour_palettes(103) = colourpalette104.BackColor; + ShiftOSDesktop.artpad_colour_palettes(104) = colourpalette105.BackColor; + ShiftOSDesktop.artpad_colour_palettes(105) = colourpalette106.BackColor; + ShiftOSDesktop.artpad_colour_palettes(106) = colourpalette107.BackColor; + ShiftOSDesktop.artpad_colour_palettes(107) = colourpalette108.BackColor; + ShiftOSDesktop.artpad_colour_palettes(108) = colourpalette109.BackColor; + ShiftOSDesktop.artpad_colour_palettes(109) = colourpalette110.BackColor; + ShiftOSDesktop.artpad_colour_palettes(110) = colourpalette111.BackColor; + ShiftOSDesktop.artpad_colour_palettes(111) = colourpalette112.BackColor; + ShiftOSDesktop.artpad_colour_palettes(112) = colourpalette113.BackColor; + ShiftOSDesktop.artpad_colour_palettes(113) = colourpalette114.BackColor; + ShiftOSDesktop.artpad_colour_palettes(114) = colourpalette115.BackColor; + ShiftOSDesktop.artpad_colour_palettes(115) = colourpalette116.BackColor; + ShiftOSDesktop.artpad_colour_palettes(116) = colourpalette117.BackColor; + ShiftOSDesktop.artpad_colour_palettes(117) = colourpalette118.BackColor; + ShiftOSDesktop.artpad_colour_palettes(118) = colourpalette119.BackColor; + ShiftOSDesktop.artpad_colour_palettes(119) = colourpalette120.BackColor; + ShiftOSDesktop.artpad_colour_palettes(120) = colourpalette121.BackColor; + ShiftOSDesktop.artpad_colour_palettes(121) = colourpalette122.BackColor; + ShiftOSDesktop.artpad_colour_palettes(122) = colourpalette123.BackColor; + ShiftOSDesktop.artpad_colour_palettes(123) = colourpalette124.BackColor; + ShiftOSDesktop.artpad_colour_palettes(124) = colourpalette125.BackColor; + ShiftOSDesktop.artpad_colour_palettes(125) = colourpalette126.BackColor; + ShiftOSDesktop.artpad_colour_palettes(126) = colourpalette127.BackColor; + ShiftOSDesktop.artpad_colour_palettes(127) = colourpalette128.BackColor; + */ + } + // + + public void settoolcolours() + { + btnpixelsetter.BackColor = drawingcolour; + btnpixelplacer.BackColor = drawingcolour; + btnpencil.BackColor = drawingcolour; + btnfloodfill.BackColor = drawingcolour; + btnsquare.BackColor = drawingcolour; + btnoval.BackColor = drawingcolour; + btnlinetool.BackColor = drawingcolour; + btnpaintbrush.BackColor = drawingcolour; + btntexttool.BackColor = drawingcolour; + } + #endregion + + #region Zooming + + // ERROR: Handles clauses are not supported in C# + private void btnzoomin_Click(object sender, EventArgs e) + { + if (magnificationlevel < 256) + { + magnificationlevel *= 2; + } + else + { + Infobox.Show("{ARTPAD_MAGNIFIER_ERROR}" + , "{ARTPAD_MAGNIFICATION_ERROR_EXP}"); + } + setmagnification(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnzoomout_Click(object sender, EventArgs e) + { + if (magnificationlevel > 1) + { + magnificationlevel /= 2; + pnldrawingbackground.AutoScrollPosition = new Point(0, 0); + } + else + { + Infobox.Show("{ARTPAD_MAGNIFIER_ERROR}" + , "{ARTPAD_MAGNIFICATION_ERROR_EXP_2}"); + } + setmagnification(); + } + + private void setmagnification() + { + magnifyRect.Width = (int)canvaswidth / magnificationlevel; + magnifyRect.Height = (int)canvasheight / magnificationlevel; + picdrawingdisplay.Size = new Size(canvaswidth * magnificationlevel, canvasheight * magnificationlevel); + if (picdrawingdisplay.Height > 468 && picdrawingdisplay.Width > 676) + { + picdrawingdisplay.Location = new Point(0, 0); + } + else + { + picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth * magnificationlevel) / 2, (pnldrawingbackground.Height - canvasheight * magnificationlevel) / 2); + } + picdrawingdisplay.Invalidate(); + lblzoomlevel.Text = magnificationlevel + "X"; + } + + #endregion + + #region Pixel Placer + + // ERROR: Handles clauses are not supported in C# + private void pnlpixelplacer_Click(object sender, EventArgs e) + { + selectedtool = "Pixel Placer"; + gettoolsettings(pnlpixelplacersettings); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpixelplacermovementmode_Click(object sender, EventArgs e) + { + if (pixalplacermovable == false) + { + pixalplacermovable = true; + btnpixelplacermovementmode.ForeColor = Color.White; + btnpixelplacermovementmode.BackColor = Color.Black; + btnpixelplacermovementmode.Text = "Deactivate Movement Mode"; + lblpixelplacerhelp.Text = "Movement mode is enabled. Click and drag on the canvas to place pixels as you move the mouse. Please use 4x magnification or greater and move the mouse very slowly."; + } + else + { + pixalplacermovable = false; + btnpixelplacermovementmode.ForeColor = Color.Black; + btnpixelplacermovementmode.BackColor = Color.White; + btnpixelplacermovementmode.Text = "Activate Movement Mode"; + lblpixelplacerhelp.Text = "This tool does not contain any alterable settings. Simply click on the canvas and a pixel will be placed in the spot you click."; + } + } + + #endregion + + #region Saving + + // ERROR: Handles clauses are not supported in C# + private void btnsave_Click(object sender, EventArgs e) + { + showsavedialog(); + } + + public void showsavedialog() + { + AppearanceManager.SetupDialog(new FileDialog(new[] { ".pic" }, FileOpenerStyle.Save, new Action((file) => + { + var res = file; + savelocation = res; + saveimage(); + }))); + } + + public void saveimage() + { + var ms = new MemoryStream(); + canvasbitmap.Save(ms, ImageFormat.Bmp); + Utils.WriteAllBytes(this.savelocation, ms.ToArray()); + ms.Close(); + } + #endregion + + #region New Canvas + + // ERROR: Handles clauses are not supported in C# + private void txtnewcanvaswidth_TextChanged(object sender, EventArgs e) + { + if (txtnewcanvaswidth.Text == "" | txtnewcanvasheight.Text == "") + { + if (txtnewcanvasheight.Text == "") + { + txtnewcanvasheight.Text = "0"; + } + if (txtnewcanvaswidth.Text == "") + { + txtnewcanvaswidth.Text = "0"; + } + } + else + { + try + { + lbltotalpixels.Text = (Convert.ToInt32(txtnewcanvaswidth.Text) * Convert.ToInt32(txtnewcanvasheight.Text)).ToString(); + if (ShiftoriumFrontend.UpgradeInstalled("artpad_limitless_pixels") == true) + { + lbltotalpixels.ForeColor = Color.Black; + } + else + { + if ((Convert.ToInt32(txtnewcanvaswidth.Text) * Convert.ToInt32(txtnewcanvasheight.Text)) > GetPixelLimit()) + { + lbltotalpixels.ForeColor = Color.Red; + } + else + { + lbltotalpixels.ForeColor = Color.Black; + } + } + } + catch + { + + } + } + + } + + public int GetPixelLimit() + { + int value = 2; + + + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_limit_4")) + { + value = 4; + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_limit_8")) + { + value = 8; + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_limit_16")) + { + value = 16; + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_limit_64")) + { + value = 64; + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_limit_256")) + { + value = 256; + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_limit_1024")) + { + value = 1024; + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_limit_4096")) + { + value = 4096; + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_limit_16384")) + { + value = 16384; + if (ShiftoriumFrontend.UpgradeInstalled("artpad_pixel_limit_65536")) + { + value = 65536; + } + } + } + } + } + } + } + } + } + + return value; + } + + // ERROR: Handles clauses are not supported in C# + private void btncreate_Click(object sender, EventArgs e) + { + if (lbltotalpixels.ForeColor == Color.Red) + { + Infobox.Show("{ARTPAD_ERROR}", "{ARTPAD_IMAGE_TOO_BIG}"); + } + else + { + if (lbltotalpixels.Text == "0") + { + } + else + { + canvaswidth = Convert.ToInt32(txtnewcanvaswidth.Text); + canvasheight = Convert.ToInt32(txtnewcanvasheight.Text); + picdrawingdisplay.Show(); + setupcanvas(); + pnlinitialcanvassettings.Hide(); + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void btncancel_Click(object sender, EventArgs e) + { + pnlinitialcanvassettings.Hide(); + picdrawingdisplay.Hide(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnnew_Click(object sender, EventArgs e) + { + pnlinitialcanvassettings.Show(); + picdrawingdisplay.Hide(); + } + + #endregion + + #region Preview + + public void setuppreview() + { + lbltoolselected.Text = selectedtool; + picpreview.CreateGraphics().FillRectangle(Brushes.White, 0, 0, 70, 50); + switch (selectedtool) + { + case "Square _tool": + var CurrentPen = new Pen(Color.FromArgb(255, drawingcolour), squarewidth); + var CurrentBrush = new SolidBrush(Color.FromArgb(255, fillsquarecolor)); + RectangleF rectdraw = new RectangleF(0, 0, picpreview.Width, picpreview.Height); + float correctionamount = squarewidth / 2; + if (squarewidth > 0) + { + picpreview.CreateGraphics().DrawRectangle(CurrentPen, rectdraw.X + correctionamount, rectdraw.Y + correctionamount, rectdraw.Width - squarewidth, rectdraw.Height - squarewidth); + } + if (squarefillon == true) + { + picpreview.CreateGraphics().FillRectangle(CurrentBrush, rectdraw.X + squarewidth, rectdraw.Y + squarewidth, rectdraw.Width - squarewidth - squarewidth, rectdraw.Height - squarewidth - squarewidth); + } + break; + case "Oval _tool": + var ovalCurrentPen = new Pen(Color.FromArgb(255, drawingcolour), ovalwidth); + var ovalCurrentBrush = new SolidBrush(Color.FromArgb(255, fillovalcolor)); + RectangleF ovalrectdraw = new RectangleF(0, 0, picpreview.Width, picpreview.Height); + float ovalcorrectionamount = ovalwidth / 2; + if (ovalwidth > 0) + { + picpreview.CreateGraphics().DrawEllipse(ovalCurrentPen, ovalrectdraw.X + ovalcorrectionamount, ovalrectdraw.Y + ovalcorrectionamount, ovalrectdraw.Width - ovalwidth, ovalrectdraw.Height - ovalwidth); + } + if (ovalfillon == true) + { + float fixer = ovalwidth / 2; + picpreview.CreateGraphics().FillEllipse(ovalCurrentBrush, (ovalrectdraw.X + fixer), (ovalrectdraw.Y + fixer), ovalrectdraw.Width - fixer - fixer, ovalrectdraw.Height - fixer - fixer); + } + break; + case "Text _tool": + var textCurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + drawtextfont = new System.Drawing.Font(drawtextfontname, 20, drawtextfontstyle); + picpreview.CreateGraphics().DrawString("A", drawtextfont, textCurrentBrush, 20, 0); + break; + case "Line _tool": + var lineCurrentPen = new Pen(Color.FromArgb(255, drawingcolour), linewidth); + picpreview.CreateGraphics().DrawLine(lineCurrentPen, 0, 0, picpreview.Width, picpreview.Height); + break; + case "Pencil": + var pencilCurrentPen = new Pen(Color.FromArgb(255, drawingcolour), pencilwidth); + picpreview.CreateGraphics().DrawLine(pencilCurrentPen, 0, 25, picpreview.Width, 25); + break; + case "Paint Brush": + var pbCurrentBrush = new SolidBrush(Color.FromArgb(255, drawingcolour)); + float halfsize = paintbrushwidth / 2; + float halfwidth = picdrawingdisplay.Width / 2; + float halfheight = picdrawingdisplay.Height / 2; + if (paintbrushtype == "circle") + { + picpreview.CreateGraphics().FillEllipse(pbCurrentBrush, halfwidth - 15 - halfsize, halfheight - 1 - halfsize, paintbrushwidth, paintbrushwidth); + } + else + { + picpreview.CreateGraphics().FillRectangle(pbCurrentBrush, halfwidth - 15 - halfsize, halfheight - 1 - halfsize, paintbrushwidth, paintbrushwidth); + } + break; + case "Eracer": + System.Drawing.SolidBrush drawbrush = new System.Drawing.SolidBrush(drawingcolour); + picpreview.CreateGraphics().FillRectangle(drawbrush, 0, 0, picpreview.Width, picpreview.Height); + var eCurrentBrush = new SolidBrush(Color.FromArgb(255, Color.White)); + float ehalfsize = eracerwidth / 2; + float ehalfwidth = picdrawingdisplay.Width / 2; + float ehalfheight = picdrawingdisplay.Height / 2; + if (eracertype == "circle") + { + picpreview.CreateGraphics().FillEllipse(eCurrentBrush, ehalfwidth - 15 - ehalfsize, ehalfheight - ehalfsize, eracerwidth, eracerwidth); + } + else + { + picpreview.CreateGraphics().FillRectangle(eCurrentBrush, ehalfwidth - 15 - ehalfsize, ehalfheight - ehalfsize, eracerwidth, eracerwidth); + } + break; + default: + System.Drawing.SolidBrush ddrawbrush = new System.Drawing.SolidBrush(drawingcolour); + picpreview.CreateGraphics().FillRectangle(ddrawbrush, 0, 0, picpreview.Width, picpreview.Height); + ddrawbrush.Dispose(); + break; + } + } + + #endregion + + #region Pencil + + // ERROR: Handles clauses are not supported in C# + private void btnpencil_Click(object sender, EventArgs e) + { + selectedtool = "Pencil"; + gettoolsettings(pnlpencilsettings); + } + + // ERROR: Handles clauses are not supported in C# + private void ChangePencilSize(object sender, EventArgs e) + { + var s = (Control)sender; + switch (s.Name.ToString()) + { + case "btnpencilsize1": + pencilwidth = 1; + break; + case "btnpencilsize2": + pencilwidth = 2; + break; + case "btnpencilsize3": + pencilwidth = 3; + break; + } + setuppreview(); + } + + #endregion + + #region Undo/Redo + + // ERROR: Handles clauses are not supported in C# + private void btnundo_Click(object sender, EventArgs e) + { + try + { + undo.redoStack.Push((Image)canvasbitmap.Clone()); + canvasbitmap = (Bitmap)undo.undoStack.Pop(); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + picdrawingdisplay.Invalidate(); + } + catch + { + Infobox.Show("{ARTPAD_UNDO_ERROR}" + , "{ARTPAD_NEXT_STEP_WILL_KILL_CANVAS_JUST_FLIPPING_CLICK_NEW}"); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnredo_Click(object sender, EventArgs e) + { + try + { + undo.undoStack.Push((Image)canvasbitmap.Clone()); + canvasbitmap = (Bitmap)undo.redoStack.Pop(); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + picdrawingdisplay.Invalidate(); + } + catch + { + Infobox.Show("{ARTPAD_REDO_ERROR}" + , "{ARTPAD_NOTHING_TO_REDO}"); + } + } + + #endregion + + #region File Loading + + // ERROR: Handles clauses are not supported in C# + private void btnopen_Click(object sender, EventArgs e) + { + AppearanceManager.SetupDialog(new FileDialog(new[] { ".pic" }, FileOpenerStyle.Open, new Action((file) => + { + string res = file; + savelocation = res; + openpic(); + }))); + } + + public void openpic() + { + pnlinitialcanvassettings.Hide(); + picdrawingdisplay.Show(); + magnificationlevel = 1; + setmagnification(); + canvasbitmap = (Bitmap)SkinEngine.ImageFromBinary(Utils.ReadAllBytes(savelocation)); + canvasheight = canvasbitmap.Height; + canvaswidth = canvasbitmap.Width; + picdrawingdisplay.Size = new Size(canvaswidth, canvasheight); + picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth) / 2, (pnldrawingbackground.Height - canvasheight) / 2); + graphicsbitmap = Graphics.FromImage(canvasbitmap); + picdrawingdisplay.Invalidate(); + } + + #endregion + + #region Flood Fill + + // Flood fill the point. + public void SafeFloodFill(Bitmap bm, int x, int y, Color new_color) + { + // Get the old and new colors. + Color old_color = bm.GetPixel(x, y); + + // The following "If Then" test was added by Reuben + // Jollif + // to protect the code in case the start pixel + // has the same color as the fill color. + if (old_color.ToArgb() != new_color.ToArgb()) + { + // Start with the original point in the stack. + Stack pts = new Stack(1000); + pts.Push(new Point(x, y)); + bm.SetPixel(x, y, new_color); + + // While the stack is not empty, process a point. + while (pts.Count > 0) + { + Point pt = (Point)pts.Pop(); + if (pt.X > 0) + SafeCheckPoint(bm, pts, pt.X - 1, pt.Y, old_color, new_color); + + if (pt.Y > 0) + SafeCheckPoint(bm, pts, pt.X, pt.Y - 1, old_color, new_color); + if (pt.X < bm.Width - 1) + SafeCheckPoint(bm, pts, pt.X + 1, pt.Y, old_color, new_color); + if (pt.Y < bm.Height - 1) + SafeCheckPoint(bm, pts, pt.X, pt.Y + 1, old_color, new_color); + } + } + } + + // See if this point should be added to the stack. + private void SafeCheckPoint(Bitmap bm, Stack pts, int x, int y, Color old_color, Color new_color) + { + Color clr = bm.GetPixel(x, y); + if (clr.Equals(old_color)) + { + pts.Push(new Point(x, y)); + bm.SetPixel(x, y, new_color); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnfill_Click(object sender, EventArgs e) + { + selectedtool = "Flood Fill"; + gettoolsettings(pnlfloodfillsettings); + } + + #endregion + + #region Shapes + + // ERROR: Handles clauses are not supported in C# + private void btnsquare_Click(object sender, EventArgs e) + { + selectedtool = "Square _tool"; + gettoolsettings(pnlsquaretoolsettings); + txtsquareborderwidth.Text = squarewidth.ToString(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtsquareborderwidth_TextChanged(object sender, EventArgs e) + { + if (txtsquareborderwidth.Text == "") + { + } + else + { + squarewidth = (Convert.ToInt32(txtsquareborderwidth.Text)); + setuppreview(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlsquarefillcolour_Click(object sender, EventArgs e) + { + pnlsquarefillcolour.BackColor = drawingcolour; + fillsquarecolor = drawingcolour; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnsquarefillonoff_Click(object sender, EventArgs e) + { + if (squarefillon == true) + { + btnsquarefillonoff.Text = "Fill OFF"; + btnsquarefillonoff.BackColor = Color.White; + btnsquarefillonoff.ForeColor = Color.Black; + squarefillon = false; + } + else + { + btnsquarefillonoff.Text = "Fill ON"; + btnsquarefillonoff.BackColor = Color.Black; + btnsquarefillonoff.ForeColor = Color.White; + squarefillon = true; + } + txtsquareborderwidth.Text = squarewidth.ToString(); + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnoval_Click(object sender, EventArgs e) + { + selectedtool = "Oval _tool"; + gettoolsettings(pnlovaltoolsettings); + txtovalborderwidth.Text = ovalwidth.ToString(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtovalborderwidth_TextChanged(object sender, EventArgs e) + { + if (txtovalborderwidth.Text == "") + { + } + else + { + ovalwidth = (Convert.ToInt32(txtovalborderwidth.Text)); + setuppreview(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlovalfillcolour_Click(object sender, EventArgs e) + { + pnlovalfillcolour.BackColor = drawingcolour; + fillovalcolor = drawingcolour; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnovalfillonoff_Click(object sender, EventArgs e) + { + if (ovalfillon == true) + { + btnovalfillonoff.Text = "Fill OFF"; + btnovalfillonoff.BackColor = Color.White; + btnovalfillonoff.ForeColor = Color.Black; + ovalfillon = false; + } + else + { + btnovalfillonoff.Text = "Fill ON"; + btnovalfillonoff.BackColor = Color.Black; + btnovalfillonoff.ForeColor = Color.White; + ovalfillon = true; + } + txtovalborderwidth.Text = ovalwidth.ToString(); + setuppreview(); + } + #endregion + + #region Eraser + + // ERROR: Handles clauses are not supported in C# + private void btneracer_Click(object sender, EventArgs e) + { + selectedtool = "Eracer"; + gettoolsettings(pnleracertoolsettings); + txteracersize.Text = eracerwidth.ToString(); + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void txteracersize_TextChanged(object sender, EventArgs e) + { + if (txteracersize.Text == "") + { + } + else + { + try + { + eracerwidth = (Convert.ToInt32(txteracersize.Text)); + } + catch + { + txteracersize.Text = eracerwidth.ToString(); + } + } + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btneracercircle_Click(object sender, EventArgs e) + { + eracertype = "circle"; + btneracercircle.BackgroundImage = Properties.Resources.ArtPadcirclerubberselected; + btneracersquare.BackgroundImage = Properties.Resources.ArtPadsquarerubber; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btneracersquare_Click(object sender, EventArgs e) + { + eracertype = "square"; + btneracercircle.BackgroundImage = Properties.Resources.ArtPadcirclerubber; + btneracersquare.BackgroundImage = Properties.Resources.ArtPadsquarerubberselected; + setuppreview(); + } + + #endregion + + #region Line + + // ERROR: Handles clauses are not supported in C# + private void btnlinetool_Click(object sender, EventArgs e) + { + selectedtool = "Line _tool"; + gettoolsettings(pnllinetoolsettings); + txtlinewidth.Text = linewidth.ToString(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtlinewidth_TextChanged(object sender, EventArgs e) + { + if (txtlinewidth.Text == "") + { + } + else + { + linewidth = (Convert.ToInt32(txtlinewidth.Text)); + } + setuppreview(); + } + + #endregion + + #region Text + + // ERROR: Handles clauses are not supported in C# + private void btntexttool_Click(object sender, EventArgs e) + { + selectedtool = "Text _tool"; + gettoolsettings(pnltexttoolsettings); + } + + // ERROR: Handles clauses are not supported in C# + private void txtdrawtextsize_TextChanged(object sender, EventArgs e) + { + if (txtdrawtextsize.Text == "") + { + } + else + { + drawtextsize = Convert.ToInt32(txtdrawtextsize.Text); + } + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void combodrawtextfont_SelectedIndexChanged(object sender, EventArgs e) + { + drawtextfontname = combodrawtextfont.Text; + txtdrawstringtext.Focus(); + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void combofontstyle_SelectedIndexChanged(object sender, EventArgs e) + { + switch (combofontstyle.Text) + { + case "Bold": + drawtextfontstyle = FontStyle.Bold; + break; + case "Italic": + drawtextfontstyle = FontStyle.Italic; + break; + case "Regular": + drawtextfontstyle = FontStyle.Regular; + break; + case "Strikeout": + drawtextfontstyle = FontStyle.Strikeout; + break; + case "Underline": + drawtextfontstyle = FontStyle.Underline; + break; + } + txtdrawstringtext.Focus(); + setuppreview(); + } + #endregion + + #region Paintbrush + + // ERROR: Handles clauses are not supported in C# + private void txtpaintbrushsize_TextChanged(object sender, EventArgs e) + { + if (txtpaintbrushsize.Text == "") + { + } + else + { + paintbrushwidth = (Convert.ToInt32(txtpaintbrushsize.Text)); + } + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpaintsquareshape_Click(object sender, EventArgs e) + { + paintbrushtype = "square"; + btnpaintcircleshape.BackgroundImage = Properties.Resources.ArtPadcirclerubber; + btnpaintsquareshape.BackgroundImage = Properties.Resources.ArtPadsquarerubberselected; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpaintcircleshape_Click(object sender, EventArgs e) + { + paintbrushtype = "circle"; + btnpaintcircleshape.BackgroundImage = Properties.Resources.ArtPadcirclerubberselected; + btnpaintsquareshape.BackgroundImage = Properties.Resources.ArtPadsquarerubber; + setuppreview(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnpaintbrush_Click(object sender, EventArgs e) + { + selectedtool = "Paint Brush"; + gettoolsettings(pnlpaintbrushtoolsettings); + txtpaintbrushsize.Text = paintbrushwidth.ToString(); + setuppreview(); + } + + #endregion + + #region Codepoints + + private void preparecooldown() + { + needtosave = true; + if (codepointscooldown == true) + { + } + else + { + codepointsearned = codepointsearned + 1; + codepointscooldown = true; + tmrcodepointcooldown.Start(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void tmrcodepointcooldown_Tick(object sender, EventArgs e) + { + codepointscooldown = false; + tmrcodepointcooldown.Stop(); + } + + // ERROR: Handles clauses are not supported in C# + private void tmrshowearnedcodepoints_Tick(object sender, EventArgs e) + { + tmrshowearnedcodepoints.Stop(); + } + + #endregion + + #region More UI stuff + + public void determinevisiblepalettes() + { + int panelstoadd = 2; + + if (ShiftoriumFrontend.UpgradeInstalled("artpad_4_color_palettes") == true) + { + panelstoadd = 4; + } + if (ShiftoriumFrontend.UpgradeInstalled("artpad_8_color_palettes") == true) + { + panelstoadd = 8; + } + if (ShiftoriumFrontend.UpgradeInstalled("artpad_16_color_palettes") == true) + { + panelstoadd = 16; + } + if (ShiftoriumFrontend.UpgradeInstalled("artpad_32_color_palettes") == true) + { + panelstoadd = 32; + } + if (ShiftoriumFrontend.UpgradeInstalled("artpad_64_color_palettes") == true) + { + panelstoadd = 64; + } + if (ShiftoriumFrontend.UpgradeInstalled("artpad_128_color_palettes") == true) + { + panelstoadd = 128; + } + flowcolours.Controls.Clear(); + for (int i = 0; i < panelstoadd; i++) + { + Panel pnl = new Panel(); + pnl.BackColor = Color.Black; + pnl.Size = new Size(12, 8); + flowcolours.Controls.Add(pnl); + pnl.Margin = new Padding(1, 0, 0, 1); + pnl.MouseClick += new MouseEventHandler(this.colourpalette1_MouseClick); + pnl.Show(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnchangesizecancel_Click(object sender, EventArgs e) + { + pnlpalettesize.Hide(); + } + + #endregion + + #region More Text Stuff + + // ERROR: Handles clauses are not supported in C# + private void txtdrawstringtext_TextChanged(object sender, EventArgs e) + { + setuppreview(); + } + + #endregion + + private void tmrsetupui_Tick(object sender, EventArgs e) + { + } + + private void btnpixelplacer_Click(object sender, EventArgs e) + { + selectedtool = "Pixel Placer"; + gettoolsettings(pnlpixelplacersettings); + } + + public void OnLoad() + { + + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } + + public class undo + { + public Stack undoStack = new Stack(); + public Stack redoStack = new Stack(); + + } +} diff --git a/ShiftOS.WinForms/Applications/Artpad.resx b/ShiftOS.WinForms/Applications/Artpad.resx new file mode 100644 index 0000000..4175077 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Artpad.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 197, 17 + + + 394, 17 + + + 478, 17 + + + 591, 17 + + + 685, 17 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Chat.Designer.cs b/ShiftOS.WinForms/Applications/Chat.Designer.cs new file mode 100644 index 0000000..1704ee6 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Chat.Designer.cs @@ -0,0 +1,86 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class Chat + { + /// + /// 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.panel1 = new System.Windows.Forms.Panel(); + this.txtuserinput = new System.Windows.Forms.TextBox(); + this.rtbchat = new System.Windows.Forms.RichTextBox(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.rtbchat); + this.panel1.Controls.Add(this.txtuserinput); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(633, 318); + this.panel1.TabIndex = 0; + // + // txtuserinput + // + this.txtuserinput.Dock = System.Windows.Forms.DockStyle.Bottom; + this.txtuserinput.Location = new System.Drawing.Point(0, 298); + this.txtuserinput.Name = "txtuserinput"; + this.txtuserinput.Size = new System.Drawing.Size(633, 20); + this.txtuserinput.TabIndex = 0; + this.txtuserinput.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtuserinput_KeyDown); + // + // rtbchat + // + this.rtbchat.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtbchat.Location = new System.Drawing.Point(0, 0); + this.rtbchat.Name = "rtbchat"; + this.rtbchat.Size = new System.Drawing.Size(633, 298); + this.rtbchat.TabIndex = 1; + this.rtbchat.Text = ""; + this.rtbchat.KeyDown += new System.Windows.Forms.KeyEventHandler(this.richTextBox1_KeyDown); + // + // Chat + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.panel1); + this.Name = "Chat"; + this.Text = "Chat"; + this.Size = new System.Drawing.Size(633, 318); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.RichTextBox rtbchat; + private System.Windows.Forms.TextBox txtuserinput; + } +} diff --git a/ShiftOS.WinForms/Applications/Chat.cs b/ShiftOS.WinForms/Applications/Chat.cs new file mode 100644 index 0000000..3fb68e3 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Chat.cs @@ -0,0 +1,93 @@ +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 Newtonsoft.Json; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications +{ + [MultiplayerOnly] + [Launcher("MUD Chat", true, "al_mud_chat")] + [RequiresUpgrade("mud_fundamentals")] + [WinOpen("chat")] + public partial class Chat : UserControl, IShiftOSWindow + { + public Chat(string chatId) + { + InitializeComponent(); + id = chatId; + ServerManager.MessageReceived += (msg) => + { + if (msg.Name == "cbroadcast") + { + try + { + this.Invoke(new Action(() => + { + rtbchat.Text += msg.Contents + Environment.NewLine; + })); + } + catch { } + } + }; + } + + private string id = ""; + + public void OnLoad() + { + var save = SaveSystem.CurrentSave; + ServerManager.SendMessage("chat_join", $@"{{ + id: ""{id}"", + user: {JsonConvert.SerializeObject(save)} +}}"); + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + var save = SaveSystem.CurrentSave; + ServerManager.SendMessage("chat_leave", $@"{{ + id: ""{id}"", + user: {JsonConvert.SerializeObject(save)} +}}"); + + return true; + } + + public void OnUpgrade() + { + } + + private void richTextBox1_KeyDown(object sender, KeyEventArgs e) + { + e.SuppressKeyPress = true; + } + + private void txtuserinput_KeyDown(object sender, KeyEventArgs e) + { + if(e.KeyCode == Keys.Enter) + { + e.SuppressKeyPress = true; + + var save = SaveSystem.CurrentSave; + + ServerManager.SendMessage("chat", $@"{{ + id: ""{id}"", + user: {JsonConvert.SerializeObject(save)}, + msg: ""{txtuserinput.Text}"" +}}"); + txtuserinput.Text = ""; + } + } + } +} diff --git a/ShiftOS.WinForms/Applications/Chat.resx b/ShiftOS.WinForms/Applications/Chat.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Chat.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/CoherenceOverlay.Designer.cs b/ShiftOS.WinForms/Applications/CoherenceOverlay.Designer.cs new file mode 100644 index 0000000..a47ad43 --- /dev/null +++ b/ShiftOS.WinForms/Applications/CoherenceOverlay.Designer.cs @@ -0,0 +1,37 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class CoherenceOverlay + { + /// + /// 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() + { + components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + } + + #endregion + } +} diff --git a/ShiftOS.WinForms/Applications/CoherenceOverlay.cs b/ShiftOS.WinForms/Applications/CoherenceOverlay.cs new file mode 100644 index 0000000..1eaa89d --- /dev/null +++ b/ShiftOS.WinForms/Applications/CoherenceOverlay.cs @@ -0,0 +1,99 @@ +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 System.Threading; + +namespace ShiftOS.WinForms.Applications +{ + public partial class CoherenceOverlay : UserControl, IShiftOSWindow + { + public CoherenceOverlay(IntPtr handle, CoherenceCommands.RECT rect) + { + InitializeComponent(); + this.Load += (o, a) => + { + try + { + int left = this.ParentForm.Left; + int top = this.ParentForm.Top; + int oldwidth = this.ParentForm.Width; + int oldheight = this.ParentForm.Height; + + var t = new Thread(new ThreadStart(() => + { + while (CoherenceCommands.GetWindowRect(handle, ref rect)) + { + + if (left != rect.Left - SkinEngine.LoadedSkin.LeftBorderWidth) + { + this.Invoke(new Action(() => + { + this.ParentForm.Left = rect.Left - SkinEngine.LoadedSkin.LeftBorderWidth; + left = rect.Left - SkinEngine.LoadedSkin.LeftBorderWidth; + })); + } + if (top != rect.Top - SkinEngine.LoadedSkin.TitlebarHeight) + { + this.Invoke(new Action(() => + { + + this.ParentForm.Top = rect.Top - SkinEngine.LoadedSkin.TitlebarHeight; + top = rect.Top - SkinEngine.LoadedSkin.TitlebarHeight; + })); + } + int width = (rect.Right - rect.Left) + 1; + int height = (rect.Bottom - rect.Top) + 1; + + if (oldheight != SkinEngine.LoadedSkin.TitlebarHeight + height + SkinEngine.LoadedSkin.BottomBorderWidth) + { + this.Invoke(new Action(() => + { + this.ParentForm.Height = SkinEngine.LoadedSkin.TitlebarHeight + height + SkinEngine.LoadedSkin.BottomBorderWidth; + oldheight = SkinEngine.LoadedSkin.TitlebarHeight + height + SkinEngine.LoadedSkin.BottomBorderWidth; + })); + } + if (oldwidth != SkinEngine.LoadedSkin.LeftBorderWidth + width + SkinEngine.LoadedSkin.RightBorderWidth) + { + this.Invoke(new Action(() => + { + this.ParentForm.Width = SkinEngine.LoadedSkin.LeftBorderWidth + width + SkinEngine.LoadedSkin.RightBorderWidth; + oldwidth = SkinEngine.LoadedSkin.LeftBorderWidth + width + SkinEngine.LoadedSkin.RightBorderWidth; + })); + } + } + })); + t.IsBackground = true; + t.Start(); + } + catch + { + + } + }; + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } +} diff --git a/ShiftOS.WinForms/Applications/ColorPicker.Designer.cs b/ShiftOS.WinForms/Applications/ColorPicker.Designer.cs new file mode 100644 index 0000000..7a00b8b --- /dev/null +++ b/ShiftOS.WinForms/Applications/ColorPicker.Designer.cs @@ -0,0 +1,3570 @@ +using ShiftOS.WinForms.Controls; + +namespace ShiftOS.WinForms.Applications +{ + partial class ColorPicker + { + /// + /// 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); + } + + private void InitializeComponent() + { + this.pgcontents = new System.Windows.Forms.Panel(); + this.pnlpinkcolours = new System.Windows.Forms.Panel(); + this.pnlpinkoptions = new System.Windows.Forms.Panel(); + this.Label35 = new System.Windows.Forms.Label(); + this.txtpinksgreen = new System.Windows.Forms.TextBox(); + this.txtpinksred = new System.Windows.Forms.TextBox(); + this.Label36 = new System.Windows.Forms.Label(); + this.Label37 = new System.Windows.Forms.Label(); + this.txtpinksblue = new System.Windows.Forms.TextBox(); + this.pnlpinkcustomcolour = new System.Windows.Forms.Panel(); + this.pnlpink16 = new System.Windows.Forms.Panel(); + this.pnlpink12 = new System.Windows.Forms.Panel(); + this.pnlpink14 = new System.Windows.Forms.Panel(); + this.pnlpink10 = new System.Windows.Forms.Panel(); + this.pnlpink8 = new System.Windows.Forms.Panel(); + this.pnlpink4 = new System.Windows.Forms.Panel(); + this.pnlpink6 = new System.Windows.Forms.Panel(); + this.pnlpink15 = new System.Windows.Forms.Panel(); + this.pnlpink2 = new System.Windows.Forms.Panel(); + this.pnlpink13 = new System.Windows.Forms.Panel(); + this.pnlpink11 = new System.Windows.Forms.Panel(); + this.pnlpink7 = new System.Windows.Forms.Panel(); + this.pnlpink9 = new System.Windows.Forms.Panel(); + this.pnlpink5 = new System.Windows.Forms.Panel(); + this.pnlpink3 = new System.Windows.Forms.Panel(); + this.pnlpink1 = new System.Windows.Forms.Panel(); + this.lblpinklevel = new System.Windows.Forms.Label(); + this.Label23 = new System.Windows.Forms.Label(); + this.pnlredcolours = new System.Windows.Forms.Panel(); + this.pnlredoptions = new System.Windows.Forms.Panel(); + this.Label32 = new System.Windows.Forms.Label(); + this.txtredsblue = new System.Windows.Forms.TextBox(); + this.txtredsred = new System.Windows.Forms.TextBox(); + this.Label33 = new System.Windows.Forms.Label(); + this.Label34 = new System.Windows.Forms.Label(); + this.txtredsgreen = new System.Windows.Forms.TextBox(); + this.pnlredcustomcolour = new System.Windows.Forms.Panel(); + this.pnlred16 = new System.Windows.Forms.Panel(); + this.pnlred12 = new System.Windows.Forms.Panel(); + this.pnlred14 = new System.Windows.Forms.Panel(); + this.pnlred10 = new System.Windows.Forms.Panel(); + this.pnlred8 = new System.Windows.Forms.Panel(); + this.pnlred4 = new System.Windows.Forms.Panel(); + this.pnlred6 = new System.Windows.Forms.Panel(); + this.pnlred15 = new System.Windows.Forms.Panel(); + this.pnlred2 = new System.Windows.Forms.Panel(); + this.pnlred13 = new System.Windows.Forms.Panel(); + this.pnlred11 = new System.Windows.Forms.Panel(); + this.pnlred7 = new System.Windows.Forms.Panel(); + this.pnlred9 = new System.Windows.Forms.Panel(); + this.pnlred5 = new System.Windows.Forms.Panel(); + this.pnlred3 = new System.Windows.Forms.Panel(); + this.pnlred1 = new System.Windows.Forms.Panel(); + this.lblredlevel = new System.Windows.Forms.Label(); + this.Label21 = new System.Windows.Forms.Label(); + this.pnlbrowncolours = new System.Windows.Forms.Panel(); + this.pnlbrownoptions = new System.Windows.Forms.Panel(); + this.Label29 = new System.Windows.Forms.Label(); + this.txtbrownsblue = new System.Windows.Forms.TextBox(); + this.txtbrownsred = new System.Windows.Forms.TextBox(); + this.Label30 = new System.Windows.Forms.Label(); + this.Label31 = new System.Windows.Forms.Label(); + this.txtbrownsgreen = new System.Windows.Forms.TextBox(); + this.pnlbrowncustomcolour = new System.Windows.Forms.Panel(); + this.pnlbrown16 = new System.Windows.Forms.Panel(); + this.pnlbrown12 = new System.Windows.Forms.Panel(); + this.pnlbrown14 = new System.Windows.Forms.Panel(); + this.pnlbrown10 = new System.Windows.Forms.Panel(); + this.pnlbrown8 = new System.Windows.Forms.Panel(); + this.pnlbrown4 = new System.Windows.Forms.Panel(); + this.pnlbrown6 = new System.Windows.Forms.Panel(); + this.pnlbrown15 = new System.Windows.Forms.Panel(); + this.pnlbrown2 = new System.Windows.Forms.Panel(); + this.pnlbrown13 = new System.Windows.Forms.Panel(); + this.pnlbrown11 = new System.Windows.Forms.Panel(); + this.pnlbrown7 = new System.Windows.Forms.Panel(); + this.pnlbrown9 = new System.Windows.Forms.Panel(); + this.pnlbrown5 = new System.Windows.Forms.Panel(); + this.pnlbrown3 = new System.Windows.Forms.Panel(); + this.pnlbrown1 = new System.Windows.Forms.Panel(); + this.lblbrownlevel = new System.Windows.Forms.Label(); + this.Label19 = new System.Windows.Forms.Label(); + this.pnlorangecolours = new System.Windows.Forms.Panel(); + this.pnlorangeoptions = new System.Windows.Forms.Panel(); + this.Label25 = new System.Windows.Forms.Label(); + this.txtorangesblue = new System.Windows.Forms.TextBox(); + this.txtorangesred = new System.Windows.Forms.TextBox(); + this.Label27 = new System.Windows.Forms.Label(); + this.Label28 = new System.Windows.Forms.Label(); + this.txtorangesgreen = new System.Windows.Forms.TextBox(); + this.pnlorangecustomcolour = new System.Windows.Forms.Panel(); + this.pnlorange16 = new System.Windows.Forms.Panel(); + this.pnlorange12 = new System.Windows.Forms.Panel(); + this.pnlorange14 = new System.Windows.Forms.Panel(); + this.pnlorange10 = new System.Windows.Forms.Panel(); + this.pnlorange8 = new System.Windows.Forms.Panel(); + this.pnlorange4 = new System.Windows.Forms.Panel(); + this.pnlorange6 = new System.Windows.Forms.Panel(); + this.pnlorange15 = new System.Windows.Forms.Panel(); + this.pnlorange2 = new System.Windows.Forms.Panel(); + this.pnlorange13 = new System.Windows.Forms.Panel(); + this.pnlorange11 = new System.Windows.Forms.Panel(); + this.pnlorange7 = new System.Windows.Forms.Panel(); + this.pnlorange9 = new System.Windows.Forms.Panel(); + this.pnlorange5 = new System.Windows.Forms.Panel(); + this.pnlorange3 = new System.Windows.Forms.Panel(); + this.pnlorange1 = new System.Windows.Forms.Panel(); + this.lblorangelevel = new System.Windows.Forms.Label(); + this.Label13 = new System.Windows.Forms.Label(); + this.pnlyellowcolours = new System.Windows.Forms.Panel(); + this.pnlyellowoptions = new System.Windows.Forms.Panel(); + this.Label20 = new System.Windows.Forms.Label(); + this.txtyellowsblue = new System.Windows.Forms.TextBox(); + this.txtyellowsred = new System.Windows.Forms.TextBox(); + this.Label22 = new System.Windows.Forms.Label(); + this.Label24 = new System.Windows.Forms.Label(); + this.txtyellowsgreen = new System.Windows.Forms.TextBox(); + this.pnlyellowcustomcolour = new System.Windows.Forms.Panel(); + this.pnlyellow16 = new System.Windows.Forms.Panel(); + this.pnlyellow12 = new System.Windows.Forms.Panel(); + this.pnlyellow14 = new System.Windows.Forms.Panel(); + this.pnlyellow10 = new System.Windows.Forms.Panel(); + this.pnlyellow8 = new System.Windows.Forms.Panel(); + this.pnlyellow4 = new System.Windows.Forms.Panel(); + this.pnlyellow6 = new System.Windows.Forms.Panel(); + this.pnlyellow15 = new System.Windows.Forms.Panel(); + this.pnlyellow2 = new System.Windows.Forms.Panel(); + this.pnlyellow13 = new System.Windows.Forms.Panel(); + this.pnlyellow11 = new System.Windows.Forms.Panel(); + this.pnlyellow7 = new System.Windows.Forms.Panel(); + this.pnlyellow9 = new System.Windows.Forms.Panel(); + this.pnlyellow5 = new System.Windows.Forms.Panel(); + this.pnlyellow3 = new System.Windows.Forms.Panel(); + this.pnlyellow1 = new System.Windows.Forms.Panel(); + this.lblyellowlevel = new System.Windows.Forms.Label(); + this.Label11 = new System.Windows.Forms.Label(); + this.pnlgreencolours = new System.Windows.Forms.Panel(); + this.pnlgreenoptions = new System.Windows.Forms.Panel(); + this.Label15 = new System.Windows.Forms.Label(); + this.txtgreensred = new System.Windows.Forms.TextBox(); + this.txtgreensgreen = new System.Windows.Forms.TextBox(); + this.Label16 = new System.Windows.Forms.Label(); + this.Label18 = new System.Windows.Forms.Label(); + this.txtgreensblue = new System.Windows.Forms.TextBox(); + this.pnlgreencustomcolour = new System.Windows.Forms.Panel(); + this.pnlgreen16 = new System.Windows.Forms.Panel(); + this.pnlgreen12 = new System.Windows.Forms.Panel(); + this.pnlgreen14 = new System.Windows.Forms.Panel(); + this.pnlgreen10 = new System.Windows.Forms.Panel(); + this.pnlgreen8 = new System.Windows.Forms.Panel(); + this.pnlgreen4 = new System.Windows.Forms.Panel(); + this.pnlgreen6 = new System.Windows.Forms.Panel(); + this.pnlgreen15 = new System.Windows.Forms.Panel(); + this.pnlgreen2 = new System.Windows.Forms.Panel(); + this.pnlgreen13 = new System.Windows.Forms.Panel(); + this.pnlgreen11 = new System.Windows.Forms.Panel(); + this.pnlgreen7 = new System.Windows.Forms.Panel(); + this.pnlgreen9 = new System.Windows.Forms.Panel(); + this.pnlgreen5 = new System.Windows.Forms.Panel(); + this.pnlgreen3 = new System.Windows.Forms.Panel(); + this.pnlgreen1 = new System.Windows.Forms.Panel(); + this.lblgreenlevel = new System.Windows.Forms.Label(); + this.Label9 = new System.Windows.Forms.Label(); + this.pnlbluecolours = new System.Windows.Forms.Panel(); + this.pnlblueoptions = new System.Windows.Forms.Panel(); + this.Label6 = new System.Windows.Forms.Label(); + this.txtbluesred = new System.Windows.Forms.TextBox(); + this.txtbluesblue = new System.Windows.Forms.TextBox(); + this.Label4 = new System.Windows.Forms.Label(); + this.Label2 = new System.Windows.Forms.Label(); + this.txtbluesgreen = new System.Windows.Forms.TextBox(); + this.pnlbluecustomcolour = new System.Windows.Forms.Panel(); + this.pnlblue16 = new System.Windows.Forms.Panel(); + this.pnlblue12 = new System.Windows.Forms.Panel(); + this.pnlblue14 = new System.Windows.Forms.Panel(); + this.pnlblue10 = new System.Windows.Forms.Panel(); + this.pnlblue8 = new System.Windows.Forms.Panel(); + this.pnlblue4 = new System.Windows.Forms.Panel(); + this.pnlblue6 = new System.Windows.Forms.Panel(); + this.pnlblue15 = new System.Windows.Forms.Panel(); + this.pnlblue2 = new System.Windows.Forms.Panel(); + this.pnlblue13 = new System.Windows.Forms.Panel(); + this.pnlblue11 = new System.Windows.Forms.Panel(); + this.pnlblue7 = new System.Windows.Forms.Panel(); + this.pnlblue9 = new System.Windows.Forms.Panel(); + this.pnlblue5 = new System.Windows.Forms.Panel(); + this.pnlblue3 = new System.Windows.Forms.Panel(); + this.pnlblue1 = new System.Windows.Forms.Panel(); + this.lblbluelevel = new System.Windows.Forms.Label(); + this.Label7 = new System.Windows.Forms.Label(); + this.pnlpurplecolours = new System.Windows.Forms.Panel(); + this.pnlpurpleoptions = new System.Windows.Forms.Panel(); + this.Label8 = new System.Windows.Forms.Label(); + this.txtpurplesgreen = new System.Windows.Forms.TextBox(); + this.txtpurplesblue = new System.Windows.Forms.TextBox(); + this.Label10 = new System.Windows.Forms.Label(); + this.Label12 = new System.Windows.Forms.Label(); + this.txtpurplesred = new System.Windows.Forms.TextBox(); + this.pnlpurplecustomcolour = new System.Windows.Forms.Panel(); + this.pnlpurple16 = new System.Windows.Forms.Panel(); + this.pnlpurple12 = new System.Windows.Forms.Panel(); + this.pnlpurple14 = new System.Windows.Forms.Panel(); + this.pnlpurple10 = new System.Windows.Forms.Panel(); + this.pnlpurple8 = new System.Windows.Forms.Panel(); + this.pnlpurple4 = new System.Windows.Forms.Panel(); + this.pnlpurple6 = new System.Windows.Forms.Panel(); + this.pnlpurple15 = new System.Windows.Forms.Panel(); + this.pnlpurple2 = new System.Windows.Forms.Panel(); + this.pnlpurple13 = new System.Windows.Forms.Panel(); + this.pnlpurple11 = new System.Windows.Forms.Panel(); + this.pnlpurple7 = new System.Windows.Forms.Panel(); + this.pnlpurple9 = new System.Windows.Forms.Panel(); + this.pnlpurple5 = new System.Windows.Forms.Panel(); + this.pnlpurple3 = new System.Windows.Forms.Panel(); + this.pnlpurple1 = new System.Windows.Forms.Panel(); + this.lblpurplelevel = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.pnlgraycolours = new System.Windows.Forms.Panel(); + this.lblcustomshadetut = new System.Windows.Forms.Label(); + this.txtcustomgrayshade = new System.Windows.Forms.TextBox(); + this.pnlgraycustomcolour = new System.Windows.Forms.Panel(); + this.pnlgray16 = new System.Windows.Forms.Panel(); + this.pnlgray12 = new System.Windows.Forms.Panel(); + this.pnlgray14 = new System.Windows.Forms.Panel(); + this.pnlgray10 = new System.Windows.Forms.Panel(); + this.pnlgray8 = new System.Windows.Forms.Panel(); + this.pnlgray4 = new System.Windows.Forms.Panel(); + this.pnlgray6 = new System.Windows.Forms.Panel(); + this.pnlgray15 = new System.Windows.Forms.Panel(); + this.pnlgray2 = new System.Windows.Forms.Panel(); + this.pnlgray13 = new System.Windows.Forms.Panel(); + this.pnlgray11 = new System.Windows.Forms.Panel(); + this.pnlgray7 = new System.Windows.Forms.Panel(); + this.pnlgray9 = new System.Windows.Forms.Panel(); + this.pnlgray5 = new System.Windows.Forms.Panel(); + this.pnlgray3 = new System.Windows.Forms.Panel(); + this.pnlgray1 = new System.Windows.Forms.Panel(); + this.lblgraylevel = new System.Windows.Forms.Label(); + this.Label3 = new System.Windows.Forms.Label(); + this.pnlanycolours = new System.Windows.Forms.Panel(); + this.pnlanyoptions = new System.Windows.Forms.Panel(); + this.Label38 = new System.Windows.Forms.Label(); + this.txtanysgreen = new System.Windows.Forms.TextBox(); + this.txtanysred = new System.Windows.Forms.TextBox(); + this.Label39 = new System.Windows.Forms.Label(); + this.Label40 = new System.Windows.Forms.Label(); + this.txtanysblue = new System.Windows.Forms.TextBox(); + this.pnlanycustomcolour = new System.Windows.Forms.Panel(); + this.pnlany16 = new System.Windows.Forms.Panel(); + this.pnlany12 = new System.Windows.Forms.Panel(); + this.pnlany14 = new System.Windows.Forms.Panel(); + this.pnlany10 = new System.Windows.Forms.Panel(); + this.pnlany8 = new System.Windows.Forms.Panel(); + this.pnlany4 = new System.Windows.Forms.Panel(); + this.pnlany6 = new System.Windows.Forms.Panel(); + this.pnlany15 = new System.Windows.Forms.Panel(); + this.pnlany2 = new System.Windows.Forms.Panel(); + this.pnlany13 = new System.Windows.Forms.Panel(); + this.pnlany11 = new System.Windows.Forms.Panel(); + this.pnlany7 = new System.Windows.Forms.Panel(); + this.pnlany9 = new System.Windows.Forms.Panel(); + this.pnlany5 = new System.Windows.Forms.Panel(); + this.pnlany3 = new System.Windows.Forms.Panel(); + this.pnlany1 = new System.Windows.Forms.Panel(); + this.lblanylevel = new System.Windows.Forms.Label(); + this.Label1 = new System.Windows.Forms.Label(); + this.Panel1 = new System.Windows.Forms.Panel(); + this.lblnewcolourrgb = new System.Windows.Forms.Label(); + this.lblnewcolourname = new System.Windows.Forms.Label(); + this.Label26 = new System.Windows.Forms.Label(); + this.Label17 = new System.Windows.Forms.Label(); + this.lbloldcolourrgb = new System.Windows.Forms.Label(); + this.lbloldcolourname = new System.Windows.Forms.Label(); + this.Label14 = new System.Windows.Forms.Label(); + this.pnlnewcolour = new System.Windows.Forms.Panel(); + this.pnloldcolour = new System.Windows.Forms.Panel(); + this.lblobjecttocolour = new System.Windows.Forms.Label(); + this.pgcontents.SuspendLayout(); + this.pnlpinkcolours.SuspendLayout(); + this.pnlpinkoptions.SuspendLayout(); + this.pnlredcolours.SuspendLayout(); + this.pnlredoptions.SuspendLayout(); + this.pnlbrowncolours.SuspendLayout(); + this.pnlbrownoptions.SuspendLayout(); + this.pnlorangecolours.SuspendLayout(); + this.pnlorangeoptions.SuspendLayout(); + this.pnlyellowcolours.SuspendLayout(); + this.pnlyellowoptions.SuspendLayout(); + this.pnlgreencolours.SuspendLayout(); + this.pnlgreenoptions.SuspendLayout(); + this.pnlbluecolours.SuspendLayout(); + this.pnlblueoptions.SuspendLayout(); + this.pnlpurplecolours.SuspendLayout(); + this.pnlpurpleoptions.SuspendLayout(); + this.pnlgraycolours.SuspendLayout(); + this.pnlanycolours.SuspendLayout(); + this.pnlanyoptions.SuspendLayout(); + this.Panel1.SuspendLayout(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.Controls.Add(this.pnlpinkcolours); + this.pgcontents.Controls.Add(this.pnlredcolours); + this.pgcontents.Controls.Add(this.pnlbrowncolours); + this.pgcontents.Controls.Add(this.pnlorangecolours); + this.pgcontents.Controls.Add(this.pnlyellowcolours); + this.pgcontents.Controls.Add(this.pnlgreencolours); + this.pgcontents.Controls.Add(this.pnlbluecolours); + this.pgcontents.Controls.Add(this.pnlpurplecolours); + this.pgcontents.Controls.Add(this.pnlgraycolours); + this.pgcontents.Controls.Add(this.pnlanycolours); + this.pgcontents.Controls.Add(this.Panel1); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(552, 657); + this.pgcontents.TabIndex = 20; + // + // pnlpinkcolours + // + this.pnlpinkcolours.BackColor = System.Drawing.Color.White; + this.pnlpinkcolours.Controls.Add(this.pnlpinkoptions); + this.pnlpinkcolours.Controls.Add(this.pnlpinkcustomcolour); + this.pnlpinkcolours.Controls.Add(this.pnlpink16); + this.pnlpinkcolours.Controls.Add(this.pnlpink12); + this.pnlpinkcolours.Controls.Add(this.pnlpink14); + this.pnlpinkcolours.Controls.Add(this.pnlpink10); + this.pnlpinkcolours.Controls.Add(this.pnlpink8); + this.pnlpinkcolours.Controls.Add(this.pnlpink4); + this.pnlpinkcolours.Controls.Add(this.pnlpink6); + this.pnlpinkcolours.Controls.Add(this.pnlpink15); + this.pnlpinkcolours.Controls.Add(this.pnlpink2); + this.pnlpinkcolours.Controls.Add(this.pnlpink13); + this.pnlpinkcolours.Controls.Add(this.pnlpink11); + this.pnlpinkcolours.Controls.Add(this.pnlpink7); + this.pnlpinkcolours.Controls.Add(this.pnlpink9); + this.pnlpinkcolours.Controls.Add(this.pnlpink5); + this.pnlpinkcolours.Controls.Add(this.pnlpink3); + this.pnlpinkcolours.Controls.Add(this.pnlpink1); + this.pnlpinkcolours.Controls.Add(this.lblpinklevel); + this.pnlpinkcolours.Controls.Add(this.Label23); + this.pnlpinkcolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlpinkcolours.Location = new System.Drawing.Point(0, 521); + this.pnlpinkcolours.Name = "pnlpinkcolours"; + this.pnlpinkcolours.Size = new System.Drawing.Size(552, 46); + this.pnlpinkcolours.TabIndex = 11; + this.pnlpinkcolours.Visible = false; + // + // pnlpinkoptions + // + this.pnlpinkoptions.Controls.Add(this.Label35); + this.pnlpinkoptions.Controls.Add(this.txtpinksgreen); + this.pnlpinkoptions.Controls.Add(this.txtpinksred); + this.pnlpinkoptions.Controls.Add(this.Label36); + this.pnlpinkoptions.Controls.Add(this.Label37); + this.pnlpinkoptions.Controls.Add(this.txtpinksblue); + this.pnlpinkoptions.Location = new System.Drawing.Point(282, 2); + this.pnlpinkoptions.Name = "pnlpinkoptions"; + this.pnlpinkoptions.Size = new System.Drawing.Size(120, 40); + this.pnlpinkoptions.TabIndex = 33; + this.pnlpinkoptions.Visible = false; + // + // Label35 + // + this.Label35.AutoSize = true; + this.Label35.BackColor = System.Drawing.Color.Transparent; + this.Label35.Location = new System.Drawing.Point(56, 24); + this.Label35.Name = "Label35"; + this.Label35.Size = new System.Drawing.Size(39, 13); + this.Label35.TabIndex = 26; + this.Label35.Text = "Green:"; + // + // txtpinksgreen + // + this.txtpinksgreen.BackColor = System.Drawing.Color.White; + this.txtpinksgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpinksgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpinksgreen.Location = new System.Drawing.Point(95, 22); + this.txtpinksgreen.Multiline = true; + this.txtpinksgreen.Name = "txtpinksgreen"; + this.txtpinksgreen.Size = new System.Drawing.Size(23, 17); + this.txtpinksgreen.TabIndex = 25; + this.txtpinksgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtpinksgreen.TextChanged += new System.EventHandler(this.txtpinksred_TextChanged); + // + // txtpinksred + // + this.txtpinksred.BackColor = System.Drawing.Color.White; + this.txtpinksred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpinksred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpinksred.Location = new System.Drawing.Point(64, 2); + this.txtpinksred.Multiline = true; + this.txtpinksred.Name = "txtpinksred"; + this.txtpinksred.Size = new System.Drawing.Size(23, 17); + this.txtpinksred.TabIndex = 21; + this.txtpinksred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtpinksred.TextChanged += new System.EventHandler(this.txtpinksred_TextChanged); + // + // Label36 + // + this.Label36.AutoSize = true; + this.Label36.BackColor = System.Drawing.Color.Transparent; + this.Label36.Location = new System.Drawing.Point(1, 23); + this.Label36.Name = "Label36"; + this.Label36.Size = new System.Drawing.Size(31, 13); + this.Label36.TabIndex = 24; + this.Label36.Text = "Blue:"; + // + // Label37 + // + this.Label37.AutoSize = true; + this.Label37.BackColor = System.Drawing.Color.Transparent; + this.Label37.Location = new System.Drawing.Point(33, 4); + this.Label37.Name = "Label37"; + this.Label37.Size = new System.Drawing.Size(30, 13); + this.Label37.TabIndex = 22; + this.Label37.Text = "Red:"; + // + // txtpinksblue + // + this.txtpinksblue.BackColor = System.Drawing.Color.White; + this.txtpinksblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpinksblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpinksblue.Location = new System.Drawing.Point(32, 22); + this.txtpinksblue.Multiline = true; + this.txtpinksblue.Name = "txtpinksblue"; + this.txtpinksblue.Size = new System.Drawing.Size(23, 17); + this.txtpinksblue.TabIndex = 23; + this.txtpinksblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtpinksblue.TextChanged += new System.EventHandler(this.txtpinksred_TextChanged); + // + // pnlpinkcustomcolour + // + this.pnlpinkcustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpinkcustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlpinkcustomcolour.Name = "pnlpinkcustomcolour"; + this.pnlpinkcustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlpinkcustomcolour.TabIndex = 18; + this.pnlpinkcustomcolour.Visible = false; + // + // pnlpink16 + // + this.pnlpink16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink16.Location = new System.Drawing.Point(259, 25); + this.pnlpink16.Name = "pnlpink16"; + this.pnlpink16.Size = new System.Drawing.Size(20, 13); + this.pnlpink16.TabIndex = 17; + this.pnlpink16.Visible = false; + // + // pnlpink12 + // + this.pnlpink12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink12.Location = new System.Drawing.Point(155, 25); + this.pnlpink12.Name = "pnlpink12"; + this.pnlpink12.Size = new System.Drawing.Size(20, 13); + this.pnlpink12.TabIndex = 9; + this.pnlpink12.Visible = false; + // + // pnlpink14 + // + this.pnlpink14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink14.Location = new System.Drawing.Point(207, 25); + this.pnlpink14.Name = "pnlpink14"; + this.pnlpink14.Size = new System.Drawing.Size(20, 13); + this.pnlpink14.TabIndex = 13; + this.pnlpink14.Visible = false; + // + // pnlpink10 + // + this.pnlpink10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink10.Location = new System.Drawing.Point(103, 25); + this.pnlpink10.Name = "pnlpink10"; + this.pnlpink10.Size = new System.Drawing.Size(20, 13); + this.pnlpink10.TabIndex = 5; + this.pnlpink10.Visible = false; + // + // pnlpink8 + // + this.pnlpink8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink8.Location = new System.Drawing.Point(259, 8); + this.pnlpink8.Name = "pnlpink8"; + this.pnlpink8.Size = new System.Drawing.Size(20, 13); + this.pnlpink8.TabIndex = 16; + this.pnlpink8.Visible = false; + // + // pnlpink4 + // + this.pnlpink4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink4.Location = new System.Drawing.Point(155, 8); + this.pnlpink4.Name = "pnlpink4"; + this.pnlpink4.Size = new System.Drawing.Size(20, 13); + this.pnlpink4.TabIndex = 8; + this.pnlpink4.Visible = false; + // + // pnlpink6 + // + this.pnlpink6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink6.Location = new System.Drawing.Point(207, 8); + this.pnlpink6.Name = "pnlpink6"; + this.pnlpink6.Size = new System.Drawing.Size(20, 13); + this.pnlpink6.TabIndex = 12; + this.pnlpink6.Visible = false; + // + // pnlpink15 + // + this.pnlpink15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink15.Location = new System.Drawing.Point(233, 25); + this.pnlpink15.Name = "pnlpink15"; + this.pnlpink15.Size = new System.Drawing.Size(20, 13); + this.pnlpink15.TabIndex = 15; + this.pnlpink15.Visible = false; + // + // pnlpink2 + // + this.pnlpink2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink2.Location = new System.Drawing.Point(103, 8); + this.pnlpink2.Name = "pnlpink2"; + this.pnlpink2.Size = new System.Drawing.Size(20, 13); + this.pnlpink2.TabIndex = 4; + this.pnlpink2.Visible = false; + // + // pnlpink13 + // + this.pnlpink13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink13.Location = new System.Drawing.Point(181, 25); + this.pnlpink13.Name = "pnlpink13"; + this.pnlpink13.Size = new System.Drawing.Size(20, 13); + this.pnlpink13.TabIndex = 11; + this.pnlpink13.Visible = false; + // + // pnlpink11 + // + this.pnlpink11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink11.Location = new System.Drawing.Point(129, 25); + this.pnlpink11.Name = "pnlpink11"; + this.pnlpink11.Size = new System.Drawing.Size(20, 13); + this.pnlpink11.TabIndex = 7; + this.pnlpink11.Visible = false; + // + // pnlpink7 + // + this.pnlpink7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink7.Location = new System.Drawing.Point(233, 8); + this.pnlpink7.Name = "pnlpink7"; + this.pnlpink7.Size = new System.Drawing.Size(20, 13); + this.pnlpink7.TabIndex = 14; + this.pnlpink7.Visible = false; + // + // pnlpink9 + // + this.pnlpink9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink9.Location = new System.Drawing.Point(77, 25); + this.pnlpink9.Name = "pnlpink9"; + this.pnlpink9.Size = new System.Drawing.Size(20, 13); + this.pnlpink9.TabIndex = 3; + this.pnlpink9.Visible = false; + // + // pnlpink5 + // + this.pnlpink5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink5.Location = new System.Drawing.Point(181, 8); + this.pnlpink5.Name = "pnlpink5"; + this.pnlpink5.Size = new System.Drawing.Size(20, 13); + this.pnlpink5.TabIndex = 10; + this.pnlpink5.Visible = false; + // + // pnlpink3 + // + this.pnlpink3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink3.Location = new System.Drawing.Point(129, 8); + this.pnlpink3.Name = "pnlpink3"; + this.pnlpink3.Size = new System.Drawing.Size(20, 13); + this.pnlpink3.TabIndex = 6; + this.pnlpink3.Visible = false; + // + // pnlpink1 + // + this.pnlpink1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpink1.Location = new System.Drawing.Point(77, 8); + this.pnlpink1.Name = "pnlpink1"; + this.pnlpink1.Size = new System.Drawing.Size(20, 13); + this.pnlpink1.TabIndex = 2; + this.pnlpink1.Visible = false; + // + // lblpinklevel + // + this.lblpinklevel.AutoSize = true; + this.lblpinklevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblpinklevel.Location = new System.Drawing.Point(5, 25); + this.lblpinklevel.Name = "lblpinklevel"; + this.lblpinklevel.Size = new System.Drawing.Size(49, 15); + this.lblpinklevel.TabIndex = 1; + this.lblpinklevel.Text = "Level: 4"; + // + // Label23 + // + this.Label23.AutoSize = true; + this.Label23.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label23.Location = new System.Drawing.Point(3, 2); + this.Label23.Name = "Label23"; + this.Label23.Size = new System.Drawing.Size(48, 22); + this.Label23.TabIndex = 0; + this.Label23.Text = "Pink"; + // + // pnlredcolours + // + this.pnlredcolours.BackColor = System.Drawing.Color.White; + this.pnlredcolours.Controls.Add(this.pnlredoptions); + this.pnlredcolours.Controls.Add(this.pnlredcustomcolour); + this.pnlredcolours.Controls.Add(this.pnlred16); + this.pnlredcolours.Controls.Add(this.pnlred12); + this.pnlredcolours.Controls.Add(this.pnlred14); + this.pnlredcolours.Controls.Add(this.pnlred10); + this.pnlredcolours.Controls.Add(this.pnlred8); + this.pnlredcolours.Controls.Add(this.pnlred4); + this.pnlredcolours.Controls.Add(this.pnlred6); + this.pnlredcolours.Controls.Add(this.pnlred15); + this.pnlredcolours.Controls.Add(this.pnlred2); + this.pnlredcolours.Controls.Add(this.pnlred13); + this.pnlredcolours.Controls.Add(this.pnlred11); + this.pnlredcolours.Controls.Add(this.pnlred7); + this.pnlredcolours.Controls.Add(this.pnlred9); + this.pnlredcolours.Controls.Add(this.pnlred5); + this.pnlredcolours.Controls.Add(this.pnlred3); + this.pnlredcolours.Controls.Add(this.pnlred1); + this.pnlredcolours.Controls.Add(this.lblredlevel); + this.pnlredcolours.Controls.Add(this.Label21); + this.pnlredcolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlredcolours.Location = new System.Drawing.Point(0, 475); + this.pnlredcolours.Name = "pnlredcolours"; + this.pnlredcolours.Size = new System.Drawing.Size(552, 46); + this.pnlredcolours.TabIndex = 10; + this.pnlredcolours.Visible = false; + // + // pnlredoptions + // + this.pnlredoptions.Controls.Add(this.Label32); + this.pnlredoptions.Controls.Add(this.txtredsblue); + this.pnlredoptions.Controls.Add(this.txtredsred); + this.pnlredoptions.Controls.Add(this.Label33); + this.pnlredoptions.Controls.Add(this.Label34); + this.pnlredoptions.Controls.Add(this.txtredsgreen); + this.pnlredoptions.Location = new System.Drawing.Point(282, 2); + this.pnlredoptions.Name = "pnlredoptions"; + this.pnlredoptions.Size = new System.Drawing.Size(120, 40); + this.pnlredoptions.TabIndex = 32; + this.pnlredoptions.Visible = false; + // + // Label32 + // + this.Label32.AutoSize = true; + this.Label32.BackColor = System.Drawing.Color.Transparent; + this.Label32.Location = new System.Drawing.Point(64, 24); + this.Label32.Name = "Label32"; + this.Label32.Size = new System.Drawing.Size(31, 13); + this.Label32.TabIndex = 26; + this.Label32.Text = "Blue:"; + // + // txtredsblue + // + this.txtredsblue.BackColor = System.Drawing.Color.White; + this.txtredsblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtredsblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtredsblue.Location = new System.Drawing.Point(95, 22); + this.txtredsblue.Multiline = true; + this.txtredsblue.Name = "txtredsblue"; + this.txtredsblue.Size = new System.Drawing.Size(23, 17); + this.txtredsblue.TabIndex = 25; + this.txtredsblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtredsred + // + this.txtredsred.BackColor = System.Drawing.Color.White; + this.txtredsred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtredsred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtredsred.Location = new System.Drawing.Point(64, 2); + this.txtredsred.Multiline = true; + this.txtredsred.Name = "txtredsred"; + this.txtredsred.Size = new System.Drawing.Size(23, 17); + this.txtredsred.TabIndex = 21; + this.txtredsred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label33 + // + this.Label33.AutoSize = true; + this.Label33.BackColor = System.Drawing.Color.Transparent; + this.Label33.Location = new System.Drawing.Point(1, 23); + this.Label33.Name = "Label33"; + this.Label33.Size = new System.Drawing.Size(39, 13); + this.Label33.TabIndex = 24; + this.Label33.Text = "Green:"; + // + // Label34 + // + this.Label34.AutoSize = true; + this.Label34.BackColor = System.Drawing.Color.Transparent; + this.Label34.Location = new System.Drawing.Point(33, 4); + this.Label34.Name = "Label34"; + this.Label34.Size = new System.Drawing.Size(30, 13); + this.Label34.TabIndex = 22; + this.Label34.Text = "Red:"; + // + // txtredsgreen + // + this.txtredsgreen.BackColor = System.Drawing.Color.White; + this.txtredsgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtredsgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtredsgreen.Location = new System.Drawing.Point(40, 22); + this.txtredsgreen.Multiline = true; + this.txtredsgreen.Name = "txtredsgreen"; + this.txtredsgreen.Size = new System.Drawing.Size(23, 17); + this.txtredsgreen.TabIndex = 23; + this.txtredsgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlredcustomcolour + // + this.pnlredcustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlredcustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlredcustomcolour.Name = "pnlredcustomcolour"; + this.pnlredcustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlredcustomcolour.TabIndex = 18; + this.pnlredcustomcolour.Visible = false; + // + // pnlred16 + // + this.pnlred16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred16.Location = new System.Drawing.Point(259, 25); + this.pnlred16.Name = "pnlred16"; + this.pnlred16.Size = new System.Drawing.Size(20, 13); + this.pnlred16.TabIndex = 17; + this.pnlred16.Visible = false; + // + // pnlred12 + // + this.pnlred12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred12.Location = new System.Drawing.Point(155, 25); + this.pnlred12.Name = "pnlred12"; + this.pnlred12.Size = new System.Drawing.Size(20, 13); + this.pnlred12.TabIndex = 9; + this.pnlred12.Visible = false; + // + // pnlred14 + // + this.pnlred14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred14.Location = new System.Drawing.Point(207, 25); + this.pnlred14.Name = "pnlred14"; + this.pnlred14.Size = new System.Drawing.Size(20, 13); + this.pnlred14.TabIndex = 13; + this.pnlred14.Visible = false; + // + // pnlred10 + // + this.pnlred10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred10.Location = new System.Drawing.Point(103, 25); + this.pnlred10.Name = "pnlred10"; + this.pnlred10.Size = new System.Drawing.Size(20, 13); + this.pnlred10.TabIndex = 5; + this.pnlred10.Visible = false; + // + // pnlred8 + // + this.pnlred8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred8.Location = new System.Drawing.Point(259, 8); + this.pnlred8.Name = "pnlred8"; + this.pnlred8.Size = new System.Drawing.Size(20, 13); + this.pnlred8.TabIndex = 16; + this.pnlred8.Visible = false; + // + // pnlred4 + // + this.pnlred4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred4.Location = new System.Drawing.Point(155, 8); + this.pnlred4.Name = "pnlred4"; + this.pnlred4.Size = new System.Drawing.Size(20, 13); + this.pnlred4.TabIndex = 8; + this.pnlred4.Visible = false; + // + // pnlred6 + // + this.pnlred6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred6.Location = new System.Drawing.Point(207, 8); + this.pnlred6.Name = "pnlred6"; + this.pnlred6.Size = new System.Drawing.Size(20, 13); + this.pnlred6.TabIndex = 12; + this.pnlred6.Visible = false; + // + // pnlred15 + // + this.pnlred15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred15.Location = new System.Drawing.Point(233, 25); + this.pnlred15.Name = "pnlred15"; + this.pnlred15.Size = new System.Drawing.Size(20, 13); + this.pnlred15.TabIndex = 15; + this.pnlred15.Visible = false; + // + // pnlred2 + // + this.pnlred2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred2.Location = new System.Drawing.Point(103, 8); + this.pnlred2.Name = "pnlred2"; + this.pnlred2.Size = new System.Drawing.Size(20, 13); + this.pnlred2.TabIndex = 4; + this.pnlred2.Visible = false; + // + // pnlred13 + // + this.pnlred13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred13.Location = new System.Drawing.Point(181, 25); + this.pnlred13.Name = "pnlred13"; + this.pnlred13.Size = new System.Drawing.Size(20, 13); + this.pnlred13.TabIndex = 11; + this.pnlred13.Visible = false; + // + // pnlred11 + // + this.pnlred11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred11.Location = new System.Drawing.Point(129, 25); + this.pnlred11.Name = "pnlred11"; + this.pnlred11.Size = new System.Drawing.Size(20, 13); + this.pnlred11.TabIndex = 7; + this.pnlred11.Visible = false; + // + // pnlred7 + // + this.pnlred7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred7.Location = new System.Drawing.Point(233, 8); + this.pnlred7.Name = "pnlred7"; + this.pnlred7.Size = new System.Drawing.Size(20, 13); + this.pnlred7.TabIndex = 14; + this.pnlred7.Visible = false; + // + // pnlred9 + // + this.pnlred9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred9.Location = new System.Drawing.Point(77, 25); + this.pnlred9.Name = "pnlred9"; + this.pnlred9.Size = new System.Drawing.Size(20, 13); + this.pnlred9.TabIndex = 3; + this.pnlred9.Visible = false; + // + // pnlred5 + // + this.pnlred5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred5.Location = new System.Drawing.Point(181, 8); + this.pnlred5.Name = "pnlred5"; + this.pnlred5.Size = new System.Drawing.Size(20, 13); + this.pnlred5.TabIndex = 10; + this.pnlred5.Visible = false; + // + // pnlred3 + // + this.pnlred3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred3.Location = new System.Drawing.Point(129, 8); + this.pnlred3.Name = "pnlred3"; + this.pnlred3.Size = new System.Drawing.Size(20, 13); + this.pnlred3.TabIndex = 6; + this.pnlred3.Visible = false; + // + // pnlred1 + // + this.pnlred1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlred1.Location = new System.Drawing.Point(77, 8); + this.pnlred1.Name = "pnlred1"; + this.pnlred1.Size = new System.Drawing.Size(20, 13); + this.pnlred1.TabIndex = 2; + this.pnlred1.Visible = false; + // + // lblredlevel + // + this.lblredlevel.AutoSize = true; + this.lblredlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblredlevel.Location = new System.Drawing.Point(5, 25); + this.lblredlevel.Name = "lblredlevel"; + this.lblredlevel.Size = new System.Drawing.Size(49, 15); + this.lblredlevel.TabIndex = 1; + this.lblredlevel.Text = "Level: 4"; + // + // Label21 + // + this.Label21.AutoSize = true; + this.Label21.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label21.Location = new System.Drawing.Point(3, 2); + this.Label21.Name = "Label21"; + this.Label21.Size = new System.Drawing.Size(42, 22); + this.Label21.TabIndex = 0; + this.Label21.Text = "Red"; + // + // pnlbrowncolours + // + this.pnlbrowncolours.BackColor = System.Drawing.Color.White; + this.pnlbrowncolours.Controls.Add(this.pnlbrownoptions); + this.pnlbrowncolours.Controls.Add(this.pnlbrowncustomcolour); + this.pnlbrowncolours.Controls.Add(this.pnlbrown16); + this.pnlbrowncolours.Controls.Add(this.pnlbrown12); + this.pnlbrowncolours.Controls.Add(this.pnlbrown14); + this.pnlbrowncolours.Controls.Add(this.pnlbrown10); + this.pnlbrowncolours.Controls.Add(this.pnlbrown8); + this.pnlbrowncolours.Controls.Add(this.pnlbrown4); + this.pnlbrowncolours.Controls.Add(this.pnlbrown6); + this.pnlbrowncolours.Controls.Add(this.pnlbrown15); + this.pnlbrowncolours.Controls.Add(this.pnlbrown2); + this.pnlbrowncolours.Controls.Add(this.pnlbrown13); + this.pnlbrowncolours.Controls.Add(this.pnlbrown11); + this.pnlbrowncolours.Controls.Add(this.pnlbrown7); + this.pnlbrowncolours.Controls.Add(this.pnlbrown9); + this.pnlbrowncolours.Controls.Add(this.pnlbrown5); + this.pnlbrowncolours.Controls.Add(this.pnlbrown3); + this.pnlbrowncolours.Controls.Add(this.pnlbrown1); + this.pnlbrowncolours.Controls.Add(this.lblbrownlevel); + this.pnlbrowncolours.Controls.Add(this.Label19); + this.pnlbrowncolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlbrowncolours.Location = new System.Drawing.Point(0, 429); + this.pnlbrowncolours.Name = "pnlbrowncolours"; + this.pnlbrowncolours.Size = new System.Drawing.Size(552, 46); + this.pnlbrowncolours.TabIndex = 8; + this.pnlbrowncolours.Visible = false; + // + // pnlbrownoptions + // + this.pnlbrownoptions.Controls.Add(this.Label29); + this.pnlbrownoptions.Controls.Add(this.txtbrownsblue); + this.pnlbrownoptions.Controls.Add(this.txtbrownsred); + this.pnlbrownoptions.Controls.Add(this.Label30); + this.pnlbrownoptions.Controls.Add(this.Label31); + this.pnlbrownoptions.Controls.Add(this.txtbrownsgreen); + this.pnlbrownoptions.Location = new System.Drawing.Point(282, 3); + this.pnlbrownoptions.Name = "pnlbrownoptions"; + this.pnlbrownoptions.Size = new System.Drawing.Size(120, 40); + this.pnlbrownoptions.TabIndex = 31; + this.pnlbrownoptions.Visible = false; + // + // Label29 + // + this.Label29.AutoSize = true; + this.Label29.BackColor = System.Drawing.Color.Transparent; + this.Label29.Location = new System.Drawing.Point(64, 24); + this.Label29.Name = "Label29"; + this.Label29.Size = new System.Drawing.Size(31, 13); + this.Label29.TabIndex = 26; + this.Label29.Text = "Blue:"; + // + // txtbrownsblue + // + this.txtbrownsblue.BackColor = System.Drawing.Color.White; + this.txtbrownsblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbrownsblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbrownsblue.Location = new System.Drawing.Point(95, 22); + this.txtbrownsblue.Multiline = true; + this.txtbrownsblue.Name = "txtbrownsblue"; + this.txtbrownsblue.Size = new System.Drawing.Size(23, 17); + this.txtbrownsblue.TabIndex = 25; + this.txtbrownsblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtbrownsred + // + this.txtbrownsred.BackColor = System.Drawing.Color.White; + this.txtbrownsred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbrownsred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbrownsred.Location = new System.Drawing.Point(64, 2); + this.txtbrownsred.Multiline = true; + this.txtbrownsred.Name = "txtbrownsred"; + this.txtbrownsred.Size = new System.Drawing.Size(23, 17); + this.txtbrownsred.TabIndex = 21; + this.txtbrownsred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label30 + // + this.Label30.AutoSize = true; + this.Label30.BackColor = System.Drawing.Color.Transparent; + this.Label30.Location = new System.Drawing.Point(1, 23); + this.Label30.Name = "Label30"; + this.Label30.Size = new System.Drawing.Size(39, 13); + this.Label30.TabIndex = 24; + this.Label30.Text = "Green:"; + // + // Label31 + // + this.Label31.AutoSize = true; + this.Label31.BackColor = System.Drawing.Color.Transparent; + this.Label31.Location = new System.Drawing.Point(33, 4); + this.Label31.Name = "Label31"; + this.Label31.Size = new System.Drawing.Size(30, 13); + this.Label31.TabIndex = 22; + this.Label31.Text = "Red:"; + // + // txtbrownsgreen + // + this.txtbrownsgreen.BackColor = System.Drawing.Color.White; + this.txtbrownsgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbrownsgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbrownsgreen.Location = new System.Drawing.Point(40, 22); + this.txtbrownsgreen.Multiline = true; + this.txtbrownsgreen.Name = "txtbrownsgreen"; + this.txtbrownsgreen.Size = new System.Drawing.Size(23, 17); + this.txtbrownsgreen.TabIndex = 23; + this.txtbrownsgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlbrowncustomcolour + // + this.pnlbrowncustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrowncustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlbrowncustomcolour.Name = "pnlbrowncustomcolour"; + this.pnlbrowncustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlbrowncustomcolour.TabIndex = 18; + this.pnlbrowncustomcolour.Visible = false; + // + // pnlbrown16 + // + this.pnlbrown16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown16.Location = new System.Drawing.Point(259, 25); + this.pnlbrown16.Name = "pnlbrown16"; + this.pnlbrown16.Size = new System.Drawing.Size(20, 13); + this.pnlbrown16.TabIndex = 17; + this.pnlbrown16.Visible = false; + // + // pnlbrown12 + // + this.pnlbrown12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown12.Location = new System.Drawing.Point(155, 25); + this.pnlbrown12.Name = "pnlbrown12"; + this.pnlbrown12.Size = new System.Drawing.Size(20, 13); + this.pnlbrown12.TabIndex = 9; + this.pnlbrown12.Visible = false; + // + // pnlbrown14 + // + this.pnlbrown14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown14.Location = new System.Drawing.Point(207, 25); + this.pnlbrown14.Name = "pnlbrown14"; + this.pnlbrown14.Size = new System.Drawing.Size(20, 13); + this.pnlbrown14.TabIndex = 13; + this.pnlbrown14.Visible = false; + // + // pnlbrown10 + // + this.pnlbrown10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown10.Location = new System.Drawing.Point(103, 25); + this.pnlbrown10.Name = "pnlbrown10"; + this.pnlbrown10.Size = new System.Drawing.Size(20, 13); + this.pnlbrown10.TabIndex = 5; + this.pnlbrown10.Visible = false; + // + // pnlbrown8 + // + this.pnlbrown8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown8.Location = new System.Drawing.Point(259, 8); + this.pnlbrown8.Name = "pnlbrown8"; + this.pnlbrown8.Size = new System.Drawing.Size(20, 13); + this.pnlbrown8.TabIndex = 16; + this.pnlbrown8.Visible = false; + // + // pnlbrown4 + // + this.pnlbrown4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown4.Location = new System.Drawing.Point(155, 8); + this.pnlbrown4.Name = "pnlbrown4"; + this.pnlbrown4.Size = new System.Drawing.Size(20, 13); + this.pnlbrown4.TabIndex = 8; + this.pnlbrown4.Visible = false; + // + // pnlbrown6 + // + this.pnlbrown6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown6.Location = new System.Drawing.Point(207, 8); + this.pnlbrown6.Name = "pnlbrown6"; + this.pnlbrown6.Size = new System.Drawing.Size(20, 13); + this.pnlbrown6.TabIndex = 12; + this.pnlbrown6.Visible = false; + // + // pnlbrown15 + // + this.pnlbrown15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown15.Location = new System.Drawing.Point(233, 25); + this.pnlbrown15.Name = "pnlbrown15"; + this.pnlbrown15.Size = new System.Drawing.Size(20, 13); + this.pnlbrown15.TabIndex = 15; + this.pnlbrown15.Visible = false; + // + // pnlbrown2 + // + this.pnlbrown2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown2.Location = new System.Drawing.Point(103, 8); + this.pnlbrown2.Name = "pnlbrown2"; + this.pnlbrown2.Size = new System.Drawing.Size(20, 13); + this.pnlbrown2.TabIndex = 4; + this.pnlbrown2.Visible = false; + // + // pnlbrown13 + // + this.pnlbrown13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown13.Location = new System.Drawing.Point(181, 25); + this.pnlbrown13.Name = "pnlbrown13"; + this.pnlbrown13.Size = new System.Drawing.Size(20, 13); + this.pnlbrown13.TabIndex = 11; + this.pnlbrown13.Visible = false; + // + // pnlbrown11 + // + this.pnlbrown11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown11.Location = new System.Drawing.Point(129, 25); + this.pnlbrown11.Name = "pnlbrown11"; + this.pnlbrown11.Size = new System.Drawing.Size(20, 13); + this.pnlbrown11.TabIndex = 7; + this.pnlbrown11.Visible = false; + // + // pnlbrown7 + // + this.pnlbrown7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown7.Location = new System.Drawing.Point(233, 8); + this.pnlbrown7.Name = "pnlbrown7"; + this.pnlbrown7.Size = new System.Drawing.Size(20, 13); + this.pnlbrown7.TabIndex = 14; + this.pnlbrown7.Visible = false; + // + // pnlbrown9 + // + this.pnlbrown9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown9.Location = new System.Drawing.Point(77, 25); + this.pnlbrown9.Name = "pnlbrown9"; + this.pnlbrown9.Size = new System.Drawing.Size(20, 13); + this.pnlbrown9.TabIndex = 3; + this.pnlbrown9.Visible = false; + // + // pnlbrown5 + // + this.pnlbrown5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown5.Location = new System.Drawing.Point(181, 8); + this.pnlbrown5.Name = "pnlbrown5"; + this.pnlbrown5.Size = new System.Drawing.Size(20, 13); + this.pnlbrown5.TabIndex = 10; + this.pnlbrown5.Visible = false; + // + // pnlbrown3 + // + this.pnlbrown3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown3.Location = new System.Drawing.Point(129, 8); + this.pnlbrown3.Name = "pnlbrown3"; + this.pnlbrown3.Size = new System.Drawing.Size(20, 13); + this.pnlbrown3.TabIndex = 6; + this.pnlbrown3.Visible = false; + // + // pnlbrown1 + // + this.pnlbrown1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbrown1.Location = new System.Drawing.Point(77, 8); + this.pnlbrown1.Name = "pnlbrown1"; + this.pnlbrown1.Size = new System.Drawing.Size(20, 13); + this.pnlbrown1.TabIndex = 2; + this.pnlbrown1.Visible = false; + // + // lblbrownlevel + // + this.lblbrownlevel.AutoSize = true; + this.lblbrownlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblbrownlevel.Location = new System.Drawing.Point(5, 25); + this.lblbrownlevel.Name = "lblbrownlevel"; + this.lblbrownlevel.Size = new System.Drawing.Size(49, 15); + this.lblbrownlevel.TabIndex = 1; + this.lblbrownlevel.Text = "Level: 4"; + // + // Label19 + // + this.Label19.AutoSize = true; + this.Label19.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label19.Location = new System.Drawing.Point(3, 2); + this.Label19.Name = "Label19"; + this.Label19.Size = new System.Drawing.Size(67, 22); + this.Label19.TabIndex = 0; + this.Label19.Text = "Brown"; + // + // pnlorangecolours + // + this.pnlorangecolours.BackColor = System.Drawing.Color.White; + this.pnlorangecolours.Controls.Add(this.pnlorangeoptions); + this.pnlorangecolours.Controls.Add(this.pnlorangecustomcolour); + this.pnlorangecolours.Controls.Add(this.pnlorange16); + this.pnlorangecolours.Controls.Add(this.pnlorange12); + this.pnlorangecolours.Controls.Add(this.pnlorange14); + this.pnlorangecolours.Controls.Add(this.pnlorange10); + this.pnlorangecolours.Controls.Add(this.pnlorange8); + this.pnlorangecolours.Controls.Add(this.pnlorange4); + this.pnlorangecolours.Controls.Add(this.pnlorange6); + this.pnlorangecolours.Controls.Add(this.pnlorange15); + this.pnlorangecolours.Controls.Add(this.pnlorange2); + this.pnlorangecolours.Controls.Add(this.pnlorange13); + this.pnlorangecolours.Controls.Add(this.pnlorange11); + this.pnlorangecolours.Controls.Add(this.pnlorange7); + this.pnlorangecolours.Controls.Add(this.pnlorange9); + this.pnlorangecolours.Controls.Add(this.pnlorange5); + this.pnlorangecolours.Controls.Add(this.pnlorange3); + this.pnlorangecolours.Controls.Add(this.pnlorange1); + this.pnlorangecolours.Controls.Add(this.lblorangelevel); + this.pnlorangecolours.Controls.Add(this.Label13); + this.pnlorangecolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlorangecolours.Location = new System.Drawing.Point(0, 383); + this.pnlorangecolours.Name = "pnlorangecolours"; + this.pnlorangecolours.Size = new System.Drawing.Size(552, 46); + this.pnlorangecolours.TabIndex = 7; + this.pnlorangecolours.Visible = false; + // + // pnlorangeoptions + // + this.pnlorangeoptions.Controls.Add(this.Label25); + this.pnlorangeoptions.Controls.Add(this.txtorangesblue); + this.pnlorangeoptions.Controls.Add(this.txtorangesred); + this.pnlorangeoptions.Controls.Add(this.Label27); + this.pnlorangeoptions.Controls.Add(this.Label28); + this.pnlorangeoptions.Controls.Add(this.txtorangesgreen); + this.pnlorangeoptions.Location = new System.Drawing.Point(282, 3); + this.pnlorangeoptions.Name = "pnlorangeoptions"; + this.pnlorangeoptions.Size = new System.Drawing.Size(120, 40); + this.pnlorangeoptions.TabIndex = 30; + this.pnlorangeoptions.Visible = false; + // + // Label25 + // + this.Label25.AutoSize = true; + this.Label25.BackColor = System.Drawing.Color.Transparent; + this.Label25.Location = new System.Drawing.Point(64, 24); + this.Label25.Name = "Label25"; + this.Label25.Size = new System.Drawing.Size(31, 13); + this.Label25.TabIndex = 26; + this.Label25.Text = "Blue:"; + // + // txtorangesblue + // + this.txtorangesblue.BackColor = System.Drawing.Color.White; + this.txtorangesblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtorangesblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtorangesblue.Location = new System.Drawing.Point(95, 22); + this.txtorangesblue.Multiline = true; + this.txtorangesblue.Name = "txtorangesblue"; + this.txtorangesblue.Size = new System.Drawing.Size(23, 17); + this.txtorangesblue.TabIndex = 25; + this.txtorangesblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtorangesred + // + this.txtorangesred.BackColor = System.Drawing.Color.White; + this.txtorangesred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtorangesred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtorangesred.Location = new System.Drawing.Point(64, 2); + this.txtorangesred.Multiline = true; + this.txtorangesred.Name = "txtorangesred"; + this.txtorangesred.Size = new System.Drawing.Size(23, 17); + this.txtorangesred.TabIndex = 21; + this.txtorangesred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label27 + // + this.Label27.AutoSize = true; + this.Label27.BackColor = System.Drawing.Color.Transparent; + this.Label27.Location = new System.Drawing.Point(1, 23); + this.Label27.Name = "Label27"; + this.Label27.Size = new System.Drawing.Size(39, 13); + this.Label27.TabIndex = 24; + this.Label27.Text = "Green:"; + // + // Label28 + // + this.Label28.AutoSize = true; + this.Label28.BackColor = System.Drawing.Color.Transparent; + this.Label28.Location = new System.Drawing.Point(33, 4); + this.Label28.Name = "Label28"; + this.Label28.Size = new System.Drawing.Size(30, 13); + this.Label28.TabIndex = 22; + this.Label28.Text = "Red:"; + // + // txtorangesgreen + // + this.txtorangesgreen.BackColor = System.Drawing.Color.White; + this.txtorangesgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtorangesgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtorangesgreen.Location = new System.Drawing.Point(40, 22); + this.txtorangesgreen.Multiline = true; + this.txtorangesgreen.Name = "txtorangesgreen"; + this.txtorangesgreen.Size = new System.Drawing.Size(23, 17); + this.txtorangesgreen.TabIndex = 23; + this.txtorangesgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlorangecustomcolour + // + this.pnlorangecustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorangecustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlorangecustomcolour.Name = "pnlorangecustomcolour"; + this.pnlorangecustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlorangecustomcolour.TabIndex = 18; + this.pnlorangecustomcolour.Visible = false; + // + // pnlorange16 + // + this.pnlorange16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange16.Location = new System.Drawing.Point(259, 25); + this.pnlorange16.Name = "pnlorange16"; + this.pnlorange16.Size = new System.Drawing.Size(20, 13); + this.pnlorange16.TabIndex = 17; + this.pnlorange16.Visible = false; + // + // pnlorange12 + // + this.pnlorange12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange12.Location = new System.Drawing.Point(155, 25); + this.pnlorange12.Name = "pnlorange12"; + this.pnlorange12.Size = new System.Drawing.Size(20, 13); + this.pnlorange12.TabIndex = 9; + this.pnlorange12.Visible = false; + // + // pnlorange14 + // + this.pnlorange14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange14.Location = new System.Drawing.Point(207, 25); + this.pnlorange14.Name = "pnlorange14"; + this.pnlorange14.Size = new System.Drawing.Size(20, 13); + this.pnlorange14.TabIndex = 13; + this.pnlorange14.Visible = false; + // + // pnlorange10 + // + this.pnlorange10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange10.Location = new System.Drawing.Point(103, 25); + this.pnlorange10.Name = "pnlorange10"; + this.pnlorange10.Size = new System.Drawing.Size(20, 13); + this.pnlorange10.TabIndex = 5; + this.pnlorange10.Visible = false; + // + // pnlorange8 + // + this.pnlorange8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange8.Location = new System.Drawing.Point(259, 8); + this.pnlorange8.Name = "pnlorange8"; + this.pnlorange8.Size = new System.Drawing.Size(20, 13); + this.pnlorange8.TabIndex = 16; + this.pnlorange8.Visible = false; + // + // pnlorange4 + // + this.pnlorange4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange4.Location = new System.Drawing.Point(155, 8); + this.pnlorange4.Name = "pnlorange4"; + this.pnlorange4.Size = new System.Drawing.Size(20, 13); + this.pnlorange4.TabIndex = 8; + this.pnlorange4.Visible = false; + // + // pnlorange6 + // + this.pnlorange6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange6.Location = new System.Drawing.Point(207, 8); + this.pnlorange6.Name = "pnlorange6"; + this.pnlorange6.Size = new System.Drawing.Size(20, 13); + this.pnlorange6.TabIndex = 12; + this.pnlorange6.Visible = false; + // + // pnlorange15 + // + this.pnlorange15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange15.Location = new System.Drawing.Point(233, 25); + this.pnlorange15.Name = "pnlorange15"; + this.pnlorange15.Size = new System.Drawing.Size(20, 13); + this.pnlorange15.TabIndex = 15; + this.pnlorange15.Visible = false; + // + // pnlorange2 + // + this.pnlorange2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange2.Location = new System.Drawing.Point(103, 8); + this.pnlorange2.Name = "pnlorange2"; + this.pnlorange2.Size = new System.Drawing.Size(20, 13); + this.pnlorange2.TabIndex = 4; + this.pnlorange2.Visible = false; + // + // pnlorange13 + // + this.pnlorange13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange13.Location = new System.Drawing.Point(181, 25); + this.pnlorange13.Name = "pnlorange13"; + this.pnlorange13.Size = new System.Drawing.Size(20, 13); + this.pnlorange13.TabIndex = 11; + this.pnlorange13.Visible = false; + // + // pnlorange11 + // + this.pnlorange11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange11.Location = new System.Drawing.Point(129, 25); + this.pnlorange11.Name = "pnlorange11"; + this.pnlorange11.Size = new System.Drawing.Size(20, 13); + this.pnlorange11.TabIndex = 7; + this.pnlorange11.Visible = false; + // + // pnlorange7 + // + this.pnlorange7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange7.Location = new System.Drawing.Point(233, 8); + this.pnlorange7.Name = "pnlorange7"; + this.pnlorange7.Size = new System.Drawing.Size(20, 13); + this.pnlorange7.TabIndex = 14; + this.pnlorange7.Visible = false; + // + // pnlorange9 + // + this.pnlorange9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange9.Location = new System.Drawing.Point(77, 25); + this.pnlorange9.Name = "pnlorange9"; + this.pnlorange9.Size = new System.Drawing.Size(20, 13); + this.pnlorange9.TabIndex = 3; + this.pnlorange9.Visible = false; + // + // pnlorange5 + // + this.pnlorange5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange5.Location = new System.Drawing.Point(181, 8); + this.pnlorange5.Name = "pnlorange5"; + this.pnlorange5.Size = new System.Drawing.Size(20, 13); + this.pnlorange5.TabIndex = 10; + this.pnlorange5.Visible = false; + // + // pnlorange3 + // + this.pnlorange3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange3.Location = new System.Drawing.Point(129, 8); + this.pnlorange3.Name = "pnlorange3"; + this.pnlorange3.Size = new System.Drawing.Size(20, 13); + this.pnlorange3.TabIndex = 6; + this.pnlorange3.Visible = false; + // + // pnlorange1 + // + this.pnlorange1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlorange1.Location = new System.Drawing.Point(77, 8); + this.pnlorange1.Name = "pnlorange1"; + this.pnlorange1.Size = new System.Drawing.Size(20, 13); + this.pnlorange1.TabIndex = 2; + this.pnlorange1.Visible = false; + // + // lblorangelevel + // + this.lblorangelevel.AutoSize = true; + this.lblorangelevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblorangelevel.Location = new System.Drawing.Point(5, 25); + this.lblorangelevel.Name = "lblorangelevel"; + this.lblorangelevel.Size = new System.Drawing.Size(49, 15); + this.lblorangelevel.TabIndex = 1; + this.lblorangelevel.Text = "Level: 4"; + // + // Label13 + // + this.Label13.AutoSize = true; + this.Label13.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label13.Location = new System.Drawing.Point(3, 2); + this.Label13.Name = "Label13"; + this.Label13.Size = new System.Drawing.Size(74, 22); + this.Label13.TabIndex = 0; + this.Label13.Text = "Orange"; + // + // pnlyellowcolours + // + this.pnlyellowcolours.BackColor = System.Drawing.Color.White; + this.pnlyellowcolours.Controls.Add(this.pnlyellowoptions); + this.pnlyellowcolours.Controls.Add(this.pnlyellowcustomcolour); + this.pnlyellowcolours.Controls.Add(this.pnlyellow16); + this.pnlyellowcolours.Controls.Add(this.pnlyellow12); + this.pnlyellowcolours.Controls.Add(this.pnlyellow14); + this.pnlyellowcolours.Controls.Add(this.pnlyellow10); + this.pnlyellowcolours.Controls.Add(this.pnlyellow8); + this.pnlyellowcolours.Controls.Add(this.pnlyellow4); + this.pnlyellowcolours.Controls.Add(this.pnlyellow6); + this.pnlyellowcolours.Controls.Add(this.pnlyellow15); + this.pnlyellowcolours.Controls.Add(this.pnlyellow2); + this.pnlyellowcolours.Controls.Add(this.pnlyellow13); + this.pnlyellowcolours.Controls.Add(this.pnlyellow11); + this.pnlyellowcolours.Controls.Add(this.pnlyellow7); + this.pnlyellowcolours.Controls.Add(this.pnlyellow9); + this.pnlyellowcolours.Controls.Add(this.pnlyellow5); + this.pnlyellowcolours.Controls.Add(this.pnlyellow3); + this.pnlyellowcolours.Controls.Add(this.pnlyellow1); + this.pnlyellowcolours.Controls.Add(this.lblyellowlevel); + this.pnlyellowcolours.Controls.Add(this.Label11); + this.pnlyellowcolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlyellowcolours.Location = new System.Drawing.Point(0, 337); + this.pnlyellowcolours.Name = "pnlyellowcolours"; + this.pnlyellowcolours.Size = new System.Drawing.Size(552, 46); + this.pnlyellowcolours.TabIndex = 6; + this.pnlyellowcolours.Visible = false; + // + // pnlyellowoptions + // + this.pnlyellowoptions.Controls.Add(this.Label20); + this.pnlyellowoptions.Controls.Add(this.txtyellowsblue); + this.pnlyellowoptions.Controls.Add(this.txtyellowsred); + this.pnlyellowoptions.Controls.Add(this.Label22); + this.pnlyellowoptions.Controls.Add(this.Label24); + this.pnlyellowoptions.Controls.Add(this.txtyellowsgreen); + this.pnlyellowoptions.Location = new System.Drawing.Point(282, 3); + this.pnlyellowoptions.Name = "pnlyellowoptions"; + this.pnlyellowoptions.Size = new System.Drawing.Size(120, 40); + this.pnlyellowoptions.TabIndex = 29; + this.pnlyellowoptions.Visible = false; + // + // Label20 + // + this.Label20.AutoSize = true; + this.Label20.BackColor = System.Drawing.Color.Transparent; + this.Label20.Location = new System.Drawing.Point(64, 24); + this.Label20.Name = "Label20"; + this.Label20.Size = new System.Drawing.Size(31, 13); + this.Label20.TabIndex = 26; + this.Label20.Text = "Blue:"; + // + // txtyellowsblue + // + this.txtyellowsblue.BackColor = System.Drawing.Color.White; + this.txtyellowsblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtyellowsblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtyellowsblue.Location = new System.Drawing.Point(95, 22); + this.txtyellowsblue.Multiline = true; + this.txtyellowsblue.Name = "txtyellowsblue"; + this.txtyellowsblue.Size = new System.Drawing.Size(23, 17); + this.txtyellowsblue.TabIndex = 25; + this.txtyellowsblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtyellowsred + // + this.txtyellowsred.BackColor = System.Drawing.Color.White; + this.txtyellowsred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtyellowsred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtyellowsred.Location = new System.Drawing.Point(64, 2); + this.txtyellowsred.Multiline = true; + this.txtyellowsred.Name = "txtyellowsred"; + this.txtyellowsred.Size = new System.Drawing.Size(23, 17); + this.txtyellowsred.TabIndex = 21; + this.txtyellowsred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label22 + // + this.Label22.AutoSize = true; + this.Label22.BackColor = System.Drawing.Color.Transparent; + this.Label22.Location = new System.Drawing.Point(1, 23); + this.Label22.Name = "Label22"; + this.Label22.Size = new System.Drawing.Size(39, 13); + this.Label22.TabIndex = 24; + this.Label22.Text = "Green:"; + // + // Label24 + // + this.Label24.AutoSize = true; + this.Label24.BackColor = System.Drawing.Color.Transparent; + this.Label24.Location = new System.Drawing.Point(33, 4); + this.Label24.Name = "Label24"; + this.Label24.Size = new System.Drawing.Size(30, 13); + this.Label24.TabIndex = 22; + this.Label24.Text = "Red:"; + // + // txtyellowsgreen + // + this.txtyellowsgreen.BackColor = System.Drawing.Color.White; + this.txtyellowsgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtyellowsgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtyellowsgreen.Location = new System.Drawing.Point(40, 22); + this.txtyellowsgreen.Multiline = true; + this.txtyellowsgreen.Name = "txtyellowsgreen"; + this.txtyellowsgreen.Size = new System.Drawing.Size(23, 17); + this.txtyellowsgreen.TabIndex = 23; + this.txtyellowsgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlyellowcustomcolour + // + this.pnlyellowcustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellowcustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlyellowcustomcolour.Name = "pnlyellowcustomcolour"; + this.pnlyellowcustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlyellowcustomcolour.TabIndex = 18; + this.pnlyellowcustomcolour.Visible = false; + // + // pnlyellow16 + // + this.pnlyellow16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow16.Location = new System.Drawing.Point(259, 25); + this.pnlyellow16.Name = "pnlyellow16"; + this.pnlyellow16.Size = new System.Drawing.Size(20, 13); + this.pnlyellow16.TabIndex = 17; + this.pnlyellow16.Visible = false; + // + // pnlyellow12 + // + this.pnlyellow12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow12.Location = new System.Drawing.Point(155, 25); + this.pnlyellow12.Name = "pnlyellow12"; + this.pnlyellow12.Size = new System.Drawing.Size(20, 13); + this.pnlyellow12.TabIndex = 9; + this.pnlyellow12.Visible = false; + // + // pnlyellow14 + // + this.pnlyellow14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow14.Location = new System.Drawing.Point(207, 25); + this.pnlyellow14.Name = "pnlyellow14"; + this.pnlyellow14.Size = new System.Drawing.Size(20, 13); + this.pnlyellow14.TabIndex = 13; + this.pnlyellow14.Visible = false; + // + // pnlyellow10 + // + this.pnlyellow10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow10.Location = new System.Drawing.Point(103, 25); + this.pnlyellow10.Name = "pnlyellow10"; + this.pnlyellow10.Size = new System.Drawing.Size(20, 13); + this.pnlyellow10.TabIndex = 5; + this.pnlyellow10.Visible = false; + // + // pnlyellow8 + // + this.pnlyellow8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow8.Location = new System.Drawing.Point(259, 8); + this.pnlyellow8.Name = "pnlyellow8"; + this.pnlyellow8.Size = new System.Drawing.Size(20, 13); + this.pnlyellow8.TabIndex = 16; + this.pnlyellow8.Visible = false; + // + // pnlyellow4 + // + this.pnlyellow4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow4.Location = new System.Drawing.Point(155, 8); + this.pnlyellow4.Name = "pnlyellow4"; + this.pnlyellow4.Size = new System.Drawing.Size(20, 13); + this.pnlyellow4.TabIndex = 8; + this.pnlyellow4.Visible = false; + // + // pnlyellow6 + // + this.pnlyellow6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow6.Location = new System.Drawing.Point(207, 8); + this.pnlyellow6.Name = "pnlyellow6"; + this.pnlyellow6.Size = new System.Drawing.Size(20, 13); + this.pnlyellow6.TabIndex = 12; + this.pnlyellow6.Visible = false; + // + // pnlyellow15 + // + this.pnlyellow15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow15.Location = new System.Drawing.Point(233, 25); + this.pnlyellow15.Name = "pnlyellow15"; + this.pnlyellow15.Size = new System.Drawing.Size(20, 13); + this.pnlyellow15.TabIndex = 15; + this.pnlyellow15.Visible = false; + // + // pnlyellow2 + // + this.pnlyellow2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow2.Location = new System.Drawing.Point(103, 8); + this.pnlyellow2.Name = "pnlyellow2"; + this.pnlyellow2.Size = new System.Drawing.Size(20, 13); + this.pnlyellow2.TabIndex = 4; + this.pnlyellow2.Visible = false; + // + // pnlyellow13 + // + this.pnlyellow13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow13.Location = new System.Drawing.Point(181, 25); + this.pnlyellow13.Name = "pnlyellow13"; + this.pnlyellow13.Size = new System.Drawing.Size(20, 13); + this.pnlyellow13.TabIndex = 11; + this.pnlyellow13.Visible = false; + // + // pnlyellow11 + // + this.pnlyellow11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow11.Location = new System.Drawing.Point(129, 25); + this.pnlyellow11.Name = "pnlyellow11"; + this.pnlyellow11.Size = new System.Drawing.Size(20, 13); + this.pnlyellow11.TabIndex = 7; + this.pnlyellow11.Visible = false; + // + // pnlyellow7 + // + this.pnlyellow7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow7.Location = new System.Drawing.Point(233, 8); + this.pnlyellow7.Name = "pnlyellow7"; + this.pnlyellow7.Size = new System.Drawing.Size(20, 13); + this.pnlyellow7.TabIndex = 14; + this.pnlyellow7.Visible = false; + // + // pnlyellow9 + // + this.pnlyellow9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow9.Location = new System.Drawing.Point(77, 25); + this.pnlyellow9.Name = "pnlyellow9"; + this.pnlyellow9.Size = new System.Drawing.Size(20, 13); + this.pnlyellow9.TabIndex = 3; + this.pnlyellow9.Visible = false; + // + // pnlyellow5 + // + this.pnlyellow5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow5.Location = new System.Drawing.Point(181, 8); + this.pnlyellow5.Name = "pnlyellow5"; + this.pnlyellow5.Size = new System.Drawing.Size(20, 13); + this.pnlyellow5.TabIndex = 10; + this.pnlyellow5.Visible = false; + // + // pnlyellow3 + // + this.pnlyellow3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow3.Location = new System.Drawing.Point(129, 8); + this.pnlyellow3.Name = "pnlyellow3"; + this.pnlyellow3.Size = new System.Drawing.Size(20, 13); + this.pnlyellow3.TabIndex = 6; + this.pnlyellow3.Visible = false; + // + // pnlyellow1 + // + this.pnlyellow1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlyellow1.Location = new System.Drawing.Point(77, 8); + this.pnlyellow1.Name = "pnlyellow1"; + this.pnlyellow1.Size = new System.Drawing.Size(20, 13); + this.pnlyellow1.TabIndex = 2; + this.pnlyellow1.Visible = false; + // + // lblyellowlevel + // + this.lblyellowlevel.AutoSize = true; + this.lblyellowlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblyellowlevel.Location = new System.Drawing.Point(5, 25); + this.lblyellowlevel.Name = "lblyellowlevel"; + this.lblyellowlevel.Size = new System.Drawing.Size(49, 15); + this.lblyellowlevel.TabIndex = 1; + this.lblyellowlevel.Text = "Level: 4"; + // + // Label11 + // + this.Label11.AutoSize = true; + this.Label11.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label11.Location = new System.Drawing.Point(3, 2); + this.Label11.Name = "Label11"; + this.Label11.Size = new System.Drawing.Size(65, 22); + this.Label11.TabIndex = 0; + this.Label11.Text = "Yellow"; + // + // pnlgreencolours + // + this.pnlgreencolours.BackColor = System.Drawing.Color.White; + this.pnlgreencolours.Controls.Add(this.pnlgreenoptions); + this.pnlgreencolours.Controls.Add(this.pnlgreencustomcolour); + this.pnlgreencolours.Controls.Add(this.pnlgreen16); + this.pnlgreencolours.Controls.Add(this.pnlgreen12); + this.pnlgreencolours.Controls.Add(this.pnlgreen14); + this.pnlgreencolours.Controls.Add(this.pnlgreen10); + this.pnlgreencolours.Controls.Add(this.pnlgreen8); + this.pnlgreencolours.Controls.Add(this.pnlgreen4); + this.pnlgreencolours.Controls.Add(this.pnlgreen6); + this.pnlgreencolours.Controls.Add(this.pnlgreen15); + this.pnlgreencolours.Controls.Add(this.pnlgreen2); + this.pnlgreencolours.Controls.Add(this.pnlgreen13); + this.pnlgreencolours.Controls.Add(this.pnlgreen11); + this.pnlgreencolours.Controls.Add(this.pnlgreen7); + this.pnlgreencolours.Controls.Add(this.pnlgreen9); + this.pnlgreencolours.Controls.Add(this.pnlgreen5); + this.pnlgreencolours.Controls.Add(this.pnlgreen3); + this.pnlgreencolours.Controls.Add(this.pnlgreen1); + this.pnlgreencolours.Controls.Add(this.lblgreenlevel); + this.pnlgreencolours.Controls.Add(this.Label9); + this.pnlgreencolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlgreencolours.Location = new System.Drawing.Point(0, 291); + this.pnlgreencolours.Name = "pnlgreencolours"; + this.pnlgreencolours.Size = new System.Drawing.Size(552, 46); + this.pnlgreencolours.TabIndex = 5; + this.pnlgreencolours.Visible = false; + // + // pnlgreenoptions + // + this.pnlgreenoptions.Controls.Add(this.Label15); + this.pnlgreenoptions.Controls.Add(this.txtgreensred); + this.pnlgreenoptions.Controls.Add(this.txtgreensgreen); + this.pnlgreenoptions.Controls.Add(this.Label16); + this.pnlgreenoptions.Controls.Add(this.Label18); + this.pnlgreenoptions.Controls.Add(this.txtgreensblue); + this.pnlgreenoptions.Location = new System.Drawing.Point(282, 3); + this.pnlgreenoptions.Name = "pnlgreenoptions"; + this.pnlgreenoptions.Size = new System.Drawing.Size(120, 40); + this.pnlgreenoptions.TabIndex = 29; + this.pnlgreenoptions.Visible = false; + // + // Label15 + // + this.Label15.AutoSize = true; + this.Label15.BackColor = System.Drawing.Color.Transparent; + this.Label15.Location = new System.Drawing.Point(62, 24); + this.Label15.Name = "Label15"; + this.Label15.Size = new System.Drawing.Size(30, 13); + this.Label15.TabIndex = 26; + this.Label15.Text = "Red:"; + // + // txtgreensred + // + this.txtgreensred.BackColor = System.Drawing.Color.White; + this.txtgreensred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtgreensred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtgreensred.Location = new System.Drawing.Point(92, 22); + this.txtgreensred.Multiline = true; + this.txtgreensred.Name = "txtgreensred"; + this.txtgreensred.Size = new System.Drawing.Size(23, 17); + this.txtgreensred.TabIndex = 25; + this.txtgreensred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtgreensgreen + // + this.txtgreensgreen.BackColor = System.Drawing.Color.White; + this.txtgreensgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtgreensgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtgreensgreen.Location = new System.Drawing.Point(66, 2); + this.txtgreensgreen.Multiline = true; + this.txtgreensgreen.Name = "txtgreensgreen"; + this.txtgreensgreen.Size = new System.Drawing.Size(23, 17); + this.txtgreensgreen.TabIndex = 21; + this.txtgreensgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label16 + // + this.Label16.AutoSize = true; + this.Label16.BackColor = System.Drawing.Color.Transparent; + this.Label16.Location = new System.Drawing.Point(2, 23); + this.Label16.Name = "Label16"; + this.Label16.Size = new System.Drawing.Size(31, 13); + this.Label16.TabIndex = 24; + this.Label16.Text = "Blue:"; + // + // Label18 + // + this.Label18.AutoSize = true; + this.Label18.BackColor = System.Drawing.Color.Transparent; + this.Label18.Location = new System.Drawing.Point(28, 4); + this.Label18.Name = "Label18"; + this.Label18.Size = new System.Drawing.Size(39, 13); + this.Label18.TabIndex = 22; + this.Label18.Text = "Green:"; + // + // txtgreensblue + // + this.txtgreensblue.BackColor = System.Drawing.Color.White; + this.txtgreensblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtgreensblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtgreensblue.Location = new System.Drawing.Point(33, 22); + this.txtgreensblue.Multiline = true; + this.txtgreensblue.Name = "txtgreensblue"; + this.txtgreensblue.Size = new System.Drawing.Size(23, 17); + this.txtgreensblue.TabIndex = 23; + this.txtgreensblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlgreencustomcolour + // + this.pnlgreencustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreencustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlgreencustomcolour.Name = "pnlgreencustomcolour"; + this.pnlgreencustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlgreencustomcolour.TabIndex = 18; + this.pnlgreencustomcolour.Visible = false; + // + // pnlgreen16 + // + this.pnlgreen16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen16.Location = new System.Drawing.Point(259, 25); + this.pnlgreen16.Name = "pnlgreen16"; + this.pnlgreen16.Size = new System.Drawing.Size(20, 13); + this.pnlgreen16.TabIndex = 17; + this.pnlgreen16.Visible = false; + // + // pnlgreen12 + // + this.pnlgreen12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen12.Location = new System.Drawing.Point(155, 25); + this.pnlgreen12.Name = "pnlgreen12"; + this.pnlgreen12.Size = new System.Drawing.Size(20, 13); + this.pnlgreen12.TabIndex = 9; + this.pnlgreen12.Visible = false; + // + // pnlgreen14 + // + this.pnlgreen14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen14.Location = new System.Drawing.Point(207, 25); + this.pnlgreen14.Name = "pnlgreen14"; + this.pnlgreen14.Size = new System.Drawing.Size(20, 13); + this.pnlgreen14.TabIndex = 13; + this.pnlgreen14.Visible = false; + // + // pnlgreen10 + // + this.pnlgreen10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen10.Location = new System.Drawing.Point(103, 25); + this.pnlgreen10.Name = "pnlgreen10"; + this.pnlgreen10.Size = new System.Drawing.Size(20, 13); + this.pnlgreen10.TabIndex = 5; + this.pnlgreen10.Visible = false; + // + // pnlgreen8 + // + this.pnlgreen8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen8.Location = new System.Drawing.Point(259, 8); + this.pnlgreen8.Name = "pnlgreen8"; + this.pnlgreen8.Size = new System.Drawing.Size(20, 13); + this.pnlgreen8.TabIndex = 16; + this.pnlgreen8.Visible = false; + // + // pnlgreen4 + // + this.pnlgreen4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen4.Location = new System.Drawing.Point(155, 8); + this.pnlgreen4.Name = "pnlgreen4"; + this.pnlgreen4.Size = new System.Drawing.Size(20, 13); + this.pnlgreen4.TabIndex = 8; + this.pnlgreen4.Visible = false; + // + // pnlgreen6 + // + this.pnlgreen6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen6.Location = new System.Drawing.Point(207, 8); + this.pnlgreen6.Name = "pnlgreen6"; + this.pnlgreen6.Size = new System.Drawing.Size(20, 13); + this.pnlgreen6.TabIndex = 12; + this.pnlgreen6.Visible = false; + // + // pnlgreen15 + // + this.pnlgreen15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen15.Location = new System.Drawing.Point(233, 25); + this.pnlgreen15.Name = "pnlgreen15"; + this.pnlgreen15.Size = new System.Drawing.Size(20, 13); + this.pnlgreen15.TabIndex = 15; + this.pnlgreen15.Visible = false; + // + // pnlgreen2 + // + this.pnlgreen2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen2.Location = new System.Drawing.Point(103, 8); + this.pnlgreen2.Name = "pnlgreen2"; + this.pnlgreen2.Size = new System.Drawing.Size(20, 13); + this.pnlgreen2.TabIndex = 4; + this.pnlgreen2.Visible = false; + // + // pnlgreen13 + // + this.pnlgreen13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen13.Location = new System.Drawing.Point(181, 25); + this.pnlgreen13.Name = "pnlgreen13"; + this.pnlgreen13.Size = new System.Drawing.Size(20, 13); + this.pnlgreen13.TabIndex = 11; + this.pnlgreen13.Visible = false; + // + // pnlgreen11 + // + this.pnlgreen11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen11.Location = new System.Drawing.Point(129, 25); + this.pnlgreen11.Name = "pnlgreen11"; + this.pnlgreen11.Size = new System.Drawing.Size(20, 13); + this.pnlgreen11.TabIndex = 7; + this.pnlgreen11.Visible = false; + // + // pnlgreen7 + // + this.pnlgreen7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen7.Location = new System.Drawing.Point(233, 8); + this.pnlgreen7.Name = "pnlgreen7"; + this.pnlgreen7.Size = new System.Drawing.Size(20, 13); + this.pnlgreen7.TabIndex = 14; + this.pnlgreen7.Visible = false; + // + // pnlgreen9 + // + this.pnlgreen9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen9.Location = new System.Drawing.Point(77, 25); + this.pnlgreen9.Name = "pnlgreen9"; + this.pnlgreen9.Size = new System.Drawing.Size(20, 13); + this.pnlgreen9.TabIndex = 3; + this.pnlgreen9.Visible = false; + // + // pnlgreen5 + // + this.pnlgreen5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen5.Location = new System.Drawing.Point(181, 8); + this.pnlgreen5.Name = "pnlgreen5"; + this.pnlgreen5.Size = new System.Drawing.Size(20, 13); + this.pnlgreen5.TabIndex = 10; + this.pnlgreen5.Visible = false; + // + // pnlgreen3 + // + this.pnlgreen3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen3.Location = new System.Drawing.Point(129, 8); + this.pnlgreen3.Name = "pnlgreen3"; + this.pnlgreen3.Size = new System.Drawing.Size(20, 13); + this.pnlgreen3.TabIndex = 6; + this.pnlgreen3.Visible = false; + // + // pnlgreen1 + // + this.pnlgreen1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgreen1.Location = new System.Drawing.Point(77, 8); + this.pnlgreen1.Name = "pnlgreen1"; + this.pnlgreen1.Size = new System.Drawing.Size(20, 13); + this.pnlgreen1.TabIndex = 2; + this.pnlgreen1.Visible = false; + // + // lblgreenlevel + // + this.lblgreenlevel.AutoSize = true; + this.lblgreenlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblgreenlevel.Location = new System.Drawing.Point(5, 25); + this.lblgreenlevel.Name = "lblgreenlevel"; + this.lblgreenlevel.Size = new System.Drawing.Size(49, 15); + this.lblgreenlevel.TabIndex = 1; + this.lblgreenlevel.Text = "Level: 4"; + // + // Label9 + // + this.Label9.AutoSize = true; + this.Label9.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label9.Location = new System.Drawing.Point(3, 2); + this.Label9.Name = "Label9"; + this.Label9.Size = new System.Drawing.Size(60, 22); + this.Label9.TabIndex = 0; + this.Label9.Text = "Green"; + // + // pnlbluecolours + // + this.pnlbluecolours.BackColor = System.Drawing.Color.White; + this.pnlbluecolours.Controls.Add(this.pnlblueoptions); + this.pnlbluecolours.Controls.Add(this.pnlbluecustomcolour); + this.pnlbluecolours.Controls.Add(this.pnlblue16); + this.pnlbluecolours.Controls.Add(this.pnlblue12); + this.pnlbluecolours.Controls.Add(this.pnlblue14); + this.pnlbluecolours.Controls.Add(this.pnlblue10); + this.pnlbluecolours.Controls.Add(this.pnlblue8); + this.pnlbluecolours.Controls.Add(this.pnlblue4); + this.pnlbluecolours.Controls.Add(this.pnlblue6); + this.pnlbluecolours.Controls.Add(this.pnlblue15); + this.pnlbluecolours.Controls.Add(this.pnlblue2); + this.pnlbluecolours.Controls.Add(this.pnlblue13); + this.pnlbluecolours.Controls.Add(this.pnlblue11); + this.pnlbluecolours.Controls.Add(this.pnlblue7); + this.pnlbluecolours.Controls.Add(this.pnlblue9); + this.pnlbluecolours.Controls.Add(this.pnlblue5); + this.pnlbluecolours.Controls.Add(this.pnlblue3); + this.pnlbluecolours.Controls.Add(this.pnlblue1); + this.pnlbluecolours.Controls.Add(this.lblbluelevel); + this.pnlbluecolours.Controls.Add(this.Label7); + this.pnlbluecolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlbluecolours.Location = new System.Drawing.Point(0, 245); + this.pnlbluecolours.Name = "pnlbluecolours"; + this.pnlbluecolours.Size = new System.Drawing.Size(552, 46); + this.pnlbluecolours.TabIndex = 4; + this.pnlbluecolours.Visible = false; + // + // pnlblueoptions + // + this.pnlblueoptions.Controls.Add(this.Label6); + this.pnlblueoptions.Controls.Add(this.txtbluesred); + this.pnlblueoptions.Controls.Add(this.txtbluesblue); + this.pnlblueoptions.Controls.Add(this.Label4); + this.pnlblueoptions.Controls.Add(this.Label2); + this.pnlblueoptions.Controls.Add(this.txtbluesgreen); + this.pnlblueoptions.Location = new System.Drawing.Point(282, 3); + this.pnlblueoptions.Name = "pnlblueoptions"; + this.pnlblueoptions.Size = new System.Drawing.Size(120, 40); + this.pnlblueoptions.TabIndex = 27; + this.pnlblueoptions.Visible = false; + // + // Label6 + // + this.Label6.AutoSize = true; + this.Label6.BackColor = System.Drawing.Color.Transparent; + this.Label6.Location = new System.Drawing.Point(65, 24); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(30, 13); + this.Label6.TabIndex = 26; + this.Label6.Text = "Red:"; + // + // txtbluesred + // + this.txtbluesred.BackColor = System.Drawing.Color.White; + this.txtbluesred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbluesred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbluesred.Location = new System.Drawing.Point(95, 22); + this.txtbluesred.Multiline = true; + this.txtbluesred.Name = "txtbluesred"; + this.txtbluesred.Size = new System.Drawing.Size(23, 17); + this.txtbluesred.TabIndex = 25; + this.txtbluesred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtbluesblue + // + this.txtbluesblue.BackColor = System.Drawing.Color.White; + this.txtbluesblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbluesblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbluesblue.Location = new System.Drawing.Point(65, 2); + this.txtbluesblue.Multiline = true; + this.txtbluesblue.Name = "txtbluesblue"; + this.txtbluesblue.Size = new System.Drawing.Size(23, 17); + this.txtbluesblue.TabIndex = 21; + this.txtbluesblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.BackColor = System.Drawing.Color.Transparent; + this.Label4.Location = new System.Drawing.Point(2, 23); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(39, 13); + this.Label4.TabIndex = 24; + this.Label4.Text = "Green:"; + // + // Label2 + // + this.Label2.AutoSize = true; + this.Label2.BackColor = System.Drawing.Color.Transparent; + this.Label2.Location = new System.Drawing.Point(33, 4); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(31, 13); + this.Label2.TabIndex = 22; + this.Label2.Text = "Blue:"; + // + // txtbluesgreen + // + this.txtbluesgreen.BackColor = System.Drawing.Color.White; + this.txtbluesgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbluesgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbluesgreen.Location = new System.Drawing.Point(41, 22); + this.txtbluesgreen.Multiline = true; + this.txtbluesgreen.Name = "txtbluesgreen"; + this.txtbluesgreen.Size = new System.Drawing.Size(23, 17); + this.txtbluesgreen.TabIndex = 23; + this.txtbluesgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlbluecustomcolour + // + this.pnlbluecustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbluecustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlbluecustomcolour.Name = "pnlbluecustomcolour"; + this.pnlbluecustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlbluecustomcolour.TabIndex = 18; + this.pnlbluecustomcolour.Visible = false; + // + // pnlblue16 + // + this.pnlblue16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue16.Location = new System.Drawing.Point(259, 25); + this.pnlblue16.Name = "pnlblue16"; + this.pnlblue16.Size = new System.Drawing.Size(20, 13); + this.pnlblue16.TabIndex = 17; + this.pnlblue16.Visible = false; + // + // pnlblue12 + // + this.pnlblue12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue12.Location = new System.Drawing.Point(155, 25); + this.pnlblue12.Name = "pnlblue12"; + this.pnlblue12.Size = new System.Drawing.Size(20, 13); + this.pnlblue12.TabIndex = 9; + this.pnlblue12.Visible = false; + // + // pnlblue14 + // + this.pnlblue14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue14.Location = new System.Drawing.Point(207, 25); + this.pnlblue14.Name = "pnlblue14"; + this.pnlblue14.Size = new System.Drawing.Size(20, 13); + this.pnlblue14.TabIndex = 13; + this.pnlblue14.Visible = false; + // + // pnlblue10 + // + this.pnlblue10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue10.Location = new System.Drawing.Point(103, 25); + this.pnlblue10.Name = "pnlblue10"; + this.pnlblue10.Size = new System.Drawing.Size(20, 13); + this.pnlblue10.TabIndex = 5; + this.pnlblue10.Visible = false; + // + // pnlblue8 + // + this.pnlblue8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue8.Location = new System.Drawing.Point(259, 8); + this.pnlblue8.Name = "pnlblue8"; + this.pnlblue8.Size = new System.Drawing.Size(20, 13); + this.pnlblue8.TabIndex = 16; + this.pnlblue8.Visible = false; + // + // pnlblue4 + // + this.pnlblue4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue4.Location = new System.Drawing.Point(155, 8); + this.pnlblue4.Name = "pnlblue4"; + this.pnlblue4.Size = new System.Drawing.Size(20, 13); + this.pnlblue4.TabIndex = 8; + this.pnlblue4.Visible = false; + // + // pnlblue6 + // + this.pnlblue6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue6.Location = new System.Drawing.Point(207, 8); + this.pnlblue6.Name = "pnlblue6"; + this.pnlblue6.Size = new System.Drawing.Size(20, 13); + this.pnlblue6.TabIndex = 12; + this.pnlblue6.Visible = false; + // + // pnlblue15 + // + this.pnlblue15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue15.Location = new System.Drawing.Point(233, 25); + this.pnlblue15.Name = "pnlblue15"; + this.pnlblue15.Size = new System.Drawing.Size(20, 13); + this.pnlblue15.TabIndex = 15; + this.pnlblue15.Visible = false; + // + // pnlblue2 + // + this.pnlblue2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue2.Location = new System.Drawing.Point(103, 8); + this.pnlblue2.Name = "pnlblue2"; + this.pnlblue2.Size = new System.Drawing.Size(20, 13); + this.pnlblue2.TabIndex = 4; + this.pnlblue2.Visible = false; + // + // pnlblue13 + // + this.pnlblue13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue13.Location = new System.Drawing.Point(181, 25); + this.pnlblue13.Name = "pnlblue13"; + this.pnlblue13.Size = new System.Drawing.Size(20, 13); + this.pnlblue13.TabIndex = 11; + this.pnlblue13.Visible = false; + // + // pnlblue11 + // + this.pnlblue11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue11.Location = new System.Drawing.Point(129, 25); + this.pnlblue11.Name = "pnlblue11"; + this.pnlblue11.Size = new System.Drawing.Size(20, 13); + this.pnlblue11.TabIndex = 7; + this.pnlblue11.Visible = false; + // + // pnlblue7 + // + this.pnlblue7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue7.Location = new System.Drawing.Point(233, 8); + this.pnlblue7.Name = "pnlblue7"; + this.pnlblue7.Size = new System.Drawing.Size(20, 13); + this.pnlblue7.TabIndex = 14; + this.pnlblue7.Visible = false; + // + // pnlblue9 + // + this.pnlblue9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue9.Location = new System.Drawing.Point(77, 25); + this.pnlblue9.Name = "pnlblue9"; + this.pnlblue9.Size = new System.Drawing.Size(20, 13); + this.pnlblue9.TabIndex = 3; + this.pnlblue9.Visible = false; + // + // pnlblue5 + // + this.pnlblue5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue5.Location = new System.Drawing.Point(181, 8); + this.pnlblue5.Name = "pnlblue5"; + this.pnlblue5.Size = new System.Drawing.Size(20, 13); + this.pnlblue5.TabIndex = 10; + this.pnlblue5.Visible = false; + // + // pnlblue3 + // + this.pnlblue3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue3.Location = new System.Drawing.Point(129, 8); + this.pnlblue3.Name = "pnlblue3"; + this.pnlblue3.Size = new System.Drawing.Size(20, 13); + this.pnlblue3.TabIndex = 6; + this.pnlblue3.Visible = false; + // + // pnlblue1 + // + this.pnlblue1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlblue1.Location = new System.Drawing.Point(77, 8); + this.pnlblue1.Name = "pnlblue1"; + this.pnlblue1.Size = new System.Drawing.Size(20, 13); + this.pnlblue1.TabIndex = 2; + this.pnlblue1.Visible = false; + // + // lblbluelevel + // + this.lblbluelevel.AutoSize = true; + this.lblbluelevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblbluelevel.Location = new System.Drawing.Point(5, 25); + this.lblbluelevel.Name = "lblbluelevel"; + this.lblbluelevel.Size = new System.Drawing.Size(49, 15); + this.lblbluelevel.TabIndex = 1; + this.lblbluelevel.Text = "Level: 4"; + // + // Label7 + // + this.Label7.AutoSize = true; + this.Label7.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(3, 2); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(48, 22); + this.Label7.TabIndex = 0; + this.Label7.Text = "Blue"; + // + // pnlpurplecolours + // + this.pnlpurplecolours.BackColor = System.Drawing.Color.White; + this.pnlpurplecolours.Controls.Add(this.pnlpurpleoptions); + this.pnlpurplecolours.Controls.Add(this.pnlpurplecustomcolour); + this.pnlpurplecolours.Controls.Add(this.pnlpurple16); + this.pnlpurplecolours.Controls.Add(this.pnlpurple12); + this.pnlpurplecolours.Controls.Add(this.pnlpurple14); + this.pnlpurplecolours.Controls.Add(this.pnlpurple10); + this.pnlpurplecolours.Controls.Add(this.pnlpurple8); + this.pnlpurplecolours.Controls.Add(this.pnlpurple4); + this.pnlpurplecolours.Controls.Add(this.pnlpurple6); + this.pnlpurplecolours.Controls.Add(this.pnlpurple15); + this.pnlpurplecolours.Controls.Add(this.pnlpurple2); + this.pnlpurplecolours.Controls.Add(this.pnlpurple13); + this.pnlpurplecolours.Controls.Add(this.pnlpurple11); + this.pnlpurplecolours.Controls.Add(this.pnlpurple7); + this.pnlpurplecolours.Controls.Add(this.pnlpurple9); + this.pnlpurplecolours.Controls.Add(this.pnlpurple5); + this.pnlpurplecolours.Controls.Add(this.pnlpurple3); + this.pnlpurplecolours.Controls.Add(this.pnlpurple1); + this.pnlpurplecolours.Controls.Add(this.lblpurplelevel); + this.pnlpurplecolours.Controls.Add(this.Label5); + this.pnlpurplecolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlpurplecolours.Location = new System.Drawing.Point(0, 199); + this.pnlpurplecolours.Name = "pnlpurplecolours"; + this.pnlpurplecolours.Size = new System.Drawing.Size(552, 46); + this.pnlpurplecolours.TabIndex = 3; + this.pnlpurplecolours.Visible = false; + // + // pnlpurpleoptions + // + this.pnlpurpleoptions.Controls.Add(this.Label8); + this.pnlpurpleoptions.Controls.Add(this.txtpurplesgreen); + this.pnlpurpleoptions.Controls.Add(this.txtpurplesblue); + this.pnlpurpleoptions.Controls.Add(this.Label10); + this.pnlpurpleoptions.Controls.Add(this.Label12); + this.pnlpurpleoptions.Controls.Add(this.txtpurplesred); + this.pnlpurpleoptions.Location = new System.Drawing.Point(282, 3); + this.pnlpurpleoptions.Name = "pnlpurpleoptions"; + this.pnlpurpleoptions.Size = new System.Drawing.Size(120, 40); + this.pnlpurpleoptions.TabIndex = 28; + this.pnlpurpleoptions.Visible = false; + // + // Label8 + // + this.Label8.AutoSize = true; + this.Label8.BackColor = System.Drawing.Color.Transparent; + this.Label8.Location = new System.Drawing.Point(56, 24); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(39, 13); + this.Label8.TabIndex = 26; + this.Label8.Text = "Green:"; + // + // txtpurplesgreen + // + this.txtpurplesgreen.BackColor = System.Drawing.Color.White; + this.txtpurplesgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpurplesgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpurplesgreen.Location = new System.Drawing.Point(95, 22); + this.txtpurplesgreen.Multiline = true; + this.txtpurplesgreen.Name = "txtpurplesgreen"; + this.txtpurplesgreen.Size = new System.Drawing.Size(23, 17); + this.txtpurplesgreen.TabIndex = 25; + this.txtpurplesgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // txtpurplesblue + // + this.txtpurplesblue.BackColor = System.Drawing.Color.White; + this.txtpurplesblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpurplesblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpurplesblue.Location = new System.Drawing.Point(65, 2); + this.txtpurplesblue.Multiline = true; + this.txtpurplesblue.Name = "txtpurplesblue"; + this.txtpurplesblue.Size = new System.Drawing.Size(23, 17); + this.txtpurplesblue.TabIndex = 21; + this.txtpurplesblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label10 + // + this.Label10.AutoSize = true; + this.Label10.BackColor = System.Drawing.Color.Transparent; + this.Label10.Location = new System.Drawing.Point(2, 23); + this.Label10.Name = "Label10"; + this.Label10.Size = new System.Drawing.Size(30, 13); + this.Label10.TabIndex = 24; + this.Label10.Text = "Red:"; + // + // Label12 + // + this.Label12.AutoSize = true; + this.Label12.BackColor = System.Drawing.Color.Transparent; + this.Label12.Location = new System.Drawing.Point(33, 4); + this.Label12.Name = "Label12"; + this.Label12.Size = new System.Drawing.Size(31, 13); + this.Label12.TabIndex = 22; + this.Label12.Text = "Blue:"; + // + // txtpurplesred + // + this.txtpurplesred.BackColor = System.Drawing.Color.White; + this.txtpurplesred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpurplesred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpurplesred.Location = new System.Drawing.Point(32, 22); + this.txtpurplesred.Multiline = true; + this.txtpurplesred.Name = "txtpurplesred"; + this.txtpurplesred.Size = new System.Drawing.Size(23, 17); + this.txtpurplesred.TabIndex = 23; + this.txtpurplesred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // pnlpurplecustomcolour + // + this.pnlpurplecustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurplecustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlpurplecustomcolour.Name = "pnlpurplecustomcolour"; + this.pnlpurplecustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlpurplecustomcolour.TabIndex = 18; + this.pnlpurplecustomcolour.Visible = false; + // + // pnlpurple16 + // + this.pnlpurple16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple16.Location = new System.Drawing.Point(259, 25); + this.pnlpurple16.Name = "pnlpurple16"; + this.pnlpurple16.Size = new System.Drawing.Size(20, 13); + this.pnlpurple16.TabIndex = 17; + this.pnlpurple16.Visible = false; + // + // pnlpurple12 + // + this.pnlpurple12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple12.Location = new System.Drawing.Point(155, 25); + this.pnlpurple12.Name = "pnlpurple12"; + this.pnlpurple12.Size = new System.Drawing.Size(20, 13); + this.pnlpurple12.TabIndex = 9; + this.pnlpurple12.Visible = false; + // + // pnlpurple14 + // + this.pnlpurple14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple14.Location = new System.Drawing.Point(207, 25); + this.pnlpurple14.Name = "pnlpurple14"; + this.pnlpurple14.Size = new System.Drawing.Size(20, 13); + this.pnlpurple14.TabIndex = 13; + this.pnlpurple14.Visible = false; + // + // pnlpurple10 + // + this.pnlpurple10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple10.Location = new System.Drawing.Point(103, 25); + this.pnlpurple10.Name = "pnlpurple10"; + this.pnlpurple10.Size = new System.Drawing.Size(20, 13); + this.pnlpurple10.TabIndex = 5; + this.pnlpurple10.Visible = false; + // + // pnlpurple8 + // + this.pnlpurple8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple8.Location = new System.Drawing.Point(259, 8); + this.pnlpurple8.Name = "pnlpurple8"; + this.pnlpurple8.Size = new System.Drawing.Size(20, 13); + this.pnlpurple8.TabIndex = 16; + this.pnlpurple8.Visible = false; + // + // pnlpurple4 + // + this.pnlpurple4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple4.Location = new System.Drawing.Point(155, 8); + this.pnlpurple4.Name = "pnlpurple4"; + this.pnlpurple4.Size = new System.Drawing.Size(20, 13); + this.pnlpurple4.TabIndex = 8; + this.pnlpurple4.Visible = false; + // + // pnlpurple6 + // + this.pnlpurple6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple6.Location = new System.Drawing.Point(207, 8); + this.pnlpurple6.Name = "pnlpurple6"; + this.pnlpurple6.Size = new System.Drawing.Size(20, 13); + this.pnlpurple6.TabIndex = 12; + this.pnlpurple6.Visible = false; + // + // pnlpurple15 + // + this.pnlpurple15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple15.Location = new System.Drawing.Point(233, 25); + this.pnlpurple15.Name = "pnlpurple15"; + this.pnlpurple15.Size = new System.Drawing.Size(20, 13); + this.pnlpurple15.TabIndex = 15; + this.pnlpurple15.Visible = false; + // + // pnlpurple2 + // + this.pnlpurple2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple2.Location = new System.Drawing.Point(103, 8); + this.pnlpurple2.Name = "pnlpurple2"; + this.pnlpurple2.Size = new System.Drawing.Size(20, 13); + this.pnlpurple2.TabIndex = 4; + this.pnlpurple2.Visible = false; + // + // pnlpurple13 + // + this.pnlpurple13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple13.Location = new System.Drawing.Point(181, 25); + this.pnlpurple13.Name = "pnlpurple13"; + this.pnlpurple13.Size = new System.Drawing.Size(20, 13); + this.pnlpurple13.TabIndex = 11; + this.pnlpurple13.Visible = false; + // + // pnlpurple11 + // + this.pnlpurple11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple11.Location = new System.Drawing.Point(129, 25); + this.pnlpurple11.Name = "pnlpurple11"; + this.pnlpurple11.Size = new System.Drawing.Size(20, 13); + this.pnlpurple11.TabIndex = 7; + this.pnlpurple11.Visible = false; + // + // pnlpurple7 + // + this.pnlpurple7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple7.Location = new System.Drawing.Point(233, 8); + this.pnlpurple7.Name = "pnlpurple7"; + this.pnlpurple7.Size = new System.Drawing.Size(20, 13); + this.pnlpurple7.TabIndex = 14; + this.pnlpurple7.Visible = false; + // + // pnlpurple9 + // + this.pnlpurple9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple9.Location = new System.Drawing.Point(77, 25); + this.pnlpurple9.Name = "pnlpurple9"; + this.pnlpurple9.Size = new System.Drawing.Size(20, 13); + this.pnlpurple9.TabIndex = 3; + this.pnlpurple9.Visible = false; + // + // pnlpurple5 + // + this.pnlpurple5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple5.Location = new System.Drawing.Point(181, 8); + this.pnlpurple5.Name = "pnlpurple5"; + this.pnlpurple5.Size = new System.Drawing.Size(20, 13); + this.pnlpurple5.TabIndex = 10; + this.pnlpurple5.Visible = false; + // + // pnlpurple3 + // + this.pnlpurple3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple3.Location = new System.Drawing.Point(129, 8); + this.pnlpurple3.Name = "pnlpurple3"; + this.pnlpurple3.Size = new System.Drawing.Size(20, 13); + this.pnlpurple3.TabIndex = 6; + this.pnlpurple3.Visible = false; + // + // pnlpurple1 + // + this.pnlpurple1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpurple1.Location = new System.Drawing.Point(77, 8); + this.pnlpurple1.Name = "pnlpurple1"; + this.pnlpurple1.Size = new System.Drawing.Size(20, 13); + this.pnlpurple1.TabIndex = 2; + this.pnlpurple1.Visible = false; + // + // lblpurplelevel + // + this.lblpurplelevel.AutoSize = true; + this.lblpurplelevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblpurplelevel.Location = new System.Drawing.Point(5, 25); + this.lblpurplelevel.Name = "lblpurplelevel"; + this.lblpurplelevel.Size = new System.Drawing.Size(49, 15); + this.lblpurplelevel.TabIndex = 1; + this.lblpurplelevel.Text = "Level: 4"; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(3, 2); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(67, 22); + this.Label5.TabIndex = 0; + this.Label5.Text = "Purple"; + // + // pnlgraycolours + // + this.pnlgraycolours.BackColor = System.Drawing.Color.White; + this.pnlgraycolours.Controls.Add(this.lblcustomshadetut); + this.pnlgraycolours.Controls.Add(this.txtcustomgrayshade); + this.pnlgraycolours.Controls.Add(this.pnlgraycustomcolour); + this.pnlgraycolours.Controls.Add(this.pnlgray16); + this.pnlgraycolours.Controls.Add(this.pnlgray12); + this.pnlgraycolours.Controls.Add(this.pnlgray14); + this.pnlgraycolours.Controls.Add(this.pnlgray10); + this.pnlgraycolours.Controls.Add(this.pnlgray8); + this.pnlgraycolours.Controls.Add(this.pnlgray4); + this.pnlgraycolours.Controls.Add(this.pnlgray6); + this.pnlgraycolours.Controls.Add(this.pnlgray15); + this.pnlgraycolours.Controls.Add(this.pnlgray2); + this.pnlgraycolours.Controls.Add(this.pnlgray13); + this.pnlgraycolours.Controls.Add(this.pnlgray11); + this.pnlgraycolours.Controls.Add(this.pnlgray7); + this.pnlgraycolours.Controls.Add(this.pnlgray9); + this.pnlgraycolours.Controls.Add(this.pnlgray5); + this.pnlgraycolours.Controls.Add(this.pnlgray3); + this.pnlgraycolours.Controls.Add(this.pnlgray1); + this.pnlgraycolours.Controls.Add(this.lblgraylevel); + this.pnlgraycolours.Controls.Add(this.Label3); + this.pnlgraycolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlgraycolours.Location = new System.Drawing.Point(0, 153); + this.pnlgraycolours.Name = "pnlgraycolours"; + this.pnlgraycolours.Size = new System.Drawing.Size(552, 46); + this.pnlgraycolours.TabIndex = 2; + this.pnlgraycolours.Visible = false; + // + // lblcustomshadetut + // + this.lblcustomshadetut.AutoSize = true; + this.lblcustomshadetut.BackColor = System.Drawing.Color.Transparent; + this.lblcustomshadetut.Location = new System.Drawing.Point(290, 5); + this.lblcustomshadetut.Name = "lblcustomshadetut"; + this.lblcustomshadetut.Size = new System.Drawing.Size(102, 13); + this.lblcustomshadetut.TabIndex = 20; + this.lblcustomshadetut.Text = "Enter Shade (0-255)"; + this.lblcustomshadetut.Visible = false; + // + // txtcustomgrayshade + // + this.txtcustomgrayshade.BackColor = System.Drawing.Color.White; + this.txtcustomgrayshade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtcustomgrayshade.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtcustomgrayshade.Location = new System.Drawing.Point(317, 20); + this.txtcustomgrayshade.Multiline = true; + this.txtcustomgrayshade.Name = "txtcustomgrayshade"; + this.txtcustomgrayshade.Size = new System.Drawing.Size(45, 17); + this.txtcustomgrayshade.TabIndex = 19; + this.txtcustomgrayshade.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtcustomgrayshade.Visible = false; + this.txtcustomgrayshade.TextChanged += new System.EventHandler(this.txtcustomgrayshade_TextChanged); + // + // pnlgraycustomcolour + // + this.pnlgraycustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgraycustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlgraycustomcolour.Name = "pnlgraycustomcolour"; + this.pnlgraycustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlgraycustomcolour.TabIndex = 18; + this.pnlgraycustomcolour.Visible = false; + // + // pnlgray16 + // + this.pnlgray16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray16.Location = new System.Drawing.Point(259, 25); + this.pnlgray16.Name = "pnlgray16"; + this.pnlgray16.Size = new System.Drawing.Size(20, 13); + this.pnlgray16.TabIndex = 17; + this.pnlgray16.Visible = false; + // + // pnlgray12 + // + this.pnlgray12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray12.Location = new System.Drawing.Point(155, 25); + this.pnlgray12.Name = "pnlgray12"; + this.pnlgray12.Size = new System.Drawing.Size(20, 13); + this.pnlgray12.TabIndex = 9; + this.pnlgray12.Visible = false; + // + // pnlgray14 + // + this.pnlgray14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray14.Location = new System.Drawing.Point(207, 25); + this.pnlgray14.Name = "pnlgray14"; + this.pnlgray14.Size = new System.Drawing.Size(20, 13); + this.pnlgray14.TabIndex = 13; + this.pnlgray14.Visible = false; + // + // pnlgray10 + // + this.pnlgray10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray10.Location = new System.Drawing.Point(103, 25); + this.pnlgray10.Name = "pnlgray10"; + this.pnlgray10.Size = new System.Drawing.Size(20, 13); + this.pnlgray10.TabIndex = 5; + this.pnlgray10.Visible = false; + // + // pnlgray8 + // + this.pnlgray8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray8.Location = new System.Drawing.Point(259, 8); + this.pnlgray8.Name = "pnlgray8"; + this.pnlgray8.Size = new System.Drawing.Size(20, 13); + this.pnlgray8.TabIndex = 16; + this.pnlgray8.Visible = false; + // + // pnlgray4 + // + this.pnlgray4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray4.Location = new System.Drawing.Point(155, 8); + this.pnlgray4.Name = "pnlgray4"; + this.pnlgray4.Size = new System.Drawing.Size(20, 13); + this.pnlgray4.TabIndex = 8; + this.pnlgray4.Visible = false; + // + // pnlgray6 + // + this.pnlgray6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray6.Location = new System.Drawing.Point(207, 8); + this.pnlgray6.Name = "pnlgray6"; + this.pnlgray6.Size = new System.Drawing.Size(20, 13); + this.pnlgray6.TabIndex = 12; + this.pnlgray6.Visible = false; + // + // pnlgray15 + // + this.pnlgray15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray15.Location = new System.Drawing.Point(233, 25); + this.pnlgray15.Name = "pnlgray15"; + this.pnlgray15.Size = new System.Drawing.Size(20, 13); + this.pnlgray15.TabIndex = 15; + this.pnlgray15.Visible = false; + // + // pnlgray2 + // + this.pnlgray2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray2.Location = new System.Drawing.Point(103, 8); + this.pnlgray2.Name = "pnlgray2"; + this.pnlgray2.Size = new System.Drawing.Size(20, 13); + this.pnlgray2.TabIndex = 4; + this.pnlgray2.Visible = false; + // + // pnlgray13 + // + this.pnlgray13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray13.Location = new System.Drawing.Point(181, 25); + this.pnlgray13.Name = "pnlgray13"; + this.pnlgray13.Size = new System.Drawing.Size(20, 13); + this.pnlgray13.TabIndex = 11; + this.pnlgray13.Visible = false; + // + // pnlgray11 + // + this.pnlgray11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray11.Location = new System.Drawing.Point(129, 25); + this.pnlgray11.Name = "pnlgray11"; + this.pnlgray11.Size = new System.Drawing.Size(20, 13); + this.pnlgray11.TabIndex = 7; + this.pnlgray11.Visible = false; + // + // pnlgray7 + // + this.pnlgray7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray7.Location = new System.Drawing.Point(233, 8); + this.pnlgray7.Name = "pnlgray7"; + this.pnlgray7.Size = new System.Drawing.Size(20, 13); + this.pnlgray7.TabIndex = 14; + this.pnlgray7.Visible = false; + // + // pnlgray9 + // + this.pnlgray9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray9.Location = new System.Drawing.Point(77, 25); + this.pnlgray9.Name = "pnlgray9"; + this.pnlgray9.Size = new System.Drawing.Size(20, 13); + this.pnlgray9.TabIndex = 3; + this.pnlgray9.Visible = false; + // + // pnlgray5 + // + this.pnlgray5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray5.Location = new System.Drawing.Point(181, 8); + this.pnlgray5.Name = "pnlgray5"; + this.pnlgray5.Size = new System.Drawing.Size(20, 13); + this.pnlgray5.TabIndex = 10; + this.pnlgray5.Visible = false; + // + // pnlgray3 + // + this.pnlgray3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray3.Location = new System.Drawing.Point(129, 8); + this.pnlgray3.Name = "pnlgray3"; + this.pnlgray3.Size = new System.Drawing.Size(20, 13); + this.pnlgray3.TabIndex = 6; + this.pnlgray3.Visible = false; + // + // pnlgray1 + // + this.pnlgray1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlgray1.Location = new System.Drawing.Point(77, 8); + this.pnlgray1.Name = "pnlgray1"; + this.pnlgray1.Size = new System.Drawing.Size(20, 13); + this.pnlgray1.TabIndex = 2; + this.pnlgray1.Visible = false; + // + // lblgraylevel + // + this.lblgraylevel.AutoSize = true; + this.lblgraylevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblgraylevel.Location = new System.Drawing.Point(5, 25); + this.lblgraylevel.Name = "lblgraylevel"; + this.lblgraylevel.Size = new System.Drawing.Size(49, 15); + this.lblgraylevel.TabIndex = 1; + this.lblgraylevel.Text = "Level: 4"; + // + // Label3 + // + this.Label3.AutoSize = true; + this.Label3.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(3, 2); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(52, 22); + this.Label3.TabIndex = 0; + this.Label3.Text = "Gray"; + // + // pnlanycolours + // + this.pnlanycolours.BackColor = System.Drawing.Color.White; + this.pnlanycolours.Controls.Add(this.pnlanyoptions); + this.pnlanycolours.Controls.Add(this.pnlanycustomcolour); + this.pnlanycolours.Controls.Add(this.pnlany16); + this.pnlanycolours.Controls.Add(this.pnlany12); + this.pnlanycolours.Controls.Add(this.pnlany14); + this.pnlanycolours.Controls.Add(this.pnlany10); + this.pnlanycolours.Controls.Add(this.pnlany8); + this.pnlanycolours.Controls.Add(this.pnlany4); + this.pnlanycolours.Controls.Add(this.pnlany6); + this.pnlanycolours.Controls.Add(this.pnlany15); + this.pnlanycolours.Controls.Add(this.pnlany2); + this.pnlanycolours.Controls.Add(this.pnlany13); + this.pnlanycolours.Controls.Add(this.pnlany11); + this.pnlanycolours.Controls.Add(this.pnlany7); + this.pnlanycolours.Controls.Add(this.pnlany9); + this.pnlanycolours.Controls.Add(this.pnlany5); + this.pnlanycolours.Controls.Add(this.pnlany3); + this.pnlanycolours.Controls.Add(this.pnlany1); + this.pnlanycolours.Controls.Add(this.lblanylevel); + this.pnlanycolours.Controls.Add(this.Label1); + this.pnlanycolours.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlanycolours.Location = new System.Drawing.Point(0, 107); + this.pnlanycolours.Name = "pnlanycolours"; + this.pnlanycolours.Size = new System.Drawing.Size(552, 46); + this.pnlanycolours.TabIndex = 1; + this.pnlanycolours.Visible = false; + // + // pnlanyoptions + // + this.pnlanyoptions.Controls.Add(this.Label38); + this.pnlanyoptions.Controls.Add(this.txtanysgreen); + this.pnlanyoptions.Controls.Add(this.txtanysred); + this.pnlanyoptions.Controls.Add(this.Label39); + this.pnlanyoptions.Controls.Add(this.Label40); + this.pnlanyoptions.Controls.Add(this.txtanysblue); + this.pnlanyoptions.Location = new System.Drawing.Point(282, 3); + this.pnlanyoptions.Name = "pnlanyoptions"; + this.pnlanyoptions.Size = new System.Drawing.Size(120, 40); + this.pnlanyoptions.TabIndex = 34; + this.pnlanyoptions.Visible = false; + this.pnlanyoptions.MouseLeave += new System.EventHandler(this.pnlanyoptions_MouseLeave); + // + // Label38 + // + this.Label38.AutoSize = true; + this.Label38.BackColor = System.Drawing.Color.Transparent; + this.Label38.Location = new System.Drawing.Point(56, 24); + this.Label38.Name = "Label38"; + this.Label38.Size = new System.Drawing.Size(39, 13); + this.Label38.TabIndex = 26; + this.Label38.Text = "Green:"; + // + // txtanysgreen + // + this.txtanysgreen.BackColor = System.Drawing.Color.White; + this.txtanysgreen.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtanysgreen.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtanysgreen.Location = new System.Drawing.Point(95, 22); + this.txtanysgreen.Multiline = true; + this.txtanysgreen.Name = "txtanysgreen"; + this.txtanysgreen.Size = new System.Drawing.Size(23, 17); + this.txtanysgreen.TabIndex = 25; + this.txtanysgreen.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtanysgreen.TextChanged += new System.EventHandler(this.txtanysred_TextChanged); + // + // txtanysred + // + this.txtanysred.BackColor = System.Drawing.Color.White; + this.txtanysred.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtanysred.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtanysred.Location = new System.Drawing.Point(62, 2); + this.txtanysred.Multiline = true; + this.txtanysred.Name = "txtanysred"; + this.txtanysred.Size = new System.Drawing.Size(23, 17); + this.txtanysred.TabIndex = 21; + this.txtanysred.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtanysred.TextChanged += new System.EventHandler(this.txtanysred_TextChanged); + // + // Label39 + // + this.Label39.AutoSize = true; + this.Label39.BackColor = System.Drawing.Color.Transparent; + this.Label39.Location = new System.Drawing.Point(1, 23); + this.Label39.Name = "Label39"; + this.Label39.Size = new System.Drawing.Size(31, 13); + this.Label39.TabIndex = 24; + this.Label39.Text = "Blue:"; + // + // Label40 + // + this.Label40.AutoSize = true; + this.Label40.BackColor = System.Drawing.Color.Transparent; + this.Label40.Location = new System.Drawing.Point(31, 4); + this.Label40.Name = "Label40"; + this.Label40.Size = new System.Drawing.Size(30, 13); + this.Label40.TabIndex = 22; + this.Label40.Text = "Red:"; + // + // txtanysblue + // + this.txtanysblue.BackColor = System.Drawing.Color.White; + this.txtanysblue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtanysblue.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtanysblue.Location = new System.Drawing.Point(32, 22); + this.txtanysblue.Multiline = true; + this.txtanysblue.Name = "txtanysblue"; + this.txtanysblue.Size = new System.Drawing.Size(23, 17); + this.txtanysblue.TabIndex = 23; + this.txtanysblue.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.txtanysblue.TextChanged += new System.EventHandler(this.txtanysred_TextChanged); + // + // pnlanycustomcolour + // + this.pnlanycustomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlanycustomcolour.Location = new System.Drawing.Point(406, 8); + this.pnlanycustomcolour.Name = "pnlanycustomcolour"; + this.pnlanycustomcolour.Size = new System.Drawing.Size(32, 30); + this.pnlanycustomcolour.TabIndex = 17; + this.pnlanycustomcolour.Visible = false; + // + // pnlany16 + // + this.pnlany16.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany16.Location = new System.Drawing.Point(259, 25); + this.pnlany16.Name = "pnlany16"; + this.pnlany16.Size = new System.Drawing.Size(20, 13); + this.pnlany16.TabIndex = 17; + this.pnlany16.Visible = false; + // + // pnlany12 + // + this.pnlany12.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany12.Location = new System.Drawing.Point(155, 25); + this.pnlany12.Name = "pnlany12"; + this.pnlany12.Size = new System.Drawing.Size(20, 13); + this.pnlany12.TabIndex = 9; + this.pnlany12.Visible = false; + // + // pnlany14 + // + this.pnlany14.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany14.Location = new System.Drawing.Point(207, 25); + this.pnlany14.Name = "pnlany14"; + this.pnlany14.Size = new System.Drawing.Size(20, 13); + this.pnlany14.TabIndex = 13; + this.pnlany14.Visible = false; + // + // pnlany10 + // + this.pnlany10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany10.Location = new System.Drawing.Point(103, 25); + this.pnlany10.Name = "pnlany10"; + this.pnlany10.Size = new System.Drawing.Size(20, 13); + this.pnlany10.TabIndex = 5; + this.pnlany10.Visible = false; + // + // pnlany8 + // + this.pnlany8.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany8.Location = new System.Drawing.Point(259, 8); + this.pnlany8.Name = "pnlany8"; + this.pnlany8.Size = new System.Drawing.Size(20, 13); + this.pnlany8.TabIndex = 16; + this.pnlany8.Visible = false; + // + // pnlany4 + // + this.pnlany4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany4.Location = new System.Drawing.Point(155, 8); + this.pnlany4.Name = "pnlany4"; + this.pnlany4.Size = new System.Drawing.Size(20, 13); + this.pnlany4.TabIndex = 8; + this.pnlany4.Visible = false; + // + // pnlany6 + // + this.pnlany6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany6.Location = new System.Drawing.Point(207, 8); + this.pnlany6.Name = "pnlany6"; + this.pnlany6.Size = new System.Drawing.Size(20, 13); + this.pnlany6.TabIndex = 12; + this.pnlany6.Visible = false; + // + // pnlany15 + // + this.pnlany15.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany15.Location = new System.Drawing.Point(233, 25); + this.pnlany15.Name = "pnlany15"; + this.pnlany15.Size = new System.Drawing.Size(20, 13); + this.pnlany15.TabIndex = 15; + this.pnlany15.Visible = false; + // + // pnlany2 + // + this.pnlany2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany2.Location = new System.Drawing.Point(103, 8); + this.pnlany2.Name = "pnlany2"; + this.pnlany2.Size = new System.Drawing.Size(20, 13); + this.pnlany2.TabIndex = 4; + this.pnlany2.Visible = false; + // + // pnlany13 + // + this.pnlany13.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany13.Location = new System.Drawing.Point(181, 25); + this.pnlany13.Name = "pnlany13"; + this.pnlany13.Size = new System.Drawing.Size(20, 13); + this.pnlany13.TabIndex = 11; + this.pnlany13.Visible = false; + // + // pnlany11 + // + this.pnlany11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany11.Location = new System.Drawing.Point(129, 25); + this.pnlany11.Name = "pnlany11"; + this.pnlany11.Size = new System.Drawing.Size(20, 13); + this.pnlany11.TabIndex = 7; + this.pnlany11.Visible = false; + // + // pnlany7 + // + this.pnlany7.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany7.Location = new System.Drawing.Point(233, 8); + this.pnlany7.Name = "pnlany7"; + this.pnlany7.Size = new System.Drawing.Size(20, 13); + this.pnlany7.TabIndex = 14; + this.pnlany7.Visible = false; + // + // pnlany9 + // + this.pnlany9.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany9.Location = new System.Drawing.Point(77, 25); + this.pnlany9.Name = "pnlany9"; + this.pnlany9.Size = new System.Drawing.Size(20, 13); + this.pnlany9.TabIndex = 3; + this.pnlany9.Visible = false; + // + // pnlany5 + // + this.pnlany5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany5.Location = new System.Drawing.Point(181, 8); + this.pnlany5.Name = "pnlany5"; + this.pnlany5.Size = new System.Drawing.Size(20, 13); + this.pnlany5.TabIndex = 10; + this.pnlany5.Visible = false; + // + // pnlany3 + // + this.pnlany3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany3.Location = new System.Drawing.Point(129, 8); + this.pnlany3.Name = "pnlany3"; + this.pnlany3.Size = new System.Drawing.Size(20, 13); + this.pnlany3.TabIndex = 6; + this.pnlany3.Visible = false; + // + // pnlany1 + // + this.pnlany1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlany1.Location = new System.Drawing.Point(77, 8); + this.pnlany1.Name = "pnlany1"; + this.pnlany1.Size = new System.Drawing.Size(20, 13); + this.pnlany1.TabIndex = 2; + this.pnlany1.Visible = false; + // + // lblanylevel + // + this.lblanylevel.AutoSize = true; + this.lblanylevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblanylevel.Location = new System.Drawing.Point(5, 25); + this.lblanylevel.Name = "lblanylevel"; + this.lblanylevel.Size = new System.Drawing.Size(49, 15); + this.lblanylevel.TabIndex = 1; + this.lblanylevel.Text = "Level: 4"; + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Font = new System.Drawing.Font("Cambria", 14.25F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(3, 2); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(43, 22); + this.Label1.TabIndex = 0; + this.Label1.Text = "Any"; + // + // Panel1 + // + this.Panel1.BackColor = System.Drawing.Color.White; + this.Panel1.Controls.Add(this.lblnewcolourrgb); + this.Panel1.Controls.Add(this.lblnewcolourname); + this.Panel1.Controls.Add(this.Label26); + this.Panel1.Controls.Add(this.Label17); + this.Panel1.Controls.Add(this.lbloldcolourrgb); + this.Panel1.Controls.Add(this.lbloldcolourname); + this.Panel1.Controls.Add(this.Label14); + this.Panel1.Controls.Add(this.pnlnewcolour); + this.Panel1.Controls.Add(this.pnloldcolour); + this.Panel1.Controls.Add(this.lblobjecttocolour); + this.Panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.Panel1.Location = new System.Drawing.Point(0, 0); + this.Panel1.Name = "Panel1"; + this.Panel1.Size = new System.Drawing.Size(552, 107); + this.Panel1.TabIndex = 0; + // + // lblnewcolourrgb + // + this.lblnewcolourrgb.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblnewcolourrgb.Location = new System.Drawing.Point(298, 66); + this.lblnewcolourrgb.Name = "lblnewcolourrgb"; + this.lblnewcolourrgb.Size = new System.Drawing.Size(147, 18); + this.lblnewcolourrgb.TabIndex = 10; + this.lblnewcolourrgb.Text = "RGB: 234, 341, 111"; + // + // lblnewcolourname + // + this.lblnewcolourname.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblnewcolourname.Location = new System.Drawing.Point(298, 49); + this.lblnewcolourname.Name = "lblnewcolourname"; + this.lblnewcolourname.Size = new System.Drawing.Size(145, 18); + this.lblnewcolourname.TabIndex = 9; + this.lblnewcolourname.Text = "Name: Whitesmoke"; + // + // Label26 + // + this.Label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label26.Location = new System.Drawing.Point(298, 32); + this.Label26.Name = "Label26"; + this.Label26.Size = new System.Drawing.Size(145, 18); + this.Label26.TabIndex = 8; + this.Label26.Text = "New Colour"; + // + // Label17 + // + this.Label17.AutoSize = true; + this.Label17.Location = new System.Drawing.Point(7, 87); + this.Label17.Name = "Label17"; + this.Label17.Size = new System.Drawing.Size(426, 13); + this.Label17.TabIndex = 7; + this.Label17.Text = "Click the new colour above to confirm your colour choice or click the old colour " + + "to cancel"; + // + // lbloldcolourrgb + // + this.lbloldcolourrgb.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbloldcolourrgb.Location = new System.Drawing.Point(-2, 66); + this.lbloldcolourrgb.Name = "lbloldcolourrgb"; + this.lbloldcolourrgb.Size = new System.Drawing.Size(151, 18); + this.lbloldcolourrgb.TabIndex = 6; + this.lbloldcolourrgb.Text = "50, 60, 20 :RGB"; + this.lbloldcolourrgb.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // lbloldcolourname + // + this.lbloldcolourname.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbloldcolourname.Location = new System.Drawing.Point(-2, 49); + this.lbloldcolourname.Name = "lbloldcolourname"; + this.lbloldcolourname.Size = new System.Drawing.Size(151, 18); + this.lbloldcolourname.TabIndex = 5; + this.lbloldcolourname.Text = "Red :Name"; + this.lbloldcolourname.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // Label14 + // + this.Label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label14.Location = new System.Drawing.Point(-2, 32); + this.Label14.Name = "Label14"; + this.Label14.Size = new System.Drawing.Size(151, 18); + this.Label14.TabIndex = 4; + this.Label14.Text = "Old Colour"; + this.Label14.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // pnlnewcolour + // + this.pnlnewcolour.Location = new System.Drawing.Point(227, 32); + this.pnlnewcolour.Name = "pnlnewcolour"; + this.pnlnewcolour.Size = new System.Drawing.Size(67, 52); + this.pnlnewcolour.TabIndex = 3; + // + // pnloldcolour + // + this.pnloldcolour.Location = new System.Drawing.Point(153, 32); + this.pnloldcolour.Name = "pnloldcolour"; + this.pnloldcolour.Size = new System.Drawing.Size(67, 52); + this.pnloldcolour.TabIndex = 2; + // + // lblobjecttocolour + // + this.lblobjecttocolour.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblobjecttocolour.Location = new System.Drawing.Point(10, 5); + this.lblobjecttocolour.Name = "lblobjecttocolour"; + this.lblobjecttocolour.Size = new System.Drawing.Size(423, 23); + this.lblobjecttocolour.TabIndex = 1; + this.lblobjecttocolour.Text = "Close Button Colour"; + this.lblobjecttocolour.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // ColorPicker + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pgcontents); + this.Name = "ColorPicker"; + this.Text = "Color Picker"; + this.Size = new System.Drawing.Size(552, 657); + this.Load += new System.EventHandler(this.Color_Picker_Load); + this.pgcontents.ResumeLayout(false); + this.pnlpinkcolours.ResumeLayout(false); + this.pnlpinkcolours.PerformLayout(); + this.pnlpinkoptions.ResumeLayout(false); + this.pnlpinkoptions.PerformLayout(); + this.pnlredcolours.ResumeLayout(false); + this.pnlredcolours.PerformLayout(); + this.pnlredoptions.ResumeLayout(false); + this.pnlredoptions.PerformLayout(); + this.pnlbrowncolours.ResumeLayout(false); + this.pnlbrowncolours.PerformLayout(); + this.pnlbrownoptions.ResumeLayout(false); + this.pnlbrownoptions.PerformLayout(); + this.pnlorangecolours.ResumeLayout(false); + this.pnlorangecolours.PerformLayout(); + this.pnlorangeoptions.ResumeLayout(false); + this.pnlorangeoptions.PerformLayout(); + this.pnlyellowcolours.ResumeLayout(false); + this.pnlyellowcolours.PerformLayout(); + this.pnlyellowoptions.ResumeLayout(false); + this.pnlyellowoptions.PerformLayout(); + this.pnlgreencolours.ResumeLayout(false); + this.pnlgreencolours.PerformLayout(); + this.pnlgreenoptions.ResumeLayout(false); + this.pnlgreenoptions.PerformLayout(); + this.pnlbluecolours.ResumeLayout(false); + this.pnlbluecolours.PerformLayout(); + this.pnlblueoptions.ResumeLayout(false); + this.pnlblueoptions.PerformLayout(); + this.pnlpurplecolours.ResumeLayout(false); + this.pnlpurplecolours.PerformLayout(); + this.pnlpurpleoptions.ResumeLayout(false); + this.pnlpurpleoptions.PerformLayout(); + this.pnlgraycolours.ResumeLayout(false); + this.pnlgraycolours.PerformLayout(); + this.pnlanycolours.ResumeLayout(false); + this.pnlanycolours.PerformLayout(); + this.pnlanyoptions.ResumeLayout(false); + this.pnlanyoptions.PerformLayout(); + this.Panel1.ResumeLayout(false); + this.Panel1.PerformLayout(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Panel pnlanycolours; + internal System.Windows.Forms.Panel pnlany16; + internal System.Windows.Forms.Panel pnlany12; + internal System.Windows.Forms.Panel pnlany14; + internal System.Windows.Forms.Panel pnlany10; + internal System.Windows.Forms.Panel pnlany4; + internal System.Windows.Forms.Panel pnlany6; + internal System.Windows.Forms.Panel pnlany15; + internal System.Windows.Forms.Panel pnlany2; + internal System.Windows.Forms.Panel pnlany13; + internal System.Windows.Forms.Panel pnlany11; + internal System.Windows.Forms.Panel pnlany7; + internal System.Windows.Forms.Panel pnlany9; + internal System.Windows.Forms.Panel pnlany5; + internal System.Windows.Forms.Panel pnlany3; + internal System.Windows.Forms.Panel pnlany1; + internal System.Windows.Forms.Label lblanylevel; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Panel Panel1; + internal System.Windows.Forms.Panel pnlnewcolour; + internal System.Windows.Forms.Panel pnloldcolour; + internal System.Windows.Forms.Label lblobjecttocolour; + internal System.Windows.Forms.Label Label17; + internal System.Windows.Forms.Label lbloldcolourrgb; + internal System.Windows.Forms.Label lbloldcolourname; + internal System.Windows.Forms.Label Label14; + internal System.Windows.Forms.Panel pnlpinkcolours; + internal System.Windows.Forms.Panel pnlpink16; + internal System.Windows.Forms.Panel pnlpink12; + internal System.Windows.Forms.Panel pnlpink14; + internal System.Windows.Forms.Panel pnlpink10; + internal System.Windows.Forms.Panel pnlpink8; + internal System.Windows.Forms.Panel pnlpink4; + internal System.Windows.Forms.Panel pnlpink6; + internal System.Windows.Forms.Panel pnlpink15; + internal System.Windows.Forms.Panel pnlpink2; + internal System.Windows.Forms.Panel pnlpink13; + internal System.Windows.Forms.Panel pnlpink11; + internal System.Windows.Forms.Panel pnlpink7; + internal System.Windows.Forms.Panel pnlpink9; + internal System.Windows.Forms.Panel pnlpink5; + internal System.Windows.Forms.Panel pnlpink3; + internal System.Windows.Forms.Panel pnlpink1; + internal System.Windows.Forms.Label lblpinklevel; + internal System.Windows.Forms.Label Label23; + internal System.Windows.Forms.Panel pnlredcolours; + internal System.Windows.Forms.Panel pnlred16; + internal System.Windows.Forms.Panel pnlred12; + internal System.Windows.Forms.Panel pnlred14; + internal System.Windows.Forms.Panel pnlred10; + internal System.Windows.Forms.Panel pnlred8; + internal System.Windows.Forms.Panel pnlred4; + internal System.Windows.Forms.Panel pnlred6; + internal System.Windows.Forms.Panel pnlred15; + internal System.Windows.Forms.Panel pnlred2; + internal System.Windows.Forms.Panel pnlred13; + internal System.Windows.Forms.Panel pnlred11; + internal System.Windows.Forms.Panel pnlred7; + internal System.Windows.Forms.Panel pnlred9; + internal System.Windows.Forms.Panel pnlred5; + internal System.Windows.Forms.Panel pnlred3; + internal System.Windows.Forms.Panel pnlred1; + internal System.Windows.Forms.Label lblredlevel; + internal System.Windows.Forms.Label Label21; + internal System.Windows.Forms.Panel pnlbrowncolours; + internal System.Windows.Forms.Panel pnlbrown16; + internal System.Windows.Forms.Panel pnlbrown12; + internal System.Windows.Forms.Panel pnlbrown14; + internal System.Windows.Forms.Panel pnlbrown10; + internal System.Windows.Forms.Panel pnlbrown8; + internal System.Windows.Forms.Panel pnlbrown4; + internal System.Windows.Forms.Panel pnlbrown6; + internal System.Windows.Forms.Panel pnlbrown15; + internal System.Windows.Forms.Panel pnlbrown2; + internal System.Windows.Forms.Panel pnlbrown13; + internal System.Windows.Forms.Panel pnlbrown11; + internal System.Windows.Forms.Panel pnlbrown7; + internal System.Windows.Forms.Panel pnlbrown9; + internal System.Windows.Forms.Panel pnlbrown5; + internal System.Windows.Forms.Panel pnlbrown3; + internal System.Windows.Forms.Panel pnlbrown1; + internal System.Windows.Forms.Label lblbrownlevel; + internal System.Windows.Forms.Label Label19; + internal System.Windows.Forms.Panel pnlorangecolours; + internal System.Windows.Forms.Panel pnlorange16; + internal System.Windows.Forms.Panel pnlorange12; + internal System.Windows.Forms.Panel pnlorange14; + internal System.Windows.Forms.Panel pnlorange10; + internal System.Windows.Forms.Panel pnlorange8; + internal System.Windows.Forms.Panel pnlorange4; + internal System.Windows.Forms.Panel pnlorange6; + internal System.Windows.Forms.Panel pnlorange15; + internal System.Windows.Forms.Panel pnlorange2; + internal System.Windows.Forms.Panel pnlorange13; + internal System.Windows.Forms.Panel pnlorange11; + internal System.Windows.Forms.Panel pnlorange7; + internal System.Windows.Forms.Panel pnlorange9; + internal System.Windows.Forms.Panel pnlorange5; + internal System.Windows.Forms.Panel pnlorange3; + internal System.Windows.Forms.Panel pnlorange1; + internal System.Windows.Forms.Label lblorangelevel; + internal System.Windows.Forms.Label Label13; + internal System.Windows.Forms.Panel pnlyellowcolours; + internal System.Windows.Forms.Panel pnlyellow16; + internal System.Windows.Forms.Panel pnlyellow12; + internal System.Windows.Forms.Panel pnlyellow14; + internal System.Windows.Forms.Panel pnlyellow10; + internal System.Windows.Forms.Panel pnlyellow8; + internal System.Windows.Forms.Panel pnlyellow4; + internal System.Windows.Forms.Panel pnlyellow6; + internal System.Windows.Forms.Panel pnlyellow15; + internal System.Windows.Forms.Panel pnlyellow2; + internal System.Windows.Forms.Panel pnlyellow13; + internal System.Windows.Forms.Panel pnlyellow11; + internal System.Windows.Forms.Panel pnlyellow7; + internal System.Windows.Forms.Panel pnlyellow9; + internal System.Windows.Forms.Panel pnlyellow5; + internal System.Windows.Forms.Panel pnlyellow3; + internal System.Windows.Forms.Panel pnlyellow1; + internal System.Windows.Forms.Label lblyellowlevel; + internal System.Windows.Forms.Label Label11; + internal System.Windows.Forms.Panel pnlgreencolours; + internal System.Windows.Forms.Panel pnlgreen16; + internal System.Windows.Forms.Panel pnlgreen12; + internal System.Windows.Forms.Panel pnlgreen14; + internal System.Windows.Forms.Panel pnlgreen10; + internal System.Windows.Forms.Panel pnlgreen8; + internal System.Windows.Forms.Panel pnlgreen4; + internal System.Windows.Forms.Panel pnlgreen6; + internal System.Windows.Forms.Panel pnlgreen15; + internal System.Windows.Forms.Panel pnlgreen2; + internal System.Windows.Forms.Panel pnlgreen13; + internal System.Windows.Forms.Panel pnlgreen11; + internal System.Windows.Forms.Panel pnlgreen7; + internal System.Windows.Forms.Panel pnlgreen9; + internal System.Windows.Forms.Panel pnlgreen5; + internal System.Windows.Forms.Panel pnlgreen3; + internal System.Windows.Forms.Panel pnlgreen1; + internal System.Windows.Forms.Label lblgreenlevel; + internal System.Windows.Forms.Label Label9; + internal System.Windows.Forms.Panel pnlbluecolours; + internal System.Windows.Forms.Panel pnlblue16; + internal System.Windows.Forms.Panel pnlblue12; + internal System.Windows.Forms.Panel pnlblue14; + internal System.Windows.Forms.Panel pnlblue10; + internal System.Windows.Forms.Panel pnlblue8; + internal System.Windows.Forms.Panel pnlblue4; + internal System.Windows.Forms.Panel pnlblue6; + internal System.Windows.Forms.Panel pnlblue15; + internal System.Windows.Forms.Panel pnlblue2; + internal System.Windows.Forms.Panel pnlblue13; + internal System.Windows.Forms.Panel pnlblue11; + internal System.Windows.Forms.Panel pnlblue7; + internal System.Windows.Forms.Panel pnlblue9; + internal System.Windows.Forms.Panel pnlblue5; + internal System.Windows.Forms.Panel pnlblue3; + internal System.Windows.Forms.Panel pnlblue1; + internal System.Windows.Forms.Label lblbluelevel; + internal System.Windows.Forms.Label Label7; + internal System.Windows.Forms.Panel pnlpurplecolours; + internal System.Windows.Forms.Panel pnlpurple16; + internal System.Windows.Forms.Panel pnlpurple12; + internal System.Windows.Forms.Panel pnlpurple14; + internal System.Windows.Forms.Panel pnlpurple10; + internal System.Windows.Forms.Panel pnlpurple8; + internal System.Windows.Forms.Panel pnlpurple4; + internal System.Windows.Forms.Panel pnlpurple6; + internal System.Windows.Forms.Panel pnlpurple15; + internal System.Windows.Forms.Panel pnlpurple2; + internal System.Windows.Forms.Panel pnlpurple13; + internal System.Windows.Forms.Panel pnlpurple11; + internal System.Windows.Forms.Panel pnlpurple7; + internal System.Windows.Forms.Panel pnlpurple9; + internal System.Windows.Forms.Panel pnlpurple5; + internal System.Windows.Forms.Panel pnlpurple3; + internal System.Windows.Forms.Panel pnlpurple1; + internal System.Windows.Forms.Label lblpurplelevel; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Panel pnlgraycolours; + internal System.Windows.Forms.Panel pnlgray16; + internal System.Windows.Forms.Panel pnlgray12; + internal System.Windows.Forms.Panel pnlgray14; + internal System.Windows.Forms.Panel pnlgray10; + internal System.Windows.Forms.Panel pnlgray8; + internal System.Windows.Forms.Panel pnlgray4; + internal System.Windows.Forms.Panel pnlgray6; + internal System.Windows.Forms.Panel pnlgray15; + internal System.Windows.Forms.Panel pnlgray2; + internal System.Windows.Forms.Panel pnlgray13; + internal System.Windows.Forms.Panel pnlgray11; + internal System.Windows.Forms.Panel pnlgray7; + internal System.Windows.Forms.Panel pnlgray9; + internal System.Windows.Forms.Panel pnlgray5; + internal System.Windows.Forms.Panel pnlgray3; + internal System.Windows.Forms.Panel pnlgray1; + internal System.Windows.Forms.Label lblgraylevel; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.Panel pnlpinkcustomcolour; + internal System.Windows.Forms.Panel pnlredcustomcolour; + internal System.Windows.Forms.Panel pnlbrowncustomcolour; + internal System.Windows.Forms.Panel pnlorangecustomcolour; + internal System.Windows.Forms.Panel pnlyellowcustomcolour; + internal System.Windows.Forms.Panel pnlgreencustomcolour; + internal System.Windows.Forms.Panel pnlbluecustomcolour; + internal System.Windows.Forms.Panel pnlpurplecustomcolour; + internal System.Windows.Forms.Panel pnlgraycustomcolour; + internal System.Windows.Forms.Panel pnlanycustomcolour; + internal System.Windows.Forms.Panel pnlany8; + internal System.Windows.Forms.Label lblnewcolourrgb; + internal System.Windows.Forms.Label lblnewcolourname; + internal System.Windows.Forms.Label Label26; + internal System.Windows.Forms.Label lblcustomshadetut; + internal System.Windows.Forms.TextBox txtcustomgrayshade; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.TextBox txtbluesred; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.TextBox txtbluesgreen; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.TextBox txtbluesblue; + internal System.Windows.Forms.Panel pnlblueoptions; + internal System.Windows.Forms.Panel pnlyellowoptions; + internal System.Windows.Forms.Label Label20; + internal System.Windows.Forms.TextBox txtyellowsblue; + internal System.Windows.Forms.TextBox txtyellowsred; + internal System.Windows.Forms.Label Label22; + internal System.Windows.Forms.Label Label24; + internal System.Windows.Forms.TextBox txtyellowsgreen; + internal System.Windows.Forms.Panel pnlgreenoptions; + internal System.Windows.Forms.Label Label15; + internal System.Windows.Forms.TextBox txtgreensred; + internal System.Windows.Forms.TextBox txtgreensgreen; + internal System.Windows.Forms.Label Label16; + internal System.Windows.Forms.Label Label18; + internal System.Windows.Forms.TextBox txtgreensblue; + internal System.Windows.Forms.Panel pnlpurpleoptions; + internal System.Windows.Forms.Label Label8; + internal System.Windows.Forms.TextBox txtpurplesgreen; + internal System.Windows.Forms.TextBox txtpurplesblue; + internal System.Windows.Forms.Label Label10; + internal System.Windows.Forms.Label Label12; + internal System.Windows.Forms.TextBox txtpurplesred; + internal System.Windows.Forms.Panel pnlpinkoptions; + internal System.Windows.Forms.Label Label35; + internal System.Windows.Forms.TextBox txtpinksgreen; + internal System.Windows.Forms.TextBox txtpinksred; + internal System.Windows.Forms.Label Label36; + internal System.Windows.Forms.Label Label37; + internal System.Windows.Forms.TextBox txtpinksblue; + internal System.Windows.Forms.Panel pnlredoptions; + internal System.Windows.Forms.Label Label32; + internal System.Windows.Forms.TextBox txtredsblue; + internal System.Windows.Forms.TextBox txtredsred; + internal System.Windows.Forms.Label Label33; + internal System.Windows.Forms.Label Label34; + internal System.Windows.Forms.TextBox txtredsgreen; + internal System.Windows.Forms.Panel pnlbrownoptions; + internal System.Windows.Forms.Label Label29; + internal System.Windows.Forms.TextBox txtbrownsblue; + internal System.Windows.Forms.TextBox txtbrownsred; + internal System.Windows.Forms.Label Label30; + internal System.Windows.Forms.Label Label31; + internal System.Windows.Forms.TextBox txtbrownsgreen; + internal System.Windows.Forms.Panel pnlorangeoptions; + internal System.Windows.Forms.Label Label25; + internal System.Windows.Forms.TextBox txtorangesblue; + internal System.Windows.Forms.TextBox txtorangesred; + internal System.Windows.Forms.Label Label27; + internal System.Windows.Forms.Label Label28; + internal System.Windows.Forms.TextBox txtorangesgreen; + internal System.Windows.Forms.Panel pnlanyoptions; + internal System.Windows.Forms.Label Label38; + internal System.Windows.Forms.TextBox txtanysgreen; + internal System.Windows.Forms.TextBox txtanysred; + internal System.Windows.Forms.Label Label39; + internal System.Windows.Forms.Label Label40; + internal System.Windows.Forms.TextBox txtanysblue; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/ColorPicker.cs b/ShiftOS.WinForms/Applications/ColorPicker.cs new file mode 100644 index 0000000..e5630c3 --- /dev/null +++ b/ShiftOS.WinForms/Applications/ColorPicker.cs @@ -0,0 +1,2358 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; +using ShiftOS.WinForms.Tools; +using API = ShiftOS.WinForms.Tools.ColorPickerDataBackend; + +namespace ShiftOS.WinForms.Applications +{ + public partial class ColorPicker : UserControl, IShiftOSWindow + { + public ColorPicker(Color oldcol, string ctc, Action callback) + { + InitializeComponent(); + oldcolour = oldcol; + colourtochange = ctc; + Callback = callback; + } + + private Action Callback = null; + + public Color NewColor = Color.Black; + + public void Color_Picker_Load(object sender, EventArgs e) + { + getoldcolour(); + determinelevels(); + shrinktosizebasedoncoloursbought(); + setupboughtcolours(); + loadmemory(); + + foreach (Control ctrl in pnlanycolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionany); + } + foreach (Control ctrl in pnlgraycolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctiongray); + } + + foreach (Control ctrl in pnlredcolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionred); + } + + foreach (Control ctrl in pnlgreencolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctiongreen); + } + + foreach (Control ctrl in pnlbluecolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionblue); + } + + foreach (Control ctrl in pnlorangecolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionorange); + } + + foreach (Control ctrl in pnlyellowcolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionyellow); + } + + foreach (Control ctrl in pnlbrowncolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionbrown); + } + + foreach (Control ctrl in pnlpurplecolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionpurple); + } + + foreach (Control ctrl in pnlpinkcolours.Controls) + { + ctrl.MouseDown += new MouseEventHandler(this.colourselctionpink); + } + + pnloldcolour.Click += new EventHandler(pnloldcolour_Click); + pnlnewcolour.Click += new EventHandler(pnlnewcolour_Click); + } + + public int anylevel = 0; + public int graylevel = 0; + public int greenlevel = 0; + public int redlevel = 0; + public int bluelevel = 0; + public int yellowlevel = 0; + public int orangelevel = 0; + public int brownlevel = 0; + public int purplelevel = 0; + public int pinklevel = 0; + + + + public void loadmemory() + { + ///NYI + + + + + + + } + + public void saveanymemory() + { + API.anymemory[0] = pnlany1.BackColor; + API.anymemory[1] = pnlany2.BackColor; + API.anymemory[2] = pnlany3.BackColor; + API.anymemory[3] = pnlany4.BackColor; + API.anymemory[4] = pnlany5.BackColor; + API.anymemory[5] = pnlany6.BackColor; + API.anymemory[6] = pnlany7.BackColor; + API.anymemory[7] = pnlany8.BackColor; + API.anymemory[8] = pnlany9.BackColor; + API.anymemory[9] = pnlany10.BackColor; + API.anymemory[10] = pnlany11.BackColor; + API.anymemory[11] = pnlany12.BackColor; + API.anymemory[12] = pnlany13.BackColor; + API.anymemory[13] = pnlany14.BackColor; + API.anymemory[14] = pnlany15.BackColor; + API.anymemory[15] = pnlany16.BackColor; + } + + public void savegraymemory() + { + API.graymemory[0] = pnlgray1.BackColor; + API.graymemory[1] = pnlgray2.BackColor; + API.graymemory[2] = pnlgray3.BackColor; + API.graymemory[3] = pnlgray4.BackColor; + API.graymemory[4] = pnlgray5.BackColor; + API.graymemory[5] = pnlgray6.BackColor; + API.graymemory[6] = pnlgray7.BackColor; + API.graymemory[7] = pnlgray8.BackColor; + API.graymemory[8] = pnlgray9.BackColor; + API.graymemory[9] = pnlgray10.BackColor; + API.graymemory[10] = pnlgray11.BackColor; + API.graymemory[11] = pnlgray12.BackColor; + API.graymemory[12] = pnlgray13.BackColor; + API.graymemory[13] = pnlgray14.BackColor; + API.graymemory[14] = pnlgray15.BackColor; + API.graymemory[15] = pnlgray16.BackColor; + } + + public void savepurplememory() + { + API.purplememory[0] = pnlpurple1.BackColor; + API.purplememory[1] = pnlpurple2.BackColor; + API.purplememory[2] = pnlpurple3.BackColor; + API.purplememory[3] = pnlpurple4.BackColor; + API.purplememory[4] = pnlpurple5.BackColor; + API.purplememory[5] = pnlpurple6.BackColor; + API.purplememory[6] = pnlpurple7.BackColor; + API.purplememory[7] = pnlpurple8.BackColor; + API.purplememory[8] = pnlpurple9.BackColor; + API.purplememory[9] = pnlpurple10.BackColor; + API.purplememory[10] = pnlpurple11.BackColor; + API.purplememory[11] = pnlpurple12.BackColor; + API.purplememory[12] = pnlpurple13.BackColor; + API.purplememory[13] = pnlpurple14.BackColor; + API.purplememory[14] = pnlpurple15.BackColor; + API.purplememory[15] = pnlpurple16.BackColor; + } + + public void savebluememory() + { + API.bluememory[0] = pnlblue1.BackColor; + API.bluememory[1] = pnlblue2.BackColor; + API.bluememory[2] = pnlblue3.BackColor; + API.bluememory[3] = pnlblue4.BackColor; + API.bluememory[4] = pnlblue5.BackColor; + API.bluememory[5] = pnlblue6.BackColor; + API.bluememory[6] = pnlblue7.BackColor; + API.bluememory[7] = pnlblue8.BackColor; + API.bluememory[8] = pnlblue9.BackColor; + API.bluememory[9] = pnlblue10.BackColor; + API.bluememory[10] = pnlblue11.BackColor; + API.bluememory[11] = pnlblue12.BackColor; + API.bluememory[12] = pnlblue13.BackColor; + API.bluememory[13] = pnlblue14.BackColor; + API.bluememory[14] = pnlblue15.BackColor; + API.bluememory[15] = pnlblue16.BackColor; + } + + public void savegreenmemory() + { + API.greenmemory[0] = pnlgreen1.BackColor; + API.greenmemory[1] = pnlgreen2.BackColor; + API.greenmemory[2] = pnlgreen3.BackColor; + API.greenmemory[3] = pnlgreen4.BackColor; + API.greenmemory[4] = pnlgreen5.BackColor; + API.greenmemory[5] = pnlgreen6.BackColor; + API.greenmemory[6] = pnlgreen7.BackColor; + API.greenmemory[7] = pnlgreen8.BackColor; + API.greenmemory[8] = pnlgreen9.BackColor; + API.greenmemory[9] = pnlgreen10.BackColor; + API.greenmemory[10] = pnlgreen11.BackColor; + API.greenmemory[11] = pnlgreen12.BackColor; + API.greenmemory[12] = pnlgreen13.BackColor; + API.greenmemory[13] = pnlgreen14.BackColor; + API.greenmemory[14] = pnlgreen15.BackColor; + API.greenmemory[15] = pnlgreen16.BackColor; + } + + public void saveyellowmemory() + { + API.yellowmemory[0] = pnlyellow1.BackColor; + API.yellowmemory[1] = pnlyellow2.BackColor; + API.yellowmemory[2] = pnlyellow3.BackColor; + API.yellowmemory[3] = pnlyellow4.BackColor; + API.yellowmemory[4] = pnlyellow5.BackColor; + API.yellowmemory[5] = pnlyellow6.BackColor; + API.yellowmemory[6] = pnlyellow7.BackColor; + API.yellowmemory[7] = pnlyellow8.BackColor; + API.yellowmemory[8] = pnlyellow9.BackColor; + API.yellowmemory[9] = pnlyellow10.BackColor; + API.yellowmemory[10] = pnlyellow11.BackColor; + API.yellowmemory[11] = pnlyellow12.BackColor; + API.yellowmemory[12] = pnlyellow13.BackColor; + API.yellowmemory[13] = pnlyellow14.BackColor; + API.yellowmemory[14] = pnlyellow15.BackColor; + API.yellowmemory[15] = pnlyellow16.BackColor; + } + + public void saveorangememory() + { + API.orangememory[0] = pnlorange1.BackColor; + API.orangememory[1] = pnlorange2.BackColor; + API.orangememory[2] = pnlorange3.BackColor; + API.orangememory[3] = pnlorange4.BackColor; + API.orangememory[4] = pnlorange5.BackColor; + API.orangememory[5] = pnlorange6.BackColor; + API.orangememory[6] = pnlorange7.BackColor; + API.orangememory[7] = pnlorange8.BackColor; + API.orangememory[8] = pnlorange9.BackColor; + API.orangememory[9] = pnlorange10.BackColor; + API.orangememory[10] = pnlorange11.BackColor; + API.orangememory[11] = pnlorange12.BackColor; + API.orangememory[12] = pnlorange13.BackColor; + API.orangememory[13] = pnlorange14.BackColor; + API.orangememory[14] = pnlorange15.BackColor; + API.orangememory[15] = pnlorange16.BackColor; + } + + public void savebrownmemory() + { + API.brownmemory[0] = pnlbrown1.BackColor; + API.brownmemory[1] = pnlbrown2.BackColor; + API.brownmemory[2] = pnlbrown3.BackColor; + API.brownmemory[3] = pnlbrown4.BackColor; + API.brownmemory[4] = pnlbrown5.BackColor; + API.brownmemory[5] = pnlbrown6.BackColor; + API.brownmemory[6] = pnlbrown7.BackColor; + API.brownmemory[7] = pnlbrown8.BackColor; + API.brownmemory[8] = pnlbrown9.BackColor; + API.brownmemory[9] = pnlbrown10.BackColor; + API.brownmemory[10] = pnlbrown11.BackColor; + API.brownmemory[11] = pnlbrown12.BackColor; + API.brownmemory[12] = pnlbrown13.BackColor; + API.brownmemory[13] = pnlbrown14.BackColor; + API.brownmemory[14] = pnlbrown15.BackColor; + API.brownmemory[15] = pnlbrown16.BackColor; + } + + public void saveredmemory() + { + API.redmemory[0] = pnlred1.BackColor; + API.redmemory[1] = pnlred2.BackColor; + API.redmemory[2] = pnlred3.BackColor; + API.redmemory[3] = pnlred4.BackColor; + API.redmemory[4] = pnlred5.BackColor; + API.redmemory[5] = pnlred6.BackColor; + API.redmemory[6] = pnlred7.BackColor; + API.redmemory[7] = pnlred8.BackColor; + API.redmemory[8] = pnlred9.BackColor; + API.redmemory[9] = pnlred10.BackColor; + API.redmemory[10] = pnlred11.BackColor; + API.redmemory[11] = pnlred12.BackColor; + API.redmemory[12] = pnlred13.BackColor; + API.redmemory[13] = pnlred14.BackColor; + API.redmemory[14] = pnlred15.BackColor; + API.redmemory[15] = pnlred16.BackColor; + } + + public void savepinkmemory() + { + API.pinkmemory[0] = pnlpink1.BackColor; + API.pinkmemory[1] = pnlpink2.BackColor; + API.pinkmemory[2] = pnlpink3.BackColor; + API.pinkmemory[3] = pnlpink4.BackColor; + API.pinkmemory[4] = pnlpink5.BackColor; + API.pinkmemory[5] = pnlpink6.BackColor; + API.pinkmemory[6] = pnlpink7.BackColor; + API.pinkmemory[7] = pnlpink8.BackColor; + API.pinkmemory[8] = pnlpink9.BackColor; + API.pinkmemory[9] = pnlpink10.BackColor; + API.pinkmemory[10] = pnlpink11.BackColor; + API.pinkmemory[11] = pnlpink12.BackColor; + API.pinkmemory[12] = pnlpink13.BackColor; + API.pinkmemory[13] = pnlpink14.BackColor; + API.pinkmemory[14] = pnlpink15.BackColor; + API.pinkmemory[15] = pnlpink16.BackColor; + } + + public string colourtochange = ""; + public Color oldcolour = Color.White; + + private void getoldcolour() + { + lblobjecttocolour.Text = colourtochange; + pnloldcolour.BackColor = oldcolour; + if (pnloldcolour.BackColor.IsNamedColor) + { + lbloldcolourname.Text = pnloldcolour.BackColor.Name + " :Name"; + } + else + { + lbloldcolourname.Text = "Custom :Name"; + } + lbloldcolourrgb.Text = pnloldcolour.BackColor.R + ", " + pnloldcolour.BackColor.G + ", " + pnloldcolour.BackColor.B + " :RGB"; + + pnlnewcolour.BackColor = API.lastcolourpick; + if (pnlnewcolour.BackColor.IsNamedColor) + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + + private void determinelevels() + { + graylevel = 4; + anylevel = 4; + purplelevel = 4; + bluelevel = 4; + greenlevel = 4; + yellowlevel = 4; + orangelevel = 4; + brownlevel = 4; + redlevel = 4; + pinklevel = 4; + } + + private void shrinktosizebasedoncoloursbought() + { + pnlpinkcolours.Show(); + pnlredcolours.Show(); + pnlbrowncolours.Show(); + pnlorangecolours.Show(); + pnlyellowcolours.Show(); + pnlgreencolours.Show(); + pnlbluecolours.Show(); + pnlpurplecolours.Show(); + pnlgraycolours.Show(); + pnlanycolours.Show(); + } + + private void setupboughtcolours() + { + switch (graylevel) + { + case 1: + lblgraylevel.Text = "Level 1"; + pnlgray1.BackColor = Color.Black; + pnlgray1.Show(); + pnlgray2.BackColor = Color.Gray; + pnlgray2.Show(); + pnlgray3.BackColor = Color.White; + pnlgray3.Show(); + break; + case 2: + lblgraylevel.Text = "Level 2"; + pnlgray1.BackColor = Color.Black; + pnlgray1.Show(); + pnlgray2.BackColor = Color.DimGray; + pnlgray2.Show(); + pnlgray3.BackColor = Color.Gray; + pnlgray3.Show(); + pnlgray4.BackColor = Color.LightGray; + pnlgray4.Show(); + pnlgray5.BackColor = Color.White; + pnlgray5.Show(); + break; + case 3: + lblgraylevel.Text = "Level 3"; + pnlgray1.BackColor = Color.Black; + pnlgray1.Show(); + pnlgray2.BackColor = Color.DimGray; + pnlgray2.Show(); + pnlgray3.BackColor = Color.Gray; + pnlgray3.Show(); + pnlgray4.BackColor = Color.DarkGray; + pnlgray4.Show(); + pnlgray5.BackColor = Color.Silver; + pnlgray5.Show(); + pnlgray6.BackColor = Color.LightGray; + pnlgray6.Show(); + pnlgray7.BackColor = Color.Gainsboro; + pnlgray7.Show(); + pnlgray8.BackColor = Color.WhiteSmoke; + pnlgray8.Show(); + pnlgray9.BackColor = Color.White; + pnlgray9.Show(); + break; + case 4: + lblgraylevel.Text = "Level 4"; + pnlgray1.BackColor = Color.Black; + pnlgray1.Show(); + pnlgray2.BackColor = Color.DimGray; + pnlgray2.Show(); + pnlgray3.BackColor = Color.Gray; + pnlgray3.Show(); + pnlgray4.BackColor = Color.DarkGray; + pnlgray4.Show(); + pnlgray5.BackColor = Color.Silver; + pnlgray5.Show(); + pnlgray6.BackColor = Color.LightGray; + pnlgray6.Show(); + pnlgray7.BackColor = Color.Gainsboro; + pnlgray7.Show(); + pnlgray8.BackColor = Color.WhiteSmoke; + pnlgray8.Show(); + pnlgray9.BackColor = Color.White; + pnlgray9.Show(); + pnlgray10.BackColor = Color.White; + pnlgray10.Show(); + pnlgray11.BackColor = Color.White; + pnlgray11.Show(); + pnlgray12.BackColor = Color.White; + pnlgray12.Show(); + pnlgray13.BackColor = Color.White; + pnlgray13.Show(); + pnlgray14.BackColor = Color.White; + pnlgray14.Show(); + pnlgray15.BackColor = Color.White; + pnlgray15.Show(); + pnlgray16.BackColor = Color.White; + pnlgray16.Show(); + pnlgraycustomcolour.Show(); + lblcustomshadetut.Show(); + txtcustomgrayshade.Show(); + break; + } + + switch (purplelevel) + { + case 1: + lblpurplelevel.Text = "Level 1"; + pnlpurple1.BackColor = Color.Purple; + pnlpurple1.Show(); + break; + case 2: + lblpurplelevel.Text = "Level 2"; + pnlpurple1.BackColor = Color.Indigo; + pnlpurple1.Show(); + pnlpurple2.BackColor = Color.Purple; + pnlpurple2.Show(); + pnlpurple3.BackColor = Color.MediumPurple; + pnlpurple3.Show(); + break; + case 3: + lblpurplelevel.Text = "Level 3"; + pnlpurple1.BackColor = Color.Indigo; + pnlpurple1.Show(); + pnlpurple2.BackColor = Color.DarkSlateBlue; + pnlpurple2.Show(); + pnlpurple3.BackColor = Color.Purple; + pnlpurple3.Show(); + pnlpurple4.BackColor = Color.DarkOrchid; + pnlpurple4.Show(); + pnlpurple5.BackColor = Color.DarkViolet; + pnlpurple5.Show(); + pnlpurple6.BackColor = Color.BlueViolet; + pnlpurple6.Show(); + pnlpurple7.BackColor = Color.SlateBlue; + pnlpurple7.Show(); + pnlpurple8.BackColor = Color.MediumSlateBlue; + pnlpurple8.Show(); + pnlpurple9.BackColor = Color.MediumPurple; + pnlpurple9.Show(); + pnlpurple10.BackColor = Color.MediumOrchid; + pnlpurple10.Show(); + pnlpurple11.BackColor = Color.Magenta; + pnlpurple11.Show(); + pnlpurple12.BackColor = Color.Orchid; + pnlpurple12.Show(); + pnlpurple13.BackColor = Color.Violet; + pnlpurple13.Show(); + pnlpurple14.BackColor = Color.Plum; + pnlpurple14.Show(); + pnlpurple15.BackColor = Color.Thistle; + pnlpurple15.Show(); + pnlpurple16.BackColor = Color.Lavender; + pnlpurple16.Show(); + break; + case 4: + lblpurplelevel.Text = "Level 4"; + pnlpurple1.BackColor = Color.Indigo; + pnlpurple1.Show(); + pnlpurple2.BackColor = Color.DarkSlateBlue; + pnlpurple2.Show(); + pnlpurple3.BackColor = Color.Purple; + pnlpurple3.Show(); + pnlpurple4.BackColor = Color.DarkOrchid; + pnlpurple4.Show(); + pnlpurple5.BackColor = Color.DarkViolet; + pnlpurple5.Show(); + pnlpurple6.BackColor = Color.BlueViolet; + pnlpurple6.Show(); + pnlpurple7.BackColor = Color.SlateBlue; + pnlpurple7.Show(); + pnlpurple8.BackColor = Color.MediumSlateBlue; + pnlpurple8.Show(); + pnlpurple9.BackColor = Color.MediumPurple; + pnlpurple9.Show(); + pnlpurple10.BackColor = Color.MediumOrchid; + pnlpurple10.Show(); + pnlpurple11.BackColor = Color.Magenta; + pnlpurple11.Show(); + pnlpurple12.BackColor = Color.Orchid; + pnlpurple12.Show(); + pnlpurple13.BackColor = Color.Violet; + pnlpurple13.Show(); + pnlpurple14.BackColor = Color.Plum; + pnlpurple14.Show(); + pnlpurple15.BackColor = Color.Thistle; + pnlpurple15.Show(); + pnlpurple16.BackColor = Color.Lavender; + pnlpurple16.Show(); + pnlpurplecustomcolour.Show(); + pnlpurpleoptions.Show(); + break; + } + + switch (bluelevel) + { + case 1: + lblbluelevel.Text = "Level 1"; + pnlblue1.BackColor = Color.Blue; + pnlblue1.Show(); + break; + case 2: + lblbluelevel.Text = "Level 2"; + pnlblue1.BackColor = Color.Navy; + pnlblue1.Show(); + pnlblue2.BackColor = Color.Blue; + pnlblue2.Show(); + pnlblue3.BackColor = Color.LightBlue; + pnlblue3.Show(); + break; + case 3: + lblbluelevel.Text = "Level 3"; + pnlblue1.BackColor = Color.MidnightBlue; + pnlblue1.Show(); + pnlblue2.BackColor = Color.Navy; + pnlblue2.Show(); + pnlblue3.BackColor = Color.Blue; + pnlblue3.Show(); + pnlblue4.BackColor = Color.RoyalBlue; + pnlblue4.Show(); + pnlblue5.BackColor = Color.CornflowerBlue; + pnlblue5.Show(); + pnlblue6.BackColor = Color.DeepSkyBlue; + pnlblue6.Show(); + pnlblue7.BackColor = Color.SkyBlue; + pnlblue7.Show(); + pnlblue8.BackColor = Color.LightBlue; + pnlblue8.Show(); + pnlblue9.BackColor = Color.LightSteelBlue; + pnlblue9.Show(); + pnlblue10.BackColor = Color.Cyan; + pnlblue10.Show(); + pnlblue11.BackColor = Color.Aquamarine; + pnlblue11.Show(); + pnlblue12.BackColor = Color.DarkTurquoise; + pnlblue12.Show(); + pnlblue13.BackColor = Color.LightSeaGreen; + pnlblue13.Show(); + pnlblue14.BackColor = Color.MediumAquamarine; + pnlblue14.Show(); + pnlblue15.BackColor = Color.CadetBlue; + pnlblue15.Show(); + pnlblue16.BackColor = Color.Teal; + pnlblue16.Show(); + break; + case 4: + lblbluelevel.Text = "Level 4"; + pnlblue1.BackColor = Color.MidnightBlue; + pnlblue1.Show(); + pnlblue2.BackColor = Color.Navy; + pnlblue2.Show(); + pnlblue3.BackColor = Color.Blue; + pnlblue3.Show(); + pnlblue4.BackColor = Color.RoyalBlue; + pnlblue4.Show(); + pnlblue5.BackColor = Color.CornflowerBlue; + pnlblue5.Show(); + pnlblue6.BackColor = Color.DeepSkyBlue; + pnlblue6.Show(); + pnlblue7.BackColor = Color.SkyBlue; + pnlblue7.Show(); + pnlblue8.BackColor = Color.LightBlue; + pnlblue8.Show(); + pnlblue9.BackColor = Color.LightSteelBlue; + pnlblue9.Show(); + pnlblue10.BackColor = Color.Cyan; + pnlblue10.Show(); + pnlblue11.BackColor = Color.Aquamarine; + pnlblue11.Show(); + pnlblue12.BackColor = Color.DarkTurquoise; + pnlblue12.Show(); + pnlblue13.BackColor = Color.LightSeaGreen; + pnlblue13.Show(); + pnlblue14.BackColor = Color.MediumAquamarine; + pnlblue14.Show(); + pnlblue15.BackColor = Color.CadetBlue; + pnlblue15.Show(); + pnlblue16.BackColor = Color.Teal; + pnlblue16.Show(); + pnlbluecustomcolour.Show(); + pnlblueoptions.Show(); + break; + } + + switch (greenlevel) + { + case 1: + lblgreenlevel.Text = "Level 1"; + pnlgreen1.BackColor = Color.Green; + pnlgreen1.Show(); + break; + case 2: + lblgreenlevel.Text = "Level 2"; + pnlgreen1.BackColor = Color.DarkGreen; + pnlgreen1.Show(); + pnlgreen2.BackColor = Color.Green; + pnlgreen2.Show(); + pnlgreen3.BackColor = Color.LightGreen; + pnlgreen3.Show(); + break; + case 3: + lblgreenlevel.Text = "Level 3"; + pnlgreen1.BackColor = Color.DarkGreen; + pnlgreen1.Show(); + pnlgreen2.BackColor = Color.Green; + pnlgreen2.Show(); + pnlgreen3.BackColor = Color.SeaGreen; + pnlgreen3.Show(); + pnlgreen4.BackColor = Color.MediumSeaGreen; + pnlgreen4.Show(); + pnlgreen5.BackColor = Color.DarkSeaGreen; + pnlgreen5.Show(); + pnlgreen6.BackColor = Color.LightGreen; + pnlgreen6.Show(); + pnlgreen7.BackColor = Color.MediumSpringGreen; + pnlgreen7.Show(); + pnlgreen8.BackColor = Color.SpringGreen; + pnlgreen8.Show(); + pnlgreen9.BackColor = Color.GreenYellow; + pnlgreen9.Show(); + pnlgreen10.BackColor = Color.LawnGreen; + pnlgreen10.Show(); + pnlgreen11.BackColor = Color.Lime; + pnlgreen11.Show(); + pnlgreen12.BackColor = Color.LimeGreen; + pnlgreen12.Show(); + pnlgreen13.BackColor = Color.YellowGreen; + pnlgreen13.Show(); + pnlgreen14.BackColor = Color.OliveDrab; + pnlgreen14.Show(); + pnlgreen15.BackColor = Color.Olive; + pnlgreen15.Show(); + pnlgreen16.BackColor = Color.DarkOliveGreen; + pnlgreen16.Show(); + break; + case 4: + lblgreenlevel.Text = "Level 4"; + pnlgreen1.BackColor = Color.DarkGreen; + pnlgreen1.Show(); + pnlgreen2.BackColor = Color.Green; + pnlgreen2.Show(); + pnlgreen3.BackColor = Color.SeaGreen; + pnlgreen3.Show(); + pnlgreen4.BackColor = Color.MediumSeaGreen; + pnlgreen4.Show(); + pnlgreen5.BackColor = Color.DarkSeaGreen; + pnlgreen5.Show(); + pnlgreen6.BackColor = Color.LightGreen; + pnlgreen6.Show(); + pnlgreen7.BackColor = Color.MediumSpringGreen; + pnlgreen7.Show(); + pnlgreen8.BackColor = Color.SpringGreen; + pnlgreen8.Show(); + pnlgreen9.BackColor = Color.GreenYellow; + pnlgreen9.Show(); + pnlgreen10.BackColor = Color.LawnGreen; + pnlgreen10.Show(); + pnlgreen11.BackColor = Color.Lime; + pnlgreen11.Show(); + pnlgreen12.BackColor = Color.LimeGreen; + pnlgreen12.Show(); + pnlgreen13.BackColor = Color.YellowGreen; + pnlgreen13.Show(); + pnlgreen14.BackColor = Color.OliveDrab; + pnlgreen14.Show(); + pnlgreen15.BackColor = Color.Olive; + pnlgreen15.Show(); + pnlgreen16.BackColor = Color.DarkOliveGreen; + pnlgreen16.Show(); + pnlgreencustomcolour.Show(); + pnlgreenoptions.Show(); + break; + } + + switch (yellowlevel) + { + case 1: + lblyellowlevel.Text = "Level 1"; + pnlyellow1.BackColor = Color.Yellow; + pnlyellow1.Show(); + break; + case 2: + lblyellowlevel.Text = "Level 2"; + pnlyellow1.BackColor = Color.DarkKhaki; + pnlyellow1.Show(); + pnlyellow2.BackColor = Color.Yellow; + pnlyellow2.Show(); + pnlyellow3.BackColor = Color.PaleGoldenrod; + pnlyellow3.Show(); + break; + case 3: + lblyellowlevel.Text = "Level 3"; + pnlyellow1.BackColor = Color.DarkKhaki; + pnlyellow1.Show(); + pnlyellow2.BackColor = Color.Yellow; + pnlyellow2.Show(); + pnlyellow3.BackColor = Color.Khaki; + pnlyellow3.Show(); + pnlyellow4.BackColor = Color.PaleGoldenrod; + pnlyellow4.Show(); + pnlyellow5.BackColor = Color.PeachPuff; + pnlyellow5.Show(); + pnlyellow6.BackColor = Color.Moccasin; + pnlyellow6.Show(); + pnlyellow7.BackColor = Color.PapayaWhip; + pnlyellow7.Show(); + pnlyellow8.BackColor = Color.LightGoldenrodYellow; + pnlyellow8.Show(); + pnlyellow9.BackColor = Color.LemonChiffon; + pnlyellow9.Show(); + pnlyellow10.BackColor = Color.LightYellow; + pnlyellow10.Show(); + break; + case 4: + lblyellowlevel.Text = "Level 4"; + pnlyellow1.BackColor = Color.DarkKhaki; + pnlyellow1.Show(); + pnlyellow2.BackColor = Color.Yellow; + pnlyellow2.Show(); + pnlyellow3.BackColor = Color.Khaki; + pnlyellow3.Show(); + pnlyellow4.BackColor = Color.PaleGoldenrod; + pnlyellow4.Show(); + pnlyellow5.BackColor = Color.PeachPuff; + pnlyellow5.Show(); + pnlyellow6.BackColor = Color.Moccasin; + pnlyellow6.Show(); + pnlyellow7.BackColor = Color.PapayaWhip; + pnlyellow7.Show(); + pnlyellow8.BackColor = Color.LightGoldenrodYellow; + pnlyellow8.Show(); + pnlyellow9.BackColor = Color.LemonChiffon; + pnlyellow9.Show(); + pnlyellow10.BackColor = Color.LightYellow; + pnlyellow10.Show(); + pnlyellow11.BackColor = Color.White; + pnlyellow11.Show(); + pnlyellow12.BackColor = Color.White; + pnlyellow12.Show(); + pnlyellow13.BackColor = Color.White; + pnlyellow13.Show(); + pnlyellow14.BackColor = Color.White; + pnlyellow14.Show(); + pnlyellow15.BackColor = Color.White; + pnlyellow15.Show(); + pnlyellow16.BackColor = Color.White; + pnlyellow16.Show(); + pnlyellowcustomcolour.Show(); + pnlyellowoptions.Show(); + break; + } + + switch (orangelevel) + { + case 1: + lblorangelevel.Text = "Level 1"; + pnlorange1.BackColor = Color.DarkOrange; + pnlorange1.Show(); + break; + case 2: + lblorangelevel.Text = "Level 2"; + pnlorange1.BackColor = Color.OrangeRed; + pnlorange1.Show(); + pnlorange2.BackColor = Color.DarkOrange; + pnlorange2.Show(); + pnlorange3.BackColor = Color.Orange; + pnlorange3.Show(); + break; + case 3: + lblorangelevel.Text = "Level 3"; + pnlorange1.BackColor = Color.OrangeRed; + pnlorange1.Show(); + pnlorange2.BackColor = Color.Tomato; + pnlorange2.Show(); + pnlorange3.BackColor = Color.Coral; + pnlorange3.Show(); + pnlorange4.BackColor = Color.DarkOrange; + pnlorange4.Show(); + pnlorange5.BackColor = Color.Orange; + pnlorange5.Show(); + pnlorange6.BackColor = Color.Gold; + pnlorange6.Show(); + break; + case 4: + lblorangelevel.Text = "Level 4"; + pnlorange1.BackColor = Color.OrangeRed; + pnlorange1.Show(); + pnlorange2.BackColor = Color.Tomato; + pnlorange2.Show(); + pnlorange3.BackColor = Color.Coral; + pnlorange3.Show(); + pnlorange4.BackColor = Color.DarkOrange; + pnlorange4.Show(); + pnlorange5.BackColor = Color.Orange; + pnlorange5.Show(); + pnlorange6.BackColor = Color.Gold; + pnlorange6.Show(); + pnlorange7.BackColor = Color.White; + pnlorange7.Show(); + pnlorange8.BackColor = Color.White; + pnlorange8.Show(); + pnlorange9.BackColor = Color.White; + pnlorange9.Show(); + pnlorange10.BackColor = Color.White; + pnlorange10.Show(); + pnlorange11.BackColor = Color.White; + pnlorange11.Show(); + pnlorange12.BackColor = Color.White; + pnlorange12.Show(); + pnlorange13.BackColor = Color.White; + pnlorange13.Show(); + pnlorange14.BackColor = Color.White; + pnlorange14.Show(); + pnlorange15.BackColor = Color.White; + pnlorange15.Show(); + pnlorange16.BackColor = Color.White; + pnlorange16.Show(); + pnlorangecustomcolour.Show(); + pnlorangeoptions.Show(); + break; + } + + switch (brownlevel) + { + case 1: + lblbrownlevel.Text = "Level 1"; + pnlbrown1.BackColor = Color.Sienna; + pnlbrown1.Show(); + break; + case 2: + lblbrownlevel.Text = "Level 2"; + pnlbrown1.BackColor = Color.SaddleBrown; + pnlbrown1.Show(); + pnlbrown2.BackColor = Color.Sienna; + pnlbrown2.Show(); + pnlbrown3.BackColor = Color.BurlyWood; + pnlbrown3.Show(); + break; + case 3: + lblbrownlevel.Text = "Level 3"; + pnlbrown1.BackColor = Color.Maroon; + pnlbrown1.Show(); + pnlbrown2.BackColor = Color.Brown; + pnlbrown2.Show(); + pnlbrown3.BackColor = Color.Sienna; + pnlbrown3.Show(); + pnlbrown4.BackColor = Color.SaddleBrown; + pnlbrown4.Show(); + pnlbrown5.BackColor = Color.Chocolate; + pnlbrown5.Show(); + pnlbrown6.BackColor = Color.Peru; + pnlbrown6.Show(); + pnlbrown7.BackColor = Color.DarkGoldenrod; + pnlbrown7.Show(); + pnlbrown8.BackColor = Color.Goldenrod; + pnlbrown8.Show(); + pnlbrown9.BackColor = Color.SandyBrown; + pnlbrown9.Show(); + pnlbrown10.BackColor = Color.RosyBrown; + pnlbrown10.Show(); + pnlbrown11.BackColor = Color.Tan; + pnlbrown11.Show(); + pnlbrown12.BackColor = Color.BurlyWood; + pnlbrown12.Show(); + pnlbrown13.BackColor = Color.Wheat; + pnlbrown13.Show(); + pnlbrown14.BackColor = Color.NavajoWhite; + pnlbrown14.Show(); + pnlbrown15.BackColor = Color.Bisque; + pnlbrown15.Show(); + pnlbrown16.BackColor = Color.BlanchedAlmond; + pnlbrown16.Show(); + break; + case 4: + lblbrownlevel.Text = "Level 4"; + pnlbrown1.BackColor = Color.Maroon; + pnlbrown1.Show(); + pnlbrown2.BackColor = Color.Brown; + pnlbrown2.Show(); + pnlbrown3.BackColor = Color.Sienna; + pnlbrown3.Show(); + pnlbrown4.BackColor = Color.SaddleBrown; + pnlbrown4.Show(); + pnlbrown5.BackColor = Color.Chocolate; + pnlbrown5.Show(); + pnlbrown6.BackColor = Color.Peru; + pnlbrown6.Show(); + pnlbrown7.BackColor = Color.DarkGoldenrod; + pnlbrown7.Show(); + pnlbrown8.BackColor = Color.Goldenrod; + pnlbrown8.Show(); + pnlbrown9.BackColor = Color.SandyBrown; + pnlbrown9.Show(); + pnlbrown10.BackColor = Color.RosyBrown; + pnlbrown10.Show(); + pnlbrown11.BackColor = Color.Tan; + pnlbrown11.Show(); + pnlbrown12.BackColor = Color.BurlyWood; + pnlbrown12.Show(); + pnlbrown13.BackColor = Color.Wheat; + pnlbrown13.Show(); + pnlbrown14.BackColor = Color.NavajoWhite; + pnlbrown14.Show(); + pnlbrown15.BackColor = Color.Bisque; + pnlbrown15.Show(); + pnlbrown16.BackColor = Color.BlanchedAlmond; + pnlbrown16.Show(); + pnlbrowncustomcolour.Show(); + pnlbrownoptions.Show(); + break; + } + + switch (redlevel) + { + case 1: + lblredlevel.Text = "Level 1"; + pnlred1.BackColor = Color.Red; + pnlred1.Show(); + break; + case 2: + lblredlevel.Text = "Level 2"; + pnlred1.BackColor = Color.DarkRed; + pnlred1.Show(); + pnlred2.BackColor = Color.Red; + pnlred2.Show(); + pnlred3.BackColor = Color.Salmon; + pnlred3.Show(); + break; + case 3: + lblredlevel.Text = "Level 3"; + pnlred1.BackColor = Color.DarkRed; + pnlred1.Show(); + pnlred2.BackColor = Color.Red; + pnlred2.Show(); + pnlred3.BackColor = Color.Firebrick; + pnlred3.Show(); + pnlred4.BackColor = Color.Crimson; + pnlred4.Show(); + pnlred5.BackColor = Color.IndianRed; + pnlred5.Show(); + pnlred6.BackColor = Color.LightCoral; + pnlred6.Show(); + pnlred7.BackColor = Color.DarkSalmon; + pnlred7.Show(); + pnlred8.BackColor = Color.Salmon; + pnlred8.Show(); + pnlred9.BackColor = Color.LightSalmon; + pnlred9.Show(); + break; + case 4: + lblredlevel.Text = "Level 4"; + pnlred1.BackColor = Color.DarkRed; + pnlred1.Show(); + pnlred2.BackColor = Color.Red; + pnlred2.Show(); + pnlred3.BackColor = Color.Firebrick; + pnlred3.Show(); + pnlred4.BackColor = Color.Crimson; + pnlred4.Show(); + pnlred5.BackColor = Color.IndianRed; + pnlred5.Show(); + pnlred6.BackColor = Color.LightCoral; + pnlred6.Show(); + pnlred7.BackColor = Color.DarkSalmon; + pnlred7.Show(); + pnlred8.BackColor = Color.Salmon; + pnlred8.Show(); + pnlred9.BackColor = Color.LightSalmon; + pnlred9.Show(); + pnlred10.BackColor = Color.White; + pnlred10.Show(); + pnlred11.BackColor = Color.White; + pnlred11.Show(); + pnlred12.BackColor = Color.White; + pnlred12.Show(); + pnlred13.BackColor = Color.White; + pnlred13.Show(); + pnlred14.BackColor = Color.White; + pnlred14.Show(); + pnlred15.BackColor = Color.White; + pnlred15.Show(); + pnlred16.BackColor = Color.White; + pnlred16.Show(); + pnlredcustomcolour.Show(); + pnlredoptions.Show(); + break; + } + + switch (pinklevel) + { + case 1: + lblpinklevel.Text = "Level 1"; + pnlpink1.BackColor = Color.HotPink; + pnlpink1.Show(); + break; + case 2: + lblpinklevel.Text = "Level 2"; + pnlpink1.BackColor = Color.DeepPink; + pnlpink1.Show(); + pnlpink2.BackColor = Color.HotPink; + pnlpink2.Show(); + pnlpink3.BackColor = Color.LightPink; + pnlpink3.Show(); + break; + case 3: + lblpinklevel.Text = "Level 3"; + pnlpink1.BackColor = Color.MediumVioletRed; + pnlpink1.Show(); + pnlpink2.BackColor = Color.PaleVioletRed; + pnlpink2.Show(); + pnlpink3.BackColor = Color.DeepPink; + pnlpink3.Show(); + pnlpink4.BackColor = Color.HotPink; + pnlpink4.Show(); + pnlpink5.BackColor = Color.LightPink; + pnlpink5.Show(); + pnlpink6.BackColor = Color.Pink; + pnlpink6.Show(); + break; + case 4: + lblpinklevel.Text = "Level 4"; + pnlpink1.BackColor = Color.MediumVioletRed; + pnlpink1.Show(); + pnlpink2.BackColor = Color.PaleVioletRed; + pnlpink2.Show(); + pnlpink3.BackColor = Color.DeepPink; + pnlpink3.Show(); + pnlpink4.BackColor = Color.HotPink; + pnlpink4.Show(); + pnlpink5.BackColor = Color.LightPink; + pnlpink5.Show(); + pnlpink6.BackColor = Color.Pink; + pnlpink6.Show(); + pnlpink7.BackColor = Color.White; + pnlpink7.Show(); + pnlpink8.BackColor = Color.White; + pnlpink8.Show(); + pnlpink9.BackColor = Color.White; + pnlpink9.Show(); + pnlpink10.BackColor = Color.White; + pnlpink10.Show(); + pnlpink11.BackColor = Color.White; + pnlpink11.Show(); + pnlpink12.BackColor = Color.White; + pnlpink12.Show(); + pnlpink13.BackColor = Color.White; + pnlpink13.Show(); + pnlpink14.BackColor = Color.White; + pnlpink14.Show(); + pnlpink15.BackColor = Color.White; + pnlpink15.Show(); + pnlpink16.BackColor = Color.White; + pnlpink16.Show(); + pnlpinkcustomcolour.Show(); + pnlpinkoptions.Show(); + break; + } + + switch (anylevel) + { + case 1: + lblanylevel.Text = "Level 1"; + pnlany1.BackColor = Color.White; + pnlany1.Show(); + pnlanycustomcolour.Show(); + pnlanyoptions.Show(); + break; + case 2: + lblanylevel.Text = "Level 2"; + pnlany1.BackColor = Color.White; + pnlany1.Show(); + pnlany2.BackColor = Color.White; + pnlany2.Show(); + pnlany3.BackColor = Color.White; + pnlany3.Show(); + pnlany4.BackColor = Color.White; + pnlany4.Show(); + pnlanycustomcolour.Show(); + pnlanyoptions.Show(); + break; + case 3: + lblanylevel.Text = "Level 3"; + pnlany1.BackColor = Color.White; + pnlany1.Show(); + pnlany2.BackColor = Color.White; + pnlany2.Show(); + pnlany3.BackColor = Color.White; + pnlany3.Show(); + pnlany4.BackColor = Color.White; + pnlany4.Show(); + pnlany5.BackColor = Color.White; + pnlany5.Show(); + pnlany6.BackColor = Color.White; + pnlany6.Show(); + pnlany7.BackColor = Color.White; + pnlany7.Show(); + pnlany8.BackColor = Color.White; + pnlany8.Show(); + pnlanycustomcolour.Show(); + pnlanyoptions.Show(); + break; + case 4: + lblanylevel.Text = "Level 4"; + pnlany1.BackColor = Color.White; + pnlany1.Show(); + pnlany2.BackColor = Color.White; + pnlany2.Show(); + pnlany3.BackColor = Color.White; + pnlany3.Show(); + pnlany4.BackColor = Color.White; + pnlany4.Show(); + pnlany5.BackColor = Color.White; + pnlany5.Show(); + pnlany6.BackColor = Color.White; + pnlany6.Show(); + pnlany7.BackColor = Color.White; + pnlany7.Show(); + pnlany8.BackColor = Color.White; + pnlany8.Show(); + pnlany9.BackColor = Color.White; + pnlany9.Show(); + pnlany10.BackColor = Color.White; + pnlany10.Show(); + pnlany11.BackColor = Color.White; + pnlany11.Show(); + pnlany12.BackColor = Color.White; + pnlany12.Show(); + pnlany13.BackColor = Color.White; + pnlany13.Show(); + pnlany14.BackColor = Color.White; + pnlany14.Show(); + pnlany15.BackColor = Color.White; + pnlany15.Show(); + pnlany16.BackColor = Color.White; + pnlany16.Show(); + pnlanycustomcolour.Show(); + pnlanyoptions.Show(); + break; + } + } + + public string Result = "Nothing"; + + // ERROR: Handles clauses are not supported in C# + private void pnloldcolour_Click(object sender, EventArgs e) + { + Callback?.Invoke(pnloldcolour.BackColor); + this.Close(); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlnewcolour_Click(object sender, EventArgs e) + { + NewColor = pnlnewcolour.BackColor; + Callback?.Invoke(NewColor); + this.Close(); + } + + // ERROR: Handles clauses are not supported in C# + private void pnloldcolour_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 2), pnloldcolour.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlanycolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlanycolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgraycolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlgraycolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpurplecolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlpurplecolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbluecolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlbluecolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgreencolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlgreencolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlyellowcolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlyellowcolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlorangecolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlorangecolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbrowncolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlbrowncolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlredcolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlredcolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpinkcolours_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 1), pnlpinkcolours.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlnewcolour_Paint(object sender, PaintEventArgs e) + { + e.Graphics.DrawRectangle(new Pen(Color.Black, 2), pnlnewcolour.ClientRectangle); + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctiongray(object sender, MouseEventArgs e) + { + try + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlgraycustomcolour.BackColor; + savegraymemory(); + } + } + catch { } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionpurple(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlpurplecustomcolour.BackColor; + savepurplememory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionblue(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlbluecustomcolour.BackColor; + savebluememory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctiongreen(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlgreencustomcolour.BackColor; + savegreenmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionyellow(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlyellowcustomcolour.BackColor; + saveyellowmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionorange(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlorangecustomcolour.BackColor; + saveorangememory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionbrown(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlbrowncustomcolour.BackColor; + savebrownmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionred(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlredcustomcolour.BackColor; + saveredmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionpink(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlpinkcustomcolour.BackColor; + savepinkmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void colourselctionany(object sender, MouseEventArgs e) + { + Panel spanel = (Panel)sender; + if (e.Button == MouseButtons.Left) + { + pnlnewcolour.BackColor = spanel.BackColor; + if (pnlnewcolour.BackColor.IsNamedColor) + { + if (pnlnewcolour.BackColor.Name.Length > 12) + { + lblnewcolourname.Text = pnlnewcolour.BackColor.Name; + } + else + { + lblnewcolourname.Text = "Name: " + pnlnewcolour.BackColor.Name; + } + } + else + { + lblnewcolourname.Text = "Name: Custom"; + } + lblnewcolourrgb.Text = "RGB: " + pnlnewcolour.BackColor.R + ", " + pnlnewcolour.BackColor.G + ", " + pnlnewcolour.BackColor.B; + } + if (e.Button == MouseButtons.Right) + { + spanel.BackColor = pnlanycustomcolour.BackColor; + saveanymemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void txtcustomgrayshade_TextChanged(object sender, EventArgs e) + { + if (txtcustomgrayshade.Text == "") + { + txtcustomgrayshade.Text = "0"; + } + else + { + if (Convert.ToInt32(txtcustomgrayshade.Text) > 255) + { + txtcustomgrayshade.Text = "255"; + } + else + { + pnlgraycustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtcustomgrayshade.Text), Convert.ToInt16(txtcustomgrayshade.Text), Convert.ToInt16(txtcustomgrayshade.Text)); + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void CheckForNumber(object sender, KeyPressEventArgs e) + { + switch (e.KeyChar) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + e.Handled = true; + break; + } + } + + private void customcolourfailsafe() + { + if (txtcustomgrayshade.Text == "") + txtcustomgrayshade.Text = "0"; + + if (txtanysblue.Text == "") + txtanysblue.Text = "0"; + if (txtanysred.Text == "") + txtanysred.Text = "0"; + if (txtanysgreen.Text == "") + txtanysgreen.Text = "0"; + + if (txtpurplesblue.Text == "") + txtpurplesblue.Text = "255"; + if (txtpurplesred.Text == "") + txtpurplesred.Text = "150"; + if (txtpurplesgreen.Text == "") + txtpurplesgreen.Text = "0"; + + if (txtbluesblue.Text == "") + txtbluesblue.Text = "255"; + if (txtbluesred.Text == "") + txtbluesred.Text = "0"; + if (txtbluesgreen.Text == "") + txtbluesgreen.Text = "0"; + + if (txtgreensblue.Text == "") + txtgreensblue.Text = "0"; + if (txtgreensred.Text == "") + txtgreensred.Text = "0"; + if (txtgreensgreen.Text == "") + txtgreensgreen.Text = "255"; + + if (txtyellowsblue.Text == "") + txtyellowsblue.Text = "0"; + if (txtyellowsred.Text == "") + txtyellowsred.Text = "255"; + if (txtyellowsgreen.Text == "") + txtyellowsgreen.Text = "255"; + + if (txtorangesblue.Text == "") + txtorangesblue.Text = "0"; + if (txtorangesred.Text == "") + txtorangesred.Text = "255"; + if (txtorangesgreen.Text == "") + txtorangesgreen.Text = "60"; + + if (txtbrownsblue.Text == "") + txtbrownsblue.Text = "0"; + if (txtbrownsred.Text == "") + txtbrownsred.Text = "140"; + if (txtbrownsgreen.Text == "") + txtbrownsgreen.Text = "60"; + + if (txtredsblue.Text == "") + txtredsblue.Text = "0"; + if (txtredsred.Text == "") + txtredsred.Text = "255"; + if (txtredsgreen.Text == "") + txtredsgreen.Text = "0"; + + if (txtpinksblue.Text == "") + txtpinksblue.Text = "150"; + if (txtpinksred.Text == "") + txtpinksred.Text = "250"; + if (txtpinksgreen.Text == "") + txtpinksgreen.Text = "0"; + } + + // ERROR: Handles clauses are not supported in C# + private void txtpurplesgreen_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlpurplecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpurplesred.Text), Convert.ToInt16(txtpurplesgreen.Text), Convert.ToInt16(txtpurplesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpurpleoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtpurplesblue.Text) > 255) + { + txtpurplesblue.Text = "255"; + } + if (Convert.ToInt32(txtpurplesred.Text) > Convert.ToInt32(txtpurplesblue.Text)) + { + txtpurplesred.Text = txtpurplesblue.Text; + } + if (Convert.ToInt32(txtpurplesgreen.Text) > Convert.ToInt32(txtpurplesblue.Text)) + { + txtpurplesgreen.Text = txtpurplesred.Text; + } + if (Convert.ToInt32(txtpurplesgreen.Text) > Convert.ToInt32(txtpurplesred.Text)) + { + txtpurplesgreen.Text = txtpurplesred.Text; + } + pnlpurplecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpurplesred.Text), Convert.ToInt16(txtpurplesgreen.Text), Convert.ToInt16(txtpurplesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtbluesgreen_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlbluecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbluesred.Text), Convert.ToInt16(txtbluesgreen.Text), Convert.ToInt16(txtbluesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlblueoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtbluesblue.Text) > 255) + { + txtbluesblue.Text = "255"; + } + if (Convert.ToInt32(txtbluesgreen.Text) > Convert.ToInt32(txtbluesblue.Text)) + { + txtbluesgreen.Text = txtbluesblue.Text; + } + if (Convert.ToInt32(txtbluesred.Text) > Convert.ToInt32(txtbluesblue.Text)) + { + txtbluesred.Text = txtbluesgreen.Text; + } + if (Convert.ToInt32(txtbluesred.Text) > Convert.ToInt32(txtbluesgreen.Text)) + { + txtbluesred.Text = txtbluesgreen.Text; + } + pnlbluecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbluesred.Text), Convert.ToInt16(txtbluesgreen.Text), Convert.ToInt16(txtbluesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtgreensgreen_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlgreencustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtgreensred.Text), Convert.ToInt16(txtgreensgreen.Text), Convert.ToInt16(txtgreensblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgreenoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtgreensgreen.Text) > 255) + { + txtgreensgreen.Text = "255"; + } + if (Convert.ToInt32(txtgreensblue.Text) > Convert.ToInt32(txtgreensgreen.Text)) + { + txtgreensblue.Text = txtgreensgreen.Text; + } + if (Convert.ToInt32(txtgreensred.Text) > Convert.ToInt32(txtgreensgreen.Text)) + { + txtgreensred.Text = txtgreensgreen.Text; + } + if (Convert.ToInt32(txtgreensblue.Text) > Convert.ToInt32(txtgreensred.Text + 150)) + { + txtgreensblue.Text = (Convert.ToInt16(txtgreensred.Text) + 150).ToString(); + } + if (Convert.ToInt32(txtgreensred.Text) > Convert.ToInt32(txtgreensblue.Text + 150)) + { + txtgreensred.Text = (Convert.ToInt32(txtgreensblue.Text) + 150).ToString(); + } + pnlgreencustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtgreensred.Text), Convert.ToInt16(txtgreensgreen.Text), Convert.ToInt16(txtgreensblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtyellowsred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlyellowcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtyellowsred.Text), Convert.ToInt16(txtyellowsgreen.Text), Convert.ToInt16(txtyellowsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlyellowoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtyellowsred.Text) > 255) + { + txtyellowsred.Text = "255"; + } + if (Convert.ToInt32(txtyellowsred.Text) < 180) + { + txtyellowsred.Text = "180"; + } + if (Convert.ToInt32(txtyellowsgreen.Text) > Convert.ToInt32(txtyellowsred.Text)) + { + txtyellowsgreen.Text = txtyellowsred.Text; + } + if (Convert.ToInt32(txtyellowsgreen.Text) < (Convert.ToInt32(txtyellowsred.Text) - 30)) + { + txtyellowsgreen.Text = (Convert.ToInt32(txtyellowsred.Text) - 30).ToString(); + } + if (Convert.ToInt32(txtyellowsblue.Text) > Convert.ToInt32(txtyellowsgreen.Text)) + { + txtyellowsblue.Text = txtyellowsgreen.Text; + } + pnlyellowcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtyellowsred.Text), Convert.ToInt16(txtyellowsgreen.Text), Convert.ToInt16(txtyellowsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtorangesred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlorangecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtorangesred.Text), Convert.ToInt16(txtorangesgreen.Text), Convert.ToInt16(txtorangesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlorangeoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtorangesred.Text) > 255) + { + txtorangesred.Text = "255"; + } + if (Convert.ToInt32(txtorangesred.Text) < 255) + { + txtorangesred.Text = "255"; + } + if (Convert.ToInt32(txtorangesgreen.Text) > Convert.ToInt32(txtorangesred.Text) - 100) + { + txtorangesgreen.Text = (Convert.ToInt32(txtorangesred.Text) - 100).ToString(); + } + if (Convert.ToInt32(txtorangesgreen.Text) < 30) + { + txtorangesgreen.Text = "30"; + } + if (Convert.ToInt32(txtorangesblue.Text) > (Convert.ToInt32(txtorangesgreen.Text) - 30)) + { + txtorangesblue.Text = (Convert.ToInt32(txtorangesgreen.Text) - 30).ToString(); + } + pnlorangecustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtorangesred.Text), Convert.ToInt16(txtorangesgreen.Text), Convert.ToInt16(txtorangesblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtbrownsred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlbrowncustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbrownsred.Text), Convert.ToInt16(txtbrownsgreen.Text), Convert.ToInt16(txtbrownsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbrownoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtbrownsred.Text) > 255) + { + txtbrownsred.Text = "255"; + } + if (Convert.ToInt32(txtbrownsred.Text) < 90) + { + txtbrownsred.Text = "90"; + } + if (Convert.ToInt32(txtbrownsgreen.Text) > Convert.ToInt32(txtbrownsred.Text) - 30) + { + txtbrownsgreen.Text = (Convert.ToInt32(txtbrownsred.Text) - 30).ToString(); + } + if (Convert.ToInt32(txtbrownsgreen.Text) < Convert.ToInt32(txtbrownsred.Text) - 128) + { + txtbrownsgreen.Text = (Convert.ToInt32(txtbrownsred.Text) - 128).ToString(); + } + if (Convert.ToInt32(txtbrownsgreen.Text) < 60) + { + txtbrownsgreen.Text = "60"; + } + if (Convert.ToInt32(txtbrownsblue.Text) > Convert.ToInt32(txtbrownsgreen.Text) - 60) + { + txtbrownsblue.Text = (Convert.ToInt32(txtbrownsgreen.Text) - 60).ToString(); + } + pnlbrowncustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtbrownsred.Text), Convert.ToInt16(txtbrownsgreen.Text), Convert.ToInt16(txtbrownsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtsred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlredcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtredsred.Text), Convert.ToInt16(txtredsgreen.Text), Convert.ToInt16(txtredsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlredoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtredsred.Text) > 255) + { + txtredsred.Text = "255"; + } + if (Convert.ToInt32(txtredsblue.Text) > Convert.ToInt32(txtredsred.Text) - 80) + { + txtredsblue.Text = (Convert.ToInt32(txtredsred.Text) - 80).ToString(); + } + if (Convert.ToInt32(txtredsgreen.Text) > Convert.ToInt32(txtredsred.Text) - 80) + { + txtredsgreen.Text = (Convert.ToInt32(txtredsred.Text) - 80).ToString(); + } + if (Convert.ToInt32(txtredsgreen.Text) > Convert.ToInt32(txtredsblue.Text + 50)) + { + txtredsgreen.Text = (Convert.ToInt32(txtredsblue.Text) + 50).ToString(); + } + if (Convert.ToInt32(txtredsblue.Text) > Convert.ToInt32(txtredsgreen.Text + 50)) + { + txtredsblue.Text = (Convert.ToInt32(txtredsgreen.Text) + 50).ToString(); + } + pnlredcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtredsred.Text), Convert.ToInt16(txtredsgreen.Text), Convert.ToInt16(txtredsblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtpinksred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + try + { + pnlpinkcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpinksred.Text), Convert.ToInt16(txtpinksgreen.Text), Convert.ToInt16(txtpinksblue.Text)); + } + catch { } + } + + + + // ERROR: Handles clauses are not supported in C# + private void pnlpinkoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + if (Convert.ToInt32(txtpinksred.Text) > 255) + { + txtpinksred.Text = "255"; + } + if (Convert.ToInt32(txtpinksblue.Text) > Convert.ToInt32(txtpinksred.Text) - 50) + { + txtpinksblue.Text = (Convert.ToInt32(txtpinksred.Text) - 50).ToString(); + } + if (Convert.ToInt32(txtpinksgreen.Text) > Convert.ToInt32(txtpinksblue.Text)) + { + txtpinksgreen.Text = txtpinksblue.Text; + } + pnlpinkcustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtpinksred.Text), Convert.ToInt16(txtpinksgreen.Text), Convert.ToInt16(txtpinksblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void txtanysred_TextChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + try + { + pnlanycustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtanysred.Text), Convert.ToInt16(txtanysgreen.Text), Convert.ToInt16(txtanysblue.Text)); + } + catch + { + + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlanyoptions_MouseLeave(object sender, EventArgs e) + { + customcolourfailsafe(); + switch (anylevel) + { + case 1: + if (Convert.ToInt32(txtanysred.Text) > 150) + { + txtanysred.Text = "150"; + } + if (Convert.ToInt32(txtanysred.Text) < 100) + { + txtanysred.Text = "100"; + } + if (Convert.ToInt32(txtanysblue.Text) > 150) + { + txtanysblue.Text = "150"; + } + if (Convert.ToInt32(txtanysblue.Text) < 100) + { + txtanysblue.Text = "100"; + } + if (Convert.ToInt32(txtanysgreen.Text) > 150) + { + txtanysgreen.Text = "150"; + } + if (Convert.ToInt32(txtanysgreen.Text) < 100) + { + txtanysgreen.Text = "100"; + } + break; + case 2: + if (Convert.ToInt32(txtanysred.Text) > 200) + { + txtanysred.Text = "200"; + } + if (Convert.ToInt32(txtanysred.Text) < 100) + { + txtanysred.Text = "100"; + } + if (Convert.ToInt32(txtanysblue.Text) > 200) + { + txtanysblue.Text = "200"; + } + if (Convert.ToInt32(txtanysblue.Text) < 100) + { + txtanysblue.Text = "100"; + } + if (Convert.ToInt32(txtanysgreen.Text) > 200) + { + txtanysgreen.Text = "200"; + } + if (Convert.ToInt32(txtanysgreen.Text) < 100) + { + txtanysgreen.Text = "100"; + } + break; + case 3: + if (Convert.ToInt32(txtanysred.Text) > 225) + { + txtanysred.Text = "225"; + } + if (Convert.ToInt32(txtanysred.Text) < 75) + { + txtanysred.Text = "75"; + } + if (Convert.ToInt32(txtanysblue.Text) > 225) + { + txtanysblue.Text = "225"; + } + if (Convert.ToInt32(txtanysblue.Text) < 75) + { + txtanysblue.Text = "75"; + } + if (Convert.ToInt32(txtanysgreen.Text) > 225) + { + txtanysgreen.Text = "225"; + } + if (Convert.ToInt32(txtanysgreen.Text) < 75) + { + txtanysgreen.Text = "75"; + } + break; + case 4: + if (Convert.ToInt32(txtanysred.Text) > 255) + { + txtanysred.Text = "255"; + } + if (Convert.ToInt32(txtanysred.Text) < 0) + { + txtanysred.Text = "0"; + } + if (Convert.ToInt32(txtanysblue.Text) > 255) + { + txtanysblue.Text = "255"; + } + if (Convert.ToInt32(txtanysblue.Text) < 0) + { + txtanysblue.Text = "0"; + } + if (Convert.ToInt32(txtanysgreen.Text) > 255) + { + txtanysgreen.Text = "255"; + } + if (Convert.ToInt32(txtanysgreen.Text) < 0) + { + txtanysgreen.Text = "0"; + } + break; + } + pnlanycustomcolour.BackColor = Color.FromArgb(Convert.ToInt16(txtanysred.Text), Convert.ToInt16(txtanysgreen.Text), Convert.ToInt16(txtanysblue.Text)); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgraycustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Gray Rules"; + //infobox.textinfo = "You must input a value between 0 (black) and 255 (white) to form a shade of gray." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Gray Memory Wiped"; + //infobox.textinfo = "All your custom shades of Gray have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.graymemory, 0, API.graymemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpurplecustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Purple Rules"; + //infobox.textinfo = "Blue must have the highest value followed by red. Green must then have the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Purple Memory Wiped"; + //infobox.textinfo = "All your custom shades of Purple have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.purplememory, 0, API.purplememory.Length); + setupboughtcolours(); + loadmemory(); + } + + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbluecustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Blue Rules"; + //infobox.textinfo = "Blue must have the highest value followed by green. Red must then have the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Blue Memory Wiped"; + //infobox.textinfo = "All your custom shades of Blue have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.bluememory, 0, API.bluememory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlgreencustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Green Rules"; + //infobox.textinfo = "Green must have the highest value. Red and Blue need to have values within 150 of eachother." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Green Memory Wiped"; + //infobox.textinfo = "All your custom shades of Green have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.greenmemory, 0, API.greenmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlyellowcustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Yellow Rules"; + //infobox.textinfo = "Red must have the highest value and be over 180. Green must be within 30 values of red. Blue must be the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Yellow Memory Wiped"; + //infobox.textinfo = "All your custom shades of Yellow have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.yellowmemory, 0, API.yellowmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlorangecustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Orange Rules"; + //infobox.textinfo = "Red must have a value of 255. Green must be 100 or more values less than red. Blue must be 30 or more values less than green." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Orange Memory Wiped"; + //infobox.textinfo = "All your custom shades of Orange have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.orangememory, 0, API.orangememory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbrowncustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Brown Rules"; + //infobox.textinfo = "Red must have the highest value. Green must be 30 - 128 values lower than red. Blue must be 60 or more values less than green." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Brown Memory Wiped"; + //infobox.textinfo = "All your custom shades of Brown have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.brownmemory, 0, API.brownmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlredcustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Red Rules"; + //infobox.textinfo = "Red must have the highest value. Green and blue must be 80 or more values less than red but within 50 values of eachother." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Red Memory Wiped"; + //infobox.textinfo = "All your custom shades of Red have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.redmemory, 0, API.redmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlpinkcustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + //infobox.title = "Pink Rules"; + //infobox.textinfo = "Red must have the highest value. Blue must be 50 or more values less than red. Green must have the lowest value." + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Pink Memory Wiped"; + //infobox.textinfo = "All your custom shades of Pink have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.pinkmemory, 0, API.pinkmemory.Length); + setupboughtcolours(); + loadmemory(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void pnlanycustomcolour_Click(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + switch (anylevel) + { + case 1: + //infobox.title = "Custom Rules"; + //infobox.textinfo = "Red, Green and Blue may be set to any value between 100 and 150" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + break; + case 2: + //infobox.title = "Custom Rules"; + //infobox.textinfo = "Red, Green and Blue may be set to any value between 100 and 200" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + break; + case 3: + //infobox.title = "Custom Rules"; + //infobox.textinfo = "Red, Green and Blue may be set to any value between 75 and 225" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + break; + case 4: + //infobox.title = "Custom Rules"; + //infobox.textinfo = "Red, Green and Blue may be set to any value between 0 and 255" + Environment.NewLine + Environment.NewLine + "Right click a box on the left to use this colour."; + //infobox.Show(); + break; + } + } + + if (e.Button == MouseButtons.Right) + { + //infobox.title = "Custom Colour Memory Wiped"; + //infobox.textinfo = "All your custom colour shades of have been wiped from memory." + Environment.NewLine + Environment.NewLine + "You can set custom colours but right clicking any of the boxes on the left."; + //infobox.Show(); + Array.Clear(API.anymemory, 0, API.anymemory.Length); + setupboughtcolours(); + loadmemory(); + } + + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } +} diff --git a/ShiftOS.WinForms/Applications/ColorPicker.resx b/ShiftOS.WinForms/Applications/ColorPicker.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/ColorPicker.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Dialog.Designer.cs b/ShiftOS.WinForms/Applications/Dialog.Designer.cs new file mode 100644 index 0000000..66493d6 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Dialog.Designer.cs @@ -0,0 +1,38 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class Dialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Text = "Dialog"; + } + + #endregion + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Dialog.cs b/ShiftOS.WinForms/Applications/Dialog.cs new file mode 100644 index 0000000..e47dfac --- /dev/null +++ b/ShiftOS.WinForms/Applications/Dialog.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications +{ + public partial class Dialog : UserControl, IShiftOSWindow + { + public Dialog() + { + InitializeComponent(); + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } +} diff --git a/ShiftOS.WinForms/Applications/FileDialog.Designer.cs b/ShiftOS.WinForms/Applications/FileDialog.Designer.cs new file mode 100644 index 0000000..c3f7a76 --- /dev/null +++ b/ShiftOS.WinForms/Applications/FileDialog.Designer.cs @@ -0,0 +1,147 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class FileDialog + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lbcurrentfolder = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlfiletype = new System.Windows.Forms.Panel(); + this.btnok = new System.Windows.Forms.Button(); + this.cbfiletypes = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.txtfilename = new System.Windows.Forms.TextBox(); + this.lvitems = new System.Windows.Forms.ListView(); + this.panel1.SuspendLayout(); + this.pnlfiletype.SuspendLayout(); + this.SuspendLayout(); + // + // lbcurrentfolder + // + this.lbcurrentfolder.Dock = System.Windows.Forms.DockStyle.Bottom; + this.lbcurrentfolder.Location = new System.Drawing.Point(0, 356); + this.lbcurrentfolder.Name = "lbcurrentfolder"; + this.lbcurrentfolder.Size = new System.Drawing.Size(634, 13); + this.lbcurrentfolder.TabIndex = 1; + this.lbcurrentfolder.Text = "label1"; + // + // panel1 + // + this.panel1.Controls.Add(this.pnlfiletype); + this.panel1.Controls.Add(this.lvitems); + this.panel1.Controls.Add(this.lbcurrentfolder); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(634, 369); + this.panel1.TabIndex = 2; + // + // pnlfiletype + // + this.pnlfiletype.Controls.Add(this.btnok); + this.pnlfiletype.Controls.Add(this.cbfiletypes); + this.pnlfiletype.Controls.Add(this.label1); + this.pnlfiletype.Controls.Add(this.txtfilename); + this.pnlfiletype.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlfiletype.Location = new System.Drawing.Point(0, 330); + this.pnlfiletype.Name = "pnlfiletype"; + this.pnlfiletype.Size = new System.Drawing.Size(634, 26); + this.pnlfiletype.TabIndex = 2; + // + // btnok + // + this.btnok.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnok.Location = new System.Drawing.Point(551, 2); + this.btnok.Name = "btnok"; + this.btnok.Size = new System.Drawing.Size(75, 23); + this.btnok.TabIndex = 3; + this.btnok.Text = "Open"; + this.btnok.UseVisualStyleBackColor = true; + // + // cbfiletypes + // + this.cbfiletypes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.cbfiletypes.FormattingEnabled = true; + this.cbfiletypes.Location = new System.Drawing.Point(424, 2); + this.cbfiletypes.Name = "cbfiletypes"; + this.cbfiletypes.Size = new System.Drawing.Size(121, 21); + this.cbfiletypes.TabIndex = 2; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 6); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(38, 13); + this.label1.TabIndex = 1; + this.label1.Text = "Name:"; + // + // 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(47, 3); + this.txtfilename.Name = "txtfilename"; + this.txtfilename.Size = new System.Drawing.Size(371, 20); + this.txtfilename.TabIndex = 0; + // + // lvitems + // + this.lvitems.Dock = System.Windows.Forms.DockStyle.Fill; + this.lvitems.Location = new System.Drawing.Point(0, 0); + this.lvitems.Name = "lvitems"; + this.lvitems.Size = new System.Drawing.Size(634, 356); + this.lvitems.TabIndex = 0; + this.lvitems.UseCompatibleStateImageBehavior = false; + // + // FileDialog + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(634, 369); + this.Controls.Add(this.panel1); + this.Name = "FileDialog"; + this.Text = "File Dialog"; + this.panel1.ResumeLayout(false); + this.pnlfiletype.ResumeLayout(false); + this.pnlfiletype.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lbcurrentfolder; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.ListView lvitems; + private System.Windows.Forms.Panel pnlfiletype; + private System.Windows.Forms.Button btnok; + private System.Windows.Forms.ComboBox cbfiletypes; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtfilename; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/FileDialog.cs b/ShiftOS.WinForms/Applications/FileDialog.cs new file mode 100644 index 0000000..333a9b7 --- /dev/null +++ b/ShiftOS.WinForms/Applications/FileDialog.cs @@ -0,0 +1,256 @@ +using ShiftOS.Objects.ShiftFS; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using static ShiftOS.Objects.ShiftFS.Utils; +using ShiftOS.Engine; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms.Applications +{ + /// + /// + /// + public partial class FileDialog : UserControl, IShiftOSWindow + { + public FileDialog(string[] filetypes, FileOpenerStyle style, Action _callback) + { + callback = _callback; + InitializeComponent(); + foreach(var itm in filetypes) + { + cbfiletypes.Items.Add(itm); + } + cbfiletypes.SelectedIndex = 0; + cbfiletypes.SelectedIndexChanged += (o, a) => { ResetList(); }; + this.lvitems.SelectedIndexChanged += (o, a) => + { + try + { + var itm = lvitems.SelectedItems[0]; + if (FileExists(currentdir + "/" + itm.Text)) + { + txtfilename.Text = itm.Text; + } + } + catch { } + + }; + btnok.Click += (o, a) => + { + string fname = ""; + fname = (!string.IsNullOrWhiteSpace(txtfilename.Text)) ? txtfilename.Text : ""; + fname = (!fname.EndsWith(cbfiletypes.SelectedItem.ToString())) ? fname + cbfiletypes.SelectedItem.ToString() : fname; + fname = (fname == cbfiletypes.SelectedItem.ToString()) ? "" : fname; + + switch (style) + { + + case FileOpenerStyle.Open: + + + if(FileExists(currentdir + "/" + fname)) + { + callback?.Invoke(currentdir + "/" + fname); + this.Close(); + } + else + { + Infobox.Show("{FILE_NOT_FOUND}", "{FILE_NOT_FOUND_EXP}"); + } + break; + case FileOpenerStyle.Save: + if (!string.IsNullOrWhiteSpace(fname)) + { + callback?.Invoke(currentdir + "/" + fname); + this.Close(); + } + else + { + Infobox.Show("{ENTER_FILENAME}", "{ENTER_FILENAME_EXP}"); + } + break; + } + }; + btnok.Text = style.ToString(); + this.Text = style.ToString() + " File"; + this.lvitems.DoubleClick += new EventHandler(this.lvitems_DoubleClick); + this.Load += (o, a) => + { + ChangeDirectory(Paths.GetPath("root")); + }; + } + + private void lvitems_DoubleClick(object sender, EventArgs e) + { + if (lvitems.SelectedItems.Count <= 0) + return; + + var item = lvitems.SelectedItems[0]; + var path = item.Tag as string; + if (currentdir == "__system") + { + ChangeDirectory(path); + } + else if (DirectoryExists(currentdir + "/" + path)) + { + ChangeDirectory(currentdir + "/" + path); + } + else if (FileExists(currentdir + "/" + path)) + { + callback?.Invoke(currentdir + "/" + txtfilename.Text); + this.Close(); + } + else if (path == "__..") + { + ChangeToParent(); + } + } + + Action callback; + + string currentdrive = "0:"; + + public void ChangeToParent() + { + if (currentdir == currentdrive) + { + ChangeDirectory("__system"); + } + + ChangeDirectory(GetParent(currentdir)); + } + + public string GetParent(string path) + { + string[] pathlist = path.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + if (pathlist.Length > 1) + { + if (path.EndsWith("/")) + { + path = path.Remove(path.Length - 1, 1); + } + path = path.Remove(path.LastIndexOf('/'), path.Length - path.LastIndexOf('/')); + return path; + } + else + { + return "__system"; + } + } + + private string currentdir = ""; + + public void ChangeDirectory(string path) + { + currentdir = path; + lbcurrentfolder.Text = currentdir; + ResetList(); + } + + public void ResetList() + { + if (lvitems.LargeImageList == null) + { + lvitems.LargeImageList = new ImageList(); + lvitems.LargeImageList.TransparentColor = SkinEngine.LoadedSkin.ControlColor; + lvitems.LargeImageList.ImageSize = new Size(42, 42); + FileSkimmer.GetAllTypes(lvitems.LargeImageList); + } + + + lvitems.Items.Clear(); + + if (currentdir == "__system") + { + //List all drives + foreach (var dir in Mounts) + { + var item = FileSkimmer.ConstructItemAsMount(dir); + item.ImageKey = "Mount"; + lvitems.Items.Add(item); + } + } + else if (DirectoryExists(currentdir)) + { + var up = new ListViewItem(); + up.ImageKey = "UpOne"; + up.Text = "Up one"; + up.Tag = "__.."; + lvitems.Items.Add(up); + + + foreach (var dir in GetDirectories(currentdir)) + { + var item = FileSkimmer.ConstructItem(GetDirectoryInfo(dir)); + item.ImageKey = "Directory"; + lvitems.Items.Add(item); + } + + foreach (var dir in GetFiles(currentdir)) + { + if (dir.EndsWith(cbfiletypes.SelectedItem as string)) + { + var item = FileSkimmer.ConstructItem(GetFileInfo(dir)); + item.ImageKey = FileSkimmerBackend.GetFileType(dir).ToString(); + lvitems.Items.Add(item); + } + } + + } + } + + [Obsolete("Use the relevant static method within File Skimmer instead.")] + public static ListViewItem ConstructItemAsMount(Directory dir) + { + var item = new ListViewItem(); + item.Text = dir.Name + "(" + Mounts.IndexOf(dir).ToString() + ":/)"; + item.Tag = Mounts.IndexOf(dir).ToString() + ":"; + return item; + } + + + [Obsolete("Use the relevant static method within File Skimmer instead.")] + public static ListViewItem ConstructItem(Directory dir) + { + var item = new ListViewItem(); + item.Text = dir.Name; + item.Tag = item.Text; + return item; + } + + [Obsolete("Use the relevant static method within File Skimmer instead.")] + public static ListViewItem ConstructItem(File dir) + { + var item = new ListViewItem(); + item.Text = dir.Name; + item.Tag = item.Text; + return item; + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } + + +} diff --git a/ShiftOS.WinForms/Applications/FileDialog.resx b/ShiftOS.WinForms/Applications/FileDialog.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/FileDialog.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/FileSkimmer.Designer.cs b/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs new file mode 100644 index 0000000..7c75bd0 --- /dev/null +++ b/ShiftOS.WinForms/Applications/FileSkimmer.Designer.cs @@ -0,0 +1,86 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class FileSkimmer + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.lvitems = new System.Windows.Forms.ListView(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lbcurrentfolder = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // lvitems + // + this.lvitems.Dock = System.Windows.Forms.DockStyle.Fill; + this.lvitems.Location = new System.Drawing.Point(0, 0); + this.lvitems.Name = "lvitems"; + this.lvitems.Size = new System.Drawing.Size(634, 356); + this.lvitems.TabIndex = 0; + this.lvitems.UseCompatibleStateImageBehavior = false; + this.lvitems.DoubleClick += new System.EventHandler(this.lvitems_DoubleClick); + // + // panel1 + // + this.panel1.Controls.Add(this.lvitems); + this.panel1.Controls.Add(this.lbcurrentfolder); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(634, 369); + this.panel1.TabIndex = 1; + // + // lbcurrentfolder + // + this.lbcurrentfolder.Dock = System.Windows.Forms.DockStyle.Bottom; + this.lbcurrentfolder.Location = new System.Drawing.Point(0, 356); + this.lbcurrentfolder.Name = "lbcurrentfolder"; + this.lbcurrentfolder.Size = new System.Drawing.Size(634, 13); + this.lbcurrentfolder.TabIndex = 1; + this.lbcurrentfolder.Text = "label1"; + // + // FileSkimmer + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(634, 369); + this.Controls.Add(this.panel1); + this.Name = "FileSkimmer"; + this.Text = "File Skimmer"; + this.Load += new System.EventHandler(this.FileSkimmer_Load); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListView lvitems; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label lbcurrentfolder; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.cs b/ShiftOS.WinForms/Applications/FileSkimmer.cs new file mode 100644 index 0000000..959c90b --- /dev/null +++ b/ShiftOS.WinForms/Applications/FileSkimmer.cs @@ -0,0 +1,238 @@ +using ShiftOS.Objects.ShiftFS; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +using static ShiftOS.Objects.ShiftFS.Utils; +using Newtonsoft.Json; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications +{ + [Launcher("File Skimmer", true, "al_file_skimmer")] + [RequiresUpgrade("file_skimmer")] + [WinOpen("file_skimmer")] + public partial class FileSkimmer : UserControl, IShiftOSWindow + { + public FileSkimmer() + { + InitializeComponent(); + this.Load += (o, a) => + { + ChangeDirectory(Paths.GetPath("root")); + }; + } + + private void lvitems_DoubleClick(object sender, EventArgs e) + { + if (lvitems.SelectedItems.Count <= 0) + return; + + var item = lvitems.SelectedItems[0]; + var path = item.Tag as string; + + if(currentdir == "__system") + { + ChangeDirectory(path); + } + else if(DirectoryExists(currentdir + "/" + path)) + { + ChangeDirectory(currentdir + "/" + path); + } + else if(FileExists(currentdir + "/" + path)) + { + FileSkimmerBackend.OpenFile(currentdir + "/" + path); + } + else if(path == "__..") + { + ChangeToParent(); + } + } + + [Obsolete("This just forwards over to FileSkimmerBackend.OpenFile().")] + public void Open(string path) + { + FileSkimmerBackend.OpenFile(path); + } + + [Obsolete("Forwarded to FileSkimmerBackend.GetFileType().")] + public static FileType GetFileType(string path) + { + return FileSkimmerBackend.GetFileType(path); + } + + string currentdrive = "0:"; + + public void ChangeToParent() + { + if(currentdir == currentdrive) + { + ChangeDirectory("__system"); + } + + ChangeDirectory(GetParent(currentdir)); + } + + public string GetParent(string path) + { + string[] pathlist = path.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + if(pathlist.Length > 1) + { + if(path.EndsWith("/")) + { + path = path.Remove(path.Length - 1, 1); + } + path = path.Remove(path.LastIndexOf('/'), path.Length - path.LastIndexOf('/')); + return path; + } + else + { + return "__system"; + } + } + + private string currentdir = ""; + + public void ChangeDirectory(string path) + { + currentdir = path; + lbcurrentfolder.Text = currentdir; + ResetList(); + } + + + public static void GetAllTypes(ImageList list) + { + list.Images.Add("Directory", Properties.Resources.fileicon0); + list.Images.Add("UpOne", Properties.Resources.fileicon5); + list.Images.Add("Mount", Properties.Resources.FloppyDriveIcon); + + foreach (FileType value in Enum.GetValues(typeof(FileType))) + { + list.Images.Add(value.ToString(), GetImage(value)); + } + } + + public void ResetList() + { + if(lvitems.LargeImageList == null) + { + lvitems.LargeImageList = new ImageList(); + lvitems.LargeImageList.TransparentColor = SkinEngine.LoadedSkin.ControlColor; + lvitems.LargeImageList.ImageSize = new Size(42, 42); + GetAllTypes(lvitems.LargeImageList); + } + + + + lvitems.Items.Clear(); + if (currentdir == "__system") + { + //List all drives + foreach (var dir in Mounts) + { + var item = ConstructItemAsMount(dir); + item.ImageKey = "Mount"; + lvitems.Items.Add(item); + } + } + else if (DirectoryExists(currentdir)) + { + var up = new ListViewItem(); + up.Text = "Up one"; + up.ImageKey = "UpOne"; + up.Tag = "__.."; + lvitems.Items.Add(up); + + + foreach(var dir in GetDirectories(currentdir)) + { + var item = ConstructItem(GetDirectoryInfo(dir)); + item.ImageKey = "Directory"; + lvitems.Items.Add(item); + } + + foreach (var dir in GetFiles(currentdir)) + { + var item = ConstructItem(GetFileInfo(dir)); + item.ImageKey = FileSkimmerBackend.GetFileType(dir).ToString(); + lvitems.Items.Add(item); + } + + } + + } + + public static ListViewItem ConstructItemAsMount(Directory dir) + { + var item = new ListViewItem(); + item.Text = dir.Name + "(" + Mounts.IndexOf(dir).ToString() + ":/)"; + item.Tag = Mounts.IndexOf(dir).ToString() + ":"; + return item; + } + + public static ListViewItem ConstructItem(Directory dir) + { + var item = new ListViewItem(); + item.Text = dir.Name; + item.Tag = item.Text; + return item; + } + public static ListViewItem ConstructItem(File dir) + { + var item = new ListViewItem(); + item.Text = dir.Name; + item.ImageKey = "Directory"; + item.Tag = item.Text; + return item; + } + + public static Image GetImage(FileType type) + { + switch(type) + { + case FileType.Executable: + case FileType.Lua: + case FileType.Python: + return Properties.Resources.fileiconsaa; + case FileType.Image: + return Properties.Resources.fileicon3; + case FileType.Skin: + return Properties.Resources.fileicon10; + case FileType.TextFile: + return Properties.Resources.fileicon2; + default: + return Properties.Resources.fileicon1; + } + } + + private void FileSkimmer_Load(object sender, EventArgs e) { + + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } + + +} diff --git a/ShiftOS.WinForms/Applications/FileSkimmer.resx b/ShiftOS.WinForms/Applications/FileSkimmer.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/FileSkimmer.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/GraphicPicker.Designer.cs b/ShiftOS.WinForms/Applications/GraphicPicker.Designer.cs new file mode 100644 index 0000000..88749b8 --- /dev/null +++ b/ShiftOS.WinForms/Applications/GraphicPicker.Designer.cs @@ -0,0 +1,257 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class GraphicPicker + { + /// + /// 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); + } + + private void InitializeComponent() + { + this.pgcontents = new System.Windows.Forms.Panel(); + this.btncancel = new System.Windows.Forms.Button(); + this.btnreset = new System.Windows.Forms.Button(); + this.btnapply = new System.Windows.Forms.Button(); + this.Label2 = new System.Windows.Forms.Label(); + this.btnidlebrowse = new System.Windows.Forms.Button(); + this.txtidlefile = new System.Windows.Forms.TextBox(); + this.picidle = new System.Windows.Forms.PictureBox(); + this.btnzoom = new System.Windows.Forms.Button(); + this.btnstretch = new System.Windows.Forms.Button(); + this.btncentre = new System.Windows.Forms.Button(); + this.btntile = new System.Windows.Forms.Button(); + this.pnlgraphicholder = new System.Windows.Forms.Panel(); + this.picgraphic = new System.Windows.Forms.PictureBox(); + this.lblobjecttoskin = new System.Windows.Forms.Label(); + this.pgcontents.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picidle)).BeginInit(); + this.pnlgraphicholder.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picgraphic)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.btncancel); + this.pgcontents.Controls.Add(this.btnreset); + this.pgcontents.Controls.Add(this.btnapply); + this.pgcontents.Controls.Add(this.Label2); + this.pgcontents.Controls.Add(this.btnidlebrowse); + this.pgcontents.Controls.Add(this.txtidlefile); + this.pgcontents.Controls.Add(this.picidle); + this.pgcontents.Controls.Add(this.btnzoom); + this.pgcontents.Controls.Add(this.btnstretch); + this.pgcontents.Controls.Add(this.btncentre); + this.pgcontents.Controls.Add(this.btntile); + this.pgcontents.Controls.Add(this.pnlgraphicholder); + this.pgcontents.Controls.Add(this.lblobjecttoskin); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(390, 383); + this.pgcontents.TabIndex = 20; + // + // btncancel + // + this.btncancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.btncancel.Location = new System.Drawing.Point(21, 335); + this.btncancel.Name = "btncancel"; + this.btncancel.Size = new System.Drawing.Size(109, 32); + this.btncancel.TabIndex = 23; + this.btncancel.Text = "Cancel"; + this.btncancel.UseVisualStyleBackColor = true; + this.btncancel.Click += new System.EventHandler(this.btncancel_Click); + // + // btnreset + // + this.btnreset.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.btnreset.Location = new System.Drawing.Point(136, 335); + this.btnreset.Name = "btnreset"; + this.btnreset.Size = new System.Drawing.Size(109, 32); + this.btnreset.TabIndex = 22; + this.btnreset.Text = "Reset"; + this.btnreset.UseVisualStyleBackColor = true; + this.btnreset.Click += new System.EventHandler(this.btnreset_Click); + // + // btnapply + // + this.btnapply.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.btnapply.Location = new System.Drawing.Point(251, 335); + this.btnapply.Name = "btnapply"; + this.btnapply.Size = new System.Drawing.Size(118, 32); + this.btnapply.TabIndex = 21; + this.btnapply.Text = "Apply"; + this.btnapply.UseVisualStyleBackColor = true; + this.btnapply.Click += new System.EventHandler(this.btnapply_Click); + // + // Label2 + // + this.Label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.Label2.Font = new System.Drawing.Font("Arial", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(125, 260); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(163, 28); + this.Label2.TabIndex = 12; + this.Label2.Text = "Idle"; + this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnidlebrowse + // + this.btnidlebrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnidlebrowse.Location = new System.Drawing.Point(295, 260); + this.btnidlebrowse.Name = "btnidlebrowse"; + this.btnidlebrowse.Size = new System.Drawing.Size(73, 60); + this.btnidlebrowse.TabIndex = 10; + this.btnidlebrowse.Text = "Browse"; + this.btnidlebrowse.UseVisualStyleBackColor = true; + this.btnidlebrowse.Click += new System.EventHandler(this.btnidlebrowse_Click); + // + // txtidlefile + // + this.txtidlefile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.txtidlefile.BackColor = System.Drawing.Color.White; + this.txtidlefile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtidlefile.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtidlefile.Location = new System.Drawing.Point(125, 291); + this.txtidlefile.Multiline = true; + this.txtidlefile.Name = "txtidlefile"; + this.txtidlefile.Size = new System.Drawing.Size(163, 29); + this.txtidlefile.TabIndex = 9; + this.txtidlefile.Text = "None"; + this.txtidlefile.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // picidle + // + this.picidle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.picidle.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.picidle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.picidle.Location = new System.Drawing.Point(19, 260); + this.picidle.Name = "picidle"; + this.picidle.Size = new System.Drawing.Size(100, 60); + this.picidle.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.picidle.TabIndex = 8; + this.picidle.TabStop = false; + // + // btnzoom + // + this.btnzoom.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnzoom.FlatAppearance.BorderSize = 0; + this.btnzoom.Location = new System.Drawing.Point(286, 144); + this.btnzoom.Name = "btnzoom"; + this.btnzoom.Size = new System.Drawing.Size(82, 65); + this.btnzoom.TabIndex = 7; + this.btnzoom.Text = "Zoom"; + this.btnzoom.UseVisualStyleBackColor = true; + this.btnzoom.Click += new System.EventHandler(this.btnzoom_Click); + // + // btnstretch + // + this.btnstretch.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnstretch.FlatAppearance.BorderSize = 0; + this.btnstretch.Location = new System.Drawing.Point(197, 144); + this.btnstretch.Name = "btnstretch"; + this.btnstretch.Size = new System.Drawing.Size(82, 65); + this.btnstretch.TabIndex = 6; + this.btnstretch.Text = "Stretch"; + this.btnstretch.UseVisualStyleBackColor = true; + this.btnstretch.Click += new System.EventHandler(this.btnstretch_Click); + // + // btncentre + // + this.btncentre.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btncentre.FlatAppearance.BorderSize = 0; + this.btncentre.Location = new System.Drawing.Point(108, 144); + this.btncentre.Name = "btncentre"; + this.btncentre.Size = new System.Drawing.Size(82, 65); + this.btncentre.TabIndex = 5; + this.btncentre.Text = "Center"; + this.btncentre.UseVisualStyleBackColor = true; + this.btncentre.Click += new System.EventHandler(this.btncentre_Click); + // + // btntile + // + this.btntile.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btntile.FlatAppearance.BorderSize = 0; + this.btntile.Location = new System.Drawing.Point(19, 144); + this.btntile.Name = "btntile"; + this.btntile.Size = new System.Drawing.Size(82, 65); + this.btntile.TabIndex = 4; + this.btntile.Text = "Tile"; + this.btntile.UseVisualStyleBackColor = true; + this.btntile.Click += new System.EventHandler(this.btntile_Click); + // + // pnlgraphicholder + // + this.pnlgraphicholder.Controls.Add(this.picgraphic); + this.pnlgraphicholder.Location = new System.Drawing.Point(19, 38); + this.pnlgraphicholder.Name = "pnlgraphicholder"; + this.pnlgraphicholder.Size = new System.Drawing.Size(350, 100); + this.pnlgraphicholder.TabIndex = 3; + // + // picgraphic + // + this.picgraphic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.picgraphic.Location = new System.Drawing.Point(0, 0); + this.picgraphic.Name = "picgraphic"; + this.picgraphic.Size = new System.Drawing.Size(350, 100); + this.picgraphic.TabIndex = 0; + this.picgraphic.TabStop = false; + // + // lblobjecttoskin + // + this.lblobjecttoskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblobjecttoskin.Location = new System.Drawing.Point(19, 9); + this.lblobjecttoskin.Name = "lblobjecttoskin"; + this.lblobjecttoskin.Size = new System.Drawing.Size(350, 23); + this.lblobjecttoskin.TabIndex = 2; + this.lblobjecttoskin.Text = "Close Button"; + this.lblobjecttoskin.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // GraphicPicker + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(390, 383); + this.Controls.Add(this.pgcontents); + this.Name = "GraphicPicker"; + this.Text = "Graphic Picker"; + this.Load += new System.EventHandler(this.Graphic_Picker_Load); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picidle)).EndInit(); + this.pnlgraphicholder.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.picgraphic)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Button btncancel; + internal System.Windows.Forms.Button btnreset; + internal System.Windows.Forms.Button btnapply; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Button btnidlebrowse; + internal System.Windows.Forms.TextBox txtidlefile; + internal System.Windows.Forms.PictureBox picidle; + internal System.Windows.Forms.Button btnzoom; + internal System.Windows.Forms.Button btnstretch; + internal System.Windows.Forms.Button btncentre; + internal System.Windows.Forms.Button btntile; + internal System.Windows.Forms.Panel pnlgraphicholder; + internal System.Windows.Forms.PictureBox picgraphic; + internal System.Windows.Forms.Label lblobjecttoskin; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/GraphicPicker.cs b/ShiftOS.WinForms/Applications/GraphicPicker.cs new file mode 100644 index 0000000..a8cd3e8 --- /dev/null +++ b/ShiftOS.WinForms/Applications/GraphicPicker.cs @@ -0,0 +1,116 @@ +using ShiftOS.Objects.ShiftFS; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms.Applications +{ + public partial class GraphicPicker : UserControl, IShiftOSWindow + { + public GraphicPicker(Image old, string name, ImageLayout layout, Action cb) + { + InitializeComponent(); + SelectedLayout = layout; + Callback = cb; + lblobjecttoskin.Text = name; + + } + + public Action Callback; + + public ImageLayout SelectedLayout { get; private set; } + + public void btncancel_Click(object s, EventArgs a) + { + this.Close(); //don't invoke callback + } + + public void btnreset_Click(object s, EventArgs a) + { + this.ImageAsBinary = null; + this.Image = null; + Setup(); + } + + public void btnapply_Click(object s, EventArgs a) + { + Callback?.Invoke(this.ImageAsBinary, this.Image, this.SelectedLayout); + this.Close(); + } + + public byte[] ImageAsBinary { get; set; } + public Image Image { get; set; } + + public void Setup() + { + picidle.BackgroundImage = Image; + picidle.BackgroundImageLayout = SelectedLayout; + } + + public void btnidlebrowse_Click(object s, EventArgs a) + { + AppearanceManager.SetupDialog(new FileDialog(new[] { ".png", ".jpg", ".bmp", ".pic" }, FileOpenerStyle.Open, new Action((file) => + { + ImageAsBinary = Utils.ReadAllBytes(file); + System.IO.File.WriteAllBytes("temp_bin.bmp", ImageAsBinary); + Image = SkinEngine.ImageFromBinary(ImageAsBinary); + Image.Save("temp.bmp", System.Drawing.Imaging.ImageFormat.Bmp); + Setup(); + }))); + } + + public void btnzoom_Click(object s, EventArgs a) + { + this.SelectedLayout = ImageLayout.Zoom; + Setup(); + } + + public void btncentre_Click(object s, EventArgs a) + { + this.SelectedLayout = ImageLayout.Center; + Setup(); + } + + public void btnstretch_Click(object s, EventArgs a) + { + this.SelectedLayout = ImageLayout.Stretch; + Setup(); + } + + public void btntile_Click(object s, EventArgs a) + { + this.SelectedLayout = ImageLayout.Tile; + Setup(); + } + + public void Graphic_Picker_Load(object s, EventArgs a) + { + Setup(); + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } +} diff --git a/ShiftOS.WinForms/Applications/GraphicPicker.resx b/ShiftOS.WinForms/Applications/GraphicPicker.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/GraphicPicker.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/MUDAuthenticator.Designer.cs b/ShiftOS.WinForms/Applications/MUDAuthenticator.Designer.cs new file mode 100644 index 0000000..54f7afe --- /dev/null +++ b/ShiftOS.WinForms/Applications/MUDAuthenticator.Designer.cs @@ -0,0 +1,213 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class MUDAuthenticator + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlmain = new System.Windows.Forms.Panel(); + this.pnlusers = new System.Windows.Forms.GroupBox(); + this.lbusers = new System.Windows.Forms.ListBox(); + this.fluserbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnview = new System.Windows.Forms.Button(); + this.btnrefreshusers = new System.Windows.Forms.Button(); + this.pnllogin = new System.Windows.Forms.GroupBox(); + this.txtpassword = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.btnlogin = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.pnlmain.SuspendLayout(); + this.pnlusers.SuspendLayout(); + this.fluserbuttons.SuspendLayout(); + this.pnllogin.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.pnlmain); + this.panel1.Controls.Add(this.pnllogin); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(622, 430); + this.panel1.TabIndex = 0; + // + // pnlmain + // + this.pnlmain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlmain.Controls.Add(this.pnlusers); + this.pnlmain.Location = new System.Drawing.Point(13, 13); + this.pnlmain.Name = "pnlmain"; + this.pnlmain.Size = new System.Drawing.Size(597, 405); + this.pnlmain.TabIndex = 1; + this.pnlmain.Visible = false; + // + // pnlusers + // + this.pnlusers.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlusers.Controls.Add(this.lbusers); + this.pnlusers.Controls.Add(this.fluserbuttons); + this.pnlusers.Location = new System.Drawing.Point(16, 27); + this.pnlusers.Name = "pnlusers"; + this.pnlusers.Size = new System.Drawing.Size(265, 356); + this.pnlusers.TabIndex = 0; + this.pnlusers.TabStop = false; + this.pnlusers.Text = "groupBox1"; + // + // lbusers + // + this.lbusers.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbusers.FormattingEnabled = true; + this.lbusers.Location = new System.Drawing.Point(3, 16); + this.lbusers.Name = "lbusers"; + this.lbusers.Size = new System.Drawing.Size(259, 308); + this.lbusers.TabIndex = 0; + // + // fluserbuttons + // + this.fluserbuttons.AutoSize = true; + this.fluserbuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.fluserbuttons.Controls.Add(this.btnview); + this.fluserbuttons.Controls.Add(this.btnrefreshusers); + this.fluserbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.fluserbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.fluserbuttons.Location = new System.Drawing.Point(3, 324); + this.fluserbuttons.Name = "fluserbuttons"; + this.fluserbuttons.Size = new System.Drawing.Size(259, 29); + this.fluserbuttons.TabIndex = 1; + // + // btnview + // + this.btnview.AutoSize = true; + this.btnview.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnview.Location = new System.Drawing.Point(173, 3); + this.btnview.Name = "btnview"; + this.btnview.Size = new System.Drawing.Size(83, 23); + this.btnview.TabIndex = 0; + this.btnview.Text = "View user info"; + this.btnview.UseVisualStyleBackColor = true; + // + // btnrefreshusers + // + this.btnrefreshusers.AutoSize = true; + this.btnrefreshusers.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnrefreshusers.Location = new System.Drawing.Point(113, 3); + this.btnrefreshusers.Name = "btnrefreshusers"; + this.btnrefreshusers.Size = new System.Drawing.Size(54, 23); + this.btnrefreshusers.TabIndex = 1; + this.btnrefreshusers.Text = "Refresh"; + this.btnrefreshusers.UseVisualStyleBackColor = true; + // + // pnllogin + // + this.pnllogin.Controls.Add(this.txtpassword); + this.pnllogin.Controls.Add(this.label2); + this.pnllogin.Controls.Add(this.btnlogin); + this.pnllogin.Controls.Add(this.label1); + this.pnllogin.Location = new System.Drawing.Point(177, 180); + this.pnllogin.Name = "pnllogin"; + this.pnllogin.Size = new System.Drawing.Size(419, 251); + this.pnllogin.TabIndex = 0; + this.pnllogin.TabStop = false; + this.pnllogin.Text = "Log in"; + // + // txtpassword + // + this.txtpassword.Location = new System.Drawing.Point(13, 137); + this.txtpassword.Name = "txtpassword"; + this.txtpassword.Size = new System.Drawing.Size(387, 20); + this.txtpassword.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(10, 100); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(81, 13); + this.label2.TabIndex = 2; + this.label2.Text = "{PASSWORD}:"; + // + // btnlogin + // + this.btnlogin.Location = new System.Drawing.Point(325, 209); + this.btnlogin.Name = "btnlogin"; + this.btnlogin.Size = new System.Drawing.Size(75, 23); + this.btnlogin.TabIndex = 1; + this.btnlogin.Text = "Submit"; + this.btnlogin.UseVisualStyleBackColor = true; + this.btnlogin.Click += new System.EventHandler(this.btnlogin_Click); + // + // label1 + // + this.label1.Location = new System.Drawing.Point(7, 20); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(393, 64); + this.label1.TabIndex = 0; + this.label1.Text = "{LOGIN_EXP}"; + // + // MUDAuthenticator + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.ClientSize = new System.Drawing.Size(622, 430); + this.Controls.Add(this.panel1); + this.Name = "MUDAuthenticator"; + this.Text = "Multi-User Domain Admin Panel"; + this.panel1.ResumeLayout(false); + this.pnlmain.ResumeLayout(false); + this.pnlusers.ResumeLayout(false); + this.pnlusers.PerformLayout(); + this.fluserbuttons.ResumeLayout(false); + this.fluserbuttons.PerformLayout(); + this.pnllogin.ResumeLayout(false); + this.pnllogin.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.GroupBox pnllogin; + private System.Windows.Forms.TextBox txtpassword; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btnlogin; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel pnlmain; + private System.Windows.Forms.GroupBox pnlusers; + private System.Windows.Forms.ListBox lbusers; + private System.Windows.Forms.FlowLayoutPanel fluserbuttons; + private System.Windows.Forms.Button btnview; + private System.Windows.Forms.Button btnrefreshusers; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/MUDAuthenticator.cs b/ShiftOS.WinForms/Applications/MUDAuthenticator.cs new file mode 100644 index 0000000..9b588e6 --- /dev/null +++ b/ShiftOS.WinForms/Applications/MUDAuthenticator.cs @@ -0,0 +1,150 @@ +using ShiftOS.Objects; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications +{ + [MultiplayerOnly] + [Launcher("MUD Administrator", true, "al_mud_cracker")] + [RequiresUpgrade("mud_cracker")] + [WinOpen("mud_administrator")] + public partial class MUDAuthenticator : UserControl, IShiftOSWindow + { + public MUDAuthenticator() + { + try + { + InitializeComponent(); + ServerManager.ServerAccessGranted += () => + { + this.Invoke(new Action(() => { Granted(); })); + }; + ServerManager.ServerAccessDenied += () => + { + this.Invoke(new Action(() => { Denied(); })); + }; + ServerManager.GUIDReceived += (guid) => + { + this.guid = guid; + }; + ServerManager.UsersReceived += (users) => + { + foreach(var user in users) + { + if (!this.users.ContainsKey(user.Username)) + { + this.users.Add(user.Username, user); + } + else + { + this.users[user.Username].OnlineChat += ";" + user.OnlineChat; + } + } + this.Invoke(new Action(() => + { + SetupUserList(); + })); + }; + } + catch + { + + } + + pnllogin.Left = (pnllogin.Parent.Width - pnllogin.Width) / 2; + pnllogin.Top = (pnllogin.Parent.Height - pnllogin.Height) / 2; + + pnllogin.Parent.SizeChanged += (o, a) => + { + pnllogin.Left = (pnllogin.Parent.Width - pnllogin.Width) / 2; + pnllogin.Top = (pnllogin.Parent.Height - pnllogin.Height) / 2; + }; + + pnlmain.Left = (pnlmain.Parent.Width - pnlmain.Width) / 2; + pnlmain.Top = (pnlmain.Parent.Height - pnlmain.Height) / 2; + + + + } + + public void Granted() + { + Infobox.Show("{ACCESS_GRANTED}", "{ACCESS_GRANTED_MUDADMIN_EXP}"); + //This will tell the server to take the granted password off the list of granted passwords + //so the user must generate and crack a new one. + ServerManager.SendMessage("mudhack_killpass", ""); + + SetupAuthUI(); + } + + public void SetupAuthUI() + { + pnllogin.Hide(); + + pnlmain.Show(); + + PopulateUserList(); + } + + Dictionary users = new Dictionary(); + + public void PopulateUserList() + { + users = null; + ServerManager.SendMessage("mudhack_getallusers", ""); + } + + private string guid = null; + + public void SetupUserList() + { + lbusers.Items.Clear(); + foreach(var kv in users) + { + guid = null; + ServerManager.SendMessage("getguid_send", kv.Key); + while(guid == null) + { + + } + users[kv.Key].Guid = guid; + lbusers.Items.Add(kv.Key); + } + } + + public void Denied() + { + Infobox.Show("{ACCESS_DENIED}", "{ACCESS_DENIED_MUDADMIN_EXP}"); + } + + private void btnlogin_Click(object sender, EventArgs e) + { + ServerManager.SendMessage("mudhack_verify", "{pass: \"" + txtpassword.Text + "\"}"); + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } +} diff --git a/ShiftOS.WinForms/Applications/MUDAuthenticator.resx b/ShiftOS.WinForms/Applications/MUDAuthenticator.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/MUDAuthenticator.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs new file mode 100644 index 0000000..bcc5c96 --- /dev/null +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.Designer.cs @@ -0,0 +1,617 @@ +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() + { + 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.tasksToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.currentTaskToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.browseJobsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.txtappstatus = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); + this.you_memos = new System.Windows.Forms.Panel(); + this.flmemos = new System.Windows.Forms.FlowLayoutPanel(); + this.label3 = new System.Windows.Forms.Label(); + this.you_systemstatus = new System.Windows.Forms.Panel(); + this.lblsysstatus = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + 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.lgn_view = new System.Windows.Forms.Panel(); + this.banner = new System.Windows.Forms.Panel(); + this.lblegiontitle = new System.Windows.Forms.Label(); + this.btnleavelegion = new System.Windows.Forms.Button(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.btnjoinlegion = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.lbdescription = new System.Windows.Forms.Label(); + this.pnllgnusers = new System.Windows.Forms.Panel(); + this.label4 = new System.Windows.Forms.Label(); + this.lvusers = new System.Windows.Forms.ListView(); + this.lgn_join = new System.Windows.Forms.Panel(); + 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.fllegionlist = new System.Windows.Forms.FlowLayoutPanel(); + this.menuStrip1.SuspendLayout(); + this.statusStrip1.SuspendLayout(); + this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); + this.toolStripContainer1.ContentPanel.SuspendLayout(); + this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); + this.toolStripContainer1.SuspendLayout(); + this.you_memos.SuspendLayout(); + this.you_systemstatus.SuspendLayout(); + this.lgn_view.SuspendLayout(); + this.banner.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.pnllgnusers.SuspendLayout(); + this.lgn_join.SuspendLayout(); + this.panel3.SuspendLayout(); + this.flowLayoutPanel2.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.tasksToolStripMenuItem, + 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.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(152, 22); + this.browseToolStripMenuItem.Text = "Browse"; + // + // myShopToolStripMenuItem + // + this.myShopToolStripMenuItem.Name = "myShopToolStripMenuItem"; + this.myShopToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.myShopToolStripMenuItem.Text = "My Shop"; + // + // tasksToolStripMenuItem + // + this.tasksToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.currentTaskToolStripMenuItem, + this.browseJobsToolStripMenuItem}); + this.tasksToolStripMenuItem.Name = "tasksToolStripMenuItem"; + this.tasksToolStripMenuItem.Size = new System.Drawing.Size(47, 20); + this.tasksToolStripMenuItem.Text = "Tasks"; + // + // currentTaskToolStripMenuItem + // + this.currentTaskToolStripMenuItem.Name = "currentTaskToolStripMenuItem"; + this.currentTaskToolStripMenuItem.Size = new System.Drawing.Size(138, 22); + this.currentTaskToolStripMenuItem.Text = "Current task"; + // + // browseJobsToolStripMenuItem + // + this.browseJobsToolStripMenuItem.Name = "browseJobsToolStripMenuItem"; + this.browseJobsToolStripMenuItem.Size = new System.Drawing.Size(138, 22); + this.browseJobsToolStripMenuItem.Text = "Browse Jobs"; + // + // statusStrip1 + // + this.statusStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.txtappstatus}); + this.statusStrip1.Location = new System.Drawing.Point(0, 0); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(756, 22); + this.statusStrip1.TabIndex = 1; + this.statusStrip1.Text = "statusStrip1"; + // + // txtappstatus + // + this.txtappstatus.Name = "txtappstatus"; + this.txtappstatus.Size = new System.Drawing.Size(118, 17); + this.txtappstatus.Text = "toolStripStatusLabel1"; + // + // toolStripContainer1 + // + // + // toolStripContainer1.BottomToolStripPanel + // + this.toolStripContainer1.BottomToolStripPanel.Controls.Add(this.statusStrip1); + // + // toolStripContainer1.ContentPanel + // + 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.Controls.Add(this.you_systemstatus); + this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(756, 442); + 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); + // + // 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, 442); + 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, 399); + 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"; + // + // you_systemstatus + // + 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, 442); + this.you_systemstatus.TabIndex = 0; + // + // 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, 399); + 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"; + // + // 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(152, 22); + this.createLegionToolStripMenuItem.Text = "Create Legion"; + // + // joinLegionToolStripMenuItem + // + this.joinLegionToolStripMenuItem.Name = "joinLegionToolStripMenuItem"; + this.joinLegionToolStripMenuItem.Size = new System.Drawing.Size(152, 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(152, 22); + this.myLegionToolStripMenuItem.Text = "My Legion"; + this.myLegionToolStripMenuItem.Click += new System.EventHandler(this.myLegionToolStripMenuItem_Click); + // + // 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, 442); + this.lgn_view.TabIndex = 2; + // + // 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"; + // + // 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"; + // + // 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); + // + // 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"; + // + // 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); + // + // 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"; + // + // 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, 231); + this.lbdescription.TabIndex = 2; + this.lbdescription.Text = "This is the description of this multi-user domain legion. Keep it descriptive."; + // + // 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, 286); + this.pnllgnusers.TabIndex = 3; + // + // 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"; + // + // 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, 273); + this.lvusers.TabIndex = 3; + this.lvusers.UseCompatibleStateImageBehavior = false; + this.lvusers.View = System.Windows.Forms.View.SmallIcon; + // + // 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, 442); + this.lgn_join.TabIndex = 3; + // + // 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"; + // + // fllegionlist + // + 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, 342); + this.fllegionlist.TabIndex = 1; + // + // 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.Text = "MUD Control Centre"; + this.Size = new System.Drawing.Size(756, 488); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.statusStrip1.ResumeLayout(false); + this.statusStrip1.PerformLayout(); + this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.BottomToolStripPanel.PerformLayout(); + this.toolStripContainer1.ContentPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.PerformLayout(); + this.toolStripContainer1.ResumeLayout(false); + this.toolStripContainer1.PerformLayout(); + this.you_memos.ResumeLayout(false); + this.you_memos.PerformLayout(); + this.you_systemstatus.ResumeLayout(false); + this.you_systemstatus.PerformLayout(); + this.lgn_view.ResumeLayout(false); + this.lgn_view.PerformLayout(); + this.banner.ResumeLayout(false); + this.banner.PerformLayout(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.pnllgnusers.ResumeLayout(false); + this.pnllgnusers.PerformLayout(); + this.lgn_join.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.flowLayoutPanel2.ResumeLayout(false); + this.flowLayoutPanel2.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.ToolStripMenuItem tasksToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem currentTaskToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem browseJobsToolStripMenuItem; + private System.Windows.Forms.StatusStrip statusStrip1; + private System.Windows.Forms.ToolStripStatusLabel txtappstatus; + 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; + } +} diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.cs b/ShiftOS.WinForms/Applications/MUDControlCentre.cs new file mode 100644 index 0000000..7cd398b --- /dev/null +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.cs @@ -0,0 +1,314 @@ +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 +{ + [RequiresUpgrade("mud_fundamentals")] + [Launcher("MUD Control Centre", true, "al_mud_control_centre")] + [WinOpen("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_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 == "legion_all") + { + PopulateJoinLegion(JsonConvert.DeserializeObject>(msg.Contents)); + } + + })); + } + catch { } + }; + } + + 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: + 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.CurrentSave.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} + +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.CurrentSave.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", ""); + } + + 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)); + } + + 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)); + + } + } +} diff --git a/ShiftOS.WinForms/Applications/MUDControlCentre.resx b/ShiftOS.WinForms/Applications/MUDControlCentre.resx new file mode 100644 index 0000000..f1d13d7 --- /dev/null +++ b/ShiftOS.WinForms/Applications/MUDControlCentre.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 132, 17 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/MUDPasswordCracker.Designer.cs b/ShiftOS.WinForms/Applications/MUDPasswordCracker.Designer.cs new file mode 100644 index 0000000..39f3fec --- /dev/null +++ b/ShiftOS.WinForms/Applications/MUDPasswordCracker.Designer.cs @@ -0,0 +1,102 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class MUDPasswordCracker + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.txtpassword = new System.Windows.Forms.TextBox(); + this.lblpassword = new System.Windows.Forms.Label(); + this.btncrack = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.txtpassword); + this.panel1.Controls.Add(this.lblpassword); + this.panel1.Controls.Add(this.btncrack); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(439, 131); + this.panel1.TabIndex = 0; + // + // txtpassword + // + this.txtpassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtpassword.Location = new System.Drawing.Point(13, 53); + this.txtpassword.Name = "txtpassword"; + this.txtpassword.Size = new System.Drawing.Size(414, 20); + this.txtpassword.TabIndex = 2; + // + // lblpassword + // + this.lblpassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblpassword.Location = new System.Drawing.Point(13, 13); + this.lblpassword.Name = "lblpassword"; + this.lblpassword.Size = new System.Drawing.Size(414, 36); + this.lblpassword.TabIndex = 1; + this.lblpassword.Text = "{PASSWORD}:"; + this.lblpassword.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // btncrack + // + this.btncrack.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btncrack.Location = new System.Drawing.Point(12, 96); + this.btncrack.Name = "btncrack"; + this.btncrack.Size = new System.Drawing.Size(415, 23); + this.btncrack.TabIndex = 0; + this.btncrack.Text = "{CRACK}"; + this.btncrack.UseVisualStyleBackColor = true; + this.btncrack.Click += new System.EventHandler(this.btncrack_Click); + // + // MUDPasswordCracker + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(439, 131); + this.Controls.Add(this.panel1); + this.Name = "MUDPasswordCracker"; + this.Text = "Multi-User Domain Password Cracker v1.0"; + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.TextBox txtpassword; + private System.Windows.Forms.Label lblpassword; + private System.Windows.Forms.Button btncrack; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/MUDPasswordCracker.cs b/ShiftOS.WinForms/Applications/MUDPasswordCracker.cs new file mode 100644 index 0000000..acfe53d --- /dev/null +++ b/ShiftOS.WinForms/Applications/MUDPasswordCracker.cs @@ -0,0 +1,105 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications +{ + [MultiplayerOnly] + [Launcher("MUD cracker 1.0", true, "al_mud_cracker")] + [RequiresUpgrade("mud_cracker")] + [WinOpen("mud_cracker")] + public partial class MUDPasswordCracker : UserControl, IShiftOSWindow + { + public MUDPasswordCracker() + { + InitializeComponent(); + } + + private string PasswordToCrack { get; set; } + private string Password { get; set; } + + + private void btncrack_Click(object sender, EventArgs e) + { + ServerManager.ServerPasswordGenerated += (pass) => + { + PasswordToCrack = pass; + this.Invoke(new Action(() => + { + BeginCrack(); + })); + }; + ServerManager.InitiateMUDHack(); + } + + public void BeginCrack() + { + btncrack.Enabled = false; + btncrack.Text = "Starting crack..."; + + var t = new Thread(new ThreadStart(() => + { + int secondsleft = 30; + while(secondsleft > 0) + { + try + { + this.Invoke(new Action(() => + { + btncrack.Text = $"Cracking... step {secondsleft}."; + })); + + + + secondsleft -= 1; + + Thread.Sleep(1000); + } + catch + { + + } + } + this.Invoke(new Action(() => EndCrack())); + + })); + t.IsBackground = true; + t.Start(); + } + + public void EndCrack() + { + lblpassword.Show(); + txtpassword.Show(); + txtpassword.ReadOnly = true; + txtpassword.Text = PasswordToCrack; + + } + + public void OnLoad() + { + + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } +} diff --git a/ShiftOS.WinForms/Applications/MUDPasswordCracker.resx b/ShiftOS.WinForms/Applications/MUDPasswordCracker.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/MUDPasswordCracker.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/NameChanger.Designer.cs b/ShiftOS.WinForms/Applications/NameChanger.Designer.cs new file mode 100644 index 0000000..1df97d3 --- /dev/null +++ b/ShiftOS.WinForms/Applications/NameChanger.Designer.cs @@ -0,0 +1,55 @@ +namespace ShiftOS.WinForms.Applications { + partial class NameChanger { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) { + if (disposing && (components != null)) { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() { + this.listBox1 = new System.Windows.Forms.ListBox(); + this.SuspendLayout(); + // + // listBox1 + // + this.listBox1.FormattingEnabled = true; + this.listBox1.Location = new System.Drawing.Point(3, 3); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(138, 342); + this.listBox1.TabIndex = 0; + this.listBox1.SelectedIndexChanged += new System.EventHandler(this.listBox1_SelectedIndexChanged); + // + // NameChanger + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.listBox1); + this.Name = "NameChanger"; + this.Text = "Name Changer"; + this.Size = new System.Drawing.Size(459, 406); + this.Load += new System.EventHandler(this.NameChanger_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListBox listBox1; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/NameChanger.cs b/ShiftOS.WinForms/Applications/NameChanger.cs new file mode 100644 index 0000000..28b7200 --- /dev/null +++ b/ShiftOS.WinForms/Applications/NameChanger.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications { + + [Launcher("Name Changer", true, "al_name_changer")] + [RequiresUpgrade("name_changer")] + [WinOpen("name_changer")] + public partial class NameChanger : UserControl, IShiftOSWindow { + public NameChanger() { + InitializeComponent(); + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + + private void NameChanger_Load(object sender, EventArgs e) { + + } + + private void listBox1_SelectedIndexChanged(object sender, EventArgs e) + { + + } + } +} diff --git a/ShiftOS.WinForms/Applications/NameChanger.resx b/ShiftOS.WinForms/Applications/NameChanger.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/NameChanger.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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.Designer.cs b/ShiftOS.WinForms/Applications/Pong.Designer.cs new file mode 100644 index 0000000..55441a0 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Pong.Designer.cs @@ -0,0 +1,706 @@ +using ShiftOS.WinForms.Controls; + +namespace ShiftOS.WinForms.Applications +{ + partial class Pong + { + /// + /// 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); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.gameTimer = new System.Windows.Forms.Timer(this.components); + this.counter = new System.Windows.Forms.Timer(this.components); + this.tmrcountdown = new System.Windows.Forms.Timer(this.components); + this.tmrstoryline = new System.Windows.Forms.Timer(this.components); + this.pgcontents = new ShiftOS.WinForms.Controls.Canvas(); + this.pnlgamestats = new System.Windows.Forms.Panel(); + this.button1 = new System.Windows.Forms.Button(); + this.label12 = new System.Windows.Forms.Label(); + this.lblnextstats = new System.Windows.Forms.Label(); + this.Label7 = new System.Windows.Forms.Label(); + this.lblpreviousstats = new System.Windows.Forms.Label(); + this.Label4 = new System.Windows.Forms.Label(); + this.btnplayon = new System.Windows.Forms.Button(); + this.Label3 = new System.Windows.Forms.Label(); + this.btncashout = new System.Windows.Forms.Button(); + this.Label2 = new System.Windows.Forms.Label(); + this.lbllevelreached = new System.Windows.Forms.Label(); + this.pnlhighscore = new System.Windows.Forms.Panel(); + this.lbhighscore = new System.Windows.Forms.ListBox(); + this.label10 = new System.Windows.Forms.Label(); + this.pnlfinalstats = new System.Windows.Forms.Panel(); + this.btnplayagain = new System.Windows.Forms.Button(); + this.lblfinalcodepoints = new System.Windows.Forms.Label(); + this.Label11 = new System.Windows.Forms.Label(); + this.lblfinalcomputerreward = new System.Windows.Forms.Label(); + this.Label9 = new System.Windows.Forms.Label(); + this.lblfinallevelreward = new System.Windows.Forms.Label(); + this.lblfinallevelreached = new System.Windows.Forms.Label(); + this.lblfinalcodepointswithtext = new System.Windows.Forms.Label(); + this.pnllose = new System.Windows.Forms.Panel(); + this.lblmissedout = new System.Windows.Forms.Label(); + this.lblbutyougained = new System.Windows.Forms.Label(); + this.btnlosetryagain = new System.Windows.Forms.Button(); + this.Label5 = new System.Windows.Forms.Label(); + this.Label1 = new System.Windows.Forms.Label(); + this.pnlintro = new System.Windows.Forms.Panel(); + this.Label6 = new System.Windows.Forms.Label(); + this.btnstartgame = new System.Windows.Forms.Button(); + this.Label8 = new System.Windows.Forms.Label(); + this.lblbeatai = new System.Windows.Forms.Label(); + this.lblcountdown = new System.Windows.Forms.Label(); + this.ball = new ShiftOS.WinForms.Controls.Canvas(); + this.paddleHuman = new System.Windows.Forms.PictureBox(); + this.paddleComputer = new System.Windows.Forms.Panel(); + this.lbllevelandtime = new System.Windows.Forms.Label(); + this.lblstatscodepoints = new System.Windows.Forms.Label(); + this.lblstatsY = new System.Windows.Forms.Label(); + this.lblstatsX = new System.Windows.Forms.Label(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.button2 = new System.Windows.Forms.Button(); + this.pgcontents.SuspendLayout(); + this.pnlgamestats.SuspendLayout(); + this.pnlhighscore.SuspendLayout(); + this.pnlfinalstats.SuspendLayout(); + this.pnllose.SuspendLayout(); + this.pnlintro.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).BeginInit(); + this.flowLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // gameTimer + // + this.gameTimer.Interval = 30; + this.gameTimer.Tick += new System.EventHandler(this.gameTimer_Tick); + // + // counter + // + this.counter.Interval = 1000; + this.counter.Tick += new System.EventHandler(this.counter_Tick); + // + // tmrcountdown + // + this.tmrcountdown.Interval = 1000; + this.tmrcountdown.Tick += new System.EventHandler(this.countdown_Tick); + // + // tmrstoryline + // + this.tmrstoryline.Interval = 1000; + this.tmrstoryline.Tick += new System.EventHandler(this.tmrstoryline_Tick); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.pnlhighscore); + this.pgcontents.Controls.Add(this.pnlgamestats); + this.pgcontents.Controls.Add(this.pnlfinalstats); + this.pgcontents.Controls.Add(this.pnllose); + this.pgcontents.Controls.Add(this.pnlintro); + this.pgcontents.Controls.Add(this.lblbeatai); + this.pgcontents.Controls.Add(this.lblcountdown); + this.pgcontents.Controls.Add(this.ball); + this.pgcontents.Controls.Add(this.paddleHuman); + this.pgcontents.Controls.Add(this.paddleComputer); + this.pgcontents.Controls.Add(this.lbllevelandtime); + this.pgcontents.Controls.Add(this.lblstatscodepoints); + this.pgcontents.Controls.Add(this.lblstatsY); + this.pgcontents.Controls.Add(this.lblstatsX); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(700, 400); + this.pgcontents.TabIndex = 20; + this.pgcontents.Paint += new System.Windows.Forms.PaintEventHandler(this.pgcontents_Paint); + this.pgcontents.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove); + // + // pnlgamestats + // + this.pnlgamestats.Controls.Add(this.button1); + this.pnlgamestats.Controls.Add(this.label12); + this.pnlgamestats.Controls.Add(this.lblnextstats); + this.pnlgamestats.Controls.Add(this.Label7); + this.pnlgamestats.Controls.Add(this.lblpreviousstats); + this.pnlgamestats.Controls.Add(this.Label4); + this.pnlgamestats.Controls.Add(this.btnplayon); + this.pnlgamestats.Controls.Add(this.Label3); + this.pnlgamestats.Controls.Add(this.btncashout); + this.pnlgamestats.Controls.Add(this.Label2); + this.pnlgamestats.Controls.Add(this.lbllevelreached); + this.pnlgamestats.Location = new System.Drawing.Point(56, 76); + this.pnlgamestats.Name = "pnlgamestats"; + this.pnlgamestats.Size = new System.Drawing.Size(466, 284); + this.pnlgamestats.TabIndex = 6; + this.pnlgamestats.Visible = false; + // + // button1 + // + this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button1.Location = new System.Drawing.Point(32, 223); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(191, 35); + this.button1.TabIndex = 10; + this.button1.Text = "{PONG_VIEW_HIGHSCORES}"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.btnhighscore_Click); + // + // label12 + // + this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label12.Location = new System.Drawing.Point(8, 187); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(245, 33); + this.label12.TabIndex = 9; + this.label12.Text = "{PONG_HIGHSCORE_EXP}"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblnextstats + // + this.lblnextstats.AutoSize = true; + this.lblnextstats.Location = new System.Drawing.Point(278, 136); + this.lblnextstats.Name = "lblnextstats"; + this.lblnextstats.Size = new System.Drawing.Size(0, 13); + this.lblnextstats.TabIndex = 8; + // + // Label7 + // + this.Label7.AutoSize = true; + this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(278, 119); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(124, 16); + this.Label7.TabIndex = 7; + this.Label7.Text = "Next Level Stats:"; + // + // lblpreviousstats + // + this.lblpreviousstats.AutoSize = true; + this.lblpreviousstats.Location = new System.Drawing.Point(278, 54); + this.lblpreviousstats.Name = "lblpreviousstats"; + this.lblpreviousstats.Size = new System.Drawing.Size(0, 13); + this.lblpreviousstats.TabIndex = 6; + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(278, 37); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(154, 16); + this.Label4.TabIndex = 5; + this.Label4.Text = "Previous Level Stats:"; + // + // btnplayon + // + this.btnplayon.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnplayon.Location = new System.Drawing.Point(32, 147); + this.btnplayon.Name = "btnplayon"; + this.btnplayon.Size = new System.Drawing.Size(191, 35); + this.btnplayon.TabIndex = 4; + this.btnplayon.Text = "Play on for 3 codepoints!"; + this.btnplayon.UseVisualStyleBackColor = true; + this.btnplayon.Click += new System.EventHandler(this.btnplayon_Click); + // + // Label3 + // + this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(8, 111); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(245, 33); + this.Label3.TabIndex = 3; + this.Label3.Text = "{PONG_PLAYON_DESC}"; + this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btncashout + // + this.btncashout.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btncashout.Location = new System.Drawing.Point(32, 73); + this.btncashout.Name = "btncashout"; + this.btncashout.Size = new System.Drawing.Size(191, 35); + this.btncashout.TabIndex = 2; + this.btncashout.Text = "Cash out with 1 codepoint!"; + this.btncashout.UseVisualStyleBackColor = true; + this.btncashout.Click += new System.EventHandler(this.btncashout_Click); + // + // Label2 + // + this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(8, 37); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(245, 33); + this.Label2.TabIndex = 1; + this.Label2.Text = "{PONG_CASHOUT_DESC}"; + this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbllevelreached + // + this.lbllevelreached.AutoSize = true; + this.lbllevelreached.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbllevelreached.Location = new System.Drawing.Point(149, 6); + this.lbllevelreached.Name = "lbllevelreached"; + this.lbllevelreached.Size = new System.Drawing.Size(185, 20); + this.lbllevelreached.TabIndex = 0; + this.lbllevelreached.Text = "You Reached Level 2!"; + // + // pnlhighscore + // + this.pnlhighscore.Controls.Add(this.lbhighscore); + this.pnlhighscore.Controls.Add(this.flowLayoutPanel1); + this.pnlhighscore.Controls.Add(this.label10); + this.pnlhighscore.Location = new System.Drawing.Point(67, 29); + this.pnlhighscore.Name = "pnlhighscore"; + this.pnlhighscore.Size = new System.Drawing.Size(539, 311); + this.pnlhighscore.TabIndex = 14; + this.pnlhighscore.Visible = false; + // + // lbhighscore + // + this.lbhighscore.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbhighscore.FormattingEnabled = true; + this.lbhighscore.Location = new System.Drawing.Point(0, 36); + this.lbhighscore.MultiColumn = true; + this.lbhighscore.Name = "lbhighscore"; + this.lbhighscore.SelectionMode = System.Windows.Forms.SelectionMode.None; + this.lbhighscore.Size = new System.Drawing.Size(539, 246); + this.lbhighscore.TabIndex = 1; + // + // label10 + // + this.label10.Dock = System.Windows.Forms.DockStyle.Top; + this.label10.Location = new System.Drawing.Point(0, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(539, 36); + this.label10.TabIndex = 0; + this.label10.Text = "{HIGH_SCORES}"; + this.label10.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlfinalstats + // + this.pnlfinalstats.Controls.Add(this.btnplayagain); + this.pnlfinalstats.Controls.Add(this.lblfinalcodepoints); + this.pnlfinalstats.Controls.Add(this.Label11); + this.pnlfinalstats.Controls.Add(this.lblfinalcomputerreward); + this.pnlfinalstats.Controls.Add(this.Label9); + this.pnlfinalstats.Controls.Add(this.lblfinallevelreward); + this.pnlfinalstats.Controls.Add(this.lblfinallevelreached); + this.pnlfinalstats.Controls.Add(this.lblfinalcodepointswithtext); + this.pnlfinalstats.Location = new System.Drawing.Point(172, 74); + this.pnlfinalstats.Name = "pnlfinalstats"; + this.pnlfinalstats.Size = new System.Drawing.Size(362, 226); + this.pnlfinalstats.TabIndex = 9; + this.pnlfinalstats.Visible = false; + // + // btnplayagain + // + this.btnplayagain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnplayagain.Location = new System.Drawing.Point(5, 194); + this.btnplayagain.Name = "btnplayagain"; + this.btnplayagain.Size = new System.Drawing.Size(352, 29); + this.btnplayagain.TabIndex = 16; + this.btnplayagain.Text = "{PLAY}"; + this.btnplayagain.UseVisualStyleBackColor = true; + this.btnplayagain.Click += new System.EventHandler(this.btnplayagain_Click); + // + // lblfinalcodepoints + // + this.lblfinalcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinalcodepoints.Location = new System.Drawing.Point(3, 124); + this.lblfinalcodepoints.Name = "lblfinalcodepoints"; + this.lblfinalcodepoints.Size = new System.Drawing.Size(356, 73); + this.lblfinalcodepoints.TabIndex = 15; + this.lblfinalcodepoints.Text = "134 CP"; + this.lblfinalcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label11 + // + this.Label11.AutoSize = true; + this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label11.Location = new System.Drawing.Point(162, 82); + this.Label11.Name = "Label11"; + this.Label11.Size = new System.Drawing.Size(33, 33); + this.Label11.TabIndex = 14; + this.Label11.Text = "+"; + this.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblfinalcomputerreward + // + this.lblfinalcomputerreward.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinalcomputerreward.Location = new System.Drawing.Point(193, 72); + this.lblfinalcomputerreward.Name = "lblfinalcomputerreward"; + this.lblfinalcomputerreward.Size = new System.Drawing.Size(151, 52); + this.lblfinalcomputerreward.TabIndex = 12; + this.lblfinalcomputerreward.Text = "34"; + this.lblfinalcomputerreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label9 + // + this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label9.Location = new System.Drawing.Point(179, 31); + this.Label9.Name = "Label9"; + this.Label9.Size = new System.Drawing.Size(180, 49); + this.Label9.TabIndex = 11; + this.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblfinallevelreward + // + this.lblfinallevelreward.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinallevelreward.Location = new System.Drawing.Point(12, 72); + this.lblfinallevelreward.Name = "lblfinallevelreward"; + this.lblfinallevelreward.Size = new System.Drawing.Size(151, 52); + this.lblfinallevelreward.TabIndex = 10; + this.lblfinallevelreward.Text = "100"; + this.lblfinallevelreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblfinallevelreached + // + this.lblfinallevelreached.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinallevelreached.Location = new System.Drawing.Point(3, 31); + this.lblfinallevelreached.Name = "lblfinallevelreached"; + this.lblfinallevelreached.Size = new System.Drawing.Size(170, 49); + this.lblfinallevelreached.TabIndex = 9; + this.lblfinallevelreached.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblfinalcodepointswithtext + // + this.lblfinalcodepointswithtext.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblfinalcodepointswithtext.Location = new System.Drawing.Point(3, 2); + this.lblfinalcodepointswithtext.Name = "lblfinalcodepointswithtext"; + this.lblfinalcodepointswithtext.Size = new System.Drawing.Size(356, 26); + this.lblfinalcodepointswithtext.TabIndex = 1; + this.lblfinalcodepointswithtext.Text = "You cashed out with 134 codepoints!"; + this.lblfinalcodepointswithtext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnllose + // + this.pnllose.Controls.Add(this.lblmissedout); + this.pnllose.Controls.Add(this.lblbutyougained); + this.pnllose.Controls.Add(this.btnlosetryagain); + this.pnllose.Controls.Add(this.Label5); + this.pnllose.Controls.Add(this.Label1); + this.pnllose.Location = new System.Drawing.Point(209, 71); + this.pnllose.Name = "pnllose"; + this.pnllose.Size = new System.Drawing.Size(266, 214); + this.pnllose.TabIndex = 10; + this.pnllose.Visible = false; + // + // lblmissedout + // + this.lblmissedout.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblmissedout.Location = new System.Drawing.Point(3, 175); + this.lblmissedout.Name = "lblmissedout"; + this.lblmissedout.Size = new System.Drawing.Size(146, 35); + this.lblmissedout.TabIndex = 3; + this.lblmissedout.Text = "You Missed Out On: 500 Codepoints"; + this.lblmissedout.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblbutyougained + // + if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade_2")) + { + this.lblbutyougained.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblbutyougained.Location = new System.Drawing.Point(3, 125); + this.lblbutyougained.Name = "lblbutyougained"; + this.lblbutyougained.Size = new System.Drawing.Size(146, 35); + this.lblbutyougained.TabIndex = 3; + this.lblbutyougained.Text = "But you gained 5 Codepoints"; + this.lblbutyougained.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + } else + { + this.lblbutyougained.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblbutyougained.Location = new System.Drawing.Point(3, 125); + this.lblbutyougained.Name = "lblbutyougained"; + this.lblbutyougained.Size = new System.Drawing.Size(0, 0); + this.lblbutyougained.TabIndex = 3; + this.lblbutyougained.Text = "But you gained 5 Codepoints"; + this.lblbutyougained.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + } + // + // btnlosetryagain + // + this.btnlosetryagain.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnlosetryagain.Location = new System.Drawing.Point(155, 176); + this.btnlosetryagain.Name = "btnlosetryagain"; + this.btnlosetryagain.Size = new System.Drawing.Size(106, 35); + this.btnlosetryagain.TabIndex = 2; + this.btnlosetryagain.Text = "Try Again"; + this.btnlosetryagain.UseVisualStyleBackColor = true; + this.btnlosetryagain.Click += new System.EventHandler(this.btnlosetryagain_Click); + // + // Label5 + // + this.Label5.Location = new System.Drawing.Point(7, 26); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(260, 163); + this.Label5.TabIndex = 1; + // + // Label1 + // + this.Label1.Dock = System.Windows.Forms.DockStyle.Top; + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(0, 0); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(266, 16); + this.Label1.TabIndex = 0; + this.Label1.Text = "You lose!"; + this.Label1.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlintro + // + this.pnlintro.Controls.Add(this.Label6); + this.pnlintro.Controls.Add(this.btnstartgame); + this.pnlintro.Controls.Add(this.Label8); + this.pnlintro.Location = new System.Drawing.Point(52, 29); + this.pnlintro.Name = "pnlintro"; + this.pnlintro.Size = new System.Drawing.Size(595, 303); + this.pnlintro.TabIndex = 13; + // + // Label6 + // + this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label6.Location = new System.Drawing.Point(3, 39); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(589, 227); + this.Label6.TabIndex = 15; + this.Label6.Text = "{PONG_DESC}"; + this.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.Label6.Click += new System.EventHandler(this.Label6_Click); + // + // btnstartgame + // + this.btnstartgame.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnstartgame.Location = new System.Drawing.Point(186, 273); + this.btnstartgame.Name = "btnstartgame"; + this.btnstartgame.Size = new System.Drawing.Size(242, 28); + this.btnstartgame.TabIndex = 15; + this.btnstartgame.Text = "{PLAY}"; + this.btnstartgame.UseVisualStyleBackColor = true; + this.btnstartgame.Click += new System.EventHandler(this.btnstartgame_Click); + // + // Label8 + // + this.Label8.AutoSize = true; + this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label8.ForeColor = System.Drawing.Color.Black; + this.Label8.Location = new System.Drawing.Point(250, 5); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(280, 31); + this.Label8.TabIndex = 14; + this.Label8.Text = "{PONG_WELCOME}"; + this.Label8.Click += new System.EventHandler(this.Label8_Click); + // + // lblbeatai + // + this.lblbeatai.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblbeatai.Location = new System.Drawing.Point(47, 41); + this.lblbeatai.Name = "lblbeatai"; + this.lblbeatai.Size = new System.Drawing.Size(600, 30); + this.lblbeatai.TabIndex = 8; + this.lblbeatai.Text = "You got 2 codepoints for beating the Computer!"; + this.lblbeatai.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblbeatai.Visible = false; + // + // lblcountdown + // + this.lblcountdown.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblcountdown.Location = new System.Drawing.Point(182, 152); + this.lblcountdown.Name = "lblcountdown"; + this.lblcountdown.Size = new System.Drawing.Size(315, 49); + this.lblcountdown.TabIndex = 7; + this.lblcountdown.Text = "3"; + this.lblcountdown.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lblcountdown.Visible = false; + // + // ball + // + this.ball.BackColor = System.Drawing.Color.Black; + this.ball.Location = new System.Drawing.Point(300, 152); + this.ball.Name = "ball"; + this.ball.Size = new System.Drawing.Size(20, 20); + this.ball.TabIndex = 2; + this.ball.MouseEnter += new System.EventHandler(this.ball_MouseEnter); + this.ball.MouseLeave += new System.EventHandler(this.ball_MouseLeave); + // + // paddleHuman + // + this.paddleHuman.BackColor = System.Drawing.Color.Black; + this.paddleHuman.Location = new System.Drawing.Point(10, 134); + this.paddleHuman.Name = "paddleHuman"; + this.paddleHuman.Size = new System.Drawing.Size(20, 100); + this.paddleHuman.TabIndex = 3; + this.paddleHuman.TabStop = false; + // + // paddleComputer + // + this.paddleComputer.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.paddleComputer.BackColor = System.Drawing.Color.Black; + this.paddleComputer.Location = new System.Drawing.Point(666, 134); + this.paddleComputer.MaximumSize = new System.Drawing.Size(20, 100); + this.paddleComputer.Name = "paddleComputer"; + this.paddleComputer.Size = new System.Drawing.Size(20, 100); + this.paddleComputer.TabIndex = 1; + // + // lbllevelandtime + // + this.lbllevelandtime.Dock = System.Windows.Forms.DockStyle.Top; + this.lbllevelandtime.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbllevelandtime.Location = new System.Drawing.Point(0, 0); + this.lbllevelandtime.Name = "lbllevelandtime"; + this.lbllevelandtime.Size = new System.Drawing.Size(700, 22); + this.lbllevelandtime.TabIndex = 4; + this.lbllevelandtime.Text = "Level: 1 - 58 Seconds Left"; + this.lbllevelandtime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblstatscodepoints + // + this.lblstatscodepoints.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblstatscodepoints.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblstatscodepoints.Location = new System.Drawing.Point(239, 356); + this.lblstatscodepoints.Name = "lblstatscodepoints"; + this.lblstatscodepoints.Size = new System.Drawing.Size(219, 35); + this.lblstatscodepoints.TabIndex = 12; + this.lblstatscodepoints.Text = "Codepoints: "; + this.lblstatscodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblstatsY + // + this.lblstatsY.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.lblstatsY.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblstatsY.Location = new System.Drawing.Point(542, 356); + this.lblstatsY.Name = "lblstatsY"; + this.lblstatsY.Size = new System.Drawing.Size(144, 35); + this.lblstatsY.TabIndex = 11; + this.lblstatsY.Text = "Yspeed:"; + this.lblstatsY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblstatsX + // + this.lblstatsX.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lblstatsX.Font = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblstatsX.Location = new System.Drawing.Point(3, 356); + this.lblstatsX.Name = "lblstatsX"; + this.lblstatsX.Size = new System.Drawing.Size(144, 35); + this.lblstatsX.TabIndex = 5; + this.lblstatsX.Text = "Xspeed: "; + this.lblstatsX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel1.Controls.Add(this.button2); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 282); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(539, 29); + this.flowLayoutPanel1.TabIndex = 2; + // + // button2 + // + this.button2.AutoSize = true; + this.button2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button2.Location = new System.Drawing.Point(476, 3); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(60, 23); + this.button2.TabIndex = 0; + this.button2.Text = "{CLOSE}"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // Pong + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.Controls.Add(this.pgcontents); + this.DoubleBuffered = true; + this.Name = "Pong"; + this.Text = "{PONG_NAME}"; + this.Size = new System.Drawing.Size(820, 500); + this.Load += new System.EventHandler(this.Pong_Load); + this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove); + this.pgcontents.ResumeLayout(false); + this.pnlgamestats.ResumeLayout(false); + this.pnlgamestats.PerformLayout(); + this.pnlhighscore.ResumeLayout(false); + this.pnlhighscore.PerformLayout(); + this.pnlfinalstats.ResumeLayout(false); + this.pnlfinalstats.PerformLayout(); + this.pnllose.ResumeLayout(false); + this.pnlintro.ResumeLayout(false); + this.pnlintro.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).EndInit(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel paddleComputer; + internal System.Windows.Forms.Timer gameTimer; + internal System.Windows.Forms.PictureBox paddleHuman; + internal System.Windows.Forms.Label lbllevelandtime; + internal System.Windows.Forms.Label lblstatsX; + internal System.Windows.Forms.Timer counter; + internal System.Windows.Forms.Panel pnlgamestats; + internal System.Windows.Forms.Label lblnextstats; + internal System.Windows.Forms.Label Label7; + internal System.Windows.Forms.Label lblpreviousstats; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.Button btnplayon; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.Button btncashout; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Label lbllevelreached; + internal System.Windows.Forms.Label lblcountdown; + internal System.Windows.Forms.Timer tmrcountdown; + internal System.Windows.Forms.Label lblbeatai; + internal System.Windows.Forms.Panel pnlfinalstats; + internal System.Windows.Forms.Button btnplayagain; + internal System.Windows.Forms.Label lblfinalcodepoints; + internal System.Windows.Forms.Label Label11; + internal System.Windows.Forms.Label lblfinalcomputerreward; + internal System.Windows.Forms.Label Label9; + internal System.Windows.Forms.Label lblfinallevelreward; + internal System.Windows.Forms.Label lblfinallevelreached; + internal System.Windows.Forms.Label lblfinalcodepointswithtext; + internal System.Windows.Forms.Panel pnllose; + internal System.Windows.Forms.Label lblmissedout; + internal System.Windows.Forms.Label lblbutyougained; + internal System.Windows.Forms.Button btnlosetryagain; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Label lblstatscodepoints; + internal System.Windows.Forms.Label lblstatsY; + internal System.Windows.Forms.Panel pnlintro; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.Button btnstartgame; + internal System.Windows.Forms.Label Label8; + internal System.Windows.Forms.Timer tmrstoryline; + private System.Windows.Forms.Panel pnlhighscore; + private System.Windows.Forms.ListBox lbhighscore; + private System.Windows.Forms.Label label10; + internal Canvas pgcontents; + internal Canvas ball; + internal System.Windows.Forms.Button button1; + internal System.Windows.Forms.Label label12; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button button2; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Pong.cs b/ShiftOS.WinForms/Applications/Pong.cs new file mode 100644 index 0000000..72e5994 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Pong.cs @@ -0,0 +1,631 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Newtonsoft.Json; +using ShiftOS.Engine; +using ShiftOS.Objects; + +namespace ShiftOS.WinForms.Applications +{ + [Launcher("Pong", true, "al_pong")] + [WinOpen("pong")] + public partial class Pong : UserControl, IShiftOSWindow + { + int xVel = 7; + int yVel = 8; + int computerspeed = 8; + int level = 1; + int secondsleft = 60; + int casualposition; + double xveldec = 3.0; + double yveldec = 3.0; + double incrementx = 0.4; + double incrementy = 0.2; + int levelxspeed = 3; + int levelyspeed = 3; + int beatairewardtotal; + int beataireward = 1; + int[] levelrewards = new int[50]; + int totalreward; + int countdown = 3; + + bool aiShouldIsbeEnabled = true; + + public Pong() + { + InitializeComponent(); + } + + private void Pong_Load(object sender, EventArgs e) + { + setuplevelrewards(); + } + + // Move the paddle according to the mouse position. + private void pongMain_MouseMove(object sender, MouseEventArgs e) + { + var loc = this.PointToClient(MousePosition); + paddleHuman.Location = new Point(paddleHuman.Location.X, (loc.Y) - (paddleHuman.Height / 2)); + } + + + // ERROR: Handles clauses are not supported in C# + private void gameTimer_Tick(object sender, EventArgs e) + { + if (this.Left < Screen.PrimaryScreen.Bounds.Width) + { + ball.BackColor = SkinEngine.LoadedSkin.ControlTextColor; + paddleComputer.BackColor = SkinEngine.LoadedSkin.ControlTextColor; + paddleHuman.BackColor = SkinEngine.LoadedSkin.ControlTextColor; + + + + //Set the computer player to move according to the ball's position. + if(aiShouldIsbeEnabled) + if (ball.Location.X > 500 - xVel * 10 && xVel > 0) + { + if (ball.Location.Y > paddleComputer.Location.Y + 50) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed); + } + if (ball.Location.Y < paddleComputer.Location.Y + 50) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed); + } + casualposition = rand.Next(-150, 201); + } + else + { + //used to be me.location.y + if (paddleComputer.Location.Y > this.Size.Height / 2 - paddleComputer.Height + casualposition) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed); + } + //used to be me.location.y + if (paddleComputer.Location.Y < this.Size.Height / 2 - paddleComputer.Height + casualposition) + { + paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed); + } + } + + //Set Xvel and Yvel speeds from decimal + if (xVel > 0) + xVel = (int)Math.Round(xveldec); + if (xVel < 0) + xVel = (int)-Math.Round(xveldec); + if (yVel > 0) + yVel = (int)Math.Round(yveldec); + if (yVel < 0) + yVel = (int)-Math.Round(yveldec); + + // Move the game ball. + ball.Location = new Point(ball.Location.X + xVel, ball.Location.Y + yVel); + + // Check for top wall. + if (ball.Location.Y < 0) + { + ball.Location = new Point(ball.Location.X, 0); + yVel = -yVel; + } + + // Check for bottom wall. + if (ball.Location.Y > pgcontents.Height - ball.Height) + { + ball.Location = new Point(ball.Location.X, pgcontents.Height - ball.Size.Height); + yVel = -yVel; + } + + // Check for player paddle. + if (ball.Bounds.IntersectsWith(paddleHuman.Bounds)) + { + ball.Location = new Point(paddleHuman.Location.X + ball.Size.Width, ball.Location.Y); + //randomly increase x or y speed of ball + switch (rand.Next(1, 3)) + { + case 1: + xveldec = xveldec + incrementx; + break; + case 2: + if (yveldec > 0) + yveldec = yveldec + incrementy; + if (yveldec < 0) + yveldec = yveldec - incrementy; + break; + } + xVel = -xVel; + } + + // Check for computer paddle. + if (ball.Bounds.IntersectsWith(paddleComputer.Bounds)) + { + ball.Location = new Point(paddleComputer.Location.X - paddleComputer.Size.Width + 1, ball.Location.Y); + xveldec = xveldec + incrementx; + xVel = -xVel; + } + + // Check for left wall. + if (ball.Location.X < -100) + { + ball.Location = new Point(this.Size.Width / 2 + 200, this.Size.Height / 2); + paddleComputer.Location = new Point(paddleComputer.Location.X, ball.Location.Y); + if (xVel > 0) + xVel = -xVel; + pnllose.Show(); + gameTimer.Stop(); + counter.Stop(); + lblmissedout.Text = Localization.Parse("{YOU_MISSED_OUT_ON}:") + Environment.NewLine + lblstatscodepoints.Text.Replace(Localization.Parse("{CODEPOINTS}: "), "") + Localization.Parse(" {CODEPOINTS}"); + if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade_2")) + { + totalreward = levelrewards[level - 1] + beatairewardtotal; + double onePercent = (totalreward / 100); + lblbutyougained.Text = Localization.Parse("{BUT_YOU_GAINED}:") + Environment.NewLine + onePercent.ToString("") + (Localization.Parse(" {CODEPOINTS}")); + SaveSystem.TransferCodepointsFrom("pong", (totalreward / 100)); + } + } + + // Check for right wall. + if (ball.Location.X > this.Width - ball.Size.Width - paddleComputer.Width + 100) + { + ball.Location = new Point(this.Size.Width / 2 + 200, this.Size.Height / 2); + paddleComputer.Location = new Point(paddleComputer.Location.X, ball.Location.Y); + if (xVel > 0) + xVel = -xVel; + beatairewardtotal = beatairewardtotal + beataireward; + lblbeatai.Show(); + lblbeatai.Text = Localization.Parse($"{{PONG_BEAT_AI_REWARD_SECONDARY}}: {beataireward}"); + tmrcountdown.Start(); + gameTimer.Stop(); + counter.Stop(); + } + + //lblstats.Text = "Xspeed: " & Math.Abs(xVel) & " Yspeed: " & Math.Abs(yVel) & " Human Location: " & paddleHuman.Location.ToString & " Computer Location: " & paddleComputer.Location.ToString & Environment.NewLine & " Ball Location: " & ball.Location.ToString & " Xdec: " & xveldec & " Ydec: " & yveldec & " Xinc: " & incrementx & " Yinc: " & incrementy + lblstatsX.Text = Localization.Parse("{H_VEL}: ") + xveldec; + lblstatsY.Text = Localization.Parse("{V_VEL}: ") + yveldec; + lblstatscodepoints.Text = Localization.Parse("{CODEPOINTS}: ") + (levelrewards[level - 1] + beatairewardtotal).ToString(); + lbllevelandtime.Text = Localization.Parse("{LEVEL}: " + level + " - " + secondsleft + " {SECONDS_LEFT}"); + + if (xVel > 20 || xVel < -20) + { + paddleHuman.Width = Math.Abs(xVel); + paddleComputer.Width = Math.Abs(xVel); + } + else + { + paddleHuman.Width = 20; + paddleComputer.Width = 20; + } + + computerspeed = Math.Abs(yVel); + + // pgcontents.Refresh() + // pgcontents.CreateGraphics.FillRectangle(Brushes.Black, ball.Location.X, ball.Location.Y, ball.Width, ball.Height) + + } + } + + // ERROR: Handles clauses are not supported in C# + private void counter_Tick(object sender, EventArgs e) + { + if (this.Left < Screen.PrimaryScreen.Bounds.Width) + { + secondsleft = secondsleft - 1; + if (secondsleft == -1) + { + secondsleft = 60; + level = level + 1; + generatenextlevel(); + pnlgamestats.Show(); + pnlgamestats.BringToFront(); + pnlgamestats.Location = new Point((pgcontents.Width / 2) - (pnlgamestats.Width / 2), (pgcontents.Height / 2) - (pnlgamestats.Height / 2)); + + counter.Stop(); + gameTimer.Stop(); + SendHighscores(); + } + lblstatscodepoints.Text = Localization.Parse("{CODEPOINTS}: ") + (levelrewards[level - 1] + beatairewardtotal).ToString(); + } + } + + public void SendHighscores() + { + var highscore = new PongHighscore + { + UserName = $"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}", + HighestLevel = level, + HighestCodepoints = totalreward + }; + ServerManager.SendMessage("pong_sethighscore", JsonConvert.SerializeObject(highscore)); + } + + // ERROR: Handles clauses are not supported in C# + private void btnplayon_Click(object sender, EventArgs e) + { + xveldec = levelxspeed; + yveldec = levelyspeed; + + secondsleft = 60; + + tmrcountdown.Start(); + lblbeatai.Text = Localization.Parse($"{{PONG_BEAT_AI_REWARD}}: {beataireward}"); + pnlgamestats.Hide(); + lblbeatai.Show(); + ball.Location = new Point(paddleHuman.Location.X + paddleHuman.Width + 50, paddleHuman.Location.Y + paddleHuman.Height / 2); + if (xVel < 0) + xVel = Math.Abs(xVel); + lbllevelandtime.Text = Localization.Parse("{LEVEL}: " + level + " - " + secondsleft + " {SECONDS_LEFT}"); + } + + //Increase the ball speed stats for the next level + private void generatenextlevel() + { + lbllevelreached.Text = Localization.Parse("{YOU_REACHED_LEVEL} " + level + "!"); + + lblpreviousstats.Text = Localization.Parse("{INITIAL_H_VEL}: " + levelxspeed + Environment.NewLine + "{INITIAL_V_VEL}: " + levelyspeed + Environment.NewLine + "{INC_H_VEL}: " + incrementx + Environment.NewLine + "{INC_V_VEL}: " + incrementy); + + switch (rand.Next(1, 3)) + { + case 1: + levelxspeed = levelxspeed + 1; + break; + case 2: + levelxspeed = levelxspeed + 2; + break; + } + + switch (rand.Next(1, 3)) + { + case 1: + levelyspeed = levelyspeed + 1; + break; + case 2: + levelyspeed = levelyspeed + 2; + break; + } + + switch (rand.Next(1, 6)) + { + case 1: + incrementx = incrementx + 0.1; + break; + case 2: + incrementx = incrementx + 0.2; + break; + case 3: + incrementy = incrementy + 0.1; + break; + case 4: + incrementy = incrementy + 0.2; + break; + case 5: + incrementy = incrementy + 0.3; + break; + } + + lblnextstats.Text = Localization.Parse("{INITIAL_H_VEL}: " + levelxspeed + Environment.NewLine + "{INITIAL_V_VEL}: " + levelyspeed + Environment.NewLine + "{INC_H_VEL}: " + incrementx + Environment.NewLine + "{INC_V_VEL}: " + incrementy); + + if (level < 15) + { + if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade")) + { + beataireward = level * 10; + } else + { + beataireward = level * 5; + } + } + else + { + if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade")) + { + double br = levelrewards[level - 1] / 10; + beataireward = (int)Math.Round(br) * 10; + } else + { + double br = levelrewards[level - 1] / 10; + beataireward = (int)Math.Round(br) * 5; + } + } + + totalreward = levelrewards[level - 1] + beatairewardtotal; + + btncashout.Text = Localization.Parse("{CASH_OUT_WITH_CODEPOINTS}"); + btnplayon.Text = Localization.Parse("{PONG_PLAY_ON_FOR_MORE}"); + } + + private void setuplevelrewards() + { + if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade")) + { + levelrewards[0] = 0; + levelrewards[1] = 40; + levelrewards[2] = 120; + levelrewards[3] = 280; + levelrewards[4] = 580; + levelrewards[5] = 800; + levelrewards[6] = 1200; + levelrewards[7] = 1800; + levelrewards[8] = 2400; + levelrewards[9] = 3200; + levelrewards[10] = 4000; + levelrewards[11] = 5000; + levelrewards[12] = 6000; + levelrewards[13] = 8000; + levelrewards[14] = 10000; + levelrewards[15] = 12000; + levelrewards[16] = 16000; + levelrewards[17] = 20000; + levelrewards[18] = 26000; + levelrewards[19] = 32000; + levelrewards[20] = 40000; + levelrewards[21] = 50000; + levelrewards[22] = 64000; + levelrewards[23] = 80000; + levelrewards[24] = 100000; + levelrewards[25] = 120000; + levelrewards[26] = 150000; + levelrewards[27] = 180000; + levelrewards[28] = 220000; + levelrewards[29] = 280000; + levelrewards[30] = 360000; + levelrewards[31] = 440000; + levelrewards[32] = 540000; + levelrewards[33] = 640000; + levelrewards[34] = 800000; + levelrewards[35] = 1000000; + levelrewards[36] = 1280000; + levelrewards[37] = 1600000; + levelrewards[38] = 2000000; + levelrewards[39] = 3000000; + levelrewards[40] = 4000000; + } else + { + levelrewards[0] = 0; + levelrewards[1] = 20; + levelrewards[2] = 60; + levelrewards[3] = 140; + levelrewards[4] = 290; + levelrewards[5] = 400; + levelrewards[6] = 600; + levelrewards[7] = 900; + levelrewards[8] = 1200; + levelrewards[9] = 1600; + levelrewards[10] = 2000; + levelrewards[11] = 2500; + levelrewards[12] = 3000; + levelrewards[13] = 4000; + levelrewards[14] = 5000; + levelrewards[15] = 6000; + levelrewards[16] = 8000; + levelrewards[17] = 10000; + levelrewards[18] = 13000; + levelrewards[19] = 16000; + levelrewards[20] = 20000; + levelrewards[21] = 25000; + levelrewards[22] = 32000; + levelrewards[23] = 40000; + levelrewards[24] = 50000; + levelrewards[25] = 60000; + levelrewards[26] = 75000; + levelrewards[27] = 90000; + levelrewards[28] = 110000; + levelrewards[29] = 140000; + levelrewards[30] = 180000; + levelrewards[31] = 220000; + levelrewards[32] = 270000; + levelrewards[33] = 320000; + levelrewards[34] = 400000; + levelrewards[35] = 500000; + levelrewards[36] = 640000; + levelrewards[37] = 800000; + levelrewards[38] = 1000000; + levelrewards[39] = 1500000; + levelrewards[40] = 2000000; + } + } + + // ERROR: Handles clauses are not supported in C# + private void countdown_Tick(object sender, EventArgs e) + { + if (this.Left < Screen.PrimaryScreen.Bounds.Width) + { + switch (countdown) + { + case 0: + countdown = 3; + lblcountdown.Hide(); + lblbeatai.Hide(); + gameTimer.Start(); + counter.Start(); + tmrcountdown.Stop(); + break; + case 1: + lblcountdown.Text = "1"; + countdown = countdown - 1; + break; + case 2: + lblcountdown.Text = "2"; + countdown = countdown - 1; + break; + case 3: + lblcountdown.Text = "3"; + countdown = countdown - 1; + lblcountdown.Show(); + break; + } + + } + } + + // ERROR: Handles clauses are not supported in C# + private void btncashout_Click(object sender, EventArgs e) + { + pnlgamestats.Hide(); + pnlfinalstats.Show(); + lblfinalcodepointswithtext.Text = Localization.Parse("{YOU_WON} " + totalreward + " {CODEPOINTS}!"); + lblfinallevelreached.Text = Localization.Parse("{CODEPOINTS_FOR_BEATING_LEVEL}: ") + (level - 1).ToString(); + lblfinallevelreward.Text = levelrewards[level - 1].ToString(); + lblfinalcomputerreward.Text = beatairewardtotal.ToString(); + lblfinalcodepoints.Text = totalreward + Localization.Parse(" {CODEPOINTS_SHORT}"); + SaveSystem.TransferCodepointsFrom("pong", totalreward); + } + + private void newgame() + { + pnlfinalstats.Hide(); + pnllose.Hide(); + pnlintro.Hide(); + + level = 1; + totalreward = 0; + if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade")) + { + beataireward = 10; + } else + { + beataireward = 5; + } + beatairewardtotal = 0; + secondsleft = 60; + lblstatscodepoints.Text = Localization.Parse("{CODEPOINTS}: "); + //reset stats text + lblstatsX.Text = Localization.Parse("{H_VEL}: "); + lblstatsY.Text = Localization.Parse("{V_VEL}: "); + + levelxspeed = 3; + levelyspeed = 3; + + incrementx = 0.4; + incrementy = 0.2; + + xveldec = levelxspeed; + yveldec = levelyspeed; + + tmrcountdown.Start(); + lblbeatai.Text = Localization.Parse($"{{PONG_BEAT_AI_REWARD}}: {beataireward}"); + pnlgamestats.Hide(); + lblbeatai.Show(); + ball.Location = new Point(paddleHuman.Location.X + paddleHuman.Width + 50, (paddleHuman.Location.Y + paddleHuman.Height) / 2); + if (xVel < 0) + xVel = Math.Abs(xVel); + lbllevelandtime.Text = Localization.Parse("{{LEVEL}}: " + level + " - " + secondsleft + " {SECONDS_LEFT}"); + } + + public void btnhighscore_Click(object s, EventArgs a) + { + pnlhighscore.BringToFront(); + SetupHighScores(); + } + + public void SetupHighScores() + { + lbhighscore.Items.Clear(); + ServerManager.MessageReceived += (msg) => + { + if(msg.Name == "pong_highscores") + { + var hs = JsonConvert.DeserializeObject>(msg.Contents); + + var orderedhs = hs.OrderByDescending(i => i.HighestLevel); + + foreach(var score in orderedhs) + { + this.Invoke(new Action(() => + { + lbhighscore.Items.Add($"{score.UserName}\t\t\t{score.HighestLevel}\t\t{score.HighestCodepoints} CP"); + })); + } + } + }; + ServerManager.SendMessage("pong_gethighscores", null); + pnlhighscore.Show(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnplayagain_Click(object sender, EventArgs e) + { + newgame(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnlosetryagain_Click(object sender, EventArgs e) + { + newgame(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnstartgame_Click(object sender, EventArgs e) + { + newgame(); + } + + Random rand = new Random(); + // ERROR: Handles clauses are not supported in C# + private void tmrstoryline_Tick(object sender, EventArgs e) + { + // Random chance of showing getshiftnet storyline + int i = rand.Next(0, 100); + + if (i >= 25 && i <= 50) + { + tmrstoryline.Stop(); + } + + } + + // ERROR: Handles clauses are not supported in C# + private void me_closing(object sender, FormClosingEventArgs e) + { + tmrstoryline.Stop(); + } + + private void Label6_Click(object sender, EventArgs e) + { + + } + + private void Label8_Click(object sender, EventArgs e) + { + + } + + private void pgcontents_Paint(object sender, PaintEventArgs e) { + + } + + private void ball_MouseEnter(object sender, EventArgs e) { + aiShouldIsbeEnabled = false; + } + + private void ball_MouseLeave(object sender, EventArgs e) { + aiShouldIsbeEnabled = true; + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + + private void button2_Click(object sender, EventArgs e) + { + pnlhighscore.Hide(); + } + } +} diff --git a/ShiftOS.WinForms/Applications/Pong.resx b/ShiftOS.WinForms/Applications/Pong.resx new file mode 100644 index 0000000..3b5619d --- /dev/null +++ b/ShiftOS.WinForms/Applications/Pong.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 227, 17 + + + 134, 17 + + + 340, 17 + + + 17, 17 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Shifter.Designer.cs b/ShiftOS.WinForms/Applications/Shifter.Designer.cs new file mode 100644 index 0000000..b4a45ea --- /dev/null +++ b/ShiftOS.WinForms/Applications/Shifter.Designer.cs @@ -0,0 +1,164 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class Shifter + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.panel4 = new System.Windows.Forms.Panel(); + this.flbody = new System.Windows.Forms.FlowLayoutPanel(); + this.flcategory = new System.Windows.Forms.FlowLayoutPanel(); + this.panel3 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.panel2 = new System.Windows.Forms.Panel(); + this.flmeta = new System.Windows.Forms.FlowLayoutPanel(); + this.btnapply = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.panel4.SuspendLayout(); + this.panel3.SuspendLayout(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.panel4); + this.panel1.Controls.Add(this.panel3); + this.panel1.Controls.Add(this.panel2); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(893, 539); + this.panel1.TabIndex = 0; + // + // panel4 + // + this.panel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel4.Controls.Add(this.flbody); + this.panel4.Controls.Add(this.flcategory); + this.panel4.Location = new System.Drawing.Point(154, 283); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(734, 253); + this.panel4.TabIndex = 2; + // + // flbody + // + this.flbody.AutoScroll = true; + this.flbody.Dock = System.Windows.Forms.DockStyle.Fill; + this.flbody.Location = new System.Drawing.Point(126, 0); + this.flbody.Name = "flbody"; + this.flbody.Size = new System.Drawing.Size(608, 253); + this.flbody.TabIndex = 3; + // + // flcategory + // + this.flcategory.Dock = System.Windows.Forms.DockStyle.Left; + this.flcategory.Location = new System.Drawing.Point(0, 0); + this.flcategory.Name = "flcategory"; + this.flcategory.Size = new System.Drawing.Size(126, 253); + this.flcategory.TabIndex = 2; + // + // panel3 + // + this.panel3.Controls.Add(this.label1); + this.panel3.Location = new System.Drawing.Point(155, 12); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(640, 360); + this.panel3.TabIndex = 1; + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(640, 360); + this.label1.TabIndex = 0; + this.label1.Text = "Preview not available."; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // panel2 + // + this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.panel2.Controls.Add(this.flmeta); + this.panel2.Controls.Add(this.btnapply); + this.panel2.Location = new System.Drawing.Point(12, 12); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(136, 511); + this.panel2.TabIndex = 0; + // + // flmeta + // + this.flmeta.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.flmeta.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flmeta.Location = new System.Drawing.Point(4, 4); + this.flmeta.Name = "flmeta"; + this.flmeta.Size = new System.Drawing.Size(126, 450); + this.flmeta.TabIndex = 1; + // + // btnapply + // + this.btnapply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnapply.Location = new System.Drawing.Point(3, 460); + this.btnapply.Name = "btnapply"; + this.btnapply.Size = new System.Drawing.Size(127, 48); + this.btnapply.TabIndex = 0; + this.btnapply.Text = "Apply"; + this.btnapply.UseVisualStyleBackColor = true; + this.btnapply.Click += new System.EventHandler(this.btnapply_Click); + // + // Shifter + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.panel1); + this.Name = "Shifter"; + this.Text = "Shifter"; + this.Size = new System.Drawing.Size(893, 539); + this.Load += new System.EventHandler(this.Shifter_Load); + this.panel1.ResumeLayout(false); + this.panel4.ResumeLayout(false); + this.panel3.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.FlowLayoutPanel flmeta; + private System.Windows.Forms.Button btnapply; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.FlowLayoutPanel flbody; + private System.Windows.Forms.FlowLayoutPanel flcategory; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Shifter.cs b/ShiftOS.WinForms/Applications/Shifter.cs new file mode 100644 index 0000000..6becfcb --- /dev/null +++ b/ShiftOS.WinForms/Applications/Shifter.cs @@ -0,0 +1,616 @@ +using Newtonsoft.Json; +using ShiftOS.Objects.ShiftFS; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms.Applications +{ + [Launcher("Shifter", true, "al_shifter")] + [RequiresUpgrade("shifter")] + [WinOpen("shifter")] + public partial class Shifter : UserControl, IShiftOSWindow + { + public Shifter() + { + InitializeComponent(); + PopulateShifter(); + } + + public int CodepointValue = 0; + public List settings = new List(); + public Skin LoadedSkin = null; + + public void PopulateShifter() + { + if (LoadedSkin == null) + LoadedSkin = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(SkinEngine.LoadedSkin)); + + settings.Clear(); + + foreach(var field in LoadedSkin.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance)) + { + if (ShiftoriumFrontend.UpgradeAttributesUnlocked(field)) + { + bool addToShifter = true; + ShifterSetting setting = new Applications.ShifterSetting(); + foreach (var attr in field.GetCustomAttributes(false)) + { + if (attr is ShifterHiddenAttribute) + { + addToShifter = false; + continue; + } + + if (attr is ShifterMetaAttribute) + { + setting.Category = (attr as ShifterMetaAttribute).Meta; + } + if (attr is ShifterCategoryAttribute) + { + setting.SubCategory = (attr as ShifterCategoryAttribute).Category; + } + if (attr is ShifterNameAttribute) + { + setting.Name = (attr as ShifterNameAttribute).Name; + } + if (attr is ShifterDescriptionAttribute) + { + setting.Description = (attr as ShifterDescriptionAttribute).Description; + } + + } + if (addToShifter == true) + { + setting.Field = field; + settings.Add(setting); + } + } + } + + PopulateCategories(); + } + + public void PopulateCategories() + { + flmeta.Controls.Clear(); + + List cats = new List(); + + foreach(var c in this.settings) + { + if (!cats.Contains(c.Category)) + { + cats.Add(c.Category); + } + } + + foreach(var c in cats) + { + var btn = new Button(); + btn.Text = c; + btn.Width = flmeta.Width - (flmeta.Margin.Left * 2); + btn.FlatStyle = FlatStyle.Flat; + btn.Click += (o, a) => + { + PopulateSubcategories(c); + }; + + flmeta.Controls.Add(btn); + btn.Show(); + } + } + + public void PopulateSubcategories(string cat) + { + flcategory.Controls.Clear(); + + List cats = new List(); + + foreach (var c in this.settings) + { + if (c.Category == cat) + { + if (!cats.Contains(c.SubCategory)) + { + cats.Add(c.SubCategory); + } + } + } + + foreach (var c in cats) + { + var btn = new Button(); + btn.Text = c; + btn.Width = flcategory.Width - (flcategory.Margin.Left * 2); + btn.FlatStyle = FlatStyle.Flat; + btn.Click += (o, a) => + { + PopulateBody(cat, c); + }; + + flcategory.Controls.Add(btn); + btn.Show(); + } + } + + public void PopulateBody(string cat, string subcat) + { + flbody.Controls.Clear(); + + List cats = new List(); + + foreach (var c in this.settings) + { + if (c.SubCategory == subcat && c.Category == cat) + { + if (c.Field.FlagFullfilled(LoadedSkin)) + { + if (!cats.Contains(c)) + { + cats.Add(c); + } + } + } + } + + foreach(var c in cats) + { + var lbl = new Label(); + int labelHeight = 0; + lbl.AutoSize = true; + lbl.Text = c.Name + ":"; + flbody.Controls.Add(lbl); + lbl.TextAlign = ContentAlignment.MiddleLeft; + lbl.Show(); + //Cool - label's in. + if(c.Field.FieldType == typeof(Point)) + { + var width = new TextBox(); + var height = new TextBox(); + labelHeight = width.Height; //irony? + width.Width = 30; + height.Width = width.Width; + width.Text = ((Point)c.Field.GetValue(this.LoadedSkin)).X.ToString(); + height.Text = ((Point)c.Field.GetValue(this.LoadedSkin)).Y.ToString(); + flbody.SetFlowBreak(height, true); + ControlManager.SetupControl(width); + ControlManager.SetupControl(height); + + flbody.Controls.Add(width); + width.Show(); + flbody.Controls.Add(height); + height.Show(); + + EventHandler tc = (o, a) => + { + try + { + int x = Convert.ToInt32(width.Text); + int y = Convert.ToInt32(height.Text); + + int oldx = ((Point)c.Field.GetValue(this.LoadedSkin)).X; + int oldy = ((Point)c.Field.GetValue(this.LoadedSkin)).Y; + + if(x != oldx || y != oldy) + { + c.Field.SetValue(LoadedSkin, new Point(x, y)); + CodepointValue += 200; + } + } + catch + { + width.Text = ((Point)c.Field.GetValue(this.LoadedSkin)).X.ToString(); + height.Text = ((Point)c.Field.GetValue(this.LoadedSkin)).Y.ToString(); + } + }; + + width.TextChanged += tc; + height.TextChanged += tc; + + } + else if(c.Field.FieldType == typeof(string)) + { + var str = new TextBox(); + str.Width = 120; + ControlManager.SetupControl(str); + labelHeight = str.Height; + str.Text = c.Field.GetValue(LoadedSkin).ToString(); + flbody.SetFlowBreak(str, true); + str.TextChanged += (o, a) => { c.Field.SetValue(LoadedSkin, str.Text); CodepointValue += 100; }; + flbody.Controls.Add(str); + str.Show(); + } + else if(c.Field.FieldType == typeof(byte[])) + { + //We'll assume that this is an image file. + var color = new Button(); + color.Width = 40; + labelHeight = color.Height; + //just so it's flat like the system. + ControlManager.SetupControl(color); + flbody.SetFlowBreak(color, true); + + color.BackgroundImage = SkinEngine.ImageFromBinary((byte[])c.Field.GetValue(this.LoadedSkin)); + color.Click += (o, a) => + { + AppearanceManager.SetupDialog(new GraphicPicker(color.BackgroundImage, c.Name, GetLayout(c.Field.GetImageName()), new Action((col, gdiImg, layout) => + { + c.Field.SetValue(LoadedSkin, col); + color.BackgroundImage = SkinEngine.ImageFromBinary(col); + color.BackgroundImageLayout = layout; + LoadedSkin.SkinImageLayouts[c.Field.GetImageName()] = layout; + CodepointValue += 700; + }))); + }; + flbody.Controls.Add(color); + color.Show(); + } + else if (c.Field.FieldType == typeof(Size)) + { + var width = new TextBox(); + var height = new TextBox(); + width.Width = 30; + height.Width = width.Width; + labelHeight = width.Height; + flbody.SetFlowBreak(height, true); + + width.Text = ((Size)c.Field.GetValue(this.LoadedSkin)).Width.ToString(); + height.Text = ((Size)c.Field.GetValue(this.LoadedSkin)).Height.ToString(); + ControlManager.SetupControl(width); + ControlManager.SetupControl(height); + + flbody.Controls.Add(width); + width.Show(); + flbody.Controls.Add(height); + height.Show(); + + EventHandler tc = (o, a) => + { + try + { + int x = Convert.ToInt32(width.Text); + int y = Convert.ToInt32(height.Text); + + int oldx = ((Size)c.Field.GetValue(this.LoadedSkin)).Width; + int oldy = ((Size)c.Field.GetValue(this.LoadedSkin)).Height; + + if (x != oldx || y != oldy) + { + c.Field.SetValue(LoadedSkin, new Size(x, y)); + CodepointValue += 200; + } + } + catch + { + width.Text = ((Size)c.Field.GetValue(this.LoadedSkin)).Width.ToString(); + height.Text = ((Size)c.Field.GetValue(this.LoadedSkin)).Height.ToString(); + } + }; + + width.TextChanged += tc; + height.TextChanged += tc; + + } + else if(c.Field.FieldType == typeof(bool)) + { + var check = new CheckBox(); + check.Checked = ((bool)c.Field.GetValue(LoadedSkin)); + labelHeight = check.Height; + check.CheckedChanged += (o, a) => + { + c.Field.SetValue(LoadedSkin, check.Checked); + CodepointValue += 50; + }; + flbody.SetFlowBreak(check, true); + + flbody.Controls.Add(check); + check.Show(); + } + else if(c.Field.FieldType == typeof(Font)) + { + var name = new ComboBox(); + var size = new TextBox(); + var style = new ComboBox(); + + name.Width = 120; + labelHeight = name.Height; + size.Width = 40; + style.Width = 80; + flbody.SetFlowBreak(style, true); + + ControlManager.SetupControl(name); + ControlManager.SetupControl(size); + ControlManager.SetupControl(style); + + //populate the font name box + foreach(var font in FontFamily.Families) + { + name.Items.Add(font.Name); + } + name.Text = ((Font)c.Field.GetValue(LoadedSkin)).Name; + + size.Text = ((Font)c.Field.GetValue(LoadedSkin)).Size.ToString(); + + //populate the style box + foreach(var s in (FontStyle[])Enum.GetValues(typeof(FontStyle))) + { + style.Items.Add(s.ToString()); + } + style.Text = ((Font)c.Field.GetValue(LoadedSkin)).Style.ToString(); + + name.SelectedIndexChanged += (o, a) => + { + var en = (FontStyle[])Enum.GetValues(typeof(FontStyle)); + + var f = en[style.SelectedIndex]; + + c.Field.SetValue(LoadedSkin, new Font(name.Text, (float)Convert.ToInt32(size.Text), f)); + CodepointValue += 100; + }; + + style.SelectedIndexChanged += (o, a) => + { + var en = (FontStyle[])Enum.GetValues(typeof(FontStyle)); + + var f = en[style.SelectedIndex]; + + c.Field.SetValue(LoadedSkin, new Font(name.Text, (float)Convert.ToInt32(size.Text), f)); + CodepointValue += 50; + }; + + size.TextChanged += (o, a) => + { + try + { + var en = (FontStyle[])Enum.GetValues(typeof(FontStyle)); + + var f = en[style.SelectedIndex]; + + c.Field.SetValue(LoadedSkin, new Font(name.Text, (float)Convert.ToInt32(size.Text), f)); + } + catch + { + size.Text = ((Font)c.Field.GetValue(LoadedSkin)).Size.ToString(); + } + CodepointValue += 50; + }; + + flbody.Controls.Add(name); + flbody.Controls.Add(size); + flbody.Controls.Add(style); + + name.Show(); + size.Show(); + style.Show(); + + } + else if(c.Field.FieldType == typeof(Color)) + { + var color = new Button(); + color.Width = 40; + labelHeight = color.Height; + //just so it's flat like the system. + ControlManager.SetupControl(color); + + color.BackColor = ((Color)c.Field.GetValue(LoadedSkin)); + color.BackColorChanged += (o, a) => + { + c.Field.SetValue(LoadedSkin, color.BackColor); + }; + color.Click += (o, a) => + { + AppearanceManager.SetupDialog(new ColorPicker(color.BackColor, c.Name, new Action((col) => + { + color.BackColor = col; + CodepointValue += 300; + }))); + }; + flbody.SetFlowBreak(color, true); + + flbody.Controls.Add(color); + color.Show(); + } + else if(c.Field.FieldType == typeof(int)) + { + if (c.Field.HasShifterEnumMask()) + { + var name = new ComboBox(); + name.Width = 120; + ControlManager.SetupControl(name); + string[] items = c.Field.GetShifterEnumMask(); + foreach(var item in items) + { + name.Items.Add(item); + } + name.SelectedIndex = (int)c.Field.GetValue(LoadedSkin); + name.SelectedIndexChanged += (o, a) => + { + c.Field.SetValue(LoadedSkin, name.SelectedIndex); + CodepointValue += 75; + }; + labelHeight = name.Height; + flbody.Controls.Add(name); + name.Show(); + flbody.SetFlowBreak(name, true); + + } + else + { + var width = new TextBox(); + width.Width = 30; + width.Text = ((int)c.Field.GetValue(this.LoadedSkin)).ToString(); + ControlManager.SetupControl(width); + labelHeight = width.Height; + flbody.Controls.Add(width); + width.Show(); + + EventHandler tc = (o, a) => + { + try + { + int x = Convert.ToInt32(width.Text); + + int oldx = ((int)c.Field.GetValue(this.LoadedSkin)); + + if (x != oldx) + { + c.Field.SetValue(LoadedSkin, x); + CodepointValue += 75; + } + } + catch + { + width.Text = ((int)c.Field.GetValue(this.LoadedSkin)).ToString(); + } + }; + + width.TextChanged += tc; + flbody.SetFlowBreak(width, true); + + } + } + lbl.AutoSize = false; + lbl.Width = (int)this.CreateGraphics().MeasureString(lbl.Text, SkinEngine.LoadedSkin.MainFont).Width + 15; + lbl.Height = labelHeight; + lbl.TextAlign = ContentAlignment.MiddleLeft; + + if (!string.IsNullOrWhiteSpace(c.Description)) + { + var desc = new Label(); + flbody.SetFlowBreak(desc, true); + desc.Text = c.Description; + desc.AutoSize = true; + flbody.Controls.Add(desc); + desc.Show(); + } + } + } + + public ImageLayout GetLayout(string name) + { + if (!LoadedSkin.SkinImageLayouts.ContainsKey(name)) + { + LoadedSkin.SkinImageLayouts.Add(name, ImageLayout.Tile); + return ImageLayout.Tile; + } + else + { + return LoadedSkin.SkinImageLayouts[name]; + } + } + + private void btnapply_Click(object sender, EventArgs e) + { + //Apply the skin. + Utils.WriteAllText(Paths.GetPath("skin.json"), JsonConvert.SerializeObject(LoadedSkin)); + SkinEngine.LoadSkin(); + CodepointValue = CodepointValue / 4; + Infobox.Show("{SHIFTER_SKIN_APPLIED}", "{YOU_HAVE_EARNED} " + CodepointValue.ToString() + " {CODEPOINTS}."); + ShiftOS.Engine.Shiftorium.Silent = true; + SaveSystem.CurrentSave.Codepoints += CodepointValue; + SaveSystem.SaveGame(); + ShiftOS.Engine.Shiftorium.Silent = false; + CodepointValue = 0; + } + + private void Shifter_Load(object sender, EventArgs e) { + + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } + + public class ShifterSetting + { + public string Name { get; set; } + public string Description { get; set; } + public string Category { get; set; } + public string SubCategory { get; set; } + public FieldInfo Field { get; set; } + } + + public static class ShifterReflectionUtilities + { + public static bool HasShifterEnumMask(this FieldInfo field) + { + foreach(var attr in field.GetCustomAttributes(false)) + { + if (attr is ShifterEnumMaskAttribute) + return true; + } + return false; + } + + public static bool FlagFullfilled(this FieldInfo field, Skin skn) + { + foreach(var attr in field.GetCustomAttributes(false)) + { + if(attr is ShifterFlagAttribute) + { + return (attr as ShifterFlagAttribute).IsTrue(skn); + } + } + return true; + } + + public static string GetImageName(this FieldInfo field) + { + foreach (var attr in field.GetCustomAttributes(false)) + { + if (attr is ImageAttribute) + { + var eattr = attr as ImageAttribute; + return eattr.Name; + } + } + return null; + + } + + public static string[] GetShifterEnumMask(this FieldInfo field) + { + if(field.HasShifterEnumMask()) + { + foreach (var attr in field.GetCustomAttributes(false)) + { + if (attr is ShifterEnumMaskAttribute) + { + var eattr = attr as ShifterEnumMaskAttribute; + return eattr.Items; + } + } + return null; + } + else + { + return null; + } + } + } +} diff --git a/ShiftOS.WinForms/Applications/Shifter.resx b/ShiftOS.WinForms/Applications/Shifter.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Shifter.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/ShiftoriumFrontend.Designer.cs b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.Designer.cs new file mode 100644 index 0000000..f0a11e3 --- /dev/null +++ b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.Designer.cs @@ -0,0 +1,237 @@ +using ShiftOS.WinForms.Controls; + +namespace ShiftOS.WinForms.Applications +{ + partial class ShiftoriumFrontend + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.lbupgradedesc = new System.Windows.Forms.Label(); + this.pnlupgradeactions = new System.Windows.Forms.Panel(); + this.btnbuy = new System.Windows.Forms.Button(); + this.lbupgradetitle = new System.Windows.Forms.Label(); + this.pnllist = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.pgupgradeprogress = new ShiftOS.WinForms.Controls.ShiftedProgressBar(); + this.lbupgrades = new System.Windows.Forms.ListBox(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.pnlupgradeactions.SuspendLayout(); + this.pnllist.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.panel2); + this.panel1.Controls.Add(this.pnllist); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(782, 427); + this.panel1.TabIndex = 0; + // + // panel2 + // + this.panel2.Controls.Add(this.lbupgradedesc); + this.panel2.Controls.Add(this.pnlupgradeactions); + this.panel2.Controls.Add(this.lbupgradetitle); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(406, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(376, 427); + this.panel2.TabIndex = 1; + // + // label2 + // + if (ShiftoriumFrontend.UpgradeInstalled("shiftorium_gui_codepoints_display")) + { + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(128, 357); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(135, 13); + this.label2.TabIndex = 3; + this.label2.Text = "You have: %cp Codepoints"; + this.label2.Click += new System.EventHandler(this.label2_Click); + } else + { + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(128, 357); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(1, 1); + this.label2.TabIndex = 3; + this.label2.Text = ""; + this.label2.Click += new System.EventHandler(this.label2_Click); + } + // + // lbupgradedesc + // + this.lbupgradedesc.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbupgradedesc.Location = new System.Drawing.Point(0, 42); + this.lbupgradedesc.Name = "lbupgradedesc"; + this.lbupgradedesc.Size = new System.Drawing.Size(376, 348); + this.lbupgradedesc.TabIndex = 2; + this.lbupgradedesc.Text = "{SHIFTORIUM_EXP}"; + this.lbupgradedesc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbupgradedesc.UseCompatibleTextRendering = true; + // + // pnlupgradeactions + // + this.pnlupgradeactions.Controls.Add(this.btnbuy); + this.pnlupgradeactions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlupgradeactions.Location = new System.Drawing.Point(0, 390); + this.pnlupgradeactions.Name = "pnlupgradeactions"; + this.pnlupgradeactions.Size = new System.Drawing.Size(376, 37); + this.pnlupgradeactions.TabIndex = 1; + // + // btnbuy + // + this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnbuy.AutoSize = true; + this.btnbuy.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnbuy.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbuy.Location = new System.Drawing.Point(327, 9); + this.btnbuy.Name = "btnbuy"; + this.btnbuy.Size = new System.Drawing.Size(37, 25); + this.btnbuy.TabIndex = 0; + this.btnbuy.Text = "Buy"; + this.btnbuy.UseVisualStyleBackColor = true; + this.btnbuy.Visible = false; + 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(376, 42); + this.lbupgradetitle.TabIndex = 0; + this.lbupgradetitle.Text = "{WELCOME_TO_SHIFTORIUM}"; + this.lbupgradetitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.lbupgradetitle.UseCompatibleTextRendering = true; + // + // pnllist + // + this.pnllist.Controls.Add(this.label2); + this.pnllist.Controls.Add(this.label1); + this.pnllist.Controls.Add(this.pgupgradeprogress); + this.pnllist.Controls.Add(this.lbupgrades); + this.pnllist.Dock = System.Windows.Forms.DockStyle.Left; + this.pnllist.Location = new System.Drawing.Point(0, 0); + this.pnllist.Name = "pnllist"; + this.pnllist.Size = new System.Drawing.Size(406, 427); + this.pnllist.TabIndex = 0; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 399); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(137, 13); + this.label1.TabIndex = 2; + this.label1.Text = "{UPGRADE_PROGRESS}:"; + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(3, 399); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(137, 13); + this.label3.TabIndex = 2; + int upgradepercent = (pgupgradeprogress.Value / 100) * 100; + this.label3.Text = upgradepercent.ToString(); + // + // pgupgradeprogress + // + this.pgupgradeprogress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pgupgradeprogress.BlockSize = 5; + this.pgupgradeprogress.Location = new System.Drawing.Point(146, 390); + this.pgupgradeprogress.Maximum = 100; + this.pgupgradeprogress.Name = "pgupgradeprogress"; + this.pgupgradeprogress.Size = new System.Drawing.Size(254, 23); + this.pgupgradeprogress.Style = System.Windows.Forms.ProgressBarStyle.Continuous; + this.pgupgradeprogress.TabIndex = 1; + this.pgupgradeprogress.Value = 25; + // + // lbupgrades + // + this.lbupgrades.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.lbupgrades.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.lbupgrades.FormattingEnabled = true; + this.lbupgrades.Location = new System.Drawing.Point(3, 66); + this.lbupgrades.Name = "lbupgrades"; + this.lbupgrades.Size = new System.Drawing.Size(397, 277); + this.lbupgrades.TabIndex = 0; + this.lbupgrades.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lbupgrades_DrawItem); + // + // ShiftoriumFrontend + // + 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.panel1); + this.ForeColor = System.Drawing.Color.LightGreen; + this.Name = "ShiftoriumFrontend"; + this.Text = "{SHIFTORIUM_NAME}"; + this.Size = new System.Drawing.Size(782, 427); + this.Load += new System.EventHandler(this.Shiftorium_Load); + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.pnlupgradeactions.ResumeLayout(false); + this.pnlupgradeactions.PerformLayout(); + this.pnllist.ResumeLayout(false); + this.pnllist.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel pnllist; + private System.Windows.Forms.ListBox lbupgrades; + private System.Windows.Forms.Label lbupgradedesc; + private System.Windows.Forms.Panel pnlupgradeactions; + private System.Windows.Forms.Label lbupgradetitle; + private System.Windows.Forms.Button btnbuy; + private ShiftedProgressBar pgupgradeprogress; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs new file mode 100644 index 0000000..2f32eb9 --- /dev/null +++ b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.cs @@ -0,0 +1,168 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; +using static ShiftOS.Engine.SkinEngine; +using backend = ShiftOS.Engine.Shiftorium; +namespace ShiftOS.WinForms.Applications +{ + [Launcher("Shiftorium", true, "al_shiftorium")] + [RequiresUpgrade("shiftorium_gui")] + [WinOpen("shiftorium")] + public partial class ShiftoriumFrontend : UserControl, IShiftOSWindow + { + + public static System.Timers.Timer timer100; + + + public ShiftoriumFrontend() + { + + InitializeComponent(); + PopulateShiftorium(); + lbupgrades.SelectedIndexChanged += (o, a) => + { + try + { + lbupgrades.Refresh(); + SelectUpgrade(lbupgrades.SelectedItem.ToString()); + } + catch { } + }; + this.pgupgradeprogress.Maximum = backend.GetDefaults().Count; + this.pgupgradeprogress.Value = SaveSystem.CurrentSave.CountUpgrades(); + backend.Installed += () => + { + this.pgupgradeprogress.Maximum = backend.GetDefaults().Count; + this.pgupgradeprogress.Value = SaveSystem.CurrentSave.CountUpgrades(); + }; + + } + + public void SelectUpgrade(string name) + { + btnbuy.Show(); + var upg = upgrades[name]; + lbupgradetitle.Text = Localization.Parse(upg.Name); + lbupgradedesc.Text = Localization.Parse(upg.Description); + } + + Dictionary upgrades = new Dictionary(); + + public void PopulateShiftorium() + { + lbupgrades.Items.Clear(); + upgrades.Clear(); + Timer(); + + foreach (var upg in backend.GetAvailable()) + { + String name = Localization.Parse(upg.Name) + " - " + upg.Cost.ToString() + "CP"; + upgrades.Add(name, upg); + lbupgrades.Items.Add(name); + } + } + + public static bool UpgradeInstalled(string upg) + { + return backend.UpgradeInstalled(upg); + } + + public static bool UpgradeAttributesUnlocked(FieldInfo finf) + { + return backend.UpgradeAttributesUnlocked(finf); + } + + public static bool UpgradeAttributesUnlocked(MethodInfo finf) + { + return backend.UpgradeAttributesUnlocked(finf); + } + + public static bool UpgradeAttributesUnlocked(Type finf) + { + return backend.UpgradeAttributesUnlocked(finf); + } + + public static bool UpgradeAttributesUnlocked(PropertyInfo finf) + { + return backend.UpgradeAttributesUnlocked(finf); + } + + private void lbupgrades_DrawItem(object sender, DrawItemEventArgs e) + { + var foreground = new SolidBrush(LoadedSkin.ControlTextColor); + var background = new SolidBrush(LoadedSkin.ControlColor); + + e.Graphics.FillRectangle(background, e.Bounds); + try + { + if (lbupgrades.GetSelected(e.Index) == true) + { + e.Graphics.FillRectangle(foreground, e.Bounds); + e.Graphics.DrawString(lbupgrades.Items[e.Index].ToString(), e.Font, background, e.Bounds.Location); + } + else + { + e.Graphics.FillRectangle(background, e.Bounds); + e.Graphics.DrawString(lbupgrades.Items[e.Index].ToString(), e.Font, foreground, e.Bounds.Location); + } + } + catch + { + } + } + + private void btnbuy_Click(object sender, EventArgs e) + { + backend.Silent = true; + backend.Buy(upgrades[lbupgrades.SelectedItem.ToString()].ID, upgrades[lbupgrades.SelectedItem.ToString()].Cost); + backend.Silent = false; + PopulateShiftorium(); + btnbuy.Hide(); + } + + private void Shiftorium_Load(object sender, EventArgs e) { + + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + + } + + private void label2_Click(object sender, EventArgs e) + { + + } + + void Timer() + { + timer100 = new System.Timers.Timer(); + timer100.Interval = 2000; + //timer100.Elapsed += ???; + timer100.AutoReset = true; + timer100.Enabled = true; + } + } +} diff --git a/ShiftOS.WinForms/Applications/ShiftoriumFrontend.resx b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/ShiftoriumFrontend.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 0000000..0197e34 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Skin Loader.Designer.cs @@ -0,0 +1,460 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class Skin_Loader + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pnldesktop = new System.Windows.Forms.Panel(); + this.pnlborder = new System.Windows.Forms.Panel(); + this.flbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnclose = new System.Windows.Forms.Button(); + this.btnloaddefault = new System.Windows.Forms.Button(); + this.btnexport = new System.Windows.Forms.Button(); + this.btnimport = new System.Windows.Forms.Button(); + this.btnapply = new System.Windows.Forms.Button(); + this.desktoppanel = new System.Windows.Forms.Panel(); + this.sysmenuholder = new System.Windows.Forms.Panel(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.apps = new System.Windows.Forms.ToolStripMenuItem(); + this.lbtime = new System.Windows.Forms.Label(); + this.item1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.item2ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.item3ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.item4ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.pnlcontents = new System.Windows.Forms.Panel(); + this.pnltitle = new System.Windows.Forms.Panel(); + this.pnlminimize = new System.Windows.Forms.Panel(); + this.pnlmaximize = new System.Windows.Forms.Panel(); + this.pnlclose = new System.Windows.Forms.Panel(); + this.lbtitletext = new System.Windows.Forms.Label(); + this.pnlbottom = new System.Windows.Forms.Panel(); + this.pnlbottomr = new System.Windows.Forms.Panel(); + this.pnlbottoml = new System.Windows.Forms.Panel(); + this.pnlright = new System.Windows.Forms.Panel(); + this.pnlleft = new System.Windows.Forms.Panel(); + this.pnltitlemaster = new System.Windows.Forms.Panel(); + this.pnltitleright = new System.Windows.Forms.Panel(); + this.pnltitleleft = new System.Windows.Forms.Panel(); + this.pnldesktop.SuspendLayout(); + this.pnlborder.SuspendLayout(); + this.flbuttons.SuspendLayout(); + this.desktoppanel.SuspendLayout(); + this.sysmenuholder.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.pnltitle.SuspendLayout(); + this.pnlbottom.SuspendLayout(); + this.pnltitlemaster.SuspendLayout(); + this.SuspendLayout(); + // + // pnldesktop + // + this.pnldesktop.BackColor = System.Drawing.Color.Black; + this.pnldesktop.Controls.Add(this.desktoppanel); + this.pnldesktop.Location = new System.Drawing.Point(13, 13); + this.pnldesktop.Name = "pnldesktop"; + this.pnldesktop.Size = new System.Drawing.Size(522, 251); + this.pnldesktop.TabIndex = 0; + // + // pnlborder + // + this.pnlborder.BackColor = System.Drawing.Color.Black; + this.pnlborder.Controls.Add(this.pnlcontents); + this.pnlborder.Controls.Add(this.pnlbottom); + this.pnlborder.Controls.Add(this.pnlright); + this.pnlborder.Controls.Add(this.pnlleft); + this.pnlborder.Controls.Add(this.pnltitlemaster); + this.pnlborder.Location = new System.Drawing.Point(12, 270); + this.pnlborder.Name = "pnlborder"; + this.pnlborder.Size = new System.Drawing.Size(522, 251); + this.pnlborder.TabIndex = 1; + // + // flbuttons + // + this.flbuttons.AutoSize = true; + this.flbuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flbuttons.Controls.Add(this.btnclose); + this.flbuttons.Controls.Add(this.btnloaddefault); + this.flbuttons.Controls.Add(this.btnexport); + this.flbuttons.Controls.Add(this.btnimport); + this.flbuttons.Controls.Add(this.btnapply); + this.flbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flbuttons.Location = new System.Drawing.Point(0, 629); + this.flbuttons.Name = "flbuttons"; + this.flbuttons.Size = new System.Drawing.Size(547, 29); + this.flbuttons.TabIndex = 2; + // + // btnclose + // + this.btnclose.AutoSize = true; + this.btnclose.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnclose.Location = new System.Drawing.Point(3, 3); + this.btnclose.Name = "btnclose"; + this.btnclose.Size = new System.Drawing.Size(60, 23); + this.btnclose.TabIndex = 0; + this.btnclose.Text = "{CLOSE}"; + this.btnclose.UseVisualStyleBackColor = true; + this.btnclose.Click += new System.EventHandler(this.btnclose_Click); + // + // btnloaddefault + // + this.btnloaddefault.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.Name = "btnloaddefault"; + this.btnloaddefault.Size = new System.Drawing.Size(109, 23); + this.btnloaddefault.TabIndex = 1; + this.btnloaddefault.Text = "{LOAD_DEFAULT}"; + this.btnloaddefault.UseVisualStyleBackColor = true; + this.btnloaddefault.Click += new System.EventHandler(this.btnloaddefault_Click); + // + // btnexport + // + this.btnexport.AutoSize = true; + this.btnexport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnexport.Location = new System.Drawing.Point(184, 3); + this.btnexport.Name = "btnexport"; + this.btnexport.Size = new System.Drawing.Size(69, 23); + this.btnexport.TabIndex = 2; + this.btnexport.Text = "{EXPORT}"; + this.btnexport.UseVisualStyleBackColor = true; + this.btnexport.Click += new System.EventHandler(this.btnexport_Click); + // + // btnimport + // + this.btnimport.AutoSize = true; + this.btnimport.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnimport.Location = new System.Drawing.Point(259, 3); + this.btnimport.Name = "btnimport"; + this.btnimport.Size = new System.Drawing.Size(67, 23); + this.btnimport.TabIndex = 3; + this.btnimport.Text = "{IMPORT}"; + this.btnimport.UseVisualStyleBackColor = true; + this.btnimport.Click += new System.EventHandler(this.btnimport_Click); + // + // btnapply + // + this.btnapply.AutoSize = true; + this.btnapply.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnapply.Location = new System.Drawing.Point(332, 3); + this.btnapply.Name = "btnapply"; + this.btnapply.Size = new System.Drawing.Size(59, 23); + this.btnapply.TabIndex = 4; + this.btnapply.Text = "{APPLY}"; + this.btnapply.UseVisualStyleBackColor = true; + this.btnapply.Click += new System.EventHandler(this.btnapply_Click); + // + // desktoppanel + // + this.desktoppanel.BackColor = System.Drawing.Color.Green; + this.desktoppanel.Controls.Add(this.sysmenuholder); + this.desktoppanel.Controls.Add(this.lbtime); + this.desktoppanel.Dock = System.Windows.Forms.DockStyle.Top; + this.desktoppanel.Location = new System.Drawing.Point(0, 0); + this.desktoppanel.Name = "desktoppanel"; + this.desktoppanel.Size = new System.Drawing.Size(522, 24); + this.desktoppanel.TabIndex = 1; + // + // sysmenuholder + // + this.sysmenuholder.Controls.Add(this.menuStrip1); + this.sysmenuholder.Location = new System.Drawing.Point(12, 5); + this.sysmenuholder.Name = "sysmenuholder"; + this.sysmenuholder.Size = new System.Drawing.Size(68, 24); + this.sysmenuholder.TabIndex = 1; + // + // menuStrip1 + // + this.menuStrip1.Dock = System.Windows.Forms.DockStyle.Fill; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.apps}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Padding = new System.Windows.Forms.Padding(0); + this.menuStrip1.Size = new System.Drawing.Size(68, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // apps + // + this.apps.AutoSize = false; + this.apps.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.item1ToolStripMenuItem, + this.item2ToolStripMenuItem, + this.item3ToolStripMenuItem, + this.toolStripSeparator1, + this.item4ToolStripMenuItem}); + this.apps.Name = "apps"; + this.apps.Padding = new System.Windows.Forms.Padding(0); + this.apps.Size = new System.Drawing.Size(58, 20); + this.apps.Text = "ShiftOS"; + // + // lbtime + // + this.lbtime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbtime.AutoSize = true; + this.lbtime.Location = new System.Drawing.Point(445, 5); + this.lbtime.Name = "lbtime"; + this.lbtime.Size = new System.Drawing.Size(35, 13); + this.lbtime.TabIndex = 0; + this.lbtime.Text = "label1"; + this.lbtime.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // item1ToolStripMenuItem + // + this.item1ToolStripMenuItem.Name = "item1ToolStripMenuItem"; + this.item1ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.item1ToolStripMenuItem.Text = "Item 1"; + // + // item2ToolStripMenuItem + // + this.item2ToolStripMenuItem.Name = "item2ToolStripMenuItem"; + this.item2ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.item2ToolStripMenuItem.Text = "Item 2"; + // + // item3ToolStripMenuItem + // + this.item3ToolStripMenuItem.Name = "item3ToolStripMenuItem"; + this.item3ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.item3ToolStripMenuItem.Text = "Item 3"; + // + // item4ToolStripMenuItem + // + this.item4ToolStripMenuItem.Name = "item4ToolStripMenuItem"; + this.item4ToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.item4ToolStripMenuItem.Text = "Item 4"; + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(149, 6); + // + // pnlcontents + // + this.pnlcontents.BackColor = System.Drawing.Color.Black; + this.pnlcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlcontents.ForeColor = System.Drawing.Color.White; + this.pnlcontents.Location = new System.Drawing.Point(2, 30); + this.pnlcontents.Name = "pnlcontents"; + this.pnlcontents.Size = new System.Drawing.Size(518, 219); + this.pnlcontents.TabIndex = 9; + // + // pnltitle + // + this.pnltitle.BackColor = System.Drawing.Color.Black; + this.pnltitle.Controls.Add(this.pnlminimize); + this.pnltitle.Controls.Add(this.pnlmaximize); + this.pnltitle.Controls.Add(this.pnlclose); + this.pnltitle.Controls.Add(this.lbtitletext); + this.pnltitle.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnltitle.Location = new System.Drawing.Point(2, 0); + this.pnltitle.Name = "pnltitle"; + this.pnltitle.Size = new System.Drawing.Size(518, 30); + this.pnltitle.TabIndex = 0; + // + // pnlminimize + // + this.pnlminimize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pnlminimize.BackColor = System.Drawing.Color.Green; + this.pnlminimize.Location = new System.Drawing.Point(437, 3); + this.pnlminimize.Name = "pnlminimize"; + this.pnlminimize.Size = new System.Drawing.Size(24, 24); + this.pnlminimize.TabIndex = 3; + // + // pnlmaximize + // + this.pnlmaximize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pnlmaximize.BackColor = System.Drawing.Color.Yellow; + this.pnlmaximize.Location = new System.Drawing.Point(464, 3); + this.pnlmaximize.Name = "pnlmaximize"; + this.pnlmaximize.Size = new System.Drawing.Size(24, 24); + this.pnlmaximize.TabIndex = 2; + // + // pnlclose + // + this.pnlclose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pnlclose.BackColor = System.Drawing.Color.Red; + this.pnlclose.Location = new System.Drawing.Point(491, 3); + this.pnlclose.Name = "pnlclose"; + this.pnlclose.Size = new System.Drawing.Size(24, 24); + this.pnlclose.TabIndex = 1; + // + // lbtitletext + // + this.lbtitletext.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.lbtitletext.AutoSize = true; + this.lbtitletext.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Bold); + this.lbtitletext.ForeColor = System.Drawing.Color.White; + this.lbtitletext.Location = new System.Drawing.Point(4, 0); + this.lbtitletext.Name = "lbtitletext"; + this.lbtitletext.Size = new System.Drawing.Size(77, 14); + this.lbtitletext.TabIndex = 0; + this.lbtitletext.Text = "Title text"; + this.lbtitletext.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lbtitletext.UseMnemonic = false; + // + // pnlbottom + // + this.pnlbottom.BackColor = System.Drawing.Color.Black; + this.pnlbottom.Controls.Add(this.pnlbottomr); + this.pnlbottom.Controls.Add(this.pnlbottoml); + this.pnlbottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlbottom.Location = new System.Drawing.Point(2, 249); + this.pnlbottom.Name = "pnlbottom"; + this.pnlbottom.Size = new System.Drawing.Size(518, 2); + this.pnlbottom.TabIndex = 6; + // + // pnlbottomr + // + this.pnlbottomr.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlbottomr.Location = new System.Drawing.Point(516, 0); + this.pnlbottomr.Name = "pnlbottomr"; + this.pnlbottomr.Size = new System.Drawing.Size(2, 2); + this.pnlbottomr.TabIndex = 3; + // + // pnlbottoml + // + this.pnlbottoml.Dock = System.Windows.Forms.DockStyle.Left; + this.pnlbottoml.Location = new System.Drawing.Point(0, 0); + this.pnlbottoml.Name = "pnlbottoml"; + this.pnlbottoml.Size = new System.Drawing.Size(2, 2); + this.pnlbottoml.TabIndex = 2; + // + // pnlright + // + this.pnlright.BackColor = System.Drawing.Color.Black; + this.pnlright.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlright.Location = new System.Drawing.Point(520, 30); + this.pnlright.Name = "pnlright"; + this.pnlright.Size = new System.Drawing.Size(2, 221); + this.pnlright.TabIndex = 8; + // + // pnlleft + // + this.pnlleft.BackColor = System.Drawing.Color.Black; + this.pnlleft.Dock = System.Windows.Forms.DockStyle.Left; + this.pnlleft.Location = new System.Drawing.Point(0, 30); + this.pnlleft.Name = "pnlleft"; + this.pnlleft.Size = new System.Drawing.Size(2, 221); + this.pnlleft.TabIndex = 7; + // + // pnltitlemaster + // + this.pnltitlemaster.Controls.Add(this.pnltitle); + this.pnltitlemaster.Controls.Add(this.pnltitleright); + this.pnltitlemaster.Controls.Add(this.pnltitleleft); + this.pnltitlemaster.Dock = System.Windows.Forms.DockStyle.Top; + this.pnltitlemaster.Location = new System.Drawing.Point(0, 0); + this.pnltitlemaster.Name = "pnltitlemaster"; + this.pnltitlemaster.Size = new System.Drawing.Size(522, 30); + this.pnltitlemaster.TabIndex = 5; + // + // pnltitleright + // + this.pnltitleright.Dock = System.Windows.Forms.DockStyle.Right; + this.pnltitleright.Location = new System.Drawing.Point(520, 0); + this.pnltitleright.Name = "pnltitleright"; + this.pnltitleright.Size = new System.Drawing.Size(2, 30); + this.pnltitleright.TabIndex = 5; + // + // pnltitleleft + // + this.pnltitleleft.Dock = System.Windows.Forms.DockStyle.Left; + this.pnltitleleft.Location = new System.Drawing.Point(0, 0); + this.pnltitleleft.Name = "pnltitleleft"; + this.pnltitleleft.Size = new System.Drawing.Size(2, 30); + this.pnltitleleft.TabIndex = 4; + // + // Skin_Loader + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(547, 658); + this.Controls.Add(this.flbuttons); + this.Controls.Add(this.pnlborder); + this.Controls.Add(this.pnldesktop); + this.Name = "Skin_Loader"; + this.Text = "Skin Loader"; + this.pnldesktop.ResumeLayout(false); + this.pnlborder.ResumeLayout(false); + this.flbuttons.ResumeLayout(false); + this.flbuttons.PerformLayout(); + this.desktoppanel.ResumeLayout(false); + this.desktoppanel.PerformLayout(); + this.sysmenuholder.ResumeLayout(false); + this.sysmenuholder.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.pnltitle.ResumeLayout(false); + this.pnltitle.PerformLayout(); + this.pnlbottom.ResumeLayout(false); + this.pnltitlemaster.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Panel pnldesktop; + private System.Windows.Forms.Panel pnlborder; + private System.Windows.Forms.FlowLayoutPanel flbuttons; + private System.Windows.Forms.Button btnclose; + private System.Windows.Forms.Button btnloaddefault; + private System.Windows.Forms.Button btnexport; + private System.Windows.Forms.Button btnimport; + private System.Windows.Forms.Button btnapply; + private System.Windows.Forms.Panel desktoppanel; + private System.Windows.Forms.Panel sysmenuholder; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem apps; + private System.Windows.Forms.ToolStripMenuItem item1ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem item2ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem item3ToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem item4ToolStripMenuItem; + private System.Windows.Forms.Label lbtime; + private System.Windows.Forms.Panel pnlcontents; + private System.Windows.Forms.Panel pnlbottom; + private System.Windows.Forms.Panel pnlbottomr; + private System.Windows.Forms.Panel pnlbottoml; + private System.Windows.Forms.Panel pnlright; + private System.Windows.Forms.Panel pnlleft; + private System.Windows.Forms.Panel pnltitlemaster; + private System.Windows.Forms.Panel pnltitle; + private System.Windows.Forms.Panel pnlminimize; + private System.Windows.Forms.Panel pnlmaximize; + private System.Windows.Forms.Panel pnlclose; + private System.Windows.Forms.Label lbtitletext; + private System.Windows.Forms.Panel pnltitleright; + private System.Windows.Forms.Panel pnltitleleft; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Skin Loader.cs b/ShiftOS.WinForms/Applications/Skin Loader.cs new file mode 100644 index 0000000..9b2abba --- /dev/null +++ b/ShiftOS.WinForms/Applications/Skin Loader.cs @@ -0,0 +1,306 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using Newtonsoft.Json; +using ShiftOS.Engine; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms.Applications +{ + [Launcher("Skin Loader", true, "al_skin_loader")] + [RequiresUpgrade("skinning")] + [WinOpen("skin_loader")] + public partial class Skin_Loader : UserControl, IShiftOSWindow + { + public Skin_Loader() + { + InitializeComponent(); + + LoadedSkin = JsonConvert.DeserializeObject(JsonConvert.SerializeObject(SkinEngine.LoadedSkin)); + this.Load += (o, a) => { SetupUI(); }; + + } + + public Skin LoadedSkin { get; set; } + + public void SetupUI() + { + SetupDesktop(); + Setup(); + } + + public void SetupDesktop() + { + menuStrip1.Renderer = new ShiftOSMenuRenderer(); + + this.DoubleBuffered = true; + desktoppanel.BackColor = Color.Green; + + //upgrades + + if (SaveSystem.CurrentSave != null) + { + desktoppanel.Visible = ShiftoriumFrontend.UpgradeInstalled("desktop"); + lbtime.Visible = ShiftoriumFrontend.UpgradeInstalled("desktop_clock_widget"); + + //skinning + lbtime.ForeColor = LoadedSkin.DesktopPanelClockColor; + + sysmenuholder.Visible = ShiftoriumFrontend.UpgradeInstalled("app_launcher"); + + //The Color Picker can give us transparent colors - which Windows Forms fucking despises when dealing with form backgrounds. + //To compensate, we must recreate the desktop color and make the alpha channel '255'. + pnldesktop.BackColor = Color.FromArgb(LoadedSkin.DesktopColor.R, LoadedSkin.DesktopColor.G, LoadedSkin.DesktopColor.B); + //Not doing this will cause an ArgumentException. + + pnldesktop.BackgroundImage = GetImage("desktopbackground"); + pnldesktop.BackgroundImageLayout = GetImageLayout("desktopbackground"); + desktoppanel.BackgroundImage = GetImage("desktoppanel"); + menuStrip1.BackgroundImage = GetImage("applauncher"); + lbtime.ForeColor = LoadedSkin.DesktopPanelClockColor; + lbtime.Font = LoadedSkin.DesktopPanelClockFont; + lbtime.Text = Applications.Terminal.GetTime(); + lbtime.Left = desktoppanel.Width - lbtime.Width - LoadedSkin.DesktopPanelClockFromRight.X; + lbtime.Top = LoadedSkin.DesktopPanelClockFromRight.Y; + + if (desktoppanel.BackgroundImage == null) + { + lbtime.BackColor = LoadedSkin.DesktopPanelClockBackgroundColor; + } + else + { + lbtime.BackColor = Color.Transparent; + } + apps.Text = LoadedSkin.AppLauncherText; + sysmenuholder.Location = LoadedSkin.AppLauncherFromLeft; + sysmenuholder.Size = LoadedSkin.AppLauncherHolderSize; + apps.Size = sysmenuholder.Size; + menuStrip1.Renderer = new ShiftOSMenuRenderer(new AppLauncherColorTable()); + desktoppanel.BackColor = LoadedSkin.DesktopPanelColor; + desktoppanel.BackgroundImageLayout = GetImageLayout("desktoppanel"); + desktoppanel.Height = LoadedSkin.DesktopPanelHeight; + if (LoadedSkin.DesktopPanelPosition == 1) + { + desktoppanel.Dock = DockStyle.Bottom; + } + else + { + desktoppanel.Dock = DockStyle.Top; + } + } + + } + + public ImageLayout GetImageLayout(string img) + { + if (LoadedSkin.SkinImageLayouts.ContainsKey(img)) + { + return LoadedSkin.SkinImageLayouts[img]; + } + else + { + LoadedSkin.SkinImageLayouts.Add(img, ImageLayout.Tile); + return ImageLayout.Tile; + } + } + + public Image GetImage(string img) + { + var type = typeof(Skin); + + foreach (var field in type.GetFields()) + { + foreach (var attr in field.GetCustomAttributes(false)) + { + if (attr is ImageAttribute) + { + var iattr = attr as ImageAttribute; + if (iattr.Name == img) + { + byte[] image = (byte[])field.GetValue(LoadedSkin); + return SkinEngine.ImageFromBinary(image); + } + } + } + } + + return null; + } + + bool IsDialog = false; + + public void Setup() + { + pnlcontents.BackColor = LoadedSkin.ControlColor; + + this.lbtitletext.Text = Localization.Parse("{TEMPLATE}"); + this.Dock = DockStyle.Fill; + + if (SaveSystem.CurrentSave != null) + { + this.pnltitle.Visible = ShiftoriumFrontend.UpgradeInstalled("wm_titlebar"); + this.pnlclose.Visible = ShiftoriumFrontend.UpgradeInstalled("close_button"); + this.pnlminimize.Visible = (IsDialog == false) && ShiftoriumFrontend.UpgradeInstalled("minimize_button"); + this.pnlmaximize.Visible = (IsDialog == false) && ShiftoriumFrontend.UpgradeInstalled("maximize_button"); + SetupSkin(); + } + else + { + this.pnltitle.Visible = false; + this.pnlclose.Visible = false; + this.pnlminimize.Visible = false; + this.pnlmaximize.Visible = false; + + } + } + + public void SetupSkin() + { + pnltitlemaster.Height = LoadedSkin.TitlebarHeight; + pnltitle.BackColor = LoadedSkin.TitleBackgroundColor; + pnltitle.BackgroundImage = GetImage("titlebar"); + pnltitleleft.Visible = LoadedSkin.ShowTitleCorners; + pnltitleright.Visible = LoadedSkin.ShowTitleCorners; + pnltitleleft.BackColor = LoadedSkin.TitleLeftCornerBackground; + pnltitleright.BackColor = LoadedSkin.TitleRightCornerBackground; + pnltitleleft.Width = LoadedSkin.TitleLeftCornerWidth; + pnltitleright.Width = LoadedSkin.TitleRightCornerWidth; + pnltitleleft.BackgroundImage = GetImage("titleleft"); + pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleft"); + pnltitleright.BackgroundImage = GetImage("titleright"); + pnltitleright.BackgroundImageLayout = GetImageLayout("titleright"); + + + lbtitletext.BackColor = LoadedSkin.TitleBackgroundColor; + lbtitletext.ForeColor = LoadedSkin.TitleTextColor; + lbtitletext.Font = LoadedSkin.TitleFont; + + pnlleft.BackColor = LoadedSkin.BorderLeftBackground; + pnlleft.BackgroundImage = GetImage("leftborder"); + pnlleft.BackgroundImageLayout = GetImageLayout("leftborder"); + pnlleft.Width = LoadedSkin.LeftBorderWidth; + pnlright.BackColor = LoadedSkin.BorderRightBackground; + pnlright.BackgroundImage = GetImage("rightborder"); + pnlright.BackgroundImageLayout = GetImageLayout("rightborder"); + pnlright.Width = LoadedSkin.RightBorderWidth; + + pnlbottom.BackColor = LoadedSkin.BorderBottomBackground; + pnlbottom.BackgroundImage = GetImage("bottomborder"); + pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborder"); + pnlbottom.Height = LoadedSkin.BottomBorderWidth; + + pnlbottomr.BackColor = LoadedSkin.BorderBottomRightBackground; + pnlbottomr.BackgroundImage = GetImage("bottomrborder"); + pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborder"); + pnlbottoml.BackColor = LoadedSkin.BorderBottomLeftBackground; + pnlbottoml.BackgroundImage = GetImage("bottomlborder"); + pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborder"); + + lbtitletext.ForeColor = LoadedSkin.TitleTextColor; + lbtitletext.Font = LoadedSkin.TitleFont; + pnlclose.BackColor = LoadedSkin.CloseButtonColor; + pnlclose.BackgroundImage = GetImage("closebutton"); + pnlclose.BackgroundImageLayout = GetImageLayout("closebutton"); + pnlminimize.BackColor = LoadedSkin.MinimizeButtonColor; + pnlminimize.BackgroundImage = GetImage("minimizebutton"); + pnlminimize.BackgroundImageLayout = GetImageLayout("minimizebutton"); + pnlmaximize.BackColor = LoadedSkin.MaximizeButtonColor; + pnlmaximize.BackgroundImage = GetImage("maximizebutton"); + pnlmaximize.BackgroundImageLayout = GetImageLayout("maximizebutton"); + + pnlclose.Size = LoadedSkin.CloseButtonSize; + pnlminimize.Size = LoadedSkin.MinimizeButtonSize; + pnlmaximize.Size = LoadedSkin.MaximizeButtonSize; + pnlclose.Location = FromRight(LoadedSkin.CloseButtonFromSide); + pnlminimize.Location = FromRight(LoadedSkin.MinimizeButtonFromSide); + pnlmaximize.Location = FromRight(LoadedSkin.MaximizeButtonFromSide); + pnlclose.Left -= pnlclose.Width; + pnlmaximize.Left -= pnlmaximize.Width; + pnlminimize.Left -= pnlminimize.Width; + + switch (LoadedSkin.TitleTextCentered) + { + case false: + lbtitletext.Location = LoadedSkin.TitleTextLeft; + break; + default: + lbtitletext.Left = (pnltitle.Width - lbtitletext.Width) / 2; + lbtitletext.Top = LoadedSkin.TitleTextLeft.Y; + break; + } + } + + public Point FromRight(Point input) + { + return new Point(pnltitle.Width - input.X, input.Y); + } + + private void btnapply_Click(object sender, EventArgs e) + { + ShiftOS.Objects.ShiftFS.Utils.WriteAllText(Paths.GetPath("skin.json"), JsonConvert.SerializeObject(LoadedSkin)); + SkinEngine.LoadSkin(); + } + + private void btnclose_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void btnloaddefault_Click(object sender, EventArgs e) + { + this.LoadedSkin = new ShiftOS.Engine.Skin(); + SetupUI(); + } + + private void btnexport_Click(object sender, EventArgs e) + { + AppearanceManager.SetupDialog(new FileDialog(new[] { ".skn" }, FileOpenerStyle.Save, new Action((filename) => + { + ShiftOS.Objects.ShiftFS.Utils.WriteAllText(filename, JsonConvert.SerializeObject(LoadedSkin)); + string fname = filename.Split('/')[filename.Split('/').Length - 1]; + if(!System.IO.Directory.Exists(Paths.SharedFolder + "\\skins")) + { + System.IO.Directory.CreateDirectory(Paths.SharedFolder + "\\skins"); + } + + string path = Paths.SharedFolder + "\\skins\\" + SaveSystem.CurrentSave.Username + "-" + fname; + System.IO.File.WriteAllText(path, JsonConvert.SerializeObject(LoadedSkin)); + + }))); + } + + private void btnimport_Click(object sender, EventArgs e) + { + AppearanceManager.SetupDialog(new FileDialog(new[] { ".skn" }, FileOpenerStyle.Open, new Action((filename) => + { + LoadedSkin = JsonConvert.DeserializeObject(ShiftOS.Objects.ShiftFS.Utils.ReadAllText(filename)); + SetupUI(); + }))); + } + + public void OnLoad() + { + + SetupUI(); + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } +} diff --git a/ShiftOS.WinForms/Applications/Skin Loader.resx b/ShiftOS.WinForms/Applications/Skin Loader.resx new file mode 100644 index 0000000..b77504b --- /dev/null +++ b/ShiftOS.WinForms/Applications/Skin Loader.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + 17, 17 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Terminal.Designer.cs b/ShiftOS.WinForms/Applications/Terminal.Designer.cs new file mode 100644 index 0000000..dab5c98 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Terminal.Designer.cs @@ -0,0 +1,65 @@ +using System.Windows.Forms; + +namespace ShiftOS.WinForms.Applications +{ + partial class Terminal + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.rtbterm = new Controls.TerminalBox(); + this.SuspendLayout(); + // + // rtbterm + // + this.rtbterm.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.rtbterm.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtbterm.Location = new System.Drawing.Point(0, 0); + this.rtbterm.Name = "rtbterm"; + this.rtbterm.Size = new System.Drawing.Size(493, 295); + this.rtbterm.TabIndex = 0; + this.rtbterm.Text = ""; + this.rtbterm.TextChanged += new System.EventHandler(this.rtbterm_TextChanged); + // + // Terminal + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.rtbterm); + this.Name = "Terminal"; + this.Text = "{TERMINAL_NAME}"; + this.Size = new System.Drawing.Size(493, 295); + this.Tag = "hidden"; + this.Load += new System.EventHandler(this.Terminal_Load); + this.ResumeLayout(false); + + } + + #endregion + + private Controls.TerminalBox rtbterm = new Controls.TerminalBox(); + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/Terminal.cs b/ShiftOS.WinForms/Applications/Terminal.cs new file mode 100644 index 0000000..86563f6 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Terminal.cs @@ -0,0 +1,306 @@ +//#define TRAILER +//#define CRASHONSTART +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Text.RegularExpressions; +using System.Collections; +using static ShiftOS.Engine.SkinEngine; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications { + [Launcher("Terminal", false)] + [WinOpen("terminal")] + public partial class Terminal : UserControl, IShiftOSWindow { + public static Stack ConsoleStack = new Stack(); + + public static System.Windows.Forms.Timer ti = new System.Windows.Forms.Timer(); + + public static string latestCommmand = ""; + + [Obsolete("This is used for compatibility with old parts of the backend. Please use TerminalBackend instead.")] + public static bool PrefixEnabled + { + get + { + return TerminalBackend.PrefixEnabled; + } + set + { + TerminalBackend.PrefixEnabled = value; + } + } + + [Obsolete("This is used for compatibility with old parts of the backend. Please use TerminalBackend instead.")] + public static bool InStory + { + get + { + return TerminalBackend.InStory; + } + set + { + TerminalBackend.InStory = value; + } + } + + [Obsolete("This is used for compatibility with old parts of the backend. Please use TerminalBackend instead.")] + public static string LastCommand + { + get + { + return TerminalBackend.LastCommand; + } + set + { + TerminalBackend.LastCommand = value; + } + } + + [Obsolete("This is used for compatibility with old parts of the backend. Please use TerminalBackend instead.")] + public static void InvokeCommand(string text) + { + TerminalBackend.InvokeCommand(text); + } + + public Terminal() { + + InitializeComponent(); + SaveSystem.GameReady += () => { + try { + this.Invoke(new Action(() => { + ResetAllKeywords(); + rtbterm.Text = ""; + TerminalBackend.PrefixEnabled = true; + TerminalBackend.InStory = false; + Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "); + if (SaveSystem.CurrentSave.StoryPosition == 6) { + Infobox.Show("Welcome to ShiftOS.", "Welcome to the ShiftOS multi-user domain. Your goal is to upgrade your system as much as possible, and gain as much wealth as possible. The first step is to get a feel for the environment. Go forth and explore, young Shifter."); + SaveSystem.CurrentSave.StoryPosition++; + } + })); + } catch { } + }; + + + this.DoubleBuffered = true; + + } + + public void FocusOnTerminal() { + rtbterm.Focus(); + } + + public static string GetTime() { + var time = DateTime.Now; + if (ShiftoriumFrontend.UpgradeInstalled("full_precision_time")) { + return DateTime.Now.ToString("h:mm:ss tt"); + } else if (ShiftoriumFrontend.UpgradeInstalled("clock_am_and_pm")) { + return time.TimeOfDay.TotalHours > 12 ? $"{time.Hour - 12} PM" : $"{time.Hour} AM"; + } else if (ShiftoriumFrontend.UpgradeInstalled("clock_hours")) { + return ((int)time.TimeOfDay.TotalHours).ToString(); + } else if (ShiftoriumFrontend.UpgradeInstalled("clock_minutes")) { + return ((int)time.TimeOfDay.TotalMinutes).ToString(); + } else if (ShiftoriumFrontend.UpgradeInstalled("clock")) { + return ((int)time.TimeOfDay.TotalSeconds).ToString(); + } + + return ""; + } + + + public static event TextSentEventHandler TextSent; + + public void ResetAllKeywords() { + string primary = SaveSystem.CurrentSave.Username + " "; + string secondary = "shiftos "; + + + var asm = Assembly.GetExecutingAssembly(); + + var types = asm.GetTypes(); + + foreach (var type in types) { + foreach (var a in type.GetCustomAttributes(false)) { + if (ShiftoriumFrontend.UpgradeAttributesUnlocked(type)) { + if (a is Namespace) { + var ns = a as Namespace; + if (!primary.Contains(ns.name)) { + primary += ns.name + " "; + } + foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.Static)) { + if (ShiftoriumFrontend.UpgradeAttributesUnlocked(method)) { + foreach (var ma in method.GetCustomAttributes(false)) { + if (ma is Command) { + var cmd = ma as Command; + if (!secondary.Contains(cmd.name)) + secondary += cmd.name + " "; + } + } + } + } + } + } + } + } + + + } + + public static void MakeWidget(Controls.TerminalBox txt) { + AppearanceManager.StartConsoleOut(); + txt.GotFocus += (o, a) => { + AppearanceManager.ConsoleOut = txt; + }; + txt.KeyDown += (o, a) => { + if (a.KeyCode == Keys.Enter) { + try { + a.SuppressKeyPress = true; + Console.WriteLine(""); + var text = txt.Lines.ToArray(); + var text2 = text[text.Length - 2]; + var text3 = ""; + var text4 = Regex.Replace(text2, @"\t|\n|\r", ""); + + if (TerminalBackend.PrefixEnabled) { + text3 = text4.Remove(0, $"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ".Length); + } + TerminalBackend.LastCommand = text3; + TextSent?.Invoke(text4); + if (TerminalBackend.InStory == false) { + TerminalBackend.InvokeCommand(text3); + } + if (TerminalBackend.PrefixEnabled) { + Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "); + } + } catch { + } + } else if (a.KeyCode == Keys.Back) { + var tostring3 = txt.Lines[txt.Lines.Length - 1]; + var tostringlen = tostring3.Length + 1; + var workaround = $"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "; + var derp = workaround.Length + 1; + if (tostringlen != derp) { + AppearanceManager.CurrentPosition--; + } else { + a.SuppressKeyPress = true; + } + } else if (a.KeyCode == Keys.Left) + { + var getstring = txt.Lines[txt.Lines.Length - 1]; + var stringlen = getstring.Length + 1; + var header = $"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "; + var headerlen = header.Length + 1; + var selstart = txt.SelectionStart; + var remstrlen = txt.TextLength - stringlen; + var finalnum = selstart - remstrlen; + + if (finalnum != headerlen) + { + AppearanceManager.CurrentPosition--; + } + else + { + a.SuppressKeyPress = true; + } + } + //( ͡° ͜ʖ ͡° ) You found the lennyface without looking at the commit message. Message Michael in the #shiftos channel on Discord saying "ladouceur" somewhere in your message if you see this. + else if (a.KeyCode == Keys.Up) { + var tostring3 = txt.Lines[txt.Lines.Length - 1]; + if (tostring3 == $"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ") + Console.Write(TerminalBackend.LastCommand); + a.SuppressKeyPress = true; + + } else { + + AppearanceManager.CurrentPosition++; + } + + }; + + AppearanceManager.ConsoleOut = txt; + + txt.Focus(); + + txt.Font = LoadedSkin.TerminalFont; + txt.ForeColor = LoadedSkin.TerminalForeColor; + txt.BackColor = LoadedSkin.TerminalBackColor; + + } + + private void Terminal_Load(object sender, EventArgs e) { + + } + + private void Terminal_FormClosing(object sender, FormClosingEventArgs e) { + ti.Stop(); + } + + public void OnLoad() { + MakeWidget(rtbterm); + + if (SaveSystem.CurrentSave != null) { + if (!ShiftoriumFrontend.UpgradeInstalled("window_manager")) { + rtbterm.Text = AppearanceManager.LastTerminalText; + rtbterm.Select(rtbterm.TextLength, 0); + } + Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "); + + } + + + } + + public void OnSkinLoad() { + try { + rtbterm.Font = LoadedSkin.TerminalFont; + rtbterm.ForeColor = LoadedSkin.TerminalForeColor; + rtbterm.BackColor = LoadedSkin.TerminalBackColor; + } catch { + + } + + } + + public bool OnUnload() { + if (SaveSystem.ShuttingDown == false) { + if (!ShiftoriumFrontend.UpgradeInstalled("desktop")) { + if (AppearanceManager.OpenForms.Count <= 1) { + Console.WriteLine(""); + Console.WriteLine("{WIN_CANTCLOSETERMINAL}"); + try { + Console.WriteLine(""); + + if (TerminalBackend.PrefixEnabled) { + Console.Write($"{SaveSystem.CurrentSave.Username}@shiftos:~$ "); + } + } catch (Exception ex) { + Console.WriteLine(ex); + } + return false; + } + } + } + return true; + } + + public void OnUpgrade() { + } + + private void rtbterm_TextChanged(object sender, EventArgs e) + { + + } + } +} diff --git a/ShiftOS.WinForms/Applications/Terminal.cs.rej b/ShiftOS.WinForms/Applications/Terminal.cs.rej new file mode 100644 index 0000000..8f0aed5 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Terminal.cs.rej @@ -0,0 +1,12 @@ +diff a/ShiftOS_TheReturn/Applications/Terminal.cs b/ShiftOS_TheReturn/Applications/Terminal.cs (rejected hunks) +@@ -228,6 +228,10 @@ + string args = text.Substring(argStart, text.Length - argStart); + text = text.Remove(argStart, text.Length - argStart).Replace(" ", ""); + ++ if(string.IsNullOrWhiteSpace(args)) ++ { ++ return new Dictionary(); ++ } + return JsonConvert.DeserializeObject>(args); + } + diff --git a/ShiftOS.WinForms/Applications/Terminal.resx b/ShiftOS.WinForms/Applications/Terminal.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/Terminal.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/TextPad.Designer.cs b/ShiftOS.WinForms/Applications/TextPad.Designer.cs new file mode 100644 index 0000000..6e26779 --- /dev/null +++ b/ShiftOS.WinForms/Applications/TextPad.Designer.cs @@ -0,0 +1,138 @@ +namespace ShiftOS.WinForms.Applications +{ + partial class TextPad + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); + this.txtcontents = new System.Windows.Forms.TextBox(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.newToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripContainer1.ContentPanel.SuspendLayout(); + this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); + this.toolStripContainer1.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // toolStripContainer1 + // + this.toolStripContainer1.BottomToolStripPanelVisible = false; + // + // toolStripContainer1.ContentPanel + // + this.toolStripContainer1.ContentPanel.Controls.Add(this.txtcontents); + this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(648, 395); + this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill; + this.toolStripContainer1.LeftToolStripPanelVisible = false; + this.toolStripContainer1.Location = new System.Drawing.Point(0, 0); + this.toolStripContainer1.Name = "toolStripContainer1"; + this.toolStripContainer1.RightToolStripPanelVisible = false; + this.toolStripContainer1.Size = new System.Drawing.Size(648, 419); + this.toolStripContainer1.TabIndex = 0; + this.toolStripContainer1.Text = "toolStripContainer1"; + // + // toolStripContainer1.TopToolStripPanel + // + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1); + // + // txtcontents + // + this.txtcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtcontents.Location = new System.Drawing.Point(0, 0); + this.txtcontents.Multiline = true; + this.txtcontents.Name = "txtcontents"; + this.txtcontents.Size = new System.Drawing.Size(648, 395); + this.txtcontents.TabIndex = 0; + this.txtcontents.TabStop = false; + this.txtcontents.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtcontents_KeyDown); + // + // menuStrip1 + // + this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newToolStripMenuItem, + this.openToolStripMenuItem, + this.saveToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(648, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // newToolStripMenuItem + // + this.newToolStripMenuItem.Name = "newToolStripMenuItem"; + this.newToolStripMenuItem.Size = new System.Drawing.Size(43, 20); + this.newToolStripMenuItem.Text = "New"; + this.newToolStripMenuItem.Click += new System.EventHandler(this.newToolStripMenuItem_Click); + // + // openToolStripMenuItem + // + this.openToolStripMenuItem.Name = "openToolStripMenuItem"; + this.openToolStripMenuItem.Size = new System.Drawing.Size(48, 20); + this.openToolStripMenuItem.Text = "Open"; + this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click); + // + // saveToolStripMenuItem + // + this.saveToolStripMenuItem.Name = "saveToolStripMenuItem"; + this.saveToolStripMenuItem.Size = new System.Drawing.Size(43, 20); + this.saveToolStripMenuItem.Text = "Save"; + this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click); + // + // TextPad + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.toolStripContainer1); + this.Name = "TextPad"; + this.Text = "{TEXTPAD_NAME}"; + this.Size = new System.Drawing.Size(648, 419); + this.toolStripContainer1.ContentPanel.ResumeLayout(false); + this.toolStripContainer1.ContentPanel.PerformLayout(); + this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.PerformLayout(); + this.toolStripContainer1.ResumeLayout(false); + this.toolStripContainer1.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ToolStripContainer toolStripContainer1; + private System.Windows.Forms.TextBox txtcontents; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem newToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/TextPad.cs b/ShiftOS.WinForms/Applications/TextPad.cs new file mode 100644 index 0000000..f566f2d --- /dev/null +++ b/ShiftOS.WinForms/Applications/TextPad.cs @@ -0,0 +1,88 @@ +using ShiftOS.Objects.ShiftFS; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Applications +{ + [Launcher("TextPad", true, "al_textpad")] + [RequiresUpgrade("textpad")] + [WinOpen("textpad")] + public partial class TextPad : UserControl, IShiftOSWindow + { + public TextPad() + { + InitializeComponent(); + } + + private void newToolStripMenuItem_Click(object sender, EventArgs e) + { + txtcontents.Text = ""; + } + + private void openToolStripMenuItem_Click(object sender, EventArgs e) + { + var types = new List(); + types.Add(".txt"); + if (ShiftoriumFrontend.UpgradeInstalled("textpad_lua_support")) + types.Add(".lua"); + if (ShiftoriumFrontend.UpgradeInstalled("textpad_python_support")) + types.Add(".py"); + + + AppearanceManager.SetupDialog(new FileDialog(types.ToArray(), FileOpenerStyle.Open, new Action((file) => this.LoadFile(file)))); + } + + public void LoadFile(string file) + { + txtcontents.Text = Utils.ReadAllText(file); + } + + public void SaveFile(string file) + { + Utils.WriteAllText(file, txtcontents.Text); + } + + private void saveToolStripMenuItem_Click(object sender, EventArgs e) + { + var types = new List(); + types.Add(".txt"); + if (ShiftoriumFrontend.UpgradeInstalled("textpad_lua_support")) + types.Add(".lua"); + if (ShiftoriumFrontend.UpgradeInstalled("textpad_python_support")) + types.Add(".py"); + + AppearanceManager.SetupDialog(new FileDialog(types.ToArray(), FileOpenerStyle.Save, new Action((file) => this.SaveFile(file)))); + + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + + private void txtcontents_KeyDown(object sender, KeyEventArgs e) + { + + } + } +} diff --git a/ShiftOS.WinForms/Applications/TextPad.resx b/ShiftOS.WinForms/Applications/TextPad.resx new file mode 100644 index 0000000..d5494e3 --- /dev/null +++ b/ShiftOS.WinForms/Applications/TextPad.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/VirusScanner.Designer.cs b/ShiftOS.WinForms/Applications/VirusScanner.Designer.cs new file mode 100644 index 0000000..554b526 --- /dev/null +++ b/ShiftOS.WinForms/Applications/VirusScanner.Designer.cs @@ -0,0 +1,202 @@ +using ShiftOS.WinForms.Controls; + +namespace ShiftOS.WinForms.Applications +{ + partial class VirusScanner + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.btnfullscan = new System.Windows.Forms.Button(); + this.btnhomescan = new System.Windows.Forms.Button(); + this.btnsysscan = new System.Windows.Forms.Button(); + this.grpresults = new System.Windows.Forms.GroupBox(); + this.lbviruses = new System.Windows.Forms.ListBox(); + this.btnremoveviruses = new System.Windows.Forms.Button(); + this.lblresults = new System.Windows.Forms.Label(); + this.grpabout = new System.Windows.Forms.GroupBox(); + this.rtbterm = new TerminalBox(); + this.lblabout = new System.Windows.Forms.Label(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.grpresults.SuspendLayout(); + this.grpabout.SuspendLayout(); + this.pgcontents.SuspendLayout(); + this.SuspendLayout(); + // + // btnfullscan + // + this.btnfullscan.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnfullscan.Location = new System.Drawing.Point(10, 12); + this.btnfullscan.Name = "btnfullscan"; + this.btnfullscan.Size = new System.Drawing.Size(175, 23); + this.btnfullscan.TabIndex = 0; + this.btnfullscan.Text = "{START_SYSTEM_SCAN}"; + this.btnfullscan.UseVisualStyleBackColor = true; + this.btnfullscan.Click += new System.EventHandler(this.btnfullscan_Click); + // + // btnhomescan + // + this.btnhomescan.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnhomescan.Location = new System.Drawing.Point(10, 41); + this.btnhomescan.Name = "btnhomescan"; + this.btnhomescan.Size = new System.Drawing.Size(175, 23); + this.btnhomescan.TabIndex = 1; + this.btnhomescan.Text = "{SCAN_HOME}"; + this.btnhomescan.UseVisualStyleBackColor = true; + this.btnhomescan.Click += new System.EventHandler(this.btnhomescan_Click); + // + // btnsysscan + // + this.btnsysscan.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsysscan.Location = new System.Drawing.Point(10, 70); + this.btnsysscan.Name = "btnsysscan"; + this.btnsysscan.Size = new System.Drawing.Size(175, 23); + this.btnsysscan.TabIndex = 2; + this.btnsysscan.Text = "{SCAN_SYSTEM}"; + this.btnsysscan.UseVisualStyleBackColor = true; + this.btnsysscan.Click += new System.EventHandler(this.btnsysscan_Click); + // + // grpresults + // + this.grpresults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.grpresults.Controls.Add(this.lbviruses); + this.grpresults.Controls.Add(this.btnremoveviruses); + this.grpresults.Controls.Add(this.lblresults); + this.grpresults.Location = new System.Drawing.Point(3, 168); + this.grpresults.Name = "grpresults"; + this.grpresults.Size = new System.Drawing.Size(179, 158); + this.grpresults.TabIndex = 3; + this.grpresults.TabStop = false; + this.grpresults.Text = "{RESULTS}"; + // + // lbviruses + // + this.lbviruses.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbviruses.FormattingEnabled = true; + this.lbviruses.Location = new System.Drawing.Point(3, 16); + this.lbviruses.Name = "lbviruses"; + this.lbviruses.Size = new System.Drawing.Size(173, 116); + this.lbviruses.TabIndex = 2; + // + // btnremoveviruses + // + this.btnremoveviruses.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnremoveviruses.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnremoveviruses.Location = new System.Drawing.Point(3, 132); + this.btnremoveviruses.Name = "btnremoveviruses"; + this.btnremoveviruses.Size = new System.Drawing.Size(173, 23); + this.btnremoveviruses.TabIndex = 1; + this.btnremoveviruses.Text = "Remove"; + this.btnremoveviruses.UseVisualStyleBackColor = true; + this.btnremoveviruses.Visible = false; + this.btnremoveviruses.Click += new System.EventHandler(this.btnremoveviruses_Click); + // + // lblresults + // + this.lblresults.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblresults.Location = new System.Drawing.Point(3, 16); + this.lblresults.Name = "lblresults"; + this.lblresults.Size = new System.Drawing.Size(173, 139); + this.lblresults.TabIndex = 0; + this.lblresults.Text = "{SCAN_NOT_STARTED}"; + // + // grpabout + // + this.grpabout.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.grpabout.Controls.Add(this.rtbterm); + this.grpabout.Controls.Add(this.lblabout); + this.grpabout.Location = new System.Drawing.Point(191, 12); + this.grpabout.Name = "grpabout"; + this.grpabout.Size = new System.Drawing.Size(362, 314); + this.grpabout.TabIndex = 5; + this.grpabout.TabStop = false; + this.grpabout.Text = "{ABOUT}"; + // + // rtbterm + // + this.rtbterm.Dock = System.Windows.Forms.DockStyle.Fill; + this.rtbterm.Location = new System.Drawing.Point(3, 16); + this.rtbterm.Name = "rtbterm"; + this.rtbterm.Size = new System.Drawing.Size(356, 295); + this.rtbterm.TabIndex = 1; + this.rtbterm.Text = ""; + // + // lblabout + // + this.lblabout.Dock = System.Windows.Forms.DockStyle.Fill; + this.lblabout.Location = new System.Drawing.Point(3, 16); + this.lblabout.Name = "lblabout"; + this.lblabout.Size = new System.Drawing.Size(356, 295); + this.lblabout.TabIndex = 0; + this.lblabout.Text = "{VIRUSSCANNER_ABOUT}"; + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.grpabout); + this.pgcontents.Controls.Add(this.grpresults); + this.pgcontents.Controls.Add(this.btnsysscan); + this.pgcontents.Controls.Add(this.btnhomescan); + this.pgcontents.Controls.Add(this.btnfullscan); + this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Name = "pgcontents"; + this.pgcontents.Size = new System.Drawing.Size(565, 343); + this.pgcontents.TabIndex = 25; + // + // VirusScanner + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.pgcontents); + this.Name = "VirusScanner"; + this.Text = "Virus Scanner"; + this.Size = new System.Drawing.Size(565, 343); + this.Load += new System.EventHandler(this.VirusScanner_Load); + this.grpresults.ResumeLayout(false); + this.grpabout.ResumeLayout(false); + this.pgcontents.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + internal System.Windows.Forms.Button btnfullscan; + internal System.Windows.Forms.Button btnhomescan; + internal System.Windows.Forms.Button btnsysscan; + internal System.Windows.Forms.GroupBox grpresults; + internal System.Windows.Forms.Button btnremoveviruses; + internal System.Windows.Forms.Label lblresults; + internal System.Windows.Forms.GroupBox grpabout; + internal System.Windows.Forms.Label lblabout; + internal System.Windows.Forms.Panel pgcontents; + private TerminalBox rtbterm; + private System.Windows.Forms.ListBox lbviruses; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/VirusScanner.cs b/ShiftOS.WinForms/Applications/VirusScanner.cs new file mode 100644 index 0000000..740c1a8 --- /dev/null +++ b/ShiftOS.WinForms/Applications/VirusScanner.cs @@ -0,0 +1,181 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using Newtonsoft.Json; +using ShiftOS.Engine; +using ShiftOS.Objects; +using static ShiftOS.Objects.ShiftFS.Utils; + +namespace ShiftOS.WinForms.Applications +{ + [Launcher("Virus Scanner", true, "al_virus_scanner")] + [RequiresUpgrade("virus_scanner")] + [WinOpen("virus_scanner")] + public partial class VirusScanner : UserControl, IShiftOSWindow + { + public VirusScanner() + { + InitializeComponent(); + Action runner = new Action((msg) => + { + if(msg.Name == "virusdb") + { + VirusDB = JsonConvert.DeserializeObject>(msg.Contents); + } + }); + + ServerManager.MessageReceived += (srv) => + { + runner?.Invoke(srv); + runner = null; + }; + + ServerManager.SendMessage("getvirusdb", ""); + } + + Dictionary VirusDB = null; + + private void btnfullscan_Click(object sender, EventArgs e) + { + lblabout.Hide(); + lbviruses.Hide(); + rtbterm.Show(); + rtbterm.Focus(); + rtbterm.Text = ""; + var t = new Thread(new ThreadStart(() => + { + ScanFolder("0:"); + })); + t.IsBackground = true; + t.Start(); + } + + public List infected = new List(); + + public void ScanFolder(string path) + { + this.Invoke(new Action(() => + { + lblresults.Hide(); + })); + foreach (var file in GetFiles(path)) + { + Console.WriteLine(file + " is now being scanned."); + string contents = ReadAllText(file); + + foreach(var kv in VirusDB) + { + if(kv.Value == contents) + { + if(kv.Key.EndsWith(".0") || kv.Key.EndsWith(".1")) + { + infected.Add(file); + Console.WriteLine($"{file} - Virus detected: {kv.Key}"); + this.Invoke(new Action(() => + { + AddVirusToList(kv.Key); + })); + } + } + } + } + + foreach(var dir in GetDirectories(path)) + { + if (dir != null) + { + ScanFolder(dir); + } + } + } + + public void AddVirusToList(string type) + { + lblresults.Hide(); + lbviruses.Show(); + btnremoveviruses.Show(); + lbviruses.Items.Add(type); + } + + private void VirusScanner_Load(object sender, EventArgs e) + { + Applications.Terminal.MakeWidget(rtbterm); + rtbterm.Hide(); + } + + private void btnhomescan_Click(object sender, EventArgs e) + { + lblabout.Hide(); + rtbterm.Show(); + rtbterm.Focus(); + rtbterm.Text = ""; + var t = new Thread(new ThreadStart(() => + { + ScanFolder(Paths.GetPath("home")); + })); + t.IsBackground = true; + t.Start(); + } + + private void btnsysscan_Click(object sender, EventArgs e) + { + lblabout.Hide(); + rtbterm.Show(); + rtbterm.Focus(); + rtbterm.Text = ""; + var t = new Thread(new ThreadStart(() => + { + ScanFolder(Paths.GetPath("system")); + })); + t.IsBackground = true; + t.Start(); + } + + private void btnremoveviruses_Click(object sender, EventArgs e) + { + while(infected.Count > 0) + { + Delete(infected[0]); + infected.RemoveAt(0); + } + + lbviruses.Items.Clear(); + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + } + + public class InfectedFile + { + public string FilePath { get; set; } + public List Viruses { get; set; } + + public InfectedFile(string fpath, string[] viruses) + { + FilePath = fpath; + Viruses = new List(viruses); + } + } +} diff --git a/ShiftOS.WinForms/Applications/VirusScanner.resx b/ShiftOS.WinForms/Applications/VirusScanner.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/VirusScanner.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Applications/mp3Player.Designer.cs b/ShiftOS.WinForms/Applications/mp3Player.Designer.cs new file mode 100644 index 0000000..f901dc7 --- /dev/null +++ b/ShiftOS.WinForms/Applications/mp3Player.Designer.cs @@ -0,0 +1,97 @@ +namespace ShiftOS.Engine +{ + partial class UserControl1 + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Komponenten-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + this.mp3FilePath = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.stopMp3 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // mp3FilePath + // + this.mp3FilePath.Location = new System.Drawing.Point(131, 8); + this.mp3FilePath.Name = "mp3FilePath"; + this.mp3FilePath.ReadOnly = true; + this.mp3FilePath.Size = new System.Drawing.Size(239, 20); + this.mp3FilePath.TabIndex = 1; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(3, 8); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(122, 21); + this.button1.TabIndex = 2; + this.button1.Text = "Choose Song"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // stopMp3 + // + this.stopMp3.Location = new System.Drawing.Point(445, 8); + this.stopMp3.Name = "stopMp3"; + this.stopMp3.Size = new System.Drawing.Size(65, 21); + this.stopMp3.TabIndex = 3; + this.stopMp3.Text = "Stop"; + this.stopMp3.UseVisualStyleBackColor = true; + this.stopMp3.Click += new System.EventHandler(this.stopMp3_Click); + // + // button2 + // + this.button2.Location = new System.Drawing.Point(376, 8); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(63, 21); + this.button2.TabIndex = 4; + this.button2.Text = "Play"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // UserControl1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.button2); + this.Controls.Add(this.stopMp3); + this.Controls.Add(this.button1); + this.Controls.Add(this.mp3FilePath); + this.Name = "UserControl1"; + this.Text = "{WAV_PLAYER_NAME}"; + this.Size = new System.Drawing.Size(530, 70); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.TextBox mp3FilePath; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button stopMp3; + private System.Windows.Forms.Button button2; + } +} diff --git a/ShiftOS.WinForms/Applications/mp3Player.cs b/ShiftOS.WinForms/Applications/mp3Player.cs new file mode 100644 index 0000000..c4afd0d --- /dev/null +++ b/ShiftOS.WinForms/Applications/mp3Player.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS.Engine +{ + [Launcher("WAV Player", true, "wav_player_al")] + [RequiresUpgrade("wav_player")] + [WinOpen("wav_player")] + public partial class UserControl1 : UserControl, IShiftOSWindow + { + string path; + public UserControl1() + { + InitializeComponent(); + } + + private void button1_Click(object sender, EventArgs e) + { + OpenFileDialog ofd = new OpenFileDialog(); + ofd.Filter = "WAV|*.wav"; + + if(ofd.ShowDialog() == DialogResult.OK) + { + path = ofd.FileName; + mp3FilePath.Text = ofd.FileName; + } + } + + private void stopMp3_Click(object sender, EventArgs e) + { + System.Media.SoundPlayer player = new System.Media.SoundPlayer(); + player.Stop(); + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + + private void button2_Click(object sender, EventArgs e) + { + System.Media.SoundPlayer player = new System.Media.SoundPlayer(); + player.SoundLocation = path; + player.Load(); + player.Play(); + } + } +} diff --git a/ShiftOS.WinForms/Applications/mp3Player.resx b/ShiftOS.WinForms/Applications/mp3Player.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Applications/mp3Player.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Commands.cs b/ShiftOS.WinForms/Commands.cs new file mode 100644 index 0000000..9fb1785 --- /dev/null +++ b/ShiftOS.WinForms/Commands.cs @@ -0,0 +1,108 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ShiftOS.Engine; +using System.IO; +using System.Diagnostics; +using System.Runtime.InteropServices; +using System.Threading; + +namespace ShiftOS.WinForms +{ + [Namespace("coherence")] + [RequiresUpgrade("kernel_coherence")] + public static class CoherenceCommands + { + [DllImport("user32.dll")] + static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags); + + static readonly IntPtr HWND_TOPMOST = new IntPtr(-1); + const UInt32 SWP_SHOWWINDOW = 0x0040; + + + + [DllImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + public static extern bool GetWindowRect(IntPtr hWnd, ref RECT lpRect); + + [StructLayout(LayoutKind.Sequential)] + public struct RECT + { + public int Left; // x position of upper-left corner + public int Top; // y position of upper-left corner + public int Right; // x position of lower-right corner + public int Bottom; // y position of lower-right corner + } + + [Command("launch", "process: \"C:\\path\\to\\process\" - The process path to launch.", "Launch a process inside kernel coherence.")] + [RequiresArgument("process")] + public static bool LaunchApp(Dictionary args) + { + string process = args["process"].ToString(); + var prc = Process.Start(process); + StartCoherence(prc); + return true; + } + + private static void StartCoherence(Process prc) + { + RECT rct = new RECT(); + + + while (!GetWindowRect(prc.MainWindowHandle, ref rct)) + { + } + + + + AppearanceManager.Invoke(new Action(() => + { + IShiftOSWindow coherenceWindow = new Applications.CoherenceOverlay(prc.MainWindowHandle, rct); + + AppearanceManager.SetupWindow(coherenceWindow); + SetWindowPos(prc.MainWindowHandle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); + + //MakeExternalWindowBorderless(prc.MainWindowHandle); + })); + + } + + const int WS_BORDER = 8388608; + const int WS_DLGFRAME = 4194304; + const int WS_CAPTION = WS_BORDER | WS_DLGFRAME; + const int WS_SYSMENU = 524288; + const int WS_THICKFRAME = 262144; + const int WS_MINIMIZE = 536870912; + const int WS_MAXIMIZEBOX = 65536; + const int GWL_STYLE = -16; + const int GWL_EXSTYLE = -20; + const int WS_EX_DLGMODALFRAME = 0x1; + const int SWP_NOMOVE = 0x2; + const int SWP_NOSIZE = 0x1; + const int SWP_FRAMECHANGED = 0x20; + const uint MF_BYPOSITION = 0x400; + const uint MF_REMOVE = 0x1000; + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] + public static extern int GetWindowLong(IntPtr hWnd, int nIndex); + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] + public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong); + [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] + public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, int uFlags); + public static void MakeExternalWindowBorderless(IntPtr MainWindowHandle) + { + int Style = 0; + Style = GetWindowLong(MainWindowHandle, GWL_STYLE); + Style = Style & ~WS_CAPTION; + Style = Style & ~WS_SYSMENU; + Style = Style & ~WS_THICKFRAME; + Style = Style & ~WS_MINIMIZE; + Style = Style & ~WS_MAXIMIZEBOX; + SetWindowLong(MainWindowHandle, GWL_STYLE, Style); + Style = GetWindowLong(MainWindowHandle, GWL_EXSTYLE); + SetWindowLong(MainWindowHandle, GWL_EXSTYLE, Style | WS_EX_DLGMODALFRAME); + SetWindowPos(MainWindowHandle, new IntPtr(0), 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); + } + } +} diff --git a/ShiftOS.WinForms/Controls/ColorControl.Designer.cs b/ShiftOS.WinForms/Controls/ColorControl.Designer.cs new file mode 100644 index 0000000..ca6b1a7 --- /dev/null +++ b/ShiftOS.WinForms/Controls/ColorControl.Designer.cs @@ -0,0 +1,69 @@ +using System.Windows.Forms; + +namespace ShiftOS.WinForms.Controls +{ + partial class ColorControl + { + /// + /// 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.pnlcolorbox = new Canvas(); + this.SuspendLayout(); + // + // pnlcolorbox + // + this.pnlcolorbox.Location = new System.Drawing.Point(37, 18); + this.pnlcolorbox.Name = "pnlcolorbox"; + this.pnlcolorbox.Size = new System.Drawing.Size(255, 255); + this.pnlcolorbox.TabIndex = 0; + // + // ColorPicker + // + 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.pnlcolorbox); + this.ForeColor = System.Drawing.Color.White; + this.Name = "ColorPicker"; + this.Size = new System.Drawing.Size(332, 520); + this.Load += new System.EventHandler(this.ColorPicker_Load); + this.ResumeLayout(false); + + } + + #endregion + + private Canvas pnlcolorbox; + } + + internal class Canvas : Panel + { + public Canvas() : base() + { + DoubleBuffered = true; + } + } +} diff --git a/ShiftOS.WinForms/Controls/ColorControl.cs b/ShiftOS.WinForms/Controls/ColorControl.cs new file mode 100644 index 0000000..09b4c34 --- /dev/null +++ b/ShiftOS.WinForms/Controls/ColorControl.cs @@ -0,0 +1,243 @@ +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.WinForms.Tools; + +namespace ShiftOS.WinForms.Controls +{ + public partial class ColorControl : UserControl + { + public ColorControl() + { + InitializeComponent(); + this.DoubleBuffered = true; + } + + public Color SelectedForeground = Color.Black; + + public Color GetColorFromCoords(Point pt) + { + for (int r = 0; r <= 255; r++) + { + //As we move to the right of the panel things should get more blue... + //and as we go down, more red + //and as we go down AND to the right, green. + for (int b = 0; b <= 255; b++) + { + int xy = LinearInterpolate(0, 255 * 255, pt.X * pt.Y, 0, 255); + int g = LinearInterpolate(0, 255 * 255, r * b, 0, 255); + if (pt.X == b && pt.Y == r && g == xy) + return Color.FromArgb(r, g, b); + } + } + + return Color.Empty; + } + + public Color SelectedColor + { + get + { + return SelectedForeground; + } + set + { + SelectedForeground = value; + } + } + + int LastX, LastY = 0; + + private void ColorPicker_Load(object sender, EventArgs e) + { + pnlcolorbox.MouseMove += (o, a) => + { + if (a.Button == MouseButtons.Left) + { + SelectedColor = GetColorFromCoords(a.Location); + LastX = a.Location.X; + LastY = a.Location.Y; + DrawEverything(); + } + + }; + pnlcolorbox.Paint += (o, a) => + { + + float selectedX = 0; + float selectedY = 0; + float width = 5; + float height = 5; + + for (int r = 0; r <= 255; r++) + { + //As we move to the right of the panel things should get more blue... + //and as we go down, more red + //and as we go down AND to the right, green. + for (int b = 0; b <= 255; b++) + { + int g = LinearInterpolate(0, 255 * 255, r * b, 0, 255); + var c = Color.FromArgb(r, g, b); + a.Graphics.FillRectangle(new SolidBrush(c), b, r, 1, 1); + if (SelectedColor == c) + { + selectedX = b - 2; + selectedY = r - 2; + } + } + } + + int selectedg = LinearInterpolate(0, 255 * 255, (int)(selectedX + 2 * selectedY + 2), 0, 255); + var inverted = InvertColor((int)selectedX + 2, selectedg, (int)selectedY + 2); + a.Graphics.DrawEllipse(new Pen(new SolidBrush(inverted), 1), selectedX, selectedY, width, height); + + }; + + red.Width = 255; + red.Left = pnlcolorbox.Left; + red.Top = pnlcolorbox.Top + pnlcolorbox.Height + 5; + red.Height = 20; + red.TextChanged += (o, a) => + { + if(red.Text != SelectedColor.R.ToString()) + { + try + { + SelectedColor = Color.FromArgb(SelectedColor.A, Convert.ToInt32(red.Text), SelectedColor.G, SelectedColor.B); + DrawEverything(); + } + catch + { + red.Text = SelectedColor.R.ToString(); + } + } + }; + this.Controls.Add(red); + red.Show(); + + green.Width = 255; + green.Left = pnlcolorbox.Left; + green.Top = red.Top + red.Height + 5; + green.Height = 20; + green.TextChanged += (o, a) => + { + if (green.Text != SelectedColor.G.ToString()) + { + try + { + SelectedColor = Color.FromArgb(SelectedColor.A, SelectedColor.R, Convert.ToInt32(green.Text), SelectedColor.B); + DrawEverything(); + } + catch + { + green.Text = SelectedColor.G.ToString(); + } + } + }; + this.Controls.Add(green); + green.Show(); + + blue.Width = 255; + blue.Left = pnlcolorbox.Left; + blue.Top = green.Top + red.Height + 5; + blue.Height = 20; + blue.TextChanged += (o, a) => + { + if (blue.Text != SelectedColor.B.ToString()) + { + try + { + SelectedColor = Color.FromArgb(SelectedColor.A, SelectedColor.R, SelectedColor.G, Convert.ToInt32(blue.Text)); + DrawEverything(); + } + catch + { + blue.Text = SelectedColor.B.ToString(); + } + } + }; + this.Controls.Add(blue); + blue.Show(); + + alpha.Width = 255; + alpha.Left = pnlcolorbox.Left; + alpha.Top = blue.Top + red.Height + 5; + alpha.Height = 20; + alpha.TextChanged += (o, a) => + { + if (alpha.Text != SelectedColor.A.ToString()) + { + try + { + SelectedColor = Color.FromArgb(Convert.ToInt32(alpha.Text), SelectedColor.R, SelectedColor.G, SelectedColor.B); + DrawEverything(); + } + catch + { + alpha.Text = SelectedColor.A.ToString(); + } + } + }; this.Controls.Add(alpha); + alpha.Show(); + + preview.Width = 255; + preview.Left = pnlcolorbox.Left; + preview.Top = alpha.Top + red.Height + 5; + preview.Height = 20; + preview.Paint += (o, a) => + { + int width = preview.Width / 2; + int height = preview.Height; + a.Graphics.FillRectangle(new SolidBrush(SelectedForeground), 0, 0, width * 2, height); + }; + this.Controls.Add(preview); + preview.Show(); + + ControlManager.SetupControl(red); + ControlManager.SetupControl(green); + ControlManager.SetupControl(blue); + ControlManager.SetupControl(alpha); + + + DrawEverything(); + } + + + TextBox red = new TextBox(); + TextBox green = new TextBox(); + TextBox blue = new TextBox(); + TextBox alpha = new TextBox(); + Panel preview = new Panel(); + + + public Color InvertColor(int r, int g, int b) + { + return Color.FromArgb(255 - r, 255 - g, 255 - b); + } + + public void DrawEverything() + { + pnlcolorbox.Refresh(); + red.Text = SelectedColor.R.ToString(); + green.Text = SelectedColor.G.ToString(); + blue.Text = SelectedColor.B.ToString(); + alpha.Text = SelectedColor.A.ToString(); + preview.Refresh(); + } + + public int LinearInterpolate(int input_start, int input_end, int input, int output_start, int output_end) + { + int input_range = input_end - input_start; + int output_range = output_end - output_start; + + return (input - input_start) * output_range / input_range + output_start; + } + + } +} diff --git a/ShiftOS.WinForms/Controls/ShiftedProgressBar.Designer.cs b/ShiftOS.WinForms/Controls/ShiftedProgressBar.Designer.cs new file mode 100644 index 0000000..a59a09c --- /dev/null +++ b/ShiftOS.WinForms/Controls/ShiftedProgressBar.Designer.cs @@ -0,0 +1,36 @@ +namespace ShiftOS.WinForms.Controls +{ + partial class ShiftedProgressBar + { + /// + /// 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() + { + components = new System.ComponentModel.Container(); + } + + #endregion + } +} diff --git a/ShiftOS.WinForms/Controls/ShiftedProgressBar.cs b/ShiftOS.WinForms/Controls/ShiftedProgressBar.cs new file mode 100644 index 0000000..4707541 --- /dev/null +++ b/ShiftOS.WinForms/Controls/ShiftedProgressBar.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS.WinForms.Controls +{ + public partial class ShiftedProgressBar : Control + { + public ShiftedProgressBar() + { + this.SizeChanged += (o, a) => + { + this.Refresh(); + }; + var t = new Timer(); + t.Interval = 100; + t.Tick += (o, a) => + { + if(this._style == ProgressBarStyle.Marquee) + { + if(_marqueePos >= this.Width) + { + _marqueePos = 0 - (this.Width / 4); + } + else + { + _marqueePos++; + } + this.Refresh(); + } + }; + t.Start(); + } + + private int _value = 0; + private int _max = 100; + public int Value + { + get + { + return _value; + } + set + { + _value = value; + this.Refresh(); + } + } + public int Maximum + { + get + { + return _max; + } + set + { + _max = value; + this.Refresh(); + } + } + + public ProgressBarStyle _style = ProgressBarStyle.Continuous; + + public ProgressBarStyle Style + { + get { return _style; } + set { _style = value; this.Refresh(); } + } + + private int _blocksize = 5; + + public int BlockSize + { + get { return _blocksize; } + set + { + _blocksize = value; + this.Refresh(); + } + } + + protected override void OnPaint(PaintEventArgs pe) + { + pe.Graphics.Clear(this.BackColor); + switch (_style) + { + case ProgressBarStyle.Continuous: + double width = linear(this.Value, 0, this.Maximum, 0, this.Width); + pe.Graphics.FillRectangle(new SolidBrush(Color.Green), new RectangleF(0, 0, (float)width, this.Height)); + break; + case ProgressBarStyle.Blocks: + int block_count = this.Width / (this._blocksize + 2); + int blocks = (int)linear(this.Value, 0, this.Maximum, 0, block_count); + for(int i = 0; i < blocks - 1; i++) + { + int position = i * (_blocksize + 2); + pe.Graphics.FillRectangle(new SolidBrush(Color.Green), new Rectangle(position, 0, _blocksize, this.Height)); + } + break; + case ProgressBarStyle.Marquee: + pe.Graphics.FillRectangle(new SolidBrush(Color.Green), new Rectangle(_marqueePos, 0, this.Width / 4, this.Height)); + break; + } + } + + private int _marqueePos = 0; + + static private double linear(double x, double x0, double x1, double y0, double y1) + { + if ((x1 - x0) == 0) + { + return (y0 + y1) / 2; + } + return y0 + (x - x0) * (y1 - y0) / (x1 - x0); + } + } +} diff --git a/ShiftOS.WinForms/Controls/TerminalBox.cs b/ShiftOS.WinForms/Controls/TerminalBox.cs new file mode 100644 index 0000000..e0745d4 --- /dev/null +++ b/ShiftOS.WinForms/Controls/TerminalBox.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; + +namespace ShiftOS.WinForms.Controls +{ + public class TerminalBox : RichTextBox, ITerminalWidget + { + public void SelectBottom() + { + try + { + this.Select(this.Text.Length, 0); + this.ScrollToCaret(); + } + catch { } + } + + public void Write(string text) + { + this.Text += Localization.Parse(text); + } + + public void WriteLine(string text) + { + this.Text += Localization.Parse(text) + Environment.NewLine; + } + } +} diff --git a/ShiftOS.WinForms/Oobe.Designer.cs b/ShiftOS.WinForms/Oobe.Designer.cs new file mode 100644 index 0000000..6c1de0d --- /dev/null +++ b/ShiftOS.WinForms/Oobe.Designer.cs @@ -0,0 +1,952 @@ +using ShiftOS.WinForms.Controls; + +namespace ShiftOS.WinForms +{ + partial class Oobe + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.pnlshadow = new System.Windows.Forms.Panel(); + this.pnllanguage = new System.Windows.Forms.Panel(); + this.btnselectlang = new System.Windows.Forms.Button(); + this.lblanguage = new System.Windows.Forms.ListBox(); + this.label1 = new System.Windows.Forms.Label(); + this.pnluserinfo = new System.Windows.Forms.Panel(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel4 = new System.Windows.Forms.FlowLayoutPanel(); + this.label5 = new System.Windows.Forms.Label(); + this.txtusername = new System.Windows.Forms.TextBox(); + this.flowLayoutPanel3 = new System.Windows.Forms.FlowLayoutPanel(); + this.label4 = new System.Windows.Forms.Label(); + this.txtpassword = new System.Windows.Forms.TextBox(); + this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel(); + this.label3 = new System.Windows.Forms.Label(); + this.txtsysname = new System.Windows.Forms.TextBox(); + this.btnsetuserinfo = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.pnldiscourse = new System.Windows.Forms.Panel(); + this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel6 = new System.Windows.Forms.FlowLayoutPanel(); + this.label6 = new System.Windows.Forms.Label(); + this.txtdiscoursename = new System.Windows.Forms.TextBox(); + this.flowLayoutPanel7 = new System.Windows.Forms.FlowLayoutPanel(); + this.label7 = new System.Windows.Forms.Label(); + this.txtdiscoursepass = new System.Windows.Forms.TextBox(); + this.button1 = new System.Windows.Forms.Button(); + this.label9 = new System.Windows.Forms.Label(); + this.pnlterminaltutorial = new System.Windows.Forms.Panel(); + this.pnlreenteruserinfo = new System.Windows.Forms.Panel(); + this.flowLayoutPanel8 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel9 = new System.Windows.Forms.FlowLayoutPanel(); + this.label8 = new System.Windows.Forms.Label(); + this.txtruser = new System.Windows.Forms.TextBox(); + this.flowLayoutPanel10 = new System.Windows.Forms.FlowLayoutPanel(); + this.label10 = new System.Windows.Forms.Label(); + this.txtrpass = new System.Windows.Forms.TextBox(); + this.button2 = new System.Windows.Forms.Button(); + this.label11 = new System.Windows.Forms.Label(); + this.pnlauthfail = new System.Windows.Forms.Panel(); + this.button3 = new System.Windows.Forms.Button(); + this.label14 = new System.Windows.Forms.Label(); + this.pnlauthdone = new System.Windows.Forms.Panel(); + this.button4 = new System.Windows.Forms.Button(); + this.label12 = new System.Windows.Forms.Label(); + this.pgsystemstatus = new ShiftOS.WinForms.Controls.ShiftedProgressBar(); + this.txtterm = new ShiftOS.WinForms.Controls.TerminalBox(); + this.pnlrelogin = new System.Windows.Forms.Panel(); + this.flowLayoutPanel11 = new System.Windows.Forms.FlowLayoutPanel(); + this.flowLayoutPanel12 = new System.Windows.Forms.FlowLayoutPanel(); + this.label13 = new System.Windows.Forms.Label(); + this.txtluser = new System.Windows.Forms.TextBox(); + this.flowLayoutPanel13 = new System.Windows.Forms.FlowLayoutPanel(); + this.label15 = new System.Windows.Forms.Label(); + this.txtlpass = new System.Windows.Forms.TextBox(); + this.button5 = new System.Windows.Forms.Button(); + this.label16 = new System.Windows.Forms.Label(); + this.pnlrelogerror = new System.Windows.Forms.Panel(); + this.button6 = new System.Windows.Forms.Button(); + this.label17 = new System.Windows.Forms.Label(); + this.pnllanguage.SuspendLayout(); + this.pnluserinfo.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.flowLayoutPanel4.SuspendLayout(); + this.flowLayoutPanel3.SuspendLayout(); + this.flowLayoutPanel2.SuspendLayout(); + this.pnldiscourse.SuspendLayout(); + this.flowLayoutPanel5.SuspendLayout(); + this.flowLayoutPanel6.SuspendLayout(); + this.flowLayoutPanel7.SuspendLayout(); + this.pnlterminaltutorial.SuspendLayout(); + this.pnlreenteruserinfo.SuspendLayout(); + this.flowLayoutPanel8.SuspendLayout(); + this.flowLayoutPanel9.SuspendLayout(); + this.flowLayoutPanel10.SuspendLayout(); + this.pnlauthfail.SuspendLayout(); + this.pnlauthdone.SuspendLayout(); + this.pnlrelogin.SuspendLayout(); + this.flowLayoutPanel11.SuspendLayout(); + this.flowLayoutPanel12.SuspendLayout(); + this.flowLayoutPanel13.SuspendLayout(); + this.pnlrelogerror.SuspendLayout(); + this.SuspendLayout(); + // + // pnlshadow + // + this.pnlshadow.BackColor = System.Drawing.Color.Black; + this.pnlshadow.Location = new System.Drawing.Point(900, 460); + this.pnlshadow.Name = "pnlshadow"; + this.pnlshadow.Size = new System.Drawing.Size(794, 318); + this.pnlshadow.TabIndex = 0; + // + // pnllanguage + // + this.pnllanguage.BackColor = System.Drawing.Color.DarkGray; + this.pnllanguage.Controls.Add(this.btnselectlang); + this.pnllanguage.Controls.Add(this.lblanguage); + this.pnllanguage.Controls.Add(this.label1); + this.pnllanguage.Location = new System.Drawing.Point(43, 75); + this.pnllanguage.Name = "pnllanguage"; + this.pnllanguage.Size = new System.Drawing.Size(542, 321); + this.pnllanguage.TabIndex = 1; + // + // btnselectlang + // + this.btnselectlang.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnselectlang.AutoSize = true; + this.btnselectlang.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnselectlang.FlatAppearance.BorderSize = 0; + this.btnselectlang.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Black; + this.btnselectlang.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Red; + this.btnselectlang.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnselectlang.ForeColor = System.Drawing.Color.White; + this.btnselectlang.Location = new System.Drawing.Point(230, 281); + this.btnselectlang.Name = "btnselectlang"; + this.btnselectlang.Size = new System.Drawing.Size(106, 22); + this.btnselectlang.TabIndex = 2; + this.btnselectlang.Text = "{SELECT_LANG}"; + this.btnselectlang.UseVisualStyleBackColor = true; + this.btnselectlang.Click += new System.EventHandler(this.btnselectlang_Click); + // + // lblanguage + // + this.lblanguage.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.lblanguage.BackColor = System.Drawing.Color.DarkGray; + this.lblanguage.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.lblanguage.FormattingEnabled = true; + this.lblanguage.ItemHeight = 12; + this.lblanguage.Location = new System.Drawing.Point(14, 83); + this.lblanguage.Name = "lblanguage"; + this.lblanguage.Size = new System.Drawing.Size(514, 192); + this.lblanguage.TabIndex = 1; + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Top; + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(542, 70); + this.label1.TabIndex = 0; + this.label1.Text = "{WELCOME_TO_SHIFTOS}\r\n\r\n{PLEASE_CHOOSE_A_SYSTEM_LANGUAGE}"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnluserinfo + // + this.pnluserinfo.BackColor = System.Drawing.Color.DarkGray; + this.pnluserinfo.Controls.Add(this.flowLayoutPanel1); + this.pnluserinfo.Controls.Add(this.btnsetuserinfo); + this.pnluserinfo.Controls.Add(this.label2); + this.pnluserinfo.Location = new System.Drawing.Point(653, 94); + this.pnluserinfo.Name = "pnluserinfo"; + this.pnluserinfo.Size = new System.Drawing.Size(334, 233); + this.pnluserinfo.TabIndex = 2; + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.AutoSize = true; + this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel1.Controls.Add(this.flowLayoutPanel4); + this.flowLayoutPanel1.Controls.Add(this.flowLayoutPanel3); + this.flowLayoutPanel1.Controls.Add(this.flowLayoutPanel2); + this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel1.Location = new System.Drawing.Point(18, 73); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(308, 96); + this.flowLayoutPanel1.TabIndex = 3; + this.flowLayoutPanel1.WrapContents = false; + // + // flowLayoutPanel4 + // + this.flowLayoutPanel4.AutoSize = true; + this.flowLayoutPanel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel4.Controls.Add(this.label5); + this.flowLayoutPanel4.Controls.Add(this.txtusername); + this.flowLayoutPanel4.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel4.Name = "flowLayoutPanel4"; + this.flowLayoutPanel4.Size = new System.Drawing.Size(302, 28); + this.flowLayoutPanel4.TabIndex = 2; + // + // label5 + // + this.label5.Location = new System.Drawing.Point(3, 0); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(108, 28); + this.label5.TabIndex = 0; + this.label5.Text = "{USER_NAME}:"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtusername + // + this.txtusername.BackColor = System.Drawing.Color.Black; + this.txtusername.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtusername.ForeColor = System.Drawing.Color.Gray; + this.txtusername.Location = new System.Drawing.Point(117, 3); + this.txtusername.Name = "txtusername"; + this.txtusername.Size = new System.Drawing.Size(182, 19); + this.txtusername.TabIndex = 1; + // + // flowLayoutPanel3 + // + this.flowLayoutPanel3.AutoSize = true; + this.flowLayoutPanel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel3.Controls.Add(this.label4); + this.flowLayoutPanel3.Controls.Add(this.txtpassword); + this.flowLayoutPanel3.Location = new System.Drawing.Point(3, 37); + this.flowLayoutPanel3.Name = "flowLayoutPanel3"; + this.flowLayoutPanel3.Size = new System.Drawing.Size(302, 25); + this.flowLayoutPanel3.TabIndex = 2; + // + // label4 + // + this.label4.Location = new System.Drawing.Point(3, 0); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(108, 22); + this.label4.TabIndex = 0; + this.label4.Text = "{PASSWORD}: "; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtpassword + // + this.txtpassword.BackColor = System.Drawing.Color.Black; + this.txtpassword.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpassword.ForeColor = System.Drawing.Color.Gray; + this.txtpassword.Location = new System.Drawing.Point(117, 3); + this.txtpassword.Name = "txtpassword"; + this.txtpassword.PasswordChar = '*'; + this.txtpassword.Size = new System.Drawing.Size(182, 19); + this.txtpassword.TabIndex = 1; + // + // flowLayoutPanel2 + // + this.flowLayoutPanel2.AutoSize = true; + this.flowLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel2.Controls.Add(this.label3); + this.flowLayoutPanel2.Controls.Add(this.txtsysname); + this.flowLayoutPanel2.Location = new System.Drawing.Point(3, 68); + this.flowLayoutPanel2.Name = "flowLayoutPanel2"; + this.flowLayoutPanel2.Size = new System.Drawing.Size(302, 25); + this.flowLayoutPanel2.TabIndex = 0; + // + // label3 + // + this.label3.Location = new System.Drawing.Point(3, 0); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(108, 22); + this.label3.TabIndex = 0; + this.label3.Text = "{SYSTEM_NAME}:"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtsysname + // + this.txtsysname.BackColor = System.Drawing.Color.Black; + this.txtsysname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtsysname.ForeColor = System.Drawing.Color.Gray; + this.txtsysname.Location = new System.Drawing.Point(117, 3); + this.txtsysname.Name = "txtsysname"; + this.txtsysname.Size = new System.Drawing.Size(182, 19); + this.txtsysname.TabIndex = 1; + // + // btnsetuserinfo + // + this.btnsetuserinfo.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.btnsetuserinfo.AutoSize = true; + this.btnsetuserinfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnsetuserinfo.FlatAppearance.BorderSize = 0; + this.btnsetuserinfo.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Black; + this.btnsetuserinfo.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Red; + this.btnsetuserinfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsetuserinfo.ForeColor = System.Drawing.Color.White; + this.btnsetuserinfo.Location = new System.Drawing.Point(138, 192); + this.btnsetuserinfo.Name = "btnsetuserinfo"; + this.btnsetuserinfo.Size = new System.Drawing.Size(71, 22); + this.btnsetuserinfo.TabIndex = 2; + this.btnsetuserinfo.Text = "{SUBMIT}"; + this.btnsetuserinfo.UseVisualStyleBackColor = true; + this.btnsetuserinfo.Click += new System.EventHandler(this.btnsetuserinfo_Click); + // + // label2 + // + this.label2.Dock = System.Windows.Forms.DockStyle.Top; + this.label2.Location = new System.Drawing.Point(0, 0); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(334, 70); + this.label2.TabIndex = 0; + this.label2.Text = "{USER_INFO}\r\n\r\n{USER_INFO_EXP}"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnldiscourse + // + this.pnldiscourse.BackColor = System.Drawing.Color.DarkGray; + this.pnldiscourse.Controls.Add(this.flowLayoutPanel5); + this.pnldiscourse.Controls.Add(this.button1); + this.pnldiscourse.Controls.Add(this.label9); + this.pnldiscourse.Location = new System.Drawing.Point(1050, 104); + this.pnldiscourse.Name = "pnldiscourse"; + this.pnldiscourse.Size = new System.Drawing.Size(334, 233); + this.pnldiscourse.TabIndex = 4; + // + // flowLayoutPanel5 + // + this.flowLayoutPanel5.AutoSize = true; + this.flowLayoutPanel5.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel5.Controls.Add(this.flowLayoutPanel6); + this.flowLayoutPanel5.Controls.Add(this.flowLayoutPanel7); + this.flowLayoutPanel5.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel5.Location = new System.Drawing.Point(14, 121); + this.flowLayoutPanel5.Name = "flowLayoutPanel5"; + this.flowLayoutPanel5.Size = new System.Drawing.Size(308, 65); + this.flowLayoutPanel5.TabIndex = 3; + this.flowLayoutPanel5.WrapContents = false; + // + // flowLayoutPanel6 + // + this.flowLayoutPanel6.AutoSize = true; + this.flowLayoutPanel6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel6.Controls.Add(this.label6); + this.flowLayoutPanel6.Controls.Add(this.txtdiscoursename); + this.flowLayoutPanel6.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel6.Name = "flowLayoutPanel6"; + this.flowLayoutPanel6.Size = new System.Drawing.Size(302, 28); + this.flowLayoutPanel6.TabIndex = 2; + // + // label6 + // + this.label6.Location = new System.Drawing.Point(3, 0); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(108, 28); + this.label6.TabIndex = 0; + this.label6.Text = "{USER_NAME}:"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtdiscoursename + // + this.txtdiscoursename.BackColor = System.Drawing.Color.Black; + this.txtdiscoursename.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdiscoursename.ForeColor = System.Drawing.Color.Gray; + this.txtdiscoursename.Location = new System.Drawing.Point(117, 3); + this.txtdiscoursename.Name = "txtdiscoursename"; + this.txtdiscoursename.Size = new System.Drawing.Size(182, 19); + this.txtdiscoursename.TabIndex = 1; + // + // flowLayoutPanel7 + // + this.flowLayoutPanel7.AutoSize = true; + this.flowLayoutPanel7.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel7.Controls.Add(this.label7); + this.flowLayoutPanel7.Controls.Add(this.txtdiscoursepass); + this.flowLayoutPanel7.Location = new System.Drawing.Point(3, 37); + this.flowLayoutPanel7.Name = "flowLayoutPanel7"; + this.flowLayoutPanel7.Size = new System.Drawing.Size(302, 25); + this.flowLayoutPanel7.TabIndex = 2; + // + // label7 + // + this.label7.Location = new System.Drawing.Point(3, 0); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(108, 22); + this.label7.TabIndex = 0; + this.label7.Text = "{PASSWORD}: "; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtdiscoursepass + // + this.txtdiscoursepass.BackColor = System.Drawing.Color.Black; + this.txtdiscoursepass.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdiscoursepass.ForeColor = System.Drawing.Color.Gray; + this.txtdiscoursepass.Location = new System.Drawing.Point(117, 3); + this.txtdiscoursepass.Name = "txtdiscoursepass"; + this.txtdiscoursepass.PasswordChar = '*'; + this.txtdiscoursepass.Size = new System.Drawing.Size(182, 19); + this.txtdiscoursepass.TabIndex = 1; + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button1.AutoSize = true; + this.button1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button1.FlatAppearance.BorderSize = 0; + this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Black; + this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Red; + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.ForeColor = System.Drawing.Color.White; + this.button1.Location = new System.Drawing.Point(138, 192); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(71, 22); + this.button1.TabIndex = 2; + this.button1.Text = "{SUBMIT}"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label9 + // + this.label9.Dock = System.Windows.Forms.DockStyle.Top; + this.label9.Location = new System.Drawing.Point(0, 0); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(334, 88); + this.label9.TabIndex = 0; + this.label9.Text = "{DISCOURSE_INTEGRATION}\r\n\r\n{DISCOURSE_INTEGRATION_EXP}"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlterminaltutorial + // + this.pnlterminaltutorial.BackColor = System.Drawing.Color.DarkGray; + this.pnlterminaltutorial.Controls.Add(this.pgsystemstatus); + this.pnlterminaltutorial.Controls.Add(this.txtterm); + this.pnlterminaltutorial.Location = new System.Drawing.Point(622, 384); + this.pnlterminaltutorial.Name = "pnlterminaltutorial"; + this.pnlterminaltutorial.Size = new System.Drawing.Size(940, 604); + this.pnlterminaltutorial.TabIndex = 5; + // + // pnlreenteruserinfo + // + this.pnlreenteruserinfo.BackColor = System.Drawing.Color.DarkGray; + this.pnlreenteruserinfo.Controls.Add(this.flowLayoutPanel8); + this.pnlreenteruserinfo.Controls.Add(this.button2); + this.pnlreenteruserinfo.Controls.Add(this.label11); + this.pnlreenteruserinfo.Location = new System.Drawing.Point(791, 384); + this.pnlreenteruserinfo.Name = "pnlreenteruserinfo"; + this.pnlreenteruserinfo.Size = new System.Drawing.Size(334, 233); + this.pnlreenteruserinfo.TabIndex = 6; + // + // flowLayoutPanel8 + // + this.flowLayoutPanel8.AutoSize = true; + this.flowLayoutPanel8.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel8.Controls.Add(this.flowLayoutPanel9); + this.flowLayoutPanel8.Controls.Add(this.flowLayoutPanel10); + this.flowLayoutPanel8.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel8.Location = new System.Drawing.Point(14, 121); + this.flowLayoutPanel8.Name = "flowLayoutPanel8"; + this.flowLayoutPanel8.Size = new System.Drawing.Size(308, 65); + this.flowLayoutPanel8.TabIndex = 3; + this.flowLayoutPanel8.WrapContents = false; + // + // flowLayoutPanel9 + // + this.flowLayoutPanel9.AutoSize = true; + this.flowLayoutPanel9.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel9.Controls.Add(this.label8); + this.flowLayoutPanel9.Controls.Add(this.txtruser); + this.flowLayoutPanel9.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel9.Name = "flowLayoutPanel9"; + this.flowLayoutPanel9.Size = new System.Drawing.Size(302, 28); + this.flowLayoutPanel9.TabIndex = 2; + // + // label8 + // + this.label8.Location = new System.Drawing.Point(3, 0); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(108, 28); + this.label8.TabIndex = 0; + this.label8.Text = "{USER_NAME}:"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtruser + // + this.txtruser.BackColor = System.Drawing.Color.Black; + this.txtruser.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtruser.ForeColor = System.Drawing.Color.Gray; + this.txtruser.Location = new System.Drawing.Point(117, 3); + this.txtruser.Name = "txtruser"; + this.txtruser.Size = new System.Drawing.Size(182, 19); + this.txtruser.TabIndex = 1; + // + // flowLayoutPanel10 + // + this.flowLayoutPanel10.AutoSize = true; + this.flowLayoutPanel10.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel10.Controls.Add(this.label10); + this.flowLayoutPanel10.Controls.Add(this.txtrpass); + this.flowLayoutPanel10.Location = new System.Drawing.Point(3, 37); + this.flowLayoutPanel10.Name = "flowLayoutPanel10"; + this.flowLayoutPanel10.Size = new System.Drawing.Size(302, 25); + this.flowLayoutPanel10.TabIndex = 2; + // + // label10 + // + this.label10.Location = new System.Drawing.Point(3, 0); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(108, 22); + this.label10.TabIndex = 0; + this.label10.Text = "{PASSWORD}: "; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtrpass + // + this.txtrpass.BackColor = System.Drawing.Color.Black; + this.txtrpass.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtrpass.ForeColor = System.Drawing.Color.Gray; + this.txtrpass.Location = new System.Drawing.Point(117, 3); + this.txtrpass.Name = "txtrpass"; + this.txtrpass.PasswordChar = '*'; + this.txtrpass.Size = new System.Drawing.Size(182, 19); + this.txtrpass.TabIndex = 1; + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button2.AutoSize = true; + this.button2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button2.FlatAppearance.BorderSize = 0; + this.button2.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Black; + this.button2.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Red; + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.ForeColor = System.Drawing.Color.White; + this.button2.Location = new System.Drawing.Point(138, 192); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(71, 22); + this.button2.TabIndex = 2; + this.button2.Text = "{SUBMIT}"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // label11 + // + this.label11.Dock = System.Windows.Forms.DockStyle.Top; + this.label11.Location = new System.Drawing.Point(0, 0); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(334, 88); + this.label11.TabIndex = 0; + this.label11.Text = "Enter new username and password\r\n\r\nAs per recent changes within the multi-user do" + + "main, you must re-enter your username and password to re-complete registration w" + + "ith the multi-user domain."; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlauthfail + // + this.pnlauthfail.BackColor = System.Drawing.Color.DarkGray; + this.pnlauthfail.Controls.Add(this.button3); + this.pnlauthfail.Controls.Add(this.label14); + this.pnlauthfail.Location = new System.Drawing.Point(161, 460); + this.pnlauthfail.Name = "pnlauthfail"; + this.pnlauthfail.Size = new System.Drawing.Size(334, 138); + this.pnlauthfail.TabIndex = 7; + // + // button3 + // + this.button3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button3.AutoSize = true; + this.button3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button3.FlatAppearance.BorderSize = 0; + this.button3.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Black; + this.button3.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Red; + this.button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button3.ForeColor = System.Drawing.Color.White; + this.button3.Location = new System.Drawing.Point(138, 97); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(71, 22); + this.button3.TabIndex = 2; + this.button3.Text = "{SUBMIT}"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // label14 + // + this.label14.Dock = System.Windows.Forms.DockStyle.Top; + this.label14.Location = new System.Drawing.Point(0, 0); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(334, 88); + this.label14.TabIndex = 0; + this.label14.Text = "Registration Failure\r\n\r\nThat account already exists."; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlauthdone + // + this.pnlauthdone.BackColor = System.Drawing.Color.DarkGray; + this.pnlauthdone.Controls.Add(this.button4); + this.pnlauthdone.Controls.Add(this.label12); + this.pnlauthdone.Location = new System.Drawing.Point(122, 640); + this.pnlauthdone.Name = "pnlauthdone"; + this.pnlauthdone.Size = new System.Drawing.Size(334, 138); + this.pnlauthdone.TabIndex = 8; + // + // button4 + // + this.button4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button4.AutoSize = true; + this.button4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button4.FlatAppearance.BorderSize = 0; + this.button4.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Black; + this.button4.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Red; + this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button4.ForeColor = System.Drawing.Color.White; + this.button4.Location = new System.Drawing.Point(138, 97); + this.button4.Name = "button4"; + this.button4.Size = new System.Drawing.Size(71, 22); + this.button4.TabIndex = 2; + this.button4.Text = "{SUBMIT}"; + this.button4.UseVisualStyleBackColor = true; + this.button4.Click += new System.EventHandler(this.button4_Click); + // + // label12 + // + this.label12.Dock = System.Windows.Forms.DockStyle.Top; + this.label12.Location = new System.Drawing.Point(0, 0); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(334, 88); + this.label12.TabIndex = 0; + this.label12.Text = "Registration Failure\r\n\r\nYou may proceed on with your regular day."; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pgsystemstatus + // + this.pgsystemstatus.BackColor = System.Drawing.Color.Black; + this.pgsystemstatus.BlockSize = 5; + this.pgsystemstatus.Location = new System.Drawing.Point(4, 578); + this.pgsystemstatus.Maximum = 100; + this.pgsystemstatus.Name = "pgsystemstatus"; + this.pgsystemstatus.Size = new System.Drawing.Size(933, 23); + this.pgsystemstatus.Style = System.Windows.Forms.ProgressBarStyle.Continuous; + this.pgsystemstatus.TabIndex = 2; + this.pgsystemstatus.Text = "shiftedProgressBar1"; + this.pgsystemstatus.Value = 0; + this.pgsystemstatus.Visible = false; + // + // txtterm + // + this.txtterm.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.txtterm.Location = new System.Drawing.Point(4, 3); + this.txtterm.Name = "txtterm"; + this.txtterm.Size = new System.Drawing.Size(933, 598); + this.txtterm.TabIndex = 1; + this.txtterm.Text = ""; + // + // pnlrelogin + // + this.pnlrelogin.BackColor = System.Drawing.Color.DarkGray; + this.pnlrelogin.Controls.Add(this.flowLayoutPanel11); + this.pnlrelogin.Controls.Add(this.button5); + this.pnlrelogin.Controls.Add(this.label16); + this.pnlrelogin.Location = new System.Drawing.Point(513, 445); + this.pnlrelogin.Name = "pnlrelogin"; + this.pnlrelogin.Size = new System.Drawing.Size(334, 233); + this.pnlrelogin.TabIndex = 7; + // + // flowLayoutPanel11 + // + this.flowLayoutPanel11.AutoSize = true; + this.flowLayoutPanel11.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel11.Controls.Add(this.flowLayoutPanel12); + this.flowLayoutPanel11.Controls.Add(this.flowLayoutPanel13); + this.flowLayoutPanel11.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flowLayoutPanel11.Location = new System.Drawing.Point(14, 121); + this.flowLayoutPanel11.Name = "flowLayoutPanel11"; + this.flowLayoutPanel11.Size = new System.Drawing.Size(308, 65); + this.flowLayoutPanel11.TabIndex = 3; + this.flowLayoutPanel11.WrapContents = false; + // + // flowLayoutPanel12 + // + this.flowLayoutPanel12.AutoSize = true; + this.flowLayoutPanel12.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel12.Controls.Add(this.label13); + this.flowLayoutPanel12.Controls.Add(this.txtluser); + this.flowLayoutPanel12.Location = new System.Drawing.Point(3, 3); + this.flowLayoutPanel12.Name = "flowLayoutPanel12"; + this.flowLayoutPanel12.Size = new System.Drawing.Size(302, 28); + this.flowLayoutPanel12.TabIndex = 2; + // + // label13 + // + this.label13.Location = new System.Drawing.Point(3, 0); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(108, 28); + this.label13.TabIndex = 0; + this.label13.Text = "{USER_NAME}:"; + this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtluser + // + this.txtluser.BackColor = System.Drawing.Color.Black; + this.txtluser.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtluser.ForeColor = System.Drawing.Color.Gray; + this.txtluser.Location = new System.Drawing.Point(117, 3); + this.txtluser.Name = "txtluser"; + this.txtluser.Size = new System.Drawing.Size(182, 19); + this.txtluser.TabIndex = 1; + // + // flowLayoutPanel13 + // + this.flowLayoutPanel13.AutoSize = true; + this.flowLayoutPanel13.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flowLayoutPanel13.Controls.Add(this.label15); + this.flowLayoutPanel13.Controls.Add(this.txtlpass); + this.flowLayoutPanel13.Location = new System.Drawing.Point(3, 37); + this.flowLayoutPanel13.Name = "flowLayoutPanel13"; + this.flowLayoutPanel13.Size = new System.Drawing.Size(302, 25); + this.flowLayoutPanel13.TabIndex = 2; + // + // label15 + // + this.label15.Location = new System.Drawing.Point(3, 0); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(108, 22); + this.label15.TabIndex = 0; + this.label15.Text = "{PASSWORD}: "; + this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // txtlpass + // + this.txtlpass.BackColor = System.Drawing.Color.Black; + this.txtlpass.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtlpass.ForeColor = System.Drawing.Color.Gray; + this.txtlpass.Location = new System.Drawing.Point(117, 3); + this.txtlpass.Name = "txtlpass"; + this.txtlpass.PasswordChar = '*'; + this.txtlpass.Size = new System.Drawing.Size(182, 19); + this.txtlpass.TabIndex = 1; + // + // button5 + // + this.button5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button5.AutoSize = true; + this.button5.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button5.FlatAppearance.BorderSize = 0; + this.button5.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Black; + this.button5.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Red; + this.button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button5.ForeColor = System.Drawing.Color.White; + this.button5.Location = new System.Drawing.Point(138, 192); + this.button5.Name = "button5"; + this.button5.Size = new System.Drawing.Size(71, 22); + this.button5.TabIndex = 2; + this.button5.Text = "{SUBMIT}"; + this.button5.UseVisualStyleBackColor = true; + this.button5.Click += new System.EventHandler(this.button5_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(334, 88); + this.label16.TabIndex = 0; + this.label16.Text = "Re-enter User Login\r\n\r\nThe auto-login attempt for your current user account did n" + + "ot work on this multi-user domain. Please enter the correct username and passwor" + + "d for this MUD."; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlrelogerror + // + this.pnlrelogerror.BackColor = System.Drawing.Color.DarkGray; + this.pnlrelogerror.Controls.Add(this.button6); + this.pnlrelogerror.Controls.Add(this.label17); + this.pnlrelogerror.Location = new System.Drawing.Point(124, 816); + this.pnlrelogerror.Name = "pnlrelogerror"; + this.pnlrelogerror.Size = new System.Drawing.Size(334, 138); + this.pnlrelogerror.TabIndex = 9; + // + // button6 + // + this.button6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.button6.AutoSize = true; + this.button6.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.button6.FlatAppearance.BorderSize = 0; + this.button6.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Black; + this.button6.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Red; + this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button6.ForeColor = System.Drawing.Color.White; + this.button6.Location = new System.Drawing.Point(138, 97); + this.button6.Name = "button6"; + this.button6.Size = new System.Drawing.Size(71, 22); + this.button6.TabIndex = 2; + this.button6.Text = "{SUBMIT}"; + this.button6.UseVisualStyleBackColor = true; + this.button6.Click += new System.EventHandler(this.button6_Click); + // + // label17 + // + this.label17.Dock = System.Windows.Forms.DockStyle.Top; + this.label17.Location = new System.Drawing.Point(0, 0); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(334, 88); + this.label17.TabIndex = 0; + this.label17.Text = "Access denied.\r\n\r\nEither you entered details for an account that doesn\'t exist or" + + " you attempted to break into an existing account with the incorrect password."; + this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Oobe + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.DarkBlue; + this.ClientSize = new System.Drawing.Size(1916, 1000); + this.Controls.Add(this.pnlrelogerror); + this.Controls.Add(this.pnlrelogin); + this.Controls.Add(this.pnlauthdone); + this.Controls.Add(this.pnlauthfail); + this.Controls.Add(this.pnlreenteruserinfo); + this.Controls.Add(this.pnlterminaltutorial); + this.Controls.Add(this.pnldiscourse); + this.Controls.Add(this.pnluserinfo); + this.Controls.Add(this.pnllanguage); + this.Controls.Add(this.pnlshadow); + this.Font = new System.Drawing.Font("Lucida Console", 9F); + this.Name = "Oobe"; + this.Text = "OutOfBoxExperience"; + this.pnllanguage.ResumeLayout(false); + this.pnllanguage.PerformLayout(); + this.pnluserinfo.ResumeLayout(false); + this.pnluserinfo.PerformLayout(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.flowLayoutPanel4.ResumeLayout(false); + this.flowLayoutPanel4.PerformLayout(); + this.flowLayoutPanel3.ResumeLayout(false); + this.flowLayoutPanel3.PerformLayout(); + this.flowLayoutPanel2.ResumeLayout(false); + this.flowLayoutPanel2.PerformLayout(); + this.pnldiscourse.ResumeLayout(false); + this.pnldiscourse.PerformLayout(); + this.flowLayoutPanel5.ResumeLayout(false); + this.flowLayoutPanel5.PerformLayout(); + this.flowLayoutPanel6.ResumeLayout(false); + this.flowLayoutPanel6.PerformLayout(); + this.flowLayoutPanel7.ResumeLayout(false); + this.flowLayoutPanel7.PerformLayout(); + this.pnlterminaltutorial.ResumeLayout(false); + this.pnlreenteruserinfo.ResumeLayout(false); + this.pnlreenteruserinfo.PerformLayout(); + this.flowLayoutPanel8.ResumeLayout(false); + this.flowLayoutPanel8.PerformLayout(); + this.flowLayoutPanel9.ResumeLayout(false); + this.flowLayoutPanel9.PerformLayout(); + this.flowLayoutPanel10.ResumeLayout(false); + this.flowLayoutPanel10.PerformLayout(); + this.pnlauthfail.ResumeLayout(false); + this.pnlauthfail.PerformLayout(); + this.pnlauthdone.ResumeLayout(false); + this.pnlauthdone.PerformLayout(); + this.pnlrelogin.ResumeLayout(false); + this.pnlrelogin.PerformLayout(); + this.flowLayoutPanel11.ResumeLayout(false); + this.flowLayoutPanel11.PerformLayout(); + this.flowLayoutPanel12.ResumeLayout(false); + this.flowLayoutPanel12.PerformLayout(); + this.flowLayoutPanel13.ResumeLayout(false); + this.flowLayoutPanel13.PerformLayout(); + this.pnlrelogerror.ResumeLayout(false); + this.pnlrelogerror.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnlshadow; + private System.Windows.Forms.Panel pnllanguage; + private System.Windows.Forms.Button btnselectlang; + private System.Windows.Forms.ListBox lblanguage; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel pnluserinfo; + private System.Windows.Forms.Button btnsetuserinfo; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel4; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox txtusername; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel3; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtpassword; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtsysname; + private System.Windows.Forms.Panel pnldiscourse; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel5; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel6; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox txtdiscoursename; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel7; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox txtdiscoursepass; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Panel pnlterminaltutorial; + private Controls.TerminalBox txtterm; + private ShiftedProgressBar pgsystemstatus; + private System.Windows.Forms.Panel pnlreenteruserinfo; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel8; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel9; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox txtruser; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel10; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox txtrpass; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Panel pnlauthfail; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Panel pnlauthdone; + private System.Windows.Forms.Button button4; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Panel pnlrelogin; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel11; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel12; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.TextBox txtluser; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel13; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox txtlpass; + private System.Windows.Forms.Button button5; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Panel pnlrelogerror; + private System.Windows.Forms.Button button6; + private System.Windows.Forms.Label label17; + } +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Oobe.cs b/ShiftOS.WinForms/Oobe.cs new file mode 100644 index 0000000..2a3e547 --- /dev/null +++ b/ShiftOS.WinForms/Oobe.cs @@ -0,0 +1,407 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using Newtonsoft.Json; +using ShiftOS.Engine; +using ShiftOS.Objects; +using ShiftOS.Objects.ShiftFS; + +namespace ShiftOS.WinForms +{ + public partial class Oobe : Form, IOobe + { + public Save MySave { get; private set; } + + public bool IsTransferMode = false; + + public Oobe() + { + InitializeComponent(); + } + + public void HideAll() + { + foreach (Control ctrl in this.Controls) + { + if (ctrl != this.pnlshadow) + { + ctrl.Hide(); + } + } + } + + public void SetupUI() + { + HideAll(); + Panel shown = null; + if (IsTransferMode == false) + { + switch (MySave.StoryPosition) + { + case 0: + shown = pnllanguage; + SetupLanguages(); + break; + case 1: + shown = pnluserinfo; + break; + case 2: + shown = pnldiscourse; + break; + default: + shown = pnlterminaltutorial; + SetupTerminal(); + break; + } + } + else + { + switch (TransferProgress) + { + case 0: + shown = pnlreenteruserinfo; + break; + case 1: + shown = pnlauthfail; + break; + case 2: + shown = pnlauthdone; + break; + case 4: + shown = pnlrelogin; + break; + case 5: + shown = pnlrelogerror; + break; + } + } + + if (shown != null) + { + shown.Location = new Point((int)(shown.Parent?.Width - shown.Width) / 2, (int)(shown?.Parent.Height - shown.Height) / 2); + pnlshadow.Size = (Size)shown.Size; + pnlshadow.Location = new Point((int)shown.Left + 15, (int)shown.Top + 15); + shown.Show(); + } + } + + private int TransferProgress = 0; + + public void SetupTerminal() + { + //just so that the terminal can access our save + SaveSystem.CurrentSave = MySave; + + Applications.Terminal.MakeWidget(txtterm); + TerminalBackend.InStory = false; + TerminalBackend.PrefixEnabled = true; + Console.WriteLine("{TERMINAL_TUTORIAL_1}"); + SaveSystem.TransferCodepointsFrom("oobe", 50); + + Shiftorium.Installed += () => + { + if (SaveSystem.CurrentSave.StoryPosition < 5) + { + if (Shiftorium.UpgradeInstalled("mud_fundamentals")) + { + Console.WriteLine("{TERMINAL_TUTORIAL_2}"); + txtterm.Height -= pgsystemstatus.Height - 4; + pgsystemstatus.Show(); + + StartInstall(); + + } + } + }; + + } + + public int thingsDone + { + get + { + return pgsystemstatus.Value; + } + set + { + this.Invoke(new Action(() => + { + pgsystemstatus.Value = value; + })); + } + } + + public int thingsToDo + { + get + { + return pgsystemstatus.Maximum; + } + set + { + this.Invoke(new Action(() => + { + pgsystemstatus.Maximum = value; + })); + } + } + + public void StartInstall() + { + Dictionary Aliases = new Dictionary(); + Aliases.Add("help", "sos.help"); + Aliases.Add("save", "sos.save"); + Aliases.Add("shutdown", "sys.shutdown"); + Aliases.Add("status", "sos.status"); + Aliases.Add("pong", "win.open{app:\"pong\"}"); + Aliases.Add("programs", "sos.help{topic:\"programs\"}"); + + foreach (var path in Paths.GetAll()) + { + Console.WriteLine("{CREATE}: " + path); + thingsDone += 1; + Thread.Sleep(500); + } + thingsToDo = Aliases.Count + Paths.GetAll().Length + 2; + + Console.WriteLine("{INSTALL}: {PONG}"); + thingsDone++; + Thread.Sleep(200); + + Console.WriteLine("{INSTALL}: {TERMINAL}"); + thingsDone++; + Thread.Sleep(200); + + foreach (var kv in Aliases) + { + Console.WriteLine($"{{ALIAS}}: {kv.Key} => {kv.Value}"); + thingsDone++; + Thread.Sleep(450); + } + + SaveSystem.CurrentSave.StoryPosition = 5; + SaveSystem.SaveGame(); + } + + List supportedLangs + { + get + { + //return JsonConvert.DeserializeObject>(Properties.Resources.languages); + + return new List(new[] { "english" }); + } + } + + public void SetupLanguages() + { + lblanguage.Items.Clear(); + + foreach (var supportedLang in supportedLangs) + { + lblanguage.Items.Add(supportedLang); + } + } + + public void SetupAllControls() + { + foreach (Control ctrl in this.Controls) + { + SetupControl(ctrl); + } + } + + public void SetupControl(Control ctrl) + { + if (!string.IsNullOrWhiteSpace(ctrl.Text)) + ctrl.Text = Localization.Parse(ctrl.Text); + try + { + foreach (Control child in ctrl.Controls) + { + SetupControl(child); + } + } + catch + { + } + + } + + private void btnselectlang_Click(object sender, EventArgs e) + { + if (lblanguage.SelectedItem != null) + { + string l = lblanguage.SelectedItem as string; + MySave.Language = l; + MySave.StoryPosition = 1; + SetupUI(); + } + } + + private void btnsetuserinfo_Click(object sender, EventArgs e) + { + if (!string.IsNullOrWhiteSpace(txtusername.Text)) + { + MySave.Username = txtusername.Text; + + MySave.Password = txtpassword.Text; + + MySave.SystemName = (string.IsNullOrWhiteSpace(txtsysname.Text)) ? "shiftos" : txtsysname.Text; + + MySave.StoryPosition = 2; + + SetupUI(); + } + } + + private void button1_Click(object sender, EventArgs e) + { + if (!string.IsNullOrWhiteSpace(txtdiscoursename.Text)) + { + MySave.DiscourseName = txtdiscoursename.Text; + MySave.DiscoursePass = txtdiscoursepass.Text; + } + MySave.StoryPosition = 3; + SetupUI(); + } + + public void StartShowing(Save save) + { + IsTransferMode = false; + MySave = save; + SetupAllControls(); + this.FormBorderStyle = FormBorderStyle.None; + this.WindowState = FormWindowState.Maximized; + this.TopMost = true; + + this.Load += (o, a) => + { + SetupUI(); + }; + SaveSystem.GameReady += () => + { + this.Invoke(new Action(() => + { + this.Close(); + (AppearanceManager.OpenForms[0] as WindowBorder).BringToFront(); + Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "); + })); + + }; + this.Show(); + } + + public void ShowSaveTransfer(Save save) + { + MySave = save; + ServerManager.MessageReceived += (msg) => + { + if(msg.Name == "mud_notfound") + { + TransferProgress = 2; + this.Invoke(new Action(() => { SetupUI(); })); + } + else if(msg.Name == "mud_found") + { + TransferProgress = 1; + this.Invoke(new Action(() => { SetupUI(); })); + } + else if(msg.Name == "mud_saved") + { + try + { + this.Invoke(new Action(() => + { + SaveSystem.CurrentSave = MySave; + this.Close(); + Utils.Delete(Paths.SaveFileInner); + })); + } + catch { } + } + }; + IsTransferMode = true; + this.FormBorderStyle = FormBorderStyle.None; + this.WindowState = FormWindowState.Maximized; + this.TopMost = true; + this.Show(); + SetupUI(); + } + + private void button2_Click(object sender, EventArgs e) + { + pnlreenteruserinfo.Hide(); + pnlshadow.Size = new Size(0, 0); + ServerManager.SendMessage("mud_checkuserexists", $@"{{ + username: ""{txtruser.Text}"", + password: ""{txtrpass.Text}"" +}}"); + MySave.Username = txtruser.Text; + MySave.Password = txtrpass.Text; + } + + private void button3_Click(object sender, EventArgs e) + { + TransferProgress = 0; + SetupUI(); + } + + private void button4_Click(object sender, EventArgs e) + { + ServerManager.SendMessage("mud_save", JsonConvert.SerializeObject(MySave)); + } + + public void PromptForLogin() + { + ServerManager.MessageReceived += (msg) => + { + if (msg.Name == "mud_notfound") + { + TransferProgress = 5; + this.Invoke(new Action(() => { SetupUI(); })); + } + else if (msg.Name == "mud_found") + { + this.Invoke(new Action(() => + { + Utils.WriteAllText(Paths.GetPath("user.dat"), $@"{{ + username: ""{txtluser.Text}"", + password: ""{txtlpass.Text}"" +}}"); + SaveSystem.ReadSave(); + this.Close(); + })); + } + }; + IsTransferMode = true; + TransferProgress = 4; + this.FormBorderStyle = FormBorderStyle.None; + this.WindowState = FormWindowState.Maximized; + this.TopMost = true; + this.Show(); + SetupUI(); + } + + private void button6_Click(object sender, EventArgs e) + { + TransferProgress = 4; + SetupUI(); + } + + private void button5_Click(object sender, EventArgs e) + { + ServerManager.SendMessage("mud_checkuserexists", $@"{{ + username: ""{txtluser.Text}"", + password: ""{txtlpass.Text}"" +}}"); + } + } +} diff --git a/ShiftOS.WinForms/Oobe.resx b/ShiftOS.WinForms/Oobe.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/Oobe.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/Program.cs b/ShiftOS.WinForms/Program.cs new file mode 100644 index 0000000..458f4c2 --- /dev/null +++ b/ShiftOS.WinForms/Program.cs @@ -0,0 +1,180 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; +using Newtonsoft.Json; +using static ShiftOS.Objects.ShiftFS.Utils; +using ShiftOS.WinForms.Applications; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Localization.RegisterProvider(new WFLanguageProvider()); + Shiftorium.RegisterProvider(new WinformsShiftoriumProvider()); + AppearanceManager.OnExit += () => + { + Environment.Exit(0); + }; + + TerminalBackend.TerminalRequested += () => + { + AppearanceManager.SetupWindow(new Applications.Terminal()); + }; + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + AppearanceManager.Initiate(new WinformsWindowManager()); + OutOfBoxExperience.Init(new Oobe()); + Infobox.Init(new WinformsInfobox()); + FileSkimmerBackend.Init(new WinformsFSFrontend()); + var desk = new WinformsDesktop(); + Desktop.Init(desk); + Application.Run(desk); + } + } + + internal class WinformsShiftoriumProvider : IShiftoriumProvider + { + public List GetDefaults() + { + return JsonConvert.DeserializeObject>(Properties.Resources.Shiftorium); + } + } + + internal class WinformsInfobox : IInfobox + { + public void Open(string title, string msg) + { + Dialog frm = new Dialog(); + frm.Text = title; + var pnl = new Panel(); + var flow = new FlowLayoutPanel(); + var btnok = new Button(); + btnok.AutoSize = true; + btnok.AutoSizeMode = AutoSizeMode.GrowAndShrink; + flow.Height = btnok.Height + 4; + btnok.Text = "ok"; + flow.Dock = DockStyle.Bottom; + flow.Controls.Add(btnok); + btnok.Show(); btnok.Click += (o, a) => + { + frm.Close(); + }; + pnl.Controls.Add(flow); + flow.Show(); + var lbl = new Label(); + lbl.Text = msg; + lbl.TextAlign = ContentAlignment.MiddleCenter; + lbl.Dock = DockStyle.Fill; + lbl.AutoSize = false; + pnl.Controls.Add(lbl); lbl.Show(); + frm.Controls.Add(pnl); + pnl.Dock = DockStyle.Fill; + frm.Size = new Size(320, 200); + AppearanceManager.SetupDialog(frm); + + } + } + + public class WinformsFSFrontend : IFileSkimmer + { + public void OpenDirectory(string path) + { + var fs = new Applications.FileSkimmer(); + AppearanceManager.SetupWindow(fs); + fs.ChangeDirectory(path); + } + + public void GetPath(string[] filetypes, FileOpenerStyle style, Action callback) + { + AppearanceManager.SetupDialog(new Applications.FileDialog(filetypes, style, callback)); + } + + public void OpenFile(string path) + { + try + { + switch (FileSkimmerBackend.GetFileType(path)) + { + case FileType.TextFile: + if (!Shiftorium.UpgradeInstalled("textpad")) + throw new Exception(); + + var txt = new TextPad(); + AppearanceManager.SetupWindow(txt); + txt.LoadFile(path); + break; + case FileType.Executable: + //NYI + throw new Exception(); + case FileType.Python: + var p = new Engine.Scripting.PythonInterpreter(); + try + { + p.ExecuteFile(path); + } + catch (Exception ex) + { + Infobox.Show("{PY_EXCEPTION}", ex.Message); + } + break; + case FileType.Lua: + try + { + var runner = new Engine.Scripting.LuaInterpreter(); + runner.ExecuteFile(path); + } + catch (Exception ex) + { + Infobox.Show("{LUA_ERROR}", ex.Message); + } + break; + case FileType.JSON: + //NYI + throw new Exception(); + case FileType.Filesystem: + MountPersistent(path); + //If this doesn't fail... + FileSkimmerBackend.OpenDirectory((Mounts.Count - 1).ToString() + ":"); + break; + case FileType.Skin: + if (!Shiftorium.UpgradeInstalled("skinning")) + throw new Exception(); + + var sl = new Skin_Loader(); + AppearanceManager.SetupWindow(sl); + sl.LoadedSkin = JsonConvert.DeserializeObject(ReadAllText(path)); + sl.SetupUI(); + break; + case FileType.Image: + if (!Shiftorium.UpgradeInstalled("artpad_open")) + throw new Exception(); + + var ap = new Artpad(); + AppearanceManager.SetupWindow(ap); + ap.LoadPicture(path); + break; + default: + throw new Exception(); + + } + } + catch + { + Infobox.Show("{NO_APP_TO_OPEN}", "{NO_APP_TO_OPEN_EXP}"); + } + + } + + } +} diff --git a/ShiftOS.WinForms/Properties/AssemblyInfo.cs b/ShiftOS.WinForms/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0e51d99 --- /dev/null +++ b/ShiftOS.WinForms/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ShiftOS.WinForms")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ShiftOS.WinForms")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("2295d2e2-3a00-4e02-b66f-b961ac329fe6")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ShiftOS.WinForms/Properties/Resources.Designer.cs b/ShiftOS.WinForms/Properties/Resources.Designer.cs new file mode 100644 index 0000000..85b14c8 --- /dev/null +++ b/ShiftOS.WinForms/Properties/Resources.Designer.cs @@ -0,0 +1,585 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ShiftOS.WinForms.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ShiftOS.WinForms.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadcirclerubber { + get { + object obj = ResourceManager.GetObject("ArtPadcirclerubber", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadcirclerubberselected { + get { + object obj = ResourceManager.GetObject("ArtPadcirclerubberselected", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPaderacer { + get { + object obj = ResourceManager.GetObject("ArtPaderacer", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadfloodfill { + get { + object obj = ResourceManager.GetObject("ArtPadfloodfill", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadlinetool { + get { + object obj = ResourceManager.GetObject("ArtPadlinetool", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadmagnify { + get { + object obj = ResourceManager.GetObject("ArtPadmagnify", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadnew { + get { + object obj = ResourceManager.GetObject("ArtPadnew", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadopen { + get { + object obj = ResourceManager.GetObject("ArtPadopen", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadOval { + get { + object obj = ResourceManager.GetObject("ArtPadOval", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadpaintbrush { + get { + object obj = ResourceManager.GetObject("ArtPadpaintbrush", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadpencil { + get { + object obj = ResourceManager.GetObject("ArtPadpencil", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadpixelplacer { + get { + object obj = ResourceManager.GetObject("ArtPadpixelplacer", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadRectangle { + get { + object obj = ResourceManager.GetObject("ArtPadRectangle", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadredo { + get { + object obj = ResourceManager.GetObject("ArtPadredo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadsave { + get { + object obj = ResourceManager.GetObject("ArtPadsave", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadsquarerubber { + get { + object obj = ResourceManager.GetObject("ArtPadsquarerubber", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadsquarerubberselected { + get { + object obj = ResourceManager.GetObject("ArtPadsquarerubberselected", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadtexttool { + get { + object obj = ResourceManager.GetObject("ArtPadtexttool", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ArtPadundo { + get { + object obj = ResourceManager.GetObject("ArtPadundo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon0 { + get { + object obj = ResourceManager.GetObject("fileicon0", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon1 { + get { + object obj = ResourceManager.GetObject("fileicon1", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon10 { + get { + object obj = ResourceManager.GetObject("fileicon10", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon11 { + get { + object obj = ResourceManager.GetObject("fileicon11", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon12 { + get { + object obj = ResourceManager.GetObject("fileicon12", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon13 { + get { + object obj = ResourceManager.GetObject("fileicon13", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon14 { + get { + object obj = ResourceManager.GetObject("fileicon14", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon15 { + get { + object obj = ResourceManager.GetObject("fileicon15", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon16 { + get { + object obj = ResourceManager.GetObject("fileicon16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon17 { + get { + object obj = ResourceManager.GetObject("fileicon17", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon18 { + get { + object obj = ResourceManager.GetObject("fileicon18", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon19 { + get { + object obj = ResourceManager.GetObject("fileicon19", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon2 { + get { + object obj = ResourceManager.GetObject("fileicon2", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon3 { + get { + object obj = ResourceManager.GetObject("fileicon3", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon4 { + get { + object obj = ResourceManager.GetObject("fileicon4", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon5 { + get { + object obj = ResourceManager.GetObject("fileicon5", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon6 { + get { + object obj = ResourceManager.GetObject("fileicon6", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon7 { + get { + object obj = ResourceManager.GetObject("fileicon7", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon8 { + get { + object obj = ResourceManager.GetObject("fileicon8", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileicon9 { + get { + object obj = ResourceManager.GetObject("fileicon9", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap fileiconsaa { + get { + object obj = ResourceManager.GetObject("fileiconsaa", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap FloppyDriveIcon { + get { + object obj = ResourceManager.GetObject("FloppyDriveIcon", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized string similar to . + /// + internal static string hello { + get { + return ResourceManager.GetString("hello", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [ + /// "english" + /// "deutsch - in beta" + ///]. + /// + internal static string languages { + get { + return ResourceManager.GetString("languages", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [ + /// { + /// Name: "MUD Fundamentals", + /// Cost: 50, + /// Description: "Some basic commands for the terminal that'll help you out in the multi-user domain.", + /// Dependencies: null + /// }, + /// { + /// Name: "WM 4 Windows", + /// Cost: 150, + /// Description: "Display up to 4 simultaneous windows on-screen in a 2x2 grid.", + /// Dependencies: "window_manager" + /// }, + /// { + /// Name: "Virus Scanner", + /// Cost: 2000, + /// Description: "Being inside the multi-user domain comes with many risks, one of which being viruses. The Virus Scanner can m [rest of string was truncated]";. + /// + internal static string Shiftorium { + get { + return ResourceManager.GetString("Shiftorium", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [ + /// "http://downloads.michaeltheshifter.me/music/blockride.mp3", + /// "http://downloads.michaeltheshifter.me/music/nightcoding.mp3" + ///]. + /// + internal static string Songs { + get { + return ResourceManager.GetString("Songs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "{SUBMIT}":"Bestätigen", + /// + ///"{TERMINAL_TUTORIAL_1}":"Wilkommen zum ShiftOS Terminal. Hier wirst du die meiste Zeit in ShiftOS verbringen. + /// + ///Eine kurze Erklärung wie du das Terminal benutzt lautet wiefolgt. Du kannst das command 'sos.help' benutzen um eine Liste aller commands aufzurufen. Schreib es + ///einfach in das Terminal und drücke <enter> um alle commands anzuzeigen. + /// + ///Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Be [rest of string was truncated]";. + /// + internal static string strings_de { + get { + return ResourceManager.GetString("strings_de", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// "{SUBMIT}":"Submit", + /// + ///"{TERMINAL_TUTORIAL_1}":"Welcome to the ShiftOS terminal. This is where you will spend the bulk of your time within ShiftOS. + /// + ///A brief rundown of how to use the terminal is as follows. You can use the 'sos.help' command to show a list of all commands. Simply type it in and strike <enter> to view all commands. + /// + ///Commands can be sent arguments by specifying a key-value pair inside a {} block at the end of the command. For example: + /// + ///some.command{print:\"hello\"} + ///math.add{op1 [rest of string was truncated]";. + /// + internal static string strings_en { + get { + return ResourceManager.GetString("strings_en", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to { + /// Character: "sys", + /// Lines:[ + /// "Hello there, %user.", + /// "Welcome to ShiftOS.", + /// "This is an automated message to all new sentiences within the ShiftOS multi-user domain.", + /// "Before you can begin with ShiftOS, you'll need to know a few things about it.", + /// "One: Terminal command syntax.", + /// "Inside ShiftOS, the bulk of your time is going to be spent within the Terminal.", + /// "The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, ope [rest of string was truncated]";. + /// + internal static string sys_shiftoriumstory { + get { + return ResourceManager.GetString("sys_shiftoriumstory", resourceCulture); + } + } + } +} diff --git a/ShiftOS.WinForms/Properties/Resources.resx b/ShiftOS.WinForms/Properties/Resources.resx new file mode 100644 index 0000000..279a944 --- /dev/null +++ b/ShiftOS.WinForms/Properties/Resources.resx @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + ..\Resources\ArtPadcirclerubber.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadcirclerubberselected.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPaderacer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadfloodfill.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadlinetool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadmagnify.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadnew.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadopen.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadOval.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadpaintbrush.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadpencil.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadpixelplacer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadRectangle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadredo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadsave.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadsquarerubber.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadsquarerubberselected.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadtexttool.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ArtPadundo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon0.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon1.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon10.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon11.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon12.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon13.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon14.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon15.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon16.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon17.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon18.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon19.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon2.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon3.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon4.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon5.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon6.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon7.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon8.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileicon9.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\fileiconsaa.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\FloppyDriveIcon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\hello.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8 + + + ..\Resources\languages.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\Shiftorium.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\Songs.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\strings_de.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\strings_en.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + + ..\Resources\sys_shiftoriumstory.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Properties/Settings.Designer.cs b/ShiftOS.WinForms/Properties/Settings.Designer.cs new file mode 100644 index 0000000..e9093dc --- /dev/null +++ b/ShiftOS.WinForms/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ShiftOS.WinForms.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ShiftOS.WinForms/Properties/Settings.settings b/ShiftOS.WinForms/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ShiftOS.WinForms/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ShiftOS.WinForms/Resources/ArtPadOval.png b/ShiftOS.WinForms/Resources/ArtPadOval.png new file mode 100644 index 0000000..fceec4c Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadOval.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadRectangle.png b/ShiftOS.WinForms/Resources/ArtPadRectangle.png new file mode 100644 index 0000000..d9e2aa2 Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadRectangle.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadcirclerubber.png b/ShiftOS.WinForms/Resources/ArtPadcirclerubber.png new file mode 100644 index 0000000..f7331e2 Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadcirclerubber.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadcirclerubberselected.png b/ShiftOS.WinForms/Resources/ArtPadcirclerubberselected.png new file mode 100644 index 0000000..17f0416 Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadcirclerubberselected.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPaderacer.png b/ShiftOS.WinForms/Resources/ArtPaderacer.png new file mode 100644 index 0000000..051718c Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPaderacer.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadfloodfill.png b/ShiftOS.WinForms/Resources/ArtPadfloodfill.png new file mode 100644 index 0000000..487585c Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadfloodfill.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadlinetool.png b/ShiftOS.WinForms/Resources/ArtPadlinetool.png new file mode 100644 index 0000000..eb7329b Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadlinetool.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadmagnify.png b/ShiftOS.WinForms/Resources/ArtPadmagnify.png new file mode 100644 index 0000000..1310233 Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadmagnify.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadnew.png b/ShiftOS.WinForms/Resources/ArtPadnew.png new file mode 100644 index 0000000..e1dc34f Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadnew.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadopen.png b/ShiftOS.WinForms/Resources/ArtPadopen.png new file mode 100644 index 0000000..9dc232b Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadopen.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadpaintbrush.png b/ShiftOS.WinForms/Resources/ArtPadpaintbrush.png new file mode 100644 index 0000000..c26ac3b Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadpaintbrush.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadpencil.png b/ShiftOS.WinForms/Resources/ArtPadpencil.png new file mode 100644 index 0000000..cf230e2 Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadpencil.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadpixelplacer.png b/ShiftOS.WinForms/Resources/ArtPadpixelplacer.png new file mode 100644 index 0000000..4cc338b Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadpixelplacer.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadredo.png b/ShiftOS.WinForms/Resources/ArtPadredo.png new file mode 100644 index 0000000..ef42439 Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadredo.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadsave.png b/ShiftOS.WinForms/Resources/ArtPadsave.png new file mode 100644 index 0000000..5a31d05 Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadsave.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadsquarerubber.png b/ShiftOS.WinForms/Resources/ArtPadsquarerubber.png new file mode 100644 index 0000000..16391ef Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadsquarerubber.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadsquarerubberselected.png b/ShiftOS.WinForms/Resources/ArtPadsquarerubberselected.png new file mode 100644 index 0000000..5991242 Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadsquarerubberselected.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadtexttool.png b/ShiftOS.WinForms/Resources/ArtPadtexttool.png new file mode 100644 index 0000000..a669a6d Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadtexttool.png differ diff --git a/ShiftOS.WinForms/Resources/ArtPadundo.png b/ShiftOS.WinForms/Resources/ArtPadundo.png new file mode 100644 index 0000000..6484122 Binary files /dev/null and b/ShiftOS.WinForms/Resources/ArtPadundo.png differ diff --git a/ShiftOS.WinForms/Resources/FloppyDriveIcon.png b/ShiftOS.WinForms/Resources/FloppyDriveIcon.png new file mode 100644 index 0000000..09ad898 Binary files /dev/null and b/ShiftOS.WinForms/Resources/FloppyDriveIcon.png differ diff --git a/ShiftOS.WinForms/Resources/Shiftorium.txt b/ShiftOS.WinForms/Resources/Shiftorium.txt new file mode 100644 index 0000000..614c668 --- /dev/null +++ b/ShiftOS.WinForms/Resources/Shiftorium.txt @@ -0,0 +1,658 @@ +[ + { + Name: "MUD Fundamentals", + Cost: 50, + Description: "Some basic commands for the terminal that'll help you out in the multi-user domain.", + Dependencies: null + }, + { + Name: "Color Depth Dithering", + Cost: 1000, + Description: "Right now, if you try to display images on the screen, with a low color depth like we have, the image will be totally unrecognizable! With this upgrade, we can adapt a simple 1-dimensional dithering algorithm into the video driver to hopefully smooth out the transition between colors.", + }, + { + Name: "Color Depth Floyd-Steinberg Dithering", + Cost: 2000, + Description: "So your images look... alright... with the new dithering algorithm, but let's take things even further and get rid of the jagged lines in the image using a 2-dimensional algorithm called the Floyd-Steinberg algorithm. It'll sure make things look better.", + Dependencies: "color_depth_dithering" + }, + { + Name: "Color Depth 2 bits", + Cost: 2000, + Description: "We can only display black and white - 0 or 1 in binary. Let's take it even further by adding an extra bit to our binary notation - making black, white, dark gray and light gray possible!", + }, + { + Name: "Color Depth 4 bits", + Cost: 4000, + Description: "4 colors is nice - but let's take it even further. With our dithering algorithm in place, let's make our images even smoother by giving a 16-color palette to the video driver!", + Dependencies: "color_depth_2_bits;color_depth_dithering" + }, + { + Name: "Color Depth 6 bits", + Cost: 6000, + Description: "Let's extend our color range into the depths of 6 bits! This'll make up to 64 different shades of gray possible! We're getting even closer to modern-day color...", + Dependencies: "color_depth_4_bits" + }, + { + Name: "Color Depth 8 bits", + Cost: 8000, + Description: "What do you get when you bite your food? You get perhaps a yummy taste. What do you get when you take a byte of memory? 256 shades of gray, of course!", + Dependencies: "color_depth_6_bits" + }, + { + Name: "Color Depth 16 bits", + Cost: 16000, + Description: "If we were just given another byte... we could divide the two up into three channels and allow mixing and matching of the channels to create colors other than gray! Let's do it.", + Dependencies: "color_depth_8_bits" + }, + { + Name: "Color Depth 24 Bits", + Cost: 24000, + Description: "Having actual color is nice for our images as we can truly see detail in our images - but if we had a third byte, each channel could have up to 256 values - adding up to almost 17 million different colors! Our eyes can't even distinguish that many.", + Dependencies: "color_depth_16_bits" + }, + { + Name: "AL MUD Control Centre", + Cost: 75, + Dependencies: "mud_fundamentals;app_launcher", + Description: "Want to access your MUD profile, legions, jobs and shops, but don't want to open your Terminal? This upgrade is for you!" + }, + { + Name: "Kernel Coherence", + Cost: 10000, + Dependencies: "wm_free_placement", + Description: "With the free placement upgrade, you can place windows of any size anywhere on the desktop, which means theoretically you could add kernel coherence between ShiftOS and another GUI-based operating system and run their applications inside ShiftOS. This upgrade unlocks that.", + }, + { + Name: "Pong Increased Paddle Size", + Cost: 1000, + Dependencies: "pong_upgrade", + Description: "Having trouble keeping that darn ball in front of you? Well, with this upgrade, your paddle increases in height.... slightly.", + }, + { + Name: "WM 4 Windows", + Cost: 150, + Description: "Display up to 4 simultaneous windows on-screen in a 2x2 grid.", + Dependencies: "window_manager" + }, + { + Name: "Virus Scanner", + Cost: 2000, + Description: "Being inside the multi-user domain comes with many risks, one of which being viruses. The Virus Scanner can mitigate this threat by allowing you to scan the files on your system for any viruses and delete them for you.", + Dependencies: "mud_fundamentals;file_skimmer" + }, + { + Name: "AL Virus Scanner", + Cost: 150, + Description: "Add an App Launcher entry for the Virus Scanner.", + Dependencies: "virus_scanner;app_launcher" + }, + { + Name: "WM Panel Buttons", + Cost: 200, + Description: "Sometimes it's useful to have a list of windows that are open on your system so you can easily switch between them.", + Dependencies: "desktop;wm_unlimited_windows" + }, + { + Name: "AL Skin Loader", + Cost: 125, + Description: "Buy this upgrade to add an entry for the Skin Loader to the App Launcher.", + Dependencies: "app_launcher;skinning" + }, + { + Name: "Shift Panel Buttons", + Cost: 150, + Description: "Want to customize your panel buttons? This Shifter category is for you!", + Dependencies: "wm_panel_buttons" + }, + { + Name: "TextPad Lua Support", + Cost: 450, + Description: "Use TextPad to write Lua scripts!", + Dependencies: "textpad;file_skimmer", + }, + { + Name: "TextPad Python Support", + Cost: 450, + Description: "Use TextPad to write Python scripts!", + Dependencies: "textpad;file_skimmer", + }, + { + Name: "App Launcher", + Cost: 10000, + Description: "It may be expensive, but having an easy-access menu to all your apps is very valuable.", + Dependencies:"desktop;wm_unlimited_windows" + }, + { + Name: "MUD Cracker", + Cost: 500, + Description: "An application for cracking the current multi-user domain's admin password.", + Dependencies: "mud_fundamentals" + }, + { + Name: "AL MUD Cracker", + Cost: 100, + Description: "Add a launcher item for the MUD cracker.", + Dependencies: "mud_cracker;app_launcher" + }, + { + Name: "Textpad", + Cost: 2500, + Description: "\"Write, save and open a text document.\"", + Dependencies: "file_skimmer" + }, + { + Name: "Shifter", + Cost: 20000, + Description: "Tired of the green and black look that is ShiftOS's default skin? Use the Shifter to shift it your way.", + Dependencies: "desktop;wm_unlimited_windows", + }, + { + Name: "Name Changer", + Cost: 10000, + Description: "Are you not a linux person and want the terminal to be called Command Prompt? Well this app is for you!", + Dependencies: "shifter", + }, + { + Name: "AL Name Changer", + Cost: 200, + Description: "Launch the Name Changer from the app launcher.", + Dependencies: "name_changer", + }, + { + Name: "{UPGRADE_DEVELOPMENT}", + Cost: 20000, + Description: "Dont buy this upgrade yet, it does nothing", + Dependencies: "", + }, + { + Name: "AL Shifter", + Cost: 500, + Description: "Launch the Shifter from the app launcher.", + Dependencies: "app_launcher;shifter" + }, + { + Name: "AL Pong", + Cost: 100, + Description: "Launch Pong from the app launcher.", + Dependencies: "app_launcher" + }, + { + Name: "AL Textpad", + Cost: 250, + Description: "Write, save and open text documents from the App Launcher.", + Dependencies:"app_launcher;textpad" + }, + { + Name: "AL File Skimmer", + Cost: 200, + Description: "Open the File Skimmer from your App Launcher.", + Dependencies:"app_launcher;file_skimmer" + }, + { + Name: "WM Free Placement", + Cost: 2000, + Description: "Disable the grid system and allow windows to be freely positioned, moved, and overlapped.", + Dependencies: "wm_4_windows" + }, + { + Name: "Desktop", + Cost: 10000, + Description: "Use a fully customizable desktop in place of the terminal to control ShiftOS.", + Dependencies: "window_manager" + }, + { + Name: "Close command", + Cost: 150, + Description: "Add a win.close script to allow you to close windows.", + Dependencies: "mud_fundamentals", + }, + { + Name: "WM Unlimited Windows", + Cost: 5000, + Description: "Break the limit of windows that can be run. Perfect for high-maintenance tasks.", + Dependencies: "wm_free_placement;close_command" + }, + { + Name: "Minimize Command", + Cost: 1250, + Description: "Use the win.mini{id} command to minimize/restore windows.", + Dependencies: "desktop" + }, + { + Name: "Maximize Command", + Cost: 1250, + Description: "Use the win.max{id} command to maximize windows.", + Dependencies: "wm_titlebar;desktop;wm_free_placement" + }, + { + Name: "Close Button", + Cost: 1000, + Description: "Add a close button to the titlebar to easily close applications.", + Dependencies: "wm_titlebar;close_command" + }, + { + Name: "Minimize Button", + Cost: 1000, + Description: "Minimize windows using a button on the titlebar", + Dependencies: "wm_titlebar;minimize_command" + }, + { + Name: "Shiftorium Bulk Buy", + Cost: 2000, + Description:"Tired of typing shiftorium.buy{} all the time? This upgrade will add a bulk buy command which allows you to specify a comma-separated list of upgrades to buy." + }, + { + Name: "File Skimmer", + Cost: 500, + Description: "View the files on your computer using File Skimmer.", + Dependencies: null + }, + { + Name: "Maximize Button", + Cost: 500, + Description: "Maximize windows using a button on the titlebar", + Dependencies: "wm_titlebar;maximize_command" + }, + { + Name: "Clock", + Cost: 100, + Description: "Adds a script that shows the amount of seconds that have passed since Midnight. Use 'sys.clock' to activate it.", + Dependencies: "mud_fundamentals" + }, + { + Name: "WM Titlebar", + Cost: 250, + Description: "Display a title on each window.", + Dependencies: "window_manager" + }, + { + Name: "Clock Minutes", + Cost: 250, + Description: "Upgrade the sys.clock command to show minutes since midnight with a {type:\"m\"} argument.", + Dependencies: "clock" + }, + { + Name: "Clock Hours", + Cost: 225, + Description: "Upgrade the sys.clock command to show hours since midnight with a {type:\"h\"} argument.", + Dependencies: "clock_minutes" + }, + { + Name: "Clock AM and PM", + Cost: 75, + Description: "Change the clock to be 12-hour based, showing whether the current time is ante-meridiem or post-meridiem.", + Dependencies: "clock_hours", + }, + { + Name: "Full Precision Time", + Cost: 500, + Description: "Show full-precision time by default when using sys.clock.", + Dependencies: "clock_am_and_pm" + }, + { + Name: "Desktop Clock Widget", + Cost: 1000, + Description: "Add a widget to the desktop which shows the results of sys.clock as text on the desktop.", + Dependencies: "clock;desktop" + }, + { + Name: "AL MUD Chat", + Cost: 125, + Description: "Adds an app launcher entry for the MUD chat application.", + Dependencies: "mud_fundamentals;app_launcher" + }, + { + Name: "Draggable windows", + Cost: 400, + Description: "Allows you to drag windows around with the mouse using the title bar.", + Dependencies: "wm_titlebar;wm_free_placement" + }, + { + Name: "Window Manager", + Cost: 100, + Description: "Allows you to run two windows simultaneously within ShiftOS.", + Dependencies: "mud_fundamentals" + }, + { + Name: "Pong Upgrade", + Cost: 4000, + Description: "This upgrade makes pong double the codepoints you get from it so you can spend less time grinding!", + Dependencies: "mud_fundamentals;window_manager" + }, + { + Name: "Pong Upgrade 2", + Cost: 10000, + Description: "So you lost in pong, it must be sad to lose all the codepoints you've gained. With this upgrade you can save 1 percent of the loss, so at least you get something for losing!", + Dependencies: "mud_fundamentals;window_manager;pong_upgrade" + }, + { + Name: "WAV Player", + Cost: 10000, + Description: "Want to listen to the greatest tunes? Well get this app asap!", + Dependencies: "desktop;wm_free_placement" + }, + { + Name: "WAV Player AL", + Cost: 300, + Description: "Just another app launcher, making it easier to listen to your favorite songs!", + Dependencies: "desktop;wm_free_placement;wav_player" + }, + + //SHIFTER SUBCATEGORIES + + { + Name: "Shift Titlebar", + Cost: 100, + Description: "Customize the Titlebar within the Shifter.", + Dependencies: "shifter;wm_titlebar" + }, + { + Name: "Shift Title Text", + Cost: 100, + Description: "Title text looking boring? This upgrade lets you customize the font, color, and position of the Title Text.", + Dependencies: "shift_titlebar" + }, + { + Name: "Shift Window Borders", + Cost: 100, + Description: "Want to customize the look of the ShiftOS window borders? Buy this upgrade and you can customize the color and thickness of the borders.", + Dependencies: "shifter" + }, + { + Name: "Shift Desktop Panel", + Cost: 100, + Description: "Not liking your desktop panel the way it is? Buy this upgrade to allow you to change the color, height, and position of the desktop panel.", + Dependencies: "shifter;desktop" + }, + { + Name: "Shift App Launcher", + Cost: 100, + Description: "You've made your desktop panel look very nice, but your app launcher looks kinda out of place. This upgrade will fix that, allowing you to change the position, size, and appearance of the app launcher button.", + Dependencies: "shift_desktop_panel;app_launcher" + }, + { + Name: "Shift Panel Clock", + Cost: 100, + Dependencies: "shift_desktop_panel;desktop_clock_widget", + Description: "That clock is very simple - let's shift it! This upgrade allows you to customize the font and color of the panel clock." + }, + { + Name: "Shift Title Buttons", + Cost: 100, + Dependencies: "close_button;minimize_button;maximize_button;shift_titlebar", + Description: "Those title buttons look very similar and primitive - with this upgrade you can change the size, position, and color of each button." + }, + + //SKINNING STUFF + + { + Name: "Skinning", + Cost: 50000, + Description: "It may be expensive, but with this upgrade, you can break the limitations of using just solid colors and gradients for your skin and start using images!", + Dependencies: "shifter" + }, + + + //ARTPAD + { + Name: "Artpad", + Cost: 25000, + Description: "ArtPad is a very extensible tool that allows you to draw images within ShiftOS. Buy this upgrade to gain access to it through win.open{}!" + }, + { + Name: "AL Artpad", + Cost: 250, + Description: "Add an App Launcher Entry for Artpad!", + Dependencies: "artpad;app_launcher" + }, + + + + + //ARTPAD PIXEL LIMITS + + { + Name: "Artpad Pixel Limit 4", + Cost: 100, + Dependencies: "artpad", + Description: "Having ArtPad is great, but there's not much you can draw with only 2 pixels. Buy this upgrade to increase the breathing room your imagination can have." + }, + { + Name: "Artpad Pixel Limit 8", + Cost: 150, + Dependencies: "artpad_pixel_limit_4", + Description: "With a 4 pixel limit, you can do some simple patterns and such, but it's still not great. Buy this upgrade to double the pixel limit and add even more possibilities!" + }, + { + Name: "Artpad Pixel Limit 16", + Cost: 200, + Dependencies:"artpad_pixel_limit_8", + Description: "Now we can have 8-pixel images, but we still can't do much more than simple patterns and icons. Use this upgrade to double the max image size yet again and allow even more images!" + }, + { + Name: "Artpad Pixel Limit 64", + Cost: 600, + Dependencies: "artpad_pixel_limit_16", + Description: "Alright. Now it's time to kick it into high-gear. Patterns and icons are fun, but let's increase the image size even more to allow higher-detail icons/patterns and small sprites!" + }, + { + Name: "Artpad Pixel Limit 256", + Cost: 1000, + Dependencies: "artpad_pixel_limit_64", + Description: "We can create high resolution icons and patterns, but we still can't really do too much more than that. Buy this upgrade and you'll be able to have up to 256 pixels in an image!" + }, + { + Name: "Artpad Pixel Limit 1024", + Cost: 1250, + Dependencies: "artpad_pixel_limit_256", + Description: "Let's make things even higher quality! With this upgrade, we'll be able to increase the image size by 4 times! ArtPad is really starting to advance." + }, + { + Name: "Artpad Pixel Limit 4096", + Cost: 4800, + Dependencies: "artpad_pixel_limit_1024", + Description: "Now we can do 1024-pixel images, but how about increasing the limit by 4 times yet again? That'll leave even more room for imagination and drawings!" + }, + { + Name: "Artpad Pixel Limit 16384", + Cost: 19200, + Dependencies: "artpad_pixel_limit_4096", + Description: "We're ever-so-slightly approaching limitless possibilities. With this upgrade, images in ArtPad will be able to have up to 16384 pixels. We can make desktop backgrounds for small monitors!" + }, + { + Name: "Artpad Pixel Limit 65536", + Cost: 76800, + Dependencies: "artpad_pixel_limit_16384", + Description: "Wow! This might be the last time we'll have to deal with pixel limits. It's amazing how far we've came since 2-pixel gradients. Now let's go even further." + }, + { + Name: "Artpad Limitless Pixels", + Cost: 100000, + Dependencies: "artpad_pixel_limit_65536", + Description: "We have a pretty high pixel limit, but with this upgrade, pixel limits are no more! With limitless pixels comes limitless creativity. Have fun!" + }, + + { + Name: "AL Shutdown", + Cost: 300, + Dependencies: "app_launcher", + Description: "Want to shut down ShiftOS from your app launcher? This is the perfect upgrade for you." + }, + + { + Name: "Help Description", + Id: "help_description", + Cost: 150, + Dependencies: "", + Description: "Dont understand what some commands do in the terminal? With this upgrade, it adds a handy little description to almost every command when you run the command sos.help!" + }, + { + Name: "Help Usage", + Cost: 150, + Dependencies: "help_description", + Description: "You got descriptions on what some commands do in the terminal, but wouldn't it be handy to also see what the proper usage is for? Now you can with this upgrade!" + }, + + //ARTPAD TOOLS + { + Name: "Artpad Pixel Placer", + Dependencies: "artpad", + Cost: 750, + Description: "This tool extends the Pixel Setter to allow you to use your mouse to place pixels by clicking on the canvas." + }, + { + Name: "Artpad PP Movement Mode", + Dependencies: "artpad_pixel_placer", + Cost: 500, + Description: "This tool extends the Pixel Placer and allows you to drag your mouse while the button is held down to draw pixels on the canvas." + }, + { + Name: "Artpad Pencil", + Dependencies: "artpad_pp_movement_mode", + Cost: 1000, + Description: "Using the power of the Pixel Placer's movement mode, the Pencil can draw strokes of different thicknesses. Most tools will extend this tool." + }, + { + Name: "Artpad Paintbrush", + Cost: 1000, + Dependencies: "artpad_pencil", + Description: "The Paintbrush allows you to draw more thick strokes on the canvas than the Pencil does." + }, + { + Name: "Artpad Eraser", + Cost: 500, + Dependencies: "artpad_paintbrush;artpad_undo", + Description: "Undo not effective? Want to only erase a select bit of the canvas? Use this tool to get an eraser!" + }, + { + Name: "Artpad Load", + Cost: 350, + Dependencies: "artpad;file_skimmer", + Description: "Want to start off from an existing masterpiece? This tool is for you. Select any .pic file and it'll be loaded onto the canvas!" + }, + { + Name: "Artpad Line Tool", + Cost: 800, + Dependencies: "artpad_pp_movement_mode", + Description: "Using the power of linear interpolation and the Pixel Placer Movement Mode, the Line tool can help you draw straight lines from one point to another." + }, + { + Name: "Artpad Rectangle Tool", + Cost: 400, + Dependencies: "artpad_line_tool", + Description: "With the line tool we are able to figure out the distance from point A to point B. Let's use that basic framework to draw rectangles!" + }, + { + Name: "Artpad Oval Tool", + Cost: 401, + Dependencies: "artpad_line_tool", + Description: "Want to draw some ovals? With this tool, you can! It uses the data from the line tool to construct a circle as you drag the mouse." + }, + { + Name: "Artpad Fill Tool", + Cost: 1000, + Dependencies: "artpad_pixel_placer", + Description: "The Pixel Placer is useful because we can grab pixel coordinates from the mouse, and determine how we can fill the area with a certain color - let's do that!" + }, + { + Name: "Artpad Text Tool", + Cost: 1500, + Dependencies: "artpad_pixel_placer", + Description: "Want to place text on your canvas? Use the Text Tool to do so!" + }, + { + Name: "Artpad New", + Dependencies: "artpad", + Cost: 500, + Description: "Made a mistake? Want a blank canvas? This tool gives you just that." + }, + { + Name: "Artpad Open", + Dependencies: "artpad;file_skimmer", + Cost: 600, + Description: "Want to edit an artpad picture? If you have the File Skimmer, then this tool is for you!" + }, + { + Name: "Artpad Save", + Dependencies: "artpad;file_skimmer", + Cost: 1000, + Description: "Have you been working extra-hard on a masterpiece in ArtPad and want to save? This upgrade is a must-have!" + }, + { + Name: "Artpad Undo", + Dependencies: "artpad_new", + Cost: 59, + Description: "Mistakes happen - but if you have to clear the canvas every time you mess up one single pixel it can get annoying. This tool will help mitigate that - you'll be able to make your last change magically disappear!" + }, + { + Name: "Artpad Redo", + Dependencies: "artpad_undo", + Cost: 50, + Description: "Did you change your mind about that mistake you've undone? Want it back? This tool is for you. Note that the second you add something new after an undo, the undone change is wiped forever!" + }, + + + + //ARTPAD COLOR PALETTES + + { + Name: "Artpad 4 Color Palettes", + Dependencies: "artpad", + Cost: 150, + Description: "Want to add an extra 2 colors to your palette? Buy this upgrade to do so!" + }, + { + Name: "Artpad 8 Color Palettes", + Dependencies: "artpad_4_color_palettes", + Cost: 400, + Description: "Want to add an extra 4 color palette entries to your Artpad to have even more colors used at once? Buy this upgrade, and that will happen!" + }, + { + Name: "Artpad 16 Color Palettes", + Dependencies: "artpad_8_color_palettes", + Cost: 600, + Description: "With this upgrade, you can have up to 16 different colors in your ArtPad palette. Good for drawing intense scenes without constantly selecting different colors." + }, + { + Name: "Artpad 32 Color Palettes", + Dependencies: "artpad_16_color_palettes", + Cost: 850, + Description: "Having 16 different color palettes is nice, but you know what's nicer? Having 32!" + }, + { + Name: "Artpad 64 Color Palettes", + Dependencies: "artpad_32_color_palettes", + Cost: 1700, + Description: "Well then. We have 32 color palettes - let's double that." + }, + { + Name: "Artpad 128 Color Palettes", + Dependencies: "artpad_128_color_palettes", + Cost: 3400, + Description: "With this upgrade we'll be able to have 128 simultaneous colors in our palette. It may get a bit glitchy though... maybe a window manager upgrade could help?" + }, + + + + //SHIFTORIUM UPGRADES FOR THE SHIFTORIUM ITSELF + + { + Name: "Shiftorium GUI", + Cost: 100, + Description: "You may spend lots of time in your terminal - executing scripts, chatting, etc, but why make it so difficult and repetitive to upgrade your system? With this upgrade, a GUI will be added to the Shiftorium, and will be accessible using win.open{app:\"shiftorium\"}." + }, + { + Name: "AL Shiftorium", + Cost: 250, + Dependencies: "shiftorium_gui;app_launcher", + Description: "Add an App Launcher Entry for the Shiftorium!" + }, + { + Name: "Shiftorium GUI Codepoints Display", + Cost: 2500, + Dependencies: "shiftorium_gui", + Description: "In the shiftorium GUI but dont know what you can spend because you can't see how many code points are on hand? Well shop easy, because with this upgrade that is now possible! You have to restart the shiftorium for it to work." + } + +] \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/Songs.txt b/ShiftOS.WinForms/Resources/Songs.txt new file mode 100644 index 0000000..1b7daff --- /dev/null +++ b/ShiftOS.WinForms/Resources/Songs.txt @@ -0,0 +1,4 @@ +[ + "http://downloads.michaeltheshifter.me/music/blockride.mp3", + "http://downloads.michaeltheshifter.me/music/nightcoding.mp3" +] \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/fileicon0.bmp b/ShiftOS.WinForms/Resources/fileicon0.bmp new file mode 100644 index 0000000..e9f684e Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon0.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon1.bmp b/ShiftOS.WinForms/Resources/fileicon1.bmp new file mode 100644 index 0000000..ba26acb Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon1.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon10.bmp b/ShiftOS.WinForms/Resources/fileicon10.bmp new file mode 100644 index 0000000..81505bd Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon10.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon11.bmp b/ShiftOS.WinForms/Resources/fileicon11.bmp new file mode 100644 index 0000000..6fb6f6a Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon11.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon12.bmp b/ShiftOS.WinForms/Resources/fileicon12.bmp new file mode 100644 index 0000000..a345c0d Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon12.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon13.bmp b/ShiftOS.WinForms/Resources/fileicon13.bmp new file mode 100644 index 0000000..5fb0a4b Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon13.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon14.bmp b/ShiftOS.WinForms/Resources/fileicon14.bmp new file mode 100644 index 0000000..f52f6a1 Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon14.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon15.bmp b/ShiftOS.WinForms/Resources/fileicon15.bmp new file mode 100644 index 0000000..bb0e029 Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon15.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon16.bmp b/ShiftOS.WinForms/Resources/fileicon16.bmp new file mode 100644 index 0000000..8ae66eb Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon16.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon17.bmp b/ShiftOS.WinForms/Resources/fileicon17.bmp new file mode 100644 index 0000000..be1e63d Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon17.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon18.bmp b/ShiftOS.WinForms/Resources/fileicon18.bmp new file mode 100644 index 0000000..c12a51f Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon18.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon19.bmp b/ShiftOS.WinForms/Resources/fileicon19.bmp new file mode 100644 index 0000000..45f03e1 Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon19.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon2.bmp b/ShiftOS.WinForms/Resources/fileicon2.bmp new file mode 100644 index 0000000..c4ffe12 Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon2.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon3.bmp b/ShiftOS.WinForms/Resources/fileicon3.bmp new file mode 100644 index 0000000..543a162 Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon3.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon4.bmp b/ShiftOS.WinForms/Resources/fileicon4.bmp new file mode 100644 index 0000000..d55037b Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon4.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon5.bmp b/ShiftOS.WinForms/Resources/fileicon5.bmp new file mode 100644 index 0000000..d72cd82 Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon5.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon6.bmp b/ShiftOS.WinForms/Resources/fileicon6.bmp new file mode 100644 index 0000000..b604e09 Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon6.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon7.bmp b/ShiftOS.WinForms/Resources/fileicon7.bmp new file mode 100644 index 0000000..8d8573e Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon7.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon8.bmp b/ShiftOS.WinForms/Resources/fileicon8.bmp new file mode 100644 index 0000000..7dc8cb8 Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon8.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileicon9.bmp b/ShiftOS.WinForms/Resources/fileicon9.bmp new file mode 100644 index 0000000..fb7f15d Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileicon9.bmp differ diff --git a/ShiftOS.WinForms/Resources/fileiconsaa.png b/ShiftOS.WinForms/Resources/fileiconsaa.png new file mode 100644 index 0000000..291770a Binary files /dev/null and b/ShiftOS.WinForms/Resources/fileiconsaa.png differ diff --git a/ShiftOS.WinForms/Resources/hello.txt b/ShiftOS.WinForms/Resources/hello.txt new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/ShiftOS.WinForms/Resources/hello.txt @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/languages.txt b/ShiftOS.WinForms/Resources/languages.txt new file mode 100644 index 0000000..ca34308 --- /dev/null +++ b/ShiftOS.WinForms/Resources/languages.txt @@ -0,0 +1,4 @@ +[ + "english" + "deutsch - in beta" +] \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/strings_de.txt b/ShiftOS.WinForms/Resources/strings_de.txt new file mode 100644 index 0000000..3cd11e4 --- /dev/null +++ b/ShiftOS.WinForms/Resources/strings_de.txt @@ -0,0 +1,227 @@ +{ + "{SUBMIT}":"Bestätigen", + +"{TERMINAL_TUTORIAL_1}":"Wilkommen zum ShiftOS Terminal. Hier wirst du die meiste Zeit in ShiftOS verbringen. + +Eine kurze Erklärung wie du das Terminal benutzt lautet wiefolgt. Du kannst das command 'sos.help' benutzen um eine Liste aller commands aufzurufen. Schreib es +einfach in das Terminal und drücke um alle commands anzuzeigen. + +Commands können mit argumenten versehen werden, indem du ein key-value Paar in einem {} Block hinter dem command angibst. Zum Beispiel: + +some.command{print:\"Guten Tag!\"} +math.add{op1:1, op2:2} +set.value{key:\"somekey\", value:true} + +Dir wurden 50 Codepoints als Startgeld gegeben - benutz dein Wissen um mit ihnen das MUD Fundamentals Shiftorium Upgrade zu kaufen. Das ganze mit dem Terminal. +Um das MUD Fundamentals Upgrade zu kaufen, tippe shiftorium.buy{upgrade:\"mud_fundamentals\"} in das Terminal. Das ganze funktioniert auch mit anderen Upgrades die +du kaufen willst, ersetze mud_fundamentals einfach mit einem anderen Upgradenamen. +", + + + "{TERMINAL_TUTORIAL_2}":"Du hast den Test erfolgreich bestanden. ShiftOS wird seine Grundfunktionen installieren.", + "{ABOUT}":"Über", + "{START_SYSTEM_SCAN}":"Starte systemweiten Scan", + "{SCAN_HOME}":"Scanne 0:/home", + "{SCAN_SYSTEM}":"Scanne 0:/system", + "{RESULTS}":"Ergebnisse", + "{VIRUSSCANNER_ABOUT}":"Wilkommen zum ShiftOS Virenscanner. + +Der ShiftOS Virenscanner ist ein Werkzeug welches dir erlaubt jede/s Datei oder System zu scannen und herauszufinden +ob es ein Virus ist. Wenn ein Virus erkannt wird, hast do die Option ihn danach zu löschen indem du 'Entfernen' +klickst. + +Wenn eine Systemdatei von dem Virenscanner erkannt wird, wird sie ersetzt.", + "{PLAY}":"Spielen", + "{APPLICATIONS}":"Anwendungen", + "{TERMINAL}":"Terminal", + "{PONG}":"Pong", + "{CODEPOINTS}":"Codepoints", + "{SHIFTORIUM}":"Shiftorium", + "{HACK}":"Hack", + "{SHIFTER}":"Shifter", + "{MUD_SHORT}":"MUD", + "{MUD}":"Multi-user domain", + "{DESKTOP}":"Desktop", + "{WINDOW}":"Fenster", + "{WINDOW_MANAGER}":"Fenstermanager", + "{UPGRADE}":"Upgrade", + "{UPGRADES}":"Upgrades", + "{APPLICATION}":"Anwendung", + "{SCRIPT}":"Skript", + "{ERROR}":"Error", + "{SCRIPTS}":"Skripts", + "{NULL}":"null", + "{ID}":"ID Num", + "{SYSTEM_INITIATED}":"System initialisiert", + "{PASSWORD}":"Passwort", + "{CRACK}":"Crack", + "{ARTPAD_UNDO_ERROR}":"Artpad - Fehler rückgängig machen", + "{ARTPAD_NEXT_STEP_WILL_KILL_CANVAS_JUST_FLIPPING_CLICK_NEW}":"You cannot undo the previous action as it would delete the canvas. If you'd like to clear the canvas, click New.", + "{ARTPAD_REDO_ERROR}":"Artpad - Wiederherstellungserror", + "{ARTPAD_NOTHING_TO_REDO}":"Artpad kann nichts wiederherstellen! Behalte im Kopf, dass wenn du etwas rückgängig machst und dann zeichnest, das der Verlauf gelöscht wird.", + "{ARTPAD_MAGNIFIER_ERROR}": "Artpad - Magnifier Error", + "{ARTPAD_MAGNIFICATION_ERROR_EXP_2}": "Artpad kann nicht weiter ranzoomen!", + "{ARTPAD_MAGNIFICATION_ERROR_EXP}": "Artpad kann nicht weiter ranzoomen. Naja, es kann, aber es will nicht.", + "{SHUTDOWN}":"Herunterfahren", + "{CONNECTING_TO_MUD}":"Verbinde mit dem Multi-User Domain...", + "{READING_FS}":"Lese Dateisystem...", + "{INIT_KERNEL}":"Initialisiere Kernel...", + "{START_DESKTOP}":"Starte Desktop-Session...", + "{DONE}": "Fertig", + "{READING_CONFIG}":"Lese Konfiguration...", + "{ID_TAKEN}":"ID Existiert bereits! Benutze chat.join um diesen Chat zu betreten.", + "{CHAT_NOT_FOUND_OR_TOO_MANY_MEMBERS}":"Dieser Chat existiert entweder nicht oder er ist voll.", + "{CHAT_NOT_FOUND_OR_NOT_IN_CHAT}":"Du bist zurzeit nicht in diesem Chat.", + "{CHAT_PLEASE_PROVIDE_VALID_CHANNEL_DATA}":"Du hast keine gültige Chat-Metadata angegeben! Bitte benutze chat.create{id:\"deine_id\", name:\"Dein Chatname\", topic:\"Thema deines Channels\"}.", + "{UPGRADE_PROGRESS}":"Upgrade progress""Upgrade Fortschritt", + "{WIN_PROVIDEID}":"Bitte gib eine gültige Fenster ID von win.list an.", + "{WIN_CANTCLOSETERMINAL}":"Du kannst dieses Terminal nicht schließen.", + "{WELCOME_TO_SHIFTORIUM}":"Willkommen zum Shiftorium!", + "{SUCCESSFULLY_CREATED_CHAT}":"Chat erfolgreich erstellt. Benutze chat.join{id:\"chat_id_hier\"} um ihm beizutreten.", + "{CHAT_HAS_JOINED}":"hat den Chat betreten.", + "{HAS_LEFT_CHAT}":"hat den Chat verlassen.", + "{SHIFTORIUM_EXP}":"The Shiftorium is your one-stop-shop for ShiftOS system enhancements, upgrades and applications. + + You can buy upgrades in the Shiftorium using a currency called Codepoints, which you can earn by doing various tasks within ShiftOS, such as playing Pong, stealing them from other users, and finding ways to make your own. It's up to you how you get your Codepoints. + + You can then use them to buy new applications, features, enhancements and upgrades for ShiftOS that make the user experience a lot better. Be careful though, buying too many system enhancements without buying new ways of earning Codepoints first can leave you in the dust and unable to upgrade the system. + + Anyways, feel free to browse from our wonderful selection! You can see a list of available upgrades on the left, as well as a progress bar showing how much you've upgraded the system compared to how much you still can.", + "{PONG_WELCOME}":"Welcome to Pong.", + "{PONG_DESC}":"Pong is an arcade game where your goal is to get the ball past the opponent paddle while keeping it from getting past yours. + + In ShiftOS, Pong is modified - you only have one chance, the game is divided into 60 second levels, and you can earn Codepoints by surviving a level, and beating the opponent.", + "{NO_APP_TO_OPEN}":"No app found for this file!", + "{NO_APP_TO_OPEN_EXP}":"File Skimmer could not find an application that can open this file.", + "{CLIENT_DIAGNOSTICS}":"Client diagnostics", + "{GUID}":"GUID", + "{CLIENT_DATA}":"Client data", + "{CLOSE}":"Close", + "{LOAD_DEFAULT}":"Load default", + "{IMPORT}":"Import", + "{EXPORT}":"Export", + "{APPLY}":"Apply", + "{TEMPLATE}":"Template", + "{H_VEL}":"Horizontal velocity", + "{V_VEL}":"Vertical velocity", + "{LEVEL}":"Level", + "{UPGRADE_DEVELOPMENT}":"Development Upgrade", + "{UPGRADE_DEVELOPMENT_DESCRIPTION}":"Development Upgrade Don't Buy", + "{SECONDS_LEFT}":"seconds left", + "{CASH_OUT_WITH_CODEPOINTS}":"Cash out with your codepoints", + "{PONG_PLAY_ON_FOR_MORE}":"Play on for more!", + "{YOU_REACHED_LEVEL}":"You've reached level", + "{PONG_BEAT_AI_REWARD}":"Reward for beating AI (CP)", + "{PONG_BEAT_AI_REWARD_SECONDARY}":"Codepoints for beating AI:", + "{CODEPOINTS_FOR_BEATING_LEVEL}":"Codepoints for beating level", + "{YOU_WON}":"You won", + "{YOU_LOSE}":"You lose", + "{TRY_AGAIN}":"Try again", + "{CODEPOINTS_SHORT}":"CP", + "{TERMINAL_FORMATTING_DRIVE}":"Formatting drive... %percent %", + "{INSTALLING_SHIFTOS}":"Installing ShiftOS on %domain.", + "{YOU_MISSED_OUT_ON}":"You missed out on", + "{BUT_YOU_GAINED}":"But you gained", + "{PONG_PLAYON_DESC}":"Or do you want to try your luck on the next level to increase your reward?", + "{PONG_CASHOUT_DESC}":"Would you like the end the game now and cash out with your reward?", + "{INITIAL_H_VEL}":"Initial H Vel", + "{INITIAL_V_VEL}":"Initial V Vel", + "{INC_H_VEL}":"Increment H Vel", + "{INC_V_VEL}":"Increment V Vel", + "{MULTIPLAYER_ONLY}":"Program not compatible with single-user domain.", + "{MULTIPLAYER_ONLY_EXP}":"This program cannot run within a single-user domain. You must be within a multi-user domain to use this program.", + "{SHIFTER_SKIN_APPLIED}":"Shifter - Settings applied!", + "{YOU_HAVE_EARNED}":"You have earned", + "{CREATING_PATH}":"Creating directory: %path", + "{CREATING_FILE}":"Creating file: %path", + "{SHIFTORIUM_HELP_DESCRIPTION}": "Help Descriptions", + "{CREATING_USER}":"Creating user %username", + "{SEPERATOR}":" - ", + "{NAMESPACE}":"Namespace ", + "{COMMAND}": "| Command ", + "{SHIFTOS_HAS_BEEN_INSTALLED}":"ShiftOS has been installed on %domain.", + "{WARN}": "WARN: ", + "{ERROR}": "!ERROR! ", + "{OBSOLETE_CHEATS_FREECP}": "The %ns.%cmd command is obsolete and has been replaced with %newcommand", + "{REBOOTING_SYSTEM}":"Rebooting system in %i seconds...", + "{ERROR_ARGUMENT_REQUIRED}": "You must supply an %argument value", + "{ERROR_ARGUMENT_REQUIRED_NO_USAGE}": "You are missing some arguments.", + "{GENERATING_PATHS}":"Generating paths...", + "{ERROR_COMMAND_WRONG}": "Check your syntax and try again", + "{LOGIN_EXP}": "Login as the admin of the multi user domain.", + + "{USAGE}": "Usage: ", + + "{NAMESPACE_SOS_DESCRIPTION}":"The ShiftOS Namespace", + "{COMMAND_HELP_USAGE}":"%ns.%cmd{[topic:]}", + "{COMMAND_HELP_DESCRIPTION}":"Lists all commands", + "{COMMAND_SOS_SHUTDOWN_USAGE}":"%ns.%cmd", + "{COMMAND_SOS_SHUTDOWN_DESCRIPTION}":"Saves and shuts down ShiftOS", + "{COMMAND_SOS_STATUS_USAGE}":"%ns.%cmd", + "{COMMAND_SOS_STATUS_DESCRIPTION}":"Displays how many codepoints you have", + "{COMMAND_DEV_CRASH_USAGE}":"%ns.%cmd", + "{COMMAND_DEV_CRASH_DESCRIPTION}":"Shuts down ShiftOS forcefully", + "{COMMAND_DEV_UNLOCKEVERYTHING_USAGE}":"%ns.%cmd", + "{COMMAND_DEV_UNLOCKEVERYTHING_DESCRIPTION}":"Unlocks all shiftorium upgrades", + "{COMMAND_DEV_FREECP_USAGE}":"%ns.%cmd{[amount:1000]}", + "{COMMAND_DEV_FREECP_DESCRIPTION}":"Gives [ammount] codepoints", + "{COMMAND_TRM_CLEAR_USAGE}":"%ns.%cmd", + "{COMMAND_TRM_CLEAR_DESCRIPTION}":"Clears the terminal", + "{COMMAND_SHIFTORIUM_BUY_USAGE}":"%ns.%cmd{upgrade:}", + "{COMMAND_SHIFTORIUM_BUY_DESCRIPTION}":"Buys [upgrade]", + "{COMMAND_SHIFTORIUM_LIST_USAGE}":"%ns.%cmd", + "{COMMAND_SHIFTORIUM_LIST_DESCRIPTION}":"Lists the upgrades that you can get", + "{COMMAND_SHIFTORIUM_INFO_USAGE}":"%ns.%cmd{upgrade:}", + "{COMMAND_SHIFTORIUM_INFO_DESCRIPTION}":"Gives a description about an upgrade", + "{COMMAND_DEV_MULTARG_USAGE}":"%ns.%cmd{id:,name:,type:}", + "{COMMAND_DEV_MULTARG_DESCRIPTION}":"A command which requiers multiple arguments", + + "{ERR_COMMAND_NOT_FOUND}":"Command not found.", + "{MUD_ERROR}":"MUD error", + + "{PROLOGUE_NO_USER_DETECTED}":"No user detected. Please enter a username.", + "{PROLOGUE_BADUSER}":"Invalid username detected.", + "{PROLOGUE_NOSPACES}":"Usernames must not contain spaces.", + "{PROLOGUE_PLEASE_ENTER_USERNAME}":"Please enter a valid username. Blank usernames are not permitted.", + + "{SHIFTORIUM_NOTENOUGHCP}":"Not enough codepoints: ", + "{SHIFTORIUM_TRANSFERRED_FROM}":"Received Codepoints from", + "{SHIFTORIUM_TRANSFERRED_TO}":"Transferred Codepoints to", + + "{SE_SAVING}":"Saving game to disk", + "{SE_TIPOFADVICE}":"Tip of advice: ShiftOS will always save your game after big events or when you shut down the operating system. You can also invoke a save yourself using 'sos.save'.", + + "{STORY_WELCOME}":"Welcome to ShiftOS", + "{STORY_SENTIENCEUNKNOWN}":"Your sentience is currently unknown. Please strike the Enter key to prove you are alive.", + + "{SENTIENCE_BASIC}":"Sentience: Basic - User can respond to basic instructions.", + "{SENTIENCE_BASICPLUS}":"Sentience: Basic+ - User can invoke commands within the ecosystem.", + "{SENTIENCE_POSSIBLEHUMAN}":"Sentience: Possible human - user can perform actions based on a choice.", + "{SENTIENCE_POSSIBLEHUMANPLUS}":"Sentience: Possible human+ - user can infer, and can pass arguments.", + "{SENTIENCE_HUMAN}":"Sentience: Human. Thanks for your patience.", + "{SENTIENCE_INVALIDPASSWORD}":"The password you entered is invalid.", + + "{ARGS_PASSWORD}":"password", + + "{SHIFTOS_PLUS_MOTTO}":"ShiftOS, Shift it YOUR way.", + "{SHIFTOS_VERSION_INFO}":"ShiftOS Version: ", + "{USER_NAME}":"Username", + "{DISCOURSE_INTEGRATION}":"Discourse Integration", + "{SYSTEM_NAME}":"System Name", + "{USER_INFO}":"User Information", + "{SELECT_LANG}":"Select language", + "{WELCOME_TO_SHIFTOS}":"Welcome to ShiftOS Alpha!", + "{CREATE}":"Create", + "{INSTALL}":"Install", + "{ALIAS}":"Alias:", + "{OBSOLETE_SYS_SHUTDOWN}":"sys.shutdown is obsolete", + "{PY_EXCEPTION}":"There was an error running python code.", + "{LUA_ERROR}":"There was an error running lua code.", + + "{TERMINAL_NAME}":"Terminal", + "{ARTPAD_NAME}":"Artpad", + "{PONG_NAME}":"Pong", + "{WAV_PLAYER_NAME}":"WAV Player", + "{SHIFTORIUM_NAME}":"Shiftorium", + "{TEXTPAD_NAME}":"TextPad", +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/strings_en.txt b/ShiftOS.WinForms/Resources/strings_en.txt new file mode 100644 index 0000000..267724a --- /dev/null +++ b/ShiftOS.WinForms/Resources/strings_en.txt @@ -0,0 +1,226 @@ +{ + "{SUBMIT}":"Submit", + +"{TERMINAL_TUTORIAL_1}":"Welcome to the ShiftOS terminal. This is where you will spend the bulk of your time within ShiftOS. + +A brief rundown of how to use the terminal is as follows. You can use the 'sos.help' command to show a list of all commands. Simply type it in and strike to view all commands. + +Commands can be sent arguments by specifying a key-value pair inside a {} block at the end of the command. For example: + +some.command{print:\"hello\"} +math.add{op1:1,op2:2} +set.value{key:\"somekey\", value:true} + +You have been given 50 Codepoints - use your knowledge to use them to buy the MUD Fundamentals Shiftorium Upgrade using the terminal. +To buy MUD Fundamentals, type shiftorium.buy{upgrade:\"mud_fundamentals\"} This is also true for any other thing you want to buy from the shiftorium, just replace mud_fundementals with any other upgrade id. +", + + + "{TERMINAL_TUTORIAL_2}":"You successfully passed the test. ShiftOS will now start installing it's base functionality.", + "{ABOUT}":"About", + "{HIGH_SCORES}":"High scores", + "{PONG_VIEW_HIGHSCORES}":"See the high scores", + "{PONG_HIGHSCORE_EXP}":"Want to see what other users have gotten?", + "{START_SYSTEM_SCAN}":"Start system-wide scan", + "{SCAN_HOME}":"Scan 0:/home", + "{SCAN_SYSTEM}":"Scan 0:/system", + "{RESULTS}":"Results", + "{VIRUSSCANNER_ABOUT}":"Welcome to the ShiftOS virus scanner. + +The ShiftOS virus scanner is a utility that allows you to scan any file on your system and see if it is a virus. If a virus is detected, you have the option to delete it after the scan by clicking 'Remove'. + +If a system file is deleted by the virus scanner, it will be replaced.", + "{PLAY}":"Play", + "{APPLICATIONS}":"Applications", + "{TERMINAL}":"Terminal", + "{PONG}":"Pong", + "{CODEPOINTS}":"Codepoints", + "{SHIFTORIUM}":"Shiftorium", + "{HACK}":"Hack", + "{SHIFTER}":"Shifter", + "{MUD_SHORT}":"MUD", + "{MUD}":"Multi-user domain", + "{DESKTOP}":"Desktop", + "{WINDOW}":"Window", + "{WINDOW_MANAGER}":"Window manager", + "{UPGRADE}":"Upgrade", + "{UPGRADES}":"Upgrades", + "{APPLICATION}":"Application", + "{SCRIPT}":"Script", + "{ERROR}":"Error", + "{SCRIPTS}":"Scripts", + "{NULL}":"null", + "{ID}":"ID Num", + "{SYSTEM_INITIATED}":"System initiated", + "{PASSWORD}":"Password", + "{CRACK}":"Crack", + "{ARTPAD_UNDO_ERROR}":"Artpad - Undo error", + "{ARTPAD_NEXT_STEP_WILL_KILL_CANVAS_JUST_FLIPPING_CLICK_NEW}":"You cannot undo the previous action as it would delete the canvas. If you'd like to clear the canvas, click New.", + "{ARTPAD_REDO_ERROR}":"Artpad - Redo error", + "{ARTPAD_NOTHING_TO_REDO}": "Artpad has nothing to redo! Remember that when you undo and then draw on the canvas, all redo history is wiped.", + "{ARTPAD_MAGNIFIER_ERROR}": "Artpad - Magnifier error", + "{ARTPAD_MAGNIFICATION_ERROR_EXP_2}": "Artpad cannot zoom out any further as the canvas would disappear!", + "{ARTPAD_MAGNIFICATION_ERROR_EXP}": "Artpad cannot zoom any further into the canvas. Well, it can, it just doesn't want to.", + "{SHUTDOWN}":"Shutdown", + "{CONNECTING_TO_MUD}":"Connecting to the multi-user domain...", + "{READING_FS}":"Reading filesystem...", + "{INIT_KERNEL}":"Initiating kernel...", + "{START_DESKTOP}":"Starting desktop session...", + "{DONE}": "done", + "{READING_CONFIG}":"Reading configuration...", + "{ID_TAKEN}":"ID has been taken! Use chat.join to join this chat.", + "{CHAT_NOT_FOUND_OR_TOO_MANY_MEMBERS}":"This chat either doesn't exist or has too many users in it.", + "{CHAT_NOT_FOUND_OR_NOT_IN_CHAT}":"You are not currently in this chat.", + "{CHAT_PLEASE_PROVIDE_VALID_CHANNEL_DATA}":"You did not specify valid chat metadata! Please do chat.create{id:\"your_id\", name:\"Your chat\", topic:\"Your chat's topic\"}.", + "{UPGRADE_PROGRESS}":"Upgrade progress", + "{WIN_PROVIDEID}":"Please provide a valid Window ID from win.list.", + "{WIN_CANTCLOSETERMINAL}":"You cannot close this terminal.", + "{WELCOME_TO_SHIFTORIUM}":"Welcome to the Shiftorium", + "{SUCCESSFULLY_CREATED_CHAT}":"Successfully created chat. Use chat.join{id:\"chat_id_here\"} to join it.", + "{CHAT_HAS_JOINED}":"has joined the chat.", + "{HAS_LEFT_CHAT}":"has left the chat.", + "{SHIFTORIUM_EXP}":"The Shiftorium is your one-stop-shop for ShiftOS system enhancements, upgrades and applications. + + You can buy upgrades in the Shiftorium using a currency called Codepoints, which you can earn by doing various tasks within ShiftOS, such as playing Pong, stealing them from other users, and finding ways to make your own. It's up to you how you get your Codepoints. + + You can then use them to buy new applications, features, enhancements and upgrades for ShiftOS that make the user experience a lot better. Be careful though, buying too many system enhancements without buying new ways of earning Codepoints first can leave you in the dust and unable to upgrade the system. + + Anyways, feel free to browse from our wonderful selection! You can see a list of available upgrades on the left, as well as a progress bar showing how much you've upgraded the system compared to how much you still can.", + "{PONG_WELCOME}":"Welcome to Pong.", + "{PONG_DESC}":"Pong is an arcade game where your goal is to get the ball past the opponent paddle while keeping it from getting past yours. + + In ShiftOS, Pong is modified - you only have one chance, the game is divided into 60 second levels, and you can earn Codepoints by surviving a level, and beating the opponent.", + "{NO_APP_TO_OPEN}":"No app found for this file!", + "{NO_APP_TO_OPEN_EXP}":"File Skimmer could not find an application that can open this file.", + "{CLIENT_DIAGNOSTICS}":"Client diagnostics", + "{GUID}":"GUID", + "{CLIENT_DATA}":"Client data", + "{CLOSE}":"Close", + "{LOAD_DEFAULT}":"Load default", + "{IMPORT}":"Import", + "{EXPORT}":"Export", + "{APPLY}":"Apply", + "{TEMPLATE}":"Template", + "{H_VEL}":"Horizontal velocity", + "{V_VEL}":"Vertical velocity", + "{LEVEL}":"Level", + "{UPGRADE_DEVELOPMENT}":"Development Upgrade", + "{UPGRADE_DEVELOPMENT_DESCRIPTION}":"Development Upgrade Don't Buy", + "{SECONDS_LEFT}":"seconds left", + "{CASH_OUT_WITH_CODEPOINTS}":"Cash out with your codepoints", + "{PONG_PLAY_ON_FOR_MORE}":"Play on for more!", + "{YOU_REACHED_LEVEL}":"You've reached level", + "{PONG_BEAT_AI_REWARD}":"Reward for beating AI (CP)", + "{PONG_BEAT_AI_REWARD_SECONDARY}":"Codepoints for beating AI:", + "{CODEPOINTS_FOR_BEATING_LEVEL}":"Codepoints for beating level", + "{YOU_WON}":"You won", + "{YOU_LOSE}":"You lose", + "{TRY_AGAIN}":"Try again", + "{CODEPOINTS_SHORT}":"CP", + "{TERMINAL_FORMATTING_DRIVE}":"Formatting drive... %percent %", + "{INSTALLING_SHIFTOS}":"Installing ShiftOS on %domain.", + "{YOU_MISSED_OUT_ON}":"You missed out on", + "{BUT_YOU_GAINED}":"But you gained", + "{PONG_PLAYON_DESC}":"Or do you want to try your luck on the next level to increase your reward?", + "{PONG_CASHOUT_DESC}":"Would you like the end the game now and cash out with your reward?", + "{INITIAL_H_VEL}":"Initial H Vel", + "{INITIAL_V_VEL}":"Initial V Vel", + "{INC_H_VEL}":"Increment H Vel", + "{INC_V_VEL}":"Increment V Vel", + "{MULTIPLAYER_ONLY}":"Program not compatible with single-user domain.", + "{MULTIPLAYER_ONLY_EXP}":"This program cannot run within a single-user domain. You must be within a multi-user domain to use this program.", + "{SHIFTER_SKIN_APPLIED}":"Shifter - Settings applied!", + "{YOU_HAVE_EARNED}":"You have earned", + "{CREATING_PATH}":"Creating directory: %path", + "{CREATING_FILE}":"Creating file: %path", + "{SHIFTORIUM_HELP_DESCRIPTION}": "Help Descriptions", + "{CREATING_USER}":"Creating user %username", + "{SEPERATOR}":" - ", + "{NAMESPACE}":"Namespace ", + "{COMMAND}": "| Command ", + "{SHIFTOS_HAS_BEEN_INSTALLED}":"ShiftOS has been installed on %domain.", + "{WARN}": "WARN: ", + "{ERROR}": "!ERROR! ", + "{OBSOLETE_CHEATS_FREECP}": "The %ns.%cmd command is obsolete and has been replaced with %newcommand", + "{REBOOTING_SYSTEM}":"Rebooting system in %i seconds...", + "{ERROR_ARGUMENT_REQUIRED}": "You must supply an %argument value", + "{ERROR_ARGUMENT_REQUIRED_NO_USAGE}": "You are missing some arguments.", + "{GENERATING_PATHS}":"Generating paths...", + "{ERROR_COMMAND_WRONG}": "Check your syntax and try again", + "{LOGIN_EXP}": "Login as the admin of the multi user domain.", + + "{USAGE}": "Usage: ", + + "{NAMESPACE_SOS_DESCRIPTION}":"The ShiftOS Namespace", + "{COMMAND_HELP_USAGE}":"%ns.%cmd{[topic:]}", + "{COMMAND_HELP_DESCRIPTION}":"Lists all commands", + "{COMMAND_SOS_SHUTDOWN_USAGE}":"%ns.%cmd", + "{COMMAND_SOS_SHUTDOWN_DESCRIPTION}":"Saves and shuts down ShiftOS", + "{COMMAND_SOS_STATUS_USAGE}":"%ns.%cmd", + "{COMMAND_SOS_STATUS_DESCRIPTION}":"Displays how many codepoints you have", + "{COMMAND_DEV_CRASH_USAGE}":"%ns.%cmd", + "{COMMAND_DEV_CRASH_DESCRIPTION}":"Shuts down ShiftOS forcefully", + "{COMMAND_DEV_UNLOCKEVERYTHING_USAGE}":"%ns.%cmd", + "{COMMAND_DEV_UNLOCKEVERYTHING_DESCRIPTION}":"Unlocks all shiftorium upgrades", + "{COMMAND_DEV_FREECP_USAGE}":"%ns.%cmd{[amount:1000]}", + "{COMMAND_DEV_FREECP_DESCRIPTION}":"Gives [ammount] codepoints", + "{COMMAND_TRM_CLEAR_USAGE}":"%ns.%cmd", + "{COMMAND_TRM_CLEAR_DESCRIPTION}":"Clears the terminal", + "{COMMAND_SHIFTORIUM_BUY_USAGE}":"%ns.%cmd{upgrade:}", + "{COMMAND_SHIFTORIUM_BUY_DESCRIPTION}":"Buys [upgrade]", + "{COMMAND_SHIFTORIUM_LIST_USAGE}":"%ns.%cmd", + "{COMMAND_SHIFTORIUM_LIST_DESCRIPTION}":"Lists the upgrades that you can get", + "{COMMAND_SHIFTORIUM_INFO_USAGE}":"%ns.%cmd{upgrade:}", + "{COMMAND_SHIFTORIUM_INFO_DESCRIPTION}":"Gives a description about an upgrade", + "{COMMAND_DEV_MULTARG_USAGE}":"%ns.%cmd{id:,name:,type:}", + "{COMMAND_DEV_MULTARG_DESCRIPTION}":"A command which requiers multiple arguments", + + "{ERR_COMMAND_NOT_FOUND}":"Command not found.", + "{MUD_ERROR}":"MUD error", + + "{PROLOGUE_NO_USER_DETECTED}":"No user detected. Please enter a username.", + "{PROLOGUE_BADUSER}":"Invalid username detected.", + "{PROLOGUE_NOSPACES}":"Usernames must not contain spaces.", + "{PROLOGUE_PLEASE_ENTER_USERNAME}":"Please enter a valid username. Blank usernames are not permitted.", + + "{SHIFTORIUM_NOTENOUGHCP}":"Not enough codepoints: ", + "{SHIFTORIUM_TRANSFERRED_FROM}":"Received Codepoints from", + "{SHIFTORIUM_TRANSFERRED_TO}":"Transferred Codepoints to", + + "{SE_SAVING}":"Saving game to disk", + "{SE_TIPOFADVICE}":"Tip of advice: ShiftOS will always save your game after big events or when you shut down the operating system. You can also invoke a save yourself using 'sos.save'.", + + "{STORY_WELCOME}":"Welcome to ShiftOS", + "{STORY_SENTIENCEUNKNOWN}":"Your sentience is currently unknown. Please strike the Enter key to prove you are alive.", + + "{SENTIENCE_BASIC}":"Sentience: Basic - User can respond to basic instructions.", + "{SENTIENCE_BASICPLUS}":"Sentience: Basic+ - User can invoke commands within the ecosystem.", + "{SENTIENCE_POSSIBLEHUMAN}":"Sentience: Possible human - user can perform actions based on a choice.", + "{SENTIENCE_POSSIBLEHUMANPLUS}":"Sentience: Possible human+ - user can infer, and can pass arguments.", + "{SENTIENCE_HUMAN}":"Sentience: Human. Thanks for your patience.", + "{SENTIENCE_INVALIDPASSWORD}":"The password you entered is invalid.", + + "{ARGS_PASSWORD}":"password", + + "{SHIFTOS_PLUS_MOTTO}":"ShiftOS, Shift it YOUR way.", + "{SHIFTOS_VERSION_INFO}":"ShiftOS Version: ", + "{USER_NAME}":"Username", + "{DISCOURSE_INTEGRATION}":"Discourse Integration", + "{SYSTEM_NAME}":"System Name", + "{USER_INFO}":"User Information", + "{SELECT_LANG}":"Select language", + "{WELCOME_TO_SHIFTOS}":"Welcome to ShiftOS Alpha!", + "{CREATE}":"Create", + "{INSTALL}":"Install", + "{ALIAS}":"Alias:", + "{OBSOLETE_SYS_SHUTDOWN}":"sys.shutdown is obsolete", + "{PY_EXCEPTION}":"There was an error running python code.", + "{LUA_ERROR}":"There was an error running lua code.", + + "{TERMINAL_NAME}":"Terminal", + "{ARTPAD_NAME}":"Artpad", + "{PONG_NAME}":"Pong", + "{WAV_PLAYER_NAME}":"WAV Player", + "{SHIFTORIUM_NAME}":"Shiftorium", + "{TEXTPAD_NAME}":"TextPad", +} \ No newline at end of file diff --git a/ShiftOS.WinForms/Resources/sys_shiftoriumstory.txt b/ShiftOS.WinForms/Resources/sys_shiftoriumstory.txt new file mode 100644 index 0000000..93a06ba --- /dev/null +++ b/ShiftOS.WinForms/Resources/sys_shiftoriumstory.txt @@ -0,0 +1,45 @@ +{ + Character: "sys", + Lines:[ + "Hello there, %user.", + "Welcome to ShiftOS.", + "This is an automated message to all new sentiences within the ShiftOS multi-user domain.", + "Before you can begin with ShiftOS, you'll need to know a few things about it.", + "One: Terminal command syntax.", + "Inside ShiftOS, the bulk of your time is going to be spent within the Terminal.", + "The Terminal is an application that starts up when you turn on your computer. It allows you to execute system commands, open programs and control your system.", + "To enter commands into your terminal, simply type in the user who created the command's name, a.k.a it's \"namespace\", followed by a period (.) followed by the command's name.", + "For example, sos.help.", + "If you would like to specify command parameters, you can do so by entering a set of curly braces {} after the command name.", + "An empty set of curly braces, or none at all, means no parameters. However, if you'd like to send a parameter, inside the curly braces, type the parameter name", + "followed by a colon (:) and then the value.", + "There are various value types you can use: + + - Booleans ({key:true, key2:false}) + - Integers ({number:123}) - Note that integers have a maximum value of 2.4 billion. + - Strings ({key:\"value\"}) + - Objects ({key:{key2:\"value\"}}) + - Arrays ({key:[\"element 1\", \"element 2\"]})", + "For example, I can do win.open{app:\"pong\"} to open the Pong application from the Terminal.", + "Next on the list - Codepoints and the Shiftorium.", + "Right now you only have two applications - the Terminal, and Pong.", + "This is not a usable operating system.", + "You can only have one application open.", + "You can't customize it.", + "You can't access your files.", + "Only the Terminal and Pong.", + "But fear not. You can upgrade ShiftOS just like you would a car or a home.", + "You can buy new applications, tweaks, features, and other upgrades.", + "But how?", + "First, you need Codepoints.", + "cmd:givecp 50", + "You have been given 50 Codepoints.", + "You can use Codepoints to buy upgrades inside the Shiftorium.", + "The first upgrade you want to buy is called MUD Fundamentals.", + "It unlocks certain capabilities within the multi-user domain such as the ability to run scripts and commands within the multi-user domain, as well as the ability to chat with other sentiences and upload your own programs.", + "It costs 50 Codepoints. You may buy it using the codepoints you have been given, or you can try and earn your own Codepoints using pong.", + "But be careful, it's best to buy things that can give you even more Codepoints...", + "because when you run out and can't make any more.... you're stuck with what you've got.", + "Disconnecting from sentience '%user' on system %domain.", + ] +} \ No newline at end of file diff --git a/ShiftOS.WinForms/ShiftOS.WinForms.csproj b/ShiftOS.WinForms/ShiftOS.WinForms.csproj new file mode 100644 index 0000000..b456796 --- /dev/null +++ b/ShiftOS.WinForms/ShiftOS.WinForms.csproj @@ -0,0 +1,464 @@ + + + + + Debug + AnyCPU + {2295D2E2-3A00-4E02-B66F-B961AC329FE6} + WinExe + Properties + ShiftOS.WinForms + ShiftOS.WinForms + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + + + + + + + UserControl + + + Artpad.cs + + + UserControl + + + Chat.cs + + + UserControl + + + CoherenceOverlay.cs + + + UserControl + + + ColorPicker.cs + + + UserControl + + + Dialog.cs + + + UserControl + + + FileDialog.cs + + + UserControl + + + FileSkimmer.cs + + + UserControl + + + GraphicPicker.cs + + + UserControl + + + mp3Player.cs + + + UserControl + + + MUDAuthenticator.cs + + + UserControl + + + MUDControlCentre.cs + + + UserControl + + + MUDPasswordCracker.cs + + + UserControl + + + NameChanger.cs + + + UserControl + + + Pong.cs + + + UserControl + + + Shifter.cs + + + UserControl + + + ShiftoriumFrontend.cs + + + UserControl + + + Skin Loader.cs + + + UserControl + + + TextPad.cs + + + UserControl + + + VirusScanner.cs + + + UserControl + + + Terminal.cs + + + + UserControl + + + ColorControl.cs + + + Component + + + ShiftedProgressBar.cs + + + Component + + + Form + + + Oobe.cs + + + + + + + + Form + + + WindowBorder.cs + + + Form + + + WinformsDesktop.cs + + + + + + Artpad.cs + + + Chat.cs + + + ColorPicker.cs + + + FileDialog.cs + + + FileSkimmer.cs + + + GraphicPicker.cs + + + mp3Player.cs + + + MUDAuthenticator.cs + + + MUDControlCentre.cs + + + MUDPasswordCracker.cs + + + NameChanger.cs + + + Pong.cs + + + Shifter.cs + + + ShiftoriumFrontend.cs + + + Skin Loader.cs + + + TextPad.cs + + + VirusScanner.cs + + + Terminal.cs + + + Oobe.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + WindowBorder.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {a069089a-8962-4607-b2b2-4cf4a371066e} + ShiftOS.Objects + + + {7c979b07-0585-4033-a110-e5555b9d6651} + ShiftOS.Engine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ShiftOS.WinForms/Tools/ColorPickerDataBackend.cs b/ShiftOS.WinForms/Tools/ColorPickerDataBackend.cs new file mode 100644 index 0000000..7e7723a --- /dev/null +++ b/ShiftOS.WinForms/Tools/ColorPickerDataBackend.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShiftOS.WinForms.Tools +{ + public static class ColorPickerDataBackend + { + private static Color[] _redmemory = new Color[20]; + private static Color[] _greenmemory = new Color[20]; + private static Color[] _bluememory = new Color[20]; + private static Color[] _orangememory = new Color[20]; + private static Color[] _pinkmemory = new Color[20]; + private static Color[] _yellowmemory = new Color[20]; + private static Color[] _purplememory = new Color[20]; + private static Color[] _graymemory = new Color[20]; + private static Color[] _anymemory = new Color[20]; + private static Color[] _brownmemory = new Color[20]; + + + public static Color[] anymemory + { + get { return _anymemory; } + } + + public static Color[] redmemory + { + get { return _redmemory; } + } + + public static Color[] greenmemory + { + get { return _greenmemory; } + } + + public static Color[] bluememory + { + get { return _bluememory; } + } + + public static Color[] brownmemory + { + get { return _brownmemory; } + } + + public static Color[] graymemory + { + get { return _graymemory; } + } + + public static Color lastcolourpick { get; set; } + + public static Color[] orangememory + { + get { return _orangememory; } + } + + public static Color[] pinkmemory + { + get { return _pinkmemory; } + } + + public static Color[] purplememory + { + get { return _purplememory; } + } + + public static Color[] yellowmemory + { + get { return _yellowmemory; } + } + + + } + + + +} diff --git a/ShiftOS.WinForms/Tools/ControlManager.cs b/ShiftOS.WinForms/Tools/ControlManager.cs new file mode 100644 index 0000000..5678fb3 --- /dev/null +++ b/ShiftOS.WinForms/Tools/ControlManager.cs @@ -0,0 +1,207 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; +using static ShiftOS.Engine.AppearanceManager; + + +namespace ShiftOS.WinForms.Tools +{ + public static class ControlManager + { + public static void Close(this UserControl ctrl) + { + for (int i = 0; i < AppearanceManager.OpenForms.Count; i++) + { + if (OpenForms[i].ParentWindow == ctrl) + { + (OpenForms[i] as Form).Close(); + return; + } + } + } + + + public static void SetupWindows() + { + if (SaveSystem.CurrentSave != null) + { + int screen_height_start = 0; + if (Shiftorium.UpgradeInstalled("wm_free_placement")) + { + } + else if (Shiftorium.UpgradeInstalled("wm_4_windows")) + { + int screen_width_half = Screen.PrimaryScreen.Bounds.Width / 2; + int screen_height_half = (Screen.PrimaryScreen.Bounds.Height - screen_height_start) / 2; + + for (int i = 0; i < OpenForms.Count; i++) + { + var frm = OpenForms[i] as WindowBorder; + + switch (i) + { + case 0: + frm.Location = new System.Drawing.Point(0, screen_height_start); + frm.Size = new System.Drawing.Size((OpenForms.Count > 1) ? screen_width_half : screen_width_half * 2, (OpenForms.Count > 2) ? screen_height_half : screen_height_half * 2); + + break; + case 1: + frm.Location = new System.Drawing.Point(screen_width_half, screen_height_start); + frm.Size = new System.Drawing.Size(screen_width_half, (OpenForms.Count > 2) ? screen_height_half : screen_height_half * 2); + break; + case 2: + frm.Location = new System.Drawing.Point(0, screen_height_half + screen_height_start); + frm.Size = new System.Drawing.Size((OpenForms.Count > 3) ? screen_width_half : screen_width_half * 2, screen_height_half); + break; + case 3: + frm.Location = new System.Drawing.Point(screen_width_half, screen_height_half + screen_height_start); + frm.Size = new System.Drawing.Size(screen_width_half, (OpenForms.Count > 2) ? screen_height_half : screen_height_half * 2); + break; + } + } + + } + else if (Shiftorium.UpgradeInstalled("window_manager")) + { + int screen_width_half = Screen.PrimaryScreen.Bounds.Width / 2; + int screen_height = (Screen.PrimaryScreen.Bounds.Height) - screen_height_start; + + + + for (int i = 0; i < OpenForms.Count; i++) + { + + + var frm = OpenForms[i] as WindowBorder; + switch (i) + { + case 0: + frm.Location = new System.Drawing.Point(0, screen_height_start); + frm.Size = new System.Drawing.Size((OpenForms.Count > 1) ? screen_width_half : screen_width_half * 2, screen_height); + break; + case 1: + frm.Location = new System.Drawing.Point(screen_width_half, screen_height_start); + frm.Size = new System.Drawing.Size(screen_width_half, screen_height); + break; + } + OpenForms[i] = frm; + } + } + else + { + var frm = OpenForms[0] as WindowBorder; + frm.Location = new Point(0, 0); + frm.Size = frm.ParentForm.Size; + OpenForms[0] = frm; + + } + } + else + { + var frm = OpenForms[0] as WindowBorder; + frm.Location = new Point(0, 0); + frm.Size = Desktop.Size; + OpenForms[0] = frm; + + } + } + + + public static void SetupControl(Control ctrl) + { + + + if (!(ctrl is MenuStrip) && !(ctrl is ToolStrip) && !(ctrl is StatusStrip) && !(ctrl is ContextMenuStrip)) + { + string tag = ""; + + try + { + tag = ctrl.Tag.ToString(); + } + catch { } + + if (!tag.Contains("keepbg")) + { + if (ctrl.BackColor != Control.DefaultBackColor) + { + ctrl.BackColor = SkinEngine.LoadedSkin.ControlColor; + } + } + + Image dithered = null; + + + ctrl.ForeColor = SkinEngine.LoadedSkin.ControlTextColor; + + ctrl.Font = SkinEngine.LoadedSkin.MainFont; + + if (tag.Contains("header1")) + { + ctrl.Font = SkinEngine.LoadedSkin.HeaderFont; + } + + if (tag.Contains("header2")) + { + ctrl.Font = SkinEngine.LoadedSkin.Header2Font; + } + + if (tag.Contains("header3")) + { + ctrl.Font = SkinEngine.LoadedSkin.Header3Font; + } + + ctrl.Text = Localization.Parse(ctrl.Text); + ctrl.KeyDown += (o, a) => + { + if (a.Control && a.KeyCode == Keys.T) + { + a.SuppressKeyPress = true; + } + + }; + if (ctrl is Button) + { + (ctrl as Button).FlatStyle = FlatStyle.Flat; + } + else if (ctrl is WindowBorder) + { + (ctrl as WindowBorder).Setup(); + } + } + + MakeDoubleBuffered(ctrl); + } + + public static void MakeDoubleBuffered(Control c) + { + if (System.Windows.Forms.SystemInformation.TerminalServerSession) + return; + + System.Reflection.PropertyInfo aProp = + typeof(System.Windows.Forms.Control).GetProperty( + "DoubleBuffered", + System.Reflection.BindingFlags.NonPublic | + System.Reflection.BindingFlags.Instance); + + aProp.SetValue(c, true, null); + + } + + public static void SetupControls(Control frm) + { + SetupControl(frm); + + for (int i = 0; i < frm.Controls.Count; i++) + { + SetupControls(frm.Controls[i]); + } + } + + } +} diff --git a/ShiftOS.WinForms/Tools/DitheringEngine.cs b/ShiftOS.WinForms/Tools/DitheringEngine.cs new file mode 100644 index 0000000..2497e6d --- /dev/null +++ b/ShiftOS.WinForms/Tools/DitheringEngine.cs @@ -0,0 +1,378 @@ +#define FLOYDSTEINBERG + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Drawing; +using System.Threading; +using ShiftOS.Engine; +using System.Runtime.InteropServices; + +namespace ShiftOS.WinForms.Tools +{ + public static class DitheringEngine + { + public static Color GetColor(Color source) + { + if (Shiftorium.UpgradeInstalled("color_depth_24_bits")) + { + return Color.FromArgb(source.R, source.G, source.B); //get rid of the alpha channel. + } + else + { + if (Shiftorium.UpgradeInstalled("color_depth_16_bits")) + { + byte r = (byte)linear(source.R, 0, 0xFF, 0, 0x1F); + byte g = (byte)linear(source.G, 0, 0xFF, 0, 0x3F); + byte b = (byte)linear(source.B, 0, 0xFF, 0, 0x1F); + + return Color.FromArgb(r, g, b); + } + else + { + int gray = (source.R + source.G + source.B) / 3; + + if (Shiftorium.UpgradeInstalled("color_depth_8_bits")) + return Color.FromArgb(gray, gray, gray); + else + { + if (Shiftorium.UpgradeInstalled("color_depth_6_bits")) + { + int gray6 = (int)linear(gray, 0, 0xFF, 0, 0x3F) * 3; + + + + return Color.FromArgb(gray6, gray6, gray6); + } + else + { + if (Shiftorium.UpgradeInstalled("color_depth_4_bits")) + { + int gray4 = (int)linear(linear(gray, 0, 0xFF, 0, 0xF), 0, 0xF, 0, 0xFF) * 0xF; + return Color.FromArgb(gray4, gray4, gray4); + } + else + { + if (Shiftorium.UpgradeInstalled("color_depth_2_bits")) + { + int gray2 = (int)linear(linear(gray, 0, 0xFF, 0, 0x3), 0, 0x3, 0, 0xFF) * 63; + return Color.FromArgb(gray2, gray2, gray2); + } + else { + if (gray >= 127) + { + return Color.Black; + } + else + { + return Color.White; + } + } + } + } + } + } + } + } + + public static void DitherColor(Color source, int width, int height, Action result) + { + var bmp = new Bitmap(width + 1, height + 1); + var data = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), System.Drawing.Imaging.ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format24bppRgb); + byte[] rgb = new byte[Math.Abs(data.Stride) * data.Height]; + Marshal.Copy(data.Scan0, rgb, 0, rgb.Length); + for (int i = 0; i < rgb.Length - 3; i += 3) + { + rgb[i] = source.R; + rgb[i + 1] = source.G; + rgb[i + 2] = source.B; + } + Marshal.Copy(rgb, 0, data.Scan0, rgb.Length); + bmp.UnlockBits(data); + DitherImage(bmp, result); + + } + + static private double linear(double x, double x0, double x1, double y0, double y1) + { + if ((x1 - x0) == 0) + { + return (y0 + y1) / 2; + } + return y0 + (x - x0) * (y1 - y0) / (x1 - x0); + } + +#if NODITHER + public static void DitherImage(Image source, Action result) + { + Desktop.InvokeOnWorkerThread(new Action(() => + { + result?.Invoke(source); + })); + } +#endif + +#if BINARIZE + public static void DitherImage(Image source, Action result) + { + if (source == null) + { + result?.Invoke(source); + return; + } + + + var t = new Thread(new ThreadStart(() => + { + var bmp = new Bitmap(source.Width, source.Height); + var sourceBmp = (Bitmap)source; + int error = 0; + for (int y = 0; y < bmp.Height; y++) + { + for (int x = 0; x < bmp.Width; x++) + { + + Color c = sourceBmp.GetPixel(x, y); + int gray = ((c.R + c.G + c.B) / 3); + if (gray >= 127) + { + error = gray - 255; + bmp.SetPixel(x, y, Color.White); + } + else + { + error = gray; + bmp.SetPixel(x, y, Color.Black); + } + + + } + } + Desktop.InvokeOnWorkerThread(new Action(() => { result?.Invoke(bmp); })); + })); + t.IsBackground = true; + t.Start(); + + } +#endif + +#if DITHER1D + public static void DitherImage(Image source, Action result) + { + if (source == null) + { + result?.Invoke(source); + return; + } + + + var t = new Thread(new ThreadStart(() => + { + var bmp = new Bitmap(source.Width, source.Height); + var sourceBmp = (Bitmap)source; + int error = 0; + for (int y = 0; y < bmp.Height; y++) + { + for (int x = 0; x < bmp.Width; x++) + { + + Color c = sourceBmp.GetPixel(x, y); + int gray = ((c.R + c.G + c.B) / 3) + error; + if (gray >= 127) + { + error = gray - 255; + bmp.SetPixel(x, y, Color.White); + } + else + { + error = gray; + bmp.SetPixel(x, y, Color.Black); + } + + + } + } + Desktop.InvokeOnWorkerThread(new Action(() => { result?.Invoke(bmp); })); + })); + t.IsBackground = true; + t.Start(); + } +#endif + +#if FLOYDSTEINBERG + public static void DitherImage(Image source, Action result) + { + if (source == null) + { + result?.Invoke(source); + return; + } + + + var bmp = new Bitmap(source.Width, source.Height); + var sourceBmp = (Bitmap)source; + var sourceLck = sourceBmp.LockBits(new Rectangle(0, 0, sourceBmp.Width, sourceBmp.Height), System.Drawing.Imaging.ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format24bppRgb); + var destLck = bmp.LockBits(new Rectangle(0, 0, bmp.Width, bmp.Height), System.Drawing.Imaging.ImageLockMode.ReadWrite, System.Drawing.Imaging.PixelFormat.Format24bppRgb); + int error_r = 0; + + + int sourceBytes = Math.Abs(sourceLck.Stride) * sourceLck.Height; + int destBytes = Math.Abs(destLck.Stride) * destLck.Height; + + IntPtr sourcePtr = sourceLck.Scan0; + IntPtr destPtr = destLck.Scan0; + + byte[] destArr = new byte[destBytes]; + byte[] sourceArr = new byte[sourceBytes]; + + byte[] grays = new byte[destBytes]; + + Marshal.Copy(sourcePtr, sourceArr, 0, sourceBytes); + Marshal.Copy(destPtr, destArr, 0, destBytes); + + int width = Math.Abs(destLck.Stride); + int height = destLck.Height; + + bool sixteenBits = Shiftorium.UpgradeInstalled("color_depth_16_bits"); + bool twoBits = Shiftorium.UpgradeInstalled("color_depth_2_bits"); + bool sixBits = Shiftorium.UpgradeInstalled("color_depth_6_bits"); + bool fourBits = Shiftorium.UpgradeInstalled("color_depth_4_bits"); + bool eightBits = Shiftorium.UpgradeInstalled("color_depth_8_bits"); + bool color_depth_floydsteinberg = Shiftorium.UpgradeInstalled("color_depth_floyd-steinberg_dithering"); + bool dithering = Shiftorium.UpgradeInstalled("color_depth_dithering"); + + for (int y = 0; y < (destLck.Height); y++) + { + for (int x = 0; x < (Math.Abs(destLck.Stride)); x += 3) + { + int i = getIndexFromXY(x, y, width); + byte red = sourceArr[i]; + byte green = sourceArr[i + 1]; + byte blue = sourceArr[i + 2]; + + Color oldc = Color.FromArgb(red, green, blue); + Color newc; + + if (sixteenBits) + { + newc = GetColor(oldc); + } + else + { + int gray = ((oldc.R + oldc.G + oldc.B) / 3); + + byte newgray = 0; + + if (dithering && !color_depth_floydsteinberg) + gray += error_r; + + + + if (eightBits) + { + newgray = (byte)gray; + error_r = 0; + } + else if(sixBits) + { + newgray = (byte)(linear(gray, 0, 0xFF, 0, 0x3F) * 3); + error_r = newgray - gray; + } + else if (fourBits) + { + newgray = (byte)(linear(gray, 0, 0xFF, 0, 0xF) * 0xF); + error_r = newgray - gray; + } + else if (twoBits) + { + if (gray >= 191) + newgray = 0xFF; + else if (gray >= 127) + newgray = Color.LightGray.R; + else if (gray >= 64) + newgray = Color.DarkGray.R; + else + newgray = 0x00; + error_r = newgray - gray; + } + else + { + if (gray >= 127) + newgray = 0xFF; + else + newgray = 0x00; + error_r = newgray - gray; + } + newc = Color.FromArgb(newgray, newgray, newgray); + } + + int nextIndex = getIndexFromXY(x + 3, y, width); + int nextRow = getIndexFromXY(x, y + 1, width); + int nextIndexOnNextRow = getIndexFromXY(x + 3, y + 1, width); + int prevIndexOnNextRow = getIndexFromXY(x - 3, y + 1, width); + + grays[i] = newc.R; + grays[i + 1] = newc.G; + grays[i + 2] = newc.B; + + if (dithering) + { + if (color_depth_floydsteinberg) + { + if (x + 3 < width) + { + sourceArr[nextIndex] += (byte)((error_r * 7) / 16); + sourceArr[nextIndex + 1] += (byte)((error_r * 7) / 16); + sourceArr[nextIndex + 2] += (byte)((error_r * 7) / 16); + } + if (y + 1 < height) + { + sourceArr[nextRow] += (byte)((error_r) / 16); + sourceArr[nextRow + 1] += (byte)((error_r) / 16); + sourceArr[nextRow + 2] += (byte)((error_r) / 16); + } + if (x + 3 < width && y + 1 < height) + { + sourceArr[nextIndexOnNextRow] += (byte)((error_r * 3) / 16); + sourceArr[nextIndexOnNextRow + 1] += (byte)((error_r * 3) / 16); + sourceArr[nextIndexOnNextRow + 2] += (byte)((error_r * 3) / 16); + + } + if (x - 3 > 0 && y + 1 < height) + { + sourceArr[prevIndexOnNextRow] += (byte)((error_r * 5) / 16); + sourceArr[prevIndexOnNextRow + 1] += (byte)((error_r * 5) / 16); + sourceArr[prevIndexOnNextRow + 2] += (byte)((error_r * 5) / 16); + + } + } + } + } + } + + for (int i = 0; i < destArr.Length - 3; i++) + { + destArr[i] = grays[i]; + + } + + Marshal.Copy(destArr, 0, destPtr, destBytes); + + + bmp.UnlockBits(destLck); + + + + Desktop.InvokeOnWorkerThread(new Action(() => { result?.Invoke(bmp); })); + + } +#endif + + private static int getIndexFromXY(int x, int y, int width) + { + return (width * y) + x; + } + } +} diff --git a/ShiftOS.WinForms/Tools/ShiftOSMenuRenderer.cs b/ShiftOS.WinForms/Tools/ShiftOSMenuRenderer.cs new file mode 100644 index 0000000..764ca7f --- /dev/null +++ b/ShiftOS.WinForms/Tools/ShiftOSMenuRenderer.cs @@ -0,0 +1,494 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Drawing; +using static ShiftOS.Engine.SkinEngine; +using System.Windows.Forms; + +namespace ShiftOS.WinForms.Tools +{ + public class ShiftOSMenuRenderer : ToolStripProfessionalRenderer + { + public ShiftOSMenuRenderer() : base(new ShiftOSColorTable()) + { + + } + + public ShiftOSMenuRenderer(ProfessionalColorTable table) : base(table) + { + + } + + protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e) + { + e.TextFont = LoadedSkin.MainFont; + if (e.Item.Selected == true) + { + e.TextColor = LoadedSkin.Menu_SelectedTextColor; + } + else + { + e.TextColor = LoadedSkin.Menu_TextColor; + } + base.OnRenderItemText(e); + } + } + + public class ShiftOSColorTable : ProfessionalColorTable + { + public override Color ButtonSelectedHighlight + { + get { return LoadedSkin.Menu_ButtonSelectedHighlight; } + } + public override Color ButtonSelectedHighlightBorder + { + get { return LoadedSkin.Menu_ButtonSelectedHighlight; } + } + public override Color ButtonPressedHighlight + { + get { return LoadedSkin.Menu_ButtonPressedHighlight; } + } + public override Color ButtonPressedHighlightBorder + { + get { return LoadedSkin.Menu_ButtonPressedHighlight; } + } + public override Color ButtonCheckedHighlight + { + get { return LoadedSkin.Menu_ButtonCheckedHighlight; } + } + public override Color ButtonCheckedHighlightBorder + { + get { return LoadedSkin.Menu_ButtonCheckedHighlightBorder; } + } + public override Color ButtonPressedBorder + { + get { return LoadedSkin.Menu_ButtonPressedBorder; } + } + public override Color ButtonSelectedBorder + { + get { return LoadedSkin.Menu_ButtonSelectedBorder; } + } + public override Color ButtonCheckedGradientBegin + { + get { return LoadedSkin.Menu_ButtonCheckedGradientBegin; } + } + public override Color ButtonCheckedGradientMiddle + { + get { return LoadedSkin.Menu_ButtonCheckedGradientMiddle; } + } + public override Color ButtonCheckedGradientEnd + { + get { return LoadedSkin.Menu_ButtonCheckedGradientEnd; } + } + public override Color ButtonSelectedGradientBegin + { + get { return LoadedSkin.Menu_ButtonSelectedGradientBegin; } + } + public override Color ButtonSelectedGradientMiddle + { + get { return LoadedSkin.Menu_ButtonSelectedGradientMiddle; } + } + public override Color ButtonSelectedGradientEnd + { + get { return LoadedSkin.Menu_ButtonSelectedGradientEnd; } + } + public override Color ButtonPressedGradientBegin + { + get { return LoadedSkin.Menu_ButtonPressedGradientBegin; } + } + public override Color ButtonPressedGradientMiddle + { + get { return LoadedSkin.Menu_ButtonPressedGradientMiddle; } + } + public override Color ButtonPressedGradientEnd + { + get { return LoadedSkin.Menu_ButtonPressedGradientEnd; } + } + public override Color CheckBackground + { + get { return LoadedSkin.Menu_CheckBackground; } + } + public override Color CheckSelectedBackground + { + get { return LoadedSkin.Menu_CheckSelectedBackground; } + } + public override Color CheckPressedBackground + { + get { return LoadedSkin.Menu_CheckPressedBackground; } + } + public override Color GripDark + { + get { return Color.Transparent; } + } + public override Color GripLight + { + get { return Color.Transparent; } + } + public override Color ImageMarginGradientBegin + { + get { return LoadedSkin.Menu_ImageMarginGradientBegin; } + } + public override Color ImageMarginGradientMiddle + { + get { return LoadedSkin.Menu_ImageMarginGradientMiddle; } + } + public override Color ImageMarginGradientEnd + { + get { return LoadedSkin.Menu_ImageMarginGradientEnd; } + } + public override Color ImageMarginRevealedGradientBegin + { + get { return LoadedSkin.Menu_ImageMarginGradientBegin; } + } + public override Color ImageMarginRevealedGradientMiddle + { + get { return LoadedSkin.Menu_ImageMarginGradientMiddle; } + } + public override Color ImageMarginRevealedGradientEnd + { + get { return LoadedSkin.Menu_ImageMarginGradientEnd; } + } + public override Color MenuStripGradientBegin + { + get { return LoadedSkin.Menu_MenuStripGradientBegin; } + } + public override Color MenuStripGradientEnd + { + get { return LoadedSkin.Menu_MenuStripGradientEnd; } + } + public override Color MenuItemSelected + { + get { return LoadedSkin.Menu_MenuItemSelected; } + } + public override Color MenuItemBorder + { + get { return LoadedSkin.Menu_MenuItemSelected; } + } + public override Color MenuBorder + { + get { return LoadedSkin.Menu_MenuBorder; } + } + public override Color MenuItemSelectedGradientBegin + { + get { return LoadedSkin.Menu_MenuItemSelectedGradientBegin; } + } + public override Color MenuItemSelectedGradientEnd + { + get { return LoadedSkin.Menu_MenuItemSelectedGradientEnd; } + } + public override Color MenuItemPressedGradientBegin + { + get { return LoadedSkin.Menu_MenuItemPressedGradientBegin; } + } + public override Color MenuItemPressedGradientMiddle + { + get { return LoadedSkin.Menu_MenuItemPressedGradientMiddle; } + } + public override Color MenuItemPressedGradientEnd + { + get { return LoadedSkin.Menu_MenuItemPressedGradientEnd; } + } + public override Color RaftingContainerGradientBegin + { + get { return LoadedSkin.Menu_RaftingContainerGradientBegin; } + } + public override Color RaftingContainerGradientEnd + { + get { return LoadedSkin.Menu_RaftingContainerGradientEnd; } + } + public override Color SeparatorDark + { + get { return LoadedSkin.Menu_SeparatorDark; } + } + public override Color SeparatorLight + { + get { return LoadedSkin.Menu_SeparatorLight; } + } + public override Color StatusStripGradientBegin + { + get { return LoadedSkin.Menu_StatusStripGradientBegin; } + } + public override Color StatusStripGradientEnd + { + get { return LoadedSkin.Menu_StatusStripGradientEnd; } + } + public override Color ToolStripBorder + { + get { return LoadedSkin.Menu_ToolStripBorder; } + } + public override Color ToolStripDropDownBackground + { + get { return LoadedSkin.Menu_ToolStripDropDownBackground; } + } + public override Color ToolStripGradientBegin + { + get { return LoadedSkin.Menu_ToolStripGradientBegin; } + } + public override Color ToolStripGradientMiddle + { + get { return LoadedSkin.Menu_ToolStripGradientMiddle; } + } + public override Color ToolStripGradientEnd + { + get { return LoadedSkin.Menu_ToolStripGradientEnd; } + } + public override Color ToolStripContentPanelGradientBegin + { + get { return LoadedSkin.Menu_ToolStripContentPanelGradientBegin; } + } + public override Color ToolStripContentPanelGradientEnd + { + get { return LoadedSkin.Menu_ToolStripContentPanelGradientEnd; } + } + public override Color ToolStripPanelGradientBegin + { + get { return LoadedSkin.Menu_ToolStripPanelGradientBegin; } + } + public override Color ToolStripPanelGradientEnd + { + get { return LoadedSkin.Menu_ToolStripPanelGradientEnd; } + } + public override Color OverflowButtonGradientBegin + { + get { return Color.Transparent; } + } + public override Color OverflowButtonGradientMiddle + { + get { return Color.Transparent; } + } + public override Color OverflowButtonGradientEnd + { + get { return Color.Transparent; } + } + } + + public class AppLauncherColorTable : ProfessionalColorTable + { + public override Color ButtonSelectedHighlight + { + get { return LoadedSkin.Menu_ButtonSelectedHighlight; } + } + public override Color ButtonSelectedHighlightBorder + { + get { return LoadedSkin.Menu_ButtonSelectedHighlight; } + } + public override Color ButtonPressedHighlight + { + get { return LoadedSkin.Menu_ButtonPressedHighlight; } + } + public override Color ButtonPressedHighlightBorder + { + get { return LoadedSkin.Menu_ButtonPressedHighlight; } + } + public override Color ButtonCheckedHighlight + { + get { return LoadedSkin.Menu_ButtonCheckedHighlight; } + } + public override Color ButtonCheckedHighlightBorder + { + get { return LoadedSkin.Menu_ButtonCheckedHighlightBorder; } + } + public override Color ButtonPressedBorder + { + get { return LoadedSkin.Menu_ButtonPressedBorder; } + } + public override Color ButtonSelectedBorder + { + get { return LoadedSkin.Menu_ButtonSelectedBorder; } + } + public override Color ButtonCheckedGradientBegin + { + get { return LoadedSkin.Menu_ButtonCheckedGradientBegin; } + } + public override Color ButtonCheckedGradientMiddle + { + get { return LoadedSkin.Menu_ButtonCheckedGradientMiddle; } + } + public override Color ButtonCheckedGradientEnd + { + get { return LoadedSkin.Menu_ButtonCheckedGradientEnd; } + } + public override Color ButtonSelectedGradientBegin + { + get { return LoadedSkin.Menu_ButtonSelectedGradientBegin; } + } + public override Color ButtonSelectedGradientMiddle + { + get { return LoadedSkin.Menu_ButtonSelectedGradientMiddle; } + } + public override Color ButtonSelectedGradientEnd + { + get { return LoadedSkin.Menu_ButtonSelectedGradientEnd; } + } + public override Color ButtonPressedGradientBegin + { + get { return LoadedSkin.Menu_ButtonPressedGradientBegin; } + } + public override Color ButtonPressedGradientMiddle + { + get { return LoadedSkin.Menu_ButtonPressedGradientMiddle; } + } + public override Color ButtonPressedGradientEnd + { + get { return LoadedSkin.Menu_ButtonPressedGradientEnd; } + } + public override Color CheckBackground + { + get { return LoadedSkin.Menu_CheckBackground; } + } + public override Color CheckSelectedBackground + { + get { return LoadedSkin.Menu_CheckSelectedBackground; } + } + public override Color CheckPressedBackground + { + get { return LoadedSkin.Menu_CheckPressedBackground; } + } + public override Color GripDark + { + get { return Color.Transparent; } + } + public override Color GripLight + { + get { return Color.Transparent; } + } + public override Color ImageMarginGradientBegin + { + get { return LoadedSkin.Menu_ImageMarginGradientBegin; } + } + public override Color ImageMarginGradientMiddle + { + get { return LoadedSkin.Menu_ImageMarginGradientMiddle; } + } + public override Color ImageMarginGradientEnd + { + get { return LoadedSkin.Menu_ImageMarginGradientEnd; } + } + public override Color ImageMarginRevealedGradientBegin + { + get { return LoadedSkin.Menu_ImageMarginGradientBegin; } + } + public override Color ImageMarginRevealedGradientMiddle + { + get { return LoadedSkin.Menu_ImageMarginGradientMiddle; } + } + public override Color ImageMarginRevealedGradientEnd + { + get { return LoadedSkin.Menu_ImageMarginGradientEnd; } + } + public override Color MenuStripGradientBegin + { + get { return LoadedSkin.Menu_MenuStripGradientBegin; } + } + public override Color MenuStripGradientEnd + { + get { return LoadedSkin.Menu_MenuStripGradientEnd; } + } + public override Color MenuItemSelected + { + get { return LoadedSkin.Menu_MenuItemSelected; } + } + public override Color MenuItemBorder + { + get { return LoadedSkin.Menu_MenuItemSelected; } + } + public override Color MenuBorder + { + get { return LoadedSkin.Menu_MenuBorder; } + } + public override Color MenuItemSelectedGradientBegin + { + get { return (GetImage("applauncher") != null) ? Color.Transparent : LoadedSkin.Menu_MenuItemSelectedGradientBegin; } + } + public override Color MenuItemSelectedGradientEnd + { + get { return (GetImage("applauncher") != null) ? Color.Transparent : LoadedSkin.Menu_MenuItemSelectedGradientEnd; } + } + public override Color MenuItemPressedGradientBegin + { + get { return (GetImage("applauncher") != null) ? Color.Transparent : LoadedSkin.Menu_MenuItemPressedGradientBegin; } + } + public override Color MenuItemPressedGradientMiddle + { + get { return (GetImage("applauncher") != null) ? Color.Transparent : LoadedSkin.Menu_MenuItemPressedGradientMiddle; } + } + public override Color MenuItemPressedGradientEnd + { + get { return (GetImage("applauncher") != null) ? Color.Transparent : LoadedSkin.Menu_MenuItemPressedGradientEnd; } + } + public override Color RaftingContainerGradientBegin + { + get { return LoadedSkin.Menu_RaftingContainerGradientBegin; } + } + public override Color RaftingContainerGradientEnd + { + get { return LoadedSkin.Menu_RaftingContainerGradientEnd; } + } + public override Color SeparatorDark + { + get { return LoadedSkin.Menu_SeparatorDark; } + } + public override Color SeparatorLight + { + get { return LoadedSkin.Menu_SeparatorLight; } + } + public override Color StatusStripGradientBegin + { + get { return LoadedSkin.Menu_StatusStripGradientBegin; } + } + public override Color StatusStripGradientEnd + { + get { return LoadedSkin.Menu_StatusStripGradientEnd; } + } + public override Color ToolStripBorder + { + get { return LoadedSkin.Menu_ToolStripBorder; } + } + public override Color ToolStripDropDownBackground + { + get { return LoadedSkin.Menu_ToolStripDropDownBackground; } + } + public override Color ToolStripGradientBegin + { + get { return LoadedSkin.Menu_ToolStripGradientBegin; } + } + public override Color ToolStripGradientMiddle + { + get { return LoadedSkin.Menu_ToolStripGradientMiddle; } + } + public override Color ToolStripGradientEnd + { + get { return LoadedSkin.Menu_ToolStripGradientEnd; } + } + public override Color ToolStripContentPanelGradientBegin + { + get { return LoadedSkin.Menu_ToolStripContentPanelGradientBegin; } + } + public override Color ToolStripContentPanelGradientEnd + { + get { return LoadedSkin.Menu_ToolStripContentPanelGradientEnd; } + } + public override Color ToolStripPanelGradientBegin + { + get { return LoadedSkin.Menu_ToolStripPanelGradientBegin; } + } + public override Color ToolStripPanelGradientEnd + { + get { return LoadedSkin.Menu_ToolStripPanelGradientEnd; } + } + public override Color OverflowButtonGradientBegin + { + get { return Color.Transparent; } + } + public override Color OverflowButtonGradientMiddle + { + get { return Color.Transparent; } + } + public override Color OverflowButtonGradientEnd + { + get { return Color.Transparent; } + } + } +} diff --git a/ShiftOS.WinForms/WFLanguageProvider.cs b/ShiftOS.WinForms/WFLanguageProvider.cs new file mode 100644 index 0000000..d334345 --- /dev/null +++ b/ShiftOS.WinForms/WFLanguageProvider.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json; +using ShiftOS.Engine; +using ShiftOS.Objects.ShiftFS; + +namespace ShiftOS.WinForms +{ + public class WFLanguageProvider : ILanguageProvider + { + public string[] GetAllLanguages() + { + return JsonConvert.DeserializeObject(Properties.Resources.languages); + } + + public string GetCurrentTranscript() + { + switch (SaveSystem.CurrentSave.Language) + { + case "deutsch - in beta": + return Properties.Resources.strings_de; + default: + return getDefault(); + + } + } + + public List GetJSONTranscripts() + { + var strings = new List(); + strings.Add(Properties.Resources.strings_en); + strings.Add(Properties.Resources.strings_de); + return strings; + } + + public void WriteDefaultTranscript() + { + Utils.WriteAllText(Paths.GetPath("english.local"), getDefault()); + } + + private string getDefault() + { + return Properties.Resources.strings_en; + } + } +} diff --git a/ShiftOS.WinForms/WindowBorder.Designer.cs b/ShiftOS.WinForms/WindowBorder.Designer.cs new file mode 100644 index 0000000..74f9d25 --- /dev/null +++ b/ShiftOS.WinForms/WindowBorder.Designer.cs @@ -0,0 +1,223 @@ +using ShiftOS.Engine; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms +{ + partial class WindowBorder + { + /// + /// 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.pnltitle = new System.Windows.Forms.Panel(); + this.pnltitleleft = new System.Windows.Forms.Panel(); + this.pnltitleright = new System.Windows.Forms.Panel(); + this.pnlminimize = new System.Windows.Forms.Panel(); + this.pnlmaximize = new System.Windows.Forms.Panel(); + this.pnlclose = new System.Windows.Forms.Panel(); + this.lbtitletext = new System.Windows.Forms.Label(); + this.pnlbottom = new System.Windows.Forms.Panel(); + this.pnlbottomr = new System.Windows.Forms.Panel(); + this.pnlbottoml = new System.Windows.Forms.Panel(); + this.pnlleft = new System.Windows.Forms.Panel(); + this.pnlright = new System.Windows.Forms.Panel(); + this.pnlcontents = new System.Windows.Forms.Panel(); + this.pnltitle.SuspendLayout(); + this.pnlbottom.SuspendLayout(); + this.SuspendLayout(); + // + // pnltitle + // + this.pnltitle.BackColor = System.Drawing.Color.Black; + this.pnltitle.Controls.Add(this.pnltitleleft); + this.pnltitle.Controls.Add(this.pnltitleright); + this.pnltitle.Controls.Add(this.pnlminimize); + this.pnltitle.Controls.Add(this.pnlmaximize); + this.pnltitle.Controls.Add(this.pnlclose); + this.pnltitle.Controls.Add(this.lbtitletext); + this.pnltitle.Dock = System.Windows.Forms.DockStyle.Top; + this.pnltitle.Location = new System.Drawing.Point(2, 0); + this.pnltitle.Name = "pnltitle"; + this.pnltitle.Size = new System.Drawing.Size(726, 30); + this.pnltitle.TabIndex = 0; + this.pnltitle.Paint += new System.Windows.Forms.PaintEventHandler(this.pnltitle_Paint); + this.pnltitle.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pnltitle_MouseMove); + // + // pnltitleleft + // + this.pnltitleleft.Dock = System.Windows.Forms.DockStyle.Left; + this.pnltitleleft.Location = new System.Drawing.Point(0, 0); + this.pnltitleleft.Name = "pnltitleleft"; + this.pnltitleleft.Size = new System.Drawing.Size(2, 30); + this.pnltitleleft.TabIndex = 4; + // + // pnltitleright + // + this.pnltitleright.Dock = System.Windows.Forms.DockStyle.Right; + this.pnltitleright.Location = new System.Drawing.Point(724, 0); + this.pnltitleright.Name = "pnltitleright"; + this.pnltitleright.Size = new System.Drawing.Size(2, 30); + this.pnltitleright.TabIndex = 5; + // + // pnlminimize + // + this.pnlminimize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pnlminimize.BackColor = System.Drawing.Color.Green; + this.pnlminimize.Location = new System.Drawing.Point(645, 3); + this.pnlminimize.Name = "pnlminimize"; + this.pnlminimize.Size = new System.Drawing.Size(24, 24); + this.pnlminimize.TabIndex = 3; + this.pnlminimize.Click += new System.EventHandler(this.pnlminimize_Click); + // + // pnlmaximize + // + this.pnlmaximize.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pnlmaximize.BackColor = System.Drawing.Color.Yellow; + this.pnlmaximize.Location = new System.Drawing.Point(672, 3); + this.pnlmaximize.Name = "pnlmaximize"; + this.pnlmaximize.Size = new System.Drawing.Size(24, 24); + this.pnlmaximize.TabIndex = 2; + this.pnlmaximize.Click += new System.EventHandler(this.pnlmaximize_Click); + // + // pnlclose + // + this.pnlclose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pnlclose.BackColor = System.Drawing.Color.Red; + this.pnlclose.Location = new System.Drawing.Point(699, 3); + this.pnlclose.Name = "pnlclose"; + this.pnlclose.Size = new System.Drawing.Size(24, 24); + this.pnlclose.TabIndex = 1; + this.pnlclose.Click += new System.EventHandler(this.pnlclose_Click); + // + // lbtitletext + // + this.lbtitletext.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.lbtitletext.AutoSize = true; + this.lbtitletext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.lbtitletext.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Bold); + this.lbtitletext.ForeColor = System.Drawing.Color.White; + this.lbtitletext.Location = new System.Drawing.Point(4, 0); + this.lbtitletext.Name = "lbtitletext"; + this.lbtitletext.Size = new System.Drawing.Size(77, 14); + this.lbtitletext.TabIndex = 0; + this.lbtitletext.Text = "Title text"; + this.lbtitletext.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.lbtitletext.UseMnemonic = false; + this.lbtitletext.Click += new System.EventHandler(this.lbtitletext_Click); + this.lbtitletext.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lbtitletext_MouseMove); + // + // pnlbottom + // + this.pnlbottom.BackColor = System.Drawing.Color.Black; + this.pnlbottom.Controls.Add(this.pnlbottomr); + this.pnlbottom.Controls.Add(this.pnlbottoml); + this.pnlbottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlbottom.Location = new System.Drawing.Point(2, 491); + this.pnlbottom.Name = "pnlbottom"; + this.pnlbottom.Size = new System.Drawing.Size(726, 2); + this.pnlbottom.TabIndex = 1; + // + // pnlbottomr + // + this.pnlbottomr.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlbottomr.Location = new System.Drawing.Point(724, 0); + this.pnlbottomr.Name = "pnlbottomr"; + this.pnlbottomr.Size = new System.Drawing.Size(2, 2); + this.pnlbottomr.TabIndex = 3; + // + // pnlbottoml + // + this.pnlbottoml.Dock = System.Windows.Forms.DockStyle.Left; + this.pnlbottoml.Location = new System.Drawing.Point(0, 0); + this.pnlbottoml.Name = "pnlbottoml"; + this.pnlbottoml.Size = new System.Drawing.Size(2, 2); + this.pnlbottoml.TabIndex = 2; + // + // pnlleft + // + this.pnlleft.BackColor = System.Drawing.Color.Black; + this.pnlleft.Dock = System.Windows.Forms.DockStyle.Left; + this.pnlleft.Location = new System.Drawing.Point(0, 0); + this.pnlleft.Name = "pnlleft"; + this.pnlleft.Size = new System.Drawing.Size(2, 493); + this.pnlleft.TabIndex = 2; + // + // pnlright + // + this.pnlright.BackColor = System.Drawing.Color.Black; + this.pnlright.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlright.Location = new System.Drawing.Point(728, 0); + this.pnlright.Name = "pnlright"; + this.pnlright.Size = new System.Drawing.Size(2, 493); + this.pnlright.TabIndex = 3; + // + // pnlcontents + // + this.pnlcontents.BackColor = System.Drawing.Color.Black; + this.pnlcontents.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlcontents.ForeColor = System.Drawing.Color.White; + this.pnlcontents.Location = new System.Drawing.Point(2, 30); + this.pnlcontents.Name = "pnlcontents"; + this.pnlcontents.Size = new System.Drawing.Size(726, 461); + this.pnlcontents.TabIndex = 4; + // + // WindowBorder + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(730, 493); + this.Controls.Add(this.pnlcontents); + this.Controls.Add(this.pnltitle); + this.Controls.Add(this.pnlbottom); + this.Controls.Add(this.pnlright); + this.Controls.Add(this.pnlleft); + this.Name = "WindowBorder"; + this.Load += new System.EventHandler(this.WindowBorder_Load); + this.pnltitle.ResumeLayout(false); + this.pnltitle.PerformLayout(); + this.pnlbottom.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnltitle; + private System.Windows.Forms.Label lbtitletext; + private System.Windows.Forms.Panel pnlminimize; + private System.Windows.Forms.Panel pnlmaximize; + private System.Windows.Forms.Panel pnlclose; + private System.Windows.Forms.Panel pnlbottom; + private System.Windows.Forms.Panel pnlbottomr; + private System.Windows.Forms.Panel pnlbottoml; + private System.Windows.Forms.Panel pnlleft; + private System.Windows.Forms.Panel pnlright; + private System.Windows.Forms.Panel pnlcontents; + private System.Windows.Forms.Panel pnltitleright; + private System.Windows.Forms.Panel pnltitleleft; + } +} diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs new file mode 100644 index 0000000..46a4c87 --- /dev/null +++ b/ShiftOS.WinForms/WindowBorder.cs @@ -0,0 +1,318 @@ +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 static ShiftOS.Engine.SkinEngine; +using System.Runtime.InteropServices; +using ShiftOS.Engine; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms +{ + public partial class WindowBorder : Form, IWindowBorder + { + protected override void OnClosing(CancelEventArgs e) + { + if ((ParentWindow as IShiftOSWindow).OnUnload()) + { + if (!SaveSystem.ShuttingDown) + { + if(Engine.AppearanceManager.OpenForms.Contains(this)) + Engine.AppearanceManager.OpenForms.Remove(this); + Desktop.ResetPanelButtons(); + } + } + base.OnClosing(e); + } + private UserControl _parentWindow = null; + + public IShiftOSWindow ParentWindow + { + get + { + return (IShiftOSWindow)_parentWindow; + } + set + { + _parentWindow = (UserControl)value; + } + } + + public WindowBorder(UserControl win) + { + InitializeComponent(); + this._parentWindow = win; + Shiftorium.Installed += () => + { + try + { + this.ParentForm.Invoke(new Action(() => + { + Setup(); + })); + } + catch { } + }; + SkinEngine.SkinLoaded += () => + { + try + { + Setup(); + (ParentWindow as IShiftOSWindow).OnSkinLoad(); + ControlManager.SetupControl(this.pnlcontents); + } + catch + { + + } + }; + + this.Width = LoadedSkin.LeftBorderWidth + _parentWindow.Width + LoadedSkin.RightBorderWidth; + this.Height = LoadedSkin.TitlebarHeight + _parentWindow.Height + LoadedSkin.BottomBorderWidth; + + this.pnlcontents.Controls.Add(this._parentWindow); + this._parentWindow.Dock = DockStyle.Fill; + this._parentWindow.Show(); + ControlManager.SetupControls(this._parentWindow); + + + Desktop.ShowWindow(this); + + } + + public static void Universal_KeyDown(object o, KeyEventArgs a) + { + if (a.Control && a.KeyCode == Keys.T) + { + a.SuppressKeyPress = true; + + + if (SaveSystem.CurrentSave != null) + { + if (Shiftorium.UpgradeInstalled("window_manager")) + { + Engine.AppearanceManager.SetupWindow(new Applications.Terminal()); + } + } + } + } + + public void WindowBorder_Load(object sender, EventArgs e) + { + this.DoubleBuffered = true; + + this._parentWindow.TextChanged += (o, a) => + { + Setup(); + Desktop.ResetPanelButtons(); + + }; + + this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2; + this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2; + + if (!this.IsDialog) + { + Engine.AppearanceManager.OpenForms.Add(this); + } + + SaveSystem.GameReady += () => + { + if (Shiftorium.UpgradeInstalled("wm_free_placement")) + { + AppearanceManager.Invoke(new Action(() => + { + this.Left = (Screen.PrimaryScreen.Bounds.Width - this.Width) / 2; + this.Top = (Screen.PrimaryScreen.Bounds.Height - this.Height) / 2; + + })); + } + AppearanceManager.Invoke(new Action(() => + { + Setup(); + })); + }; + + ControlManager.SetupControls(this); + + Setup(); + + var sWin = (IShiftOSWindow)ParentWindow; + + sWin.OnLoad(); + } + + public void Setup() + { + this.lbtitletext.Text = Localization.Parse(this._parentWindow.Text); + + if (SaveSystem.CurrentSave != null) + { + this.pnltitle.Visible = Shiftorium.UpgradeInstalled("wm_titlebar"); + this.pnlclose.Visible = Shiftorium.UpgradeInstalled("close_button"); + this.pnlminimize.Visible = (IsDialog == false) && Shiftorium.UpgradeInstalled("minimize_button"); + this.pnlmaximize.Visible = (IsDialog == false) && Shiftorium.UpgradeInstalled("maximize_button"); + SetupSkin(); + } + else + { + this.pnltitle.Visible = false; + this.pnlclose.Visible = false; + this.pnlminimize.Visible = false; + this.pnlmaximize.Visible = false; + + } + } + + public override string Text + { + get + { + return lbtitletext?.Text; + } + + set + { + lbtitletext.Text = value; + } + } + + public void SetupSkin() + { + this.DoubleBuffered = true; + this.TransparencyKey = LoadedSkin.SystemKey; + pnltitle.Height = LoadedSkin.TitlebarHeight; + pnltitle.BackColor = LoadedSkin.TitleBackgroundColor; + pnltitle.BackgroundImage = GetImage("titlebar"); + pnltitleleft.Visible = LoadedSkin.ShowTitleCorners; + pnltitleright.Visible = LoadedSkin.ShowTitleCorners; + pnltitleleft.BackColor = LoadedSkin.TitleLeftCornerBackground; + pnltitleright.BackColor = LoadedSkin.TitleRightCornerBackground; + pnltitleleft.Width = LoadedSkin.TitleLeftCornerWidth; + pnltitleright.Width = LoadedSkin.TitleRightCornerWidth; + pnltitleleft.BackgroundImage = GetImage("titleleft"); + pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleft"); + pnltitleright.BackgroundImage = GetImage("titleright"); + pnltitleright.BackgroundImageLayout = GetImageLayout("titleright"); + + + lbtitletext.BackColor = LoadedSkin.TitleBackgroundColor; + lbtitletext.ForeColor = LoadedSkin.TitleTextColor; + lbtitletext.Font = LoadedSkin.TitleFont; + + pnlleft.BackColor = LoadedSkin.BorderLeftBackground; + pnlleft.BackgroundImage = GetImage("leftborder"); + pnlleft.BackgroundImageLayout = GetImageLayout("leftborder"); + pnlleft.Width = LoadedSkin.LeftBorderWidth; + pnlright.BackColor = LoadedSkin.BorderRightBackground; + pnlright.BackgroundImage = GetImage("rightborder"); + pnlright.BackgroundImageLayout = GetImageLayout("rightborder"); + pnlright.Width = LoadedSkin.RightBorderWidth; + + pnlbottom.BackColor = LoadedSkin.BorderBottomBackground; + pnlbottom.BackgroundImage = GetImage("bottomborder"); + pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborder"); + pnlbottom.Height = LoadedSkin.BottomBorderWidth; + + pnlbottomr.BackColor = LoadedSkin.BorderBottomRightBackground; + pnlbottomr.BackgroundImage = GetImage("bottomrborder"); + pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborder"); + pnlbottoml.BackColor = LoadedSkin.BorderBottomLeftBackground; + pnlbottoml.BackgroundImage = GetImage("bottomlborder"); + pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborder"); + + lbtitletext.ForeColor = LoadedSkin.TitleTextColor; + lbtitletext.Font = LoadedSkin.TitleFont; + pnlclose.BackColor = LoadedSkin.CloseButtonColor; + pnlclose.BackgroundImage = GetImage("closebutton"); + pnlclose.BackgroundImageLayout = GetImageLayout("closebutton"); + pnlminimize.BackColor = LoadedSkin.MinimizeButtonColor; + pnlminimize.BackgroundImage = GetImage("minimizebutton"); + pnlminimize.BackgroundImageLayout = GetImageLayout("minimizebutton"); + pnlmaximize.BackColor = LoadedSkin.MaximizeButtonColor; + pnlmaximize.BackgroundImage = GetImage("maximizebutton"); + pnlmaximize.BackgroundImageLayout = GetImageLayout("maximizebutton"); + + pnlclose.Size = LoadedSkin.CloseButtonSize; + pnlminimize.Size = LoadedSkin.MinimizeButtonSize; + pnlmaximize.Size = LoadedSkin.MaximizeButtonSize; + pnlclose.Location = FromRight(LoadedSkin.CloseButtonFromSide); + pnlminimize.Location = FromRight(LoadedSkin.MinimizeButtonFromSide); + pnlmaximize.Location = FromRight(LoadedSkin.MaximizeButtonFromSide); + pnlclose.Left -= pnlclose.Width; + pnlmaximize.Left -= pnlmaximize.Width; + pnlminimize.Left -= pnlminimize.Width; + + switch (LoadedSkin.TitleTextCentered) + { + case false: + lbtitletext.Location = LoadedSkin.TitleTextLeft; + break; + default: + lbtitletext.Left = (pnltitle.Width - lbtitletext.Width) / 2; + lbtitletext.Top = LoadedSkin.TitleTextLeft.Y; + break; + } + } + + public Point FromRight(Point input) + { + return new Point(pnltitle.Width - input.X, input.Y); + } + + private void lbtitletext_Click(object sender, EventArgs e) + { + + } + + private void pnlclose_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void pnlmaximize_Click(object sender, EventArgs e) + { + TerminalBackend.InvokeCommand($"win.max{{id:{this.ParentForm.GetHashCode()}}}"); + } + + private void pnlminimize_Click(object sender, EventArgs e) + { + TerminalBackend.InvokeCommand($"win.mini{{id:{this.ParentForm.GetHashCode()}}}"); + } + + + public const int WM_NCLBUTTONDOWN = 0xA1; + public const int HT_CAPTION = 0x2; + + public bool IsDialog = false; + + + [DllImportAttribute("user32.dll")] + public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam); + [DllImportAttribute("user32.dll")] + public static extern bool ReleaseCapture(); + + private void pnltitle_MouseMove(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left && Shiftorium.UpgradeInstalled("draggable_windows")) + { + ReleaseCapture(); + SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0); + } + } + + private void pnltitle_Paint(object sender, PaintEventArgs e) { + + } + + private void lbtitletext_MouseMove(object sender, MouseEventArgs e) { + pnltitle_MouseMove(sender, e); + } + } +} diff --git a/ShiftOS.WinForms/WindowBorder.resx b/ShiftOS.WinForms/WindowBorder.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ShiftOS.WinForms/WindowBorder.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/WinformsDesktop.Designer.cs b/ShiftOS.WinForms/WinformsDesktop.Designer.cs new file mode 100644 index 0000000..50a4d7f --- /dev/null +++ b/ShiftOS.WinForms/WinformsDesktop.Designer.cs @@ -0,0 +1,138 @@ +namespace ShiftOS.WinForms +{ + partial class WinformsDesktop + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WinformsDesktop)); + this.desktoppanel = new System.Windows.Forms.Panel(); + this.panelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); + this.sysmenuholder = new System.Windows.Forms.Panel(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.apps = new System.Windows.Forms.ToolStripMenuItem(); + this.lbtime = new System.Windows.Forms.Label(); + this.desktoppanel.SuspendLayout(); + this.sysmenuholder.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // desktoppanel + // + this.desktoppanel.BackColor = System.Drawing.Color.Green; + this.desktoppanel.Controls.Add(this.lbtime); + this.desktoppanel.Controls.Add(this.panelbuttonholder); + this.desktoppanel.Controls.Add(this.sysmenuholder); + this.desktoppanel.Dock = System.Windows.Forms.DockStyle.Top; + this.desktoppanel.Location = new System.Drawing.Point(0, 0); + this.desktoppanel.Name = "desktoppanel"; + this.desktoppanel.Size = new System.Drawing.Size(1296, 24); + this.desktoppanel.TabIndex = 0; + // + // panelbuttonholder + // + this.panelbuttonholder.AutoSize = true; + this.panelbuttonholder.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.panelbuttonholder.Location = new System.Drawing.Point(107, -77); + this.panelbuttonholder.Name = "panelbuttonholder"; + this.panelbuttonholder.Size = new System.Drawing.Size(0, 0); + this.panelbuttonholder.TabIndex = 2; + // + // sysmenuholder + // + this.sysmenuholder.Controls.Add(this.menuStrip1); + this.sysmenuholder.Location = new System.Drawing.Point(12, 5); + this.sysmenuholder.Name = "sysmenuholder"; + this.sysmenuholder.Size = new System.Drawing.Size(68, 24); + this.sysmenuholder.TabIndex = 1; + // + // menuStrip1 + // + this.menuStrip1.Dock = System.Windows.Forms.DockStyle.Fill; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.apps}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Padding = new System.Windows.Forms.Padding(0); + this.menuStrip1.Size = new System.Drawing.Size(68, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // apps + // + this.apps.AutoSize = false; + this.apps.Name = "apps"; + this.apps.Padding = new System.Windows.Forms.Padding(0); + this.apps.Size = new System.Drawing.Size(58, 20); + this.apps.Text = "ShiftOS"; + // + // lbtime + // + this.lbtime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbtime.AutoSize = true; + this.lbtime.Location = new System.Drawing.Point(3, 0); + this.lbtime.Name = "lbtime"; + this.lbtime.Size = new System.Drawing.Size(49, 14); + this.lbtime.TabIndex = 0; + this.lbtime.Text = "label1"; + this.lbtime.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // Desktop + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(1296, 738); + this.Controls.Add(this.desktoppanel); + this.Font = new System.Drawing.Font("Consolas", 9F); + this.ForeColor = System.Drawing.Color.LightGreen; + this.MainMenuStrip = this.menuStrip1; + this.Name = "Desktop"; + this.Text = "Desktop"; + this.Load += new System.EventHandler(this.Desktop_Load); + this.desktoppanel.ResumeLayout(false); + this.desktoppanel.PerformLayout(); + this.sysmenuholder.ResumeLayout(false); + this.sysmenuholder.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel desktoppanel; + private System.Windows.Forms.Label lbtime; + private System.Windows.Forms.Panel sysmenuholder; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem apps; + private System.Windows.Forms.FlowLayoutPanel panelbuttonholder; + } + +} + diff --git a/ShiftOS.WinForms/WinformsDesktop.cs b/ShiftOS.WinForms/WinformsDesktop.cs new file mode 100644 index 0000000..f358c95 --- /dev/null +++ b/ShiftOS.WinForms/WinformsDesktop.cs @@ -0,0 +1,264 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; +using static ShiftOS.Engine.SkinEngine; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms +{ + public partial class WinformsDesktop : Form, IDesktop + { + private static event Action windowAdded; + + public WinformsDesktop() + { + InitializeComponent(); + this.TopMost = false; + this.LocationChanged += (o, a) => + { + if (this.Left != 0) + this.Left = 0; + if (this.Top != 0) + this.Top = 0; + }; + + this.SizeChanged += (o, a) => + { + if (this.ClientRectangle != Screen.PrimaryScreen.Bounds) + { + this.WindowState = FormWindowState.Maximized; + } + }; + + SaveSystem.GameReady += () => this.Invoke(new Action(() => SetupDesktop())); + Shiftorium.Installed += () => this.Invoke(new Action(() => SetupDesktop())); + var time = new Timer(); + time.Interval = 100; + this.KeyDown += (o, a) => + { + if (a.Control && a.KeyCode == Keys.T) + { + Engine.AppearanceManager.SetupWindow(new Applications.Terminal()); + } + /*if (a.Control && a.KeyCode == Keys.Tab) + { + // CtrlTabMenu + CtrlTabMenu.Show(); + if (a.Shift) CtrlTabMenu.CycleBack(); + else CtrlTabMenu.CycleForwards(); + }*/ //nyi + }; + SkinEngine.SkinLoaded += () => + { + SetupDesktop(); + }; + time.Tick += (o, a) => + { + if (SaveSystem.CurrentSave != null) + { + lbtime.Text = Applications.Terminal.GetTime(); + lbtime.Left = desktoppanel.Width - lbtime.Width - LoadedSkin.DesktopPanelClockFromRight.X; + lbtime.Top = LoadedSkin.DesktopPanelClockFromRight.Y; + } + }; + time.Start(); + + this.DoubleBuffered = true; + } + + public void PopulatePanelButtons() + { + panelbuttonholder.Controls.Clear(); + if (Shiftorium.UpgradeInstalled("wm_panel_buttons")) + { + foreach (WindowBorder form in Engine.AppearanceManager.OpenForms) + { + if (form != null) + { + if (form.Visible == true) + { + var pnlbtn = new Panel(); + pnlbtn.Margin = new Padding(2, LoadedSkin.PanelButtonFromTop, 0, 0); + pnlbtn.BackgroundImage = GetImage("panelbutton"); + pnlbtn.BackgroundImageLayout = GetImageLayout("panelbutton"); + + var pnlbtntext = new Label(); + pnlbtntext.Text = form.Text; + pnlbtntext.AutoSize = true; + pnlbtntext.Location = LoadedSkin.PanelButtonFromLeft; + pnlbtntext.ForeColor = LoadedSkin.PanelButtonTextColor; + pnlbtntext.Font = LoadedSkin.PanelButtonFont; + + pnlbtn.BackColor = LoadedSkin.PanelButtonColor; + if (pnlbtn.BackgroundImage != null) + { + pnlbtntext.BackColor = Color.Transparent; + } + pnlbtn.Size = LoadedSkin.PanelButtonSize; + + pnlbtn.Controls.Add(pnlbtntext); + this.panelbuttonholder.Controls.Add(pnlbtn); + ControlManager.SetupControls(pnlbtn); + pnlbtn.Show(); + pnlbtntext.Show(); + } + } + } + } + } + + public void SetupDesktop() + { + ToolStripManager.Renderer = new ShiftOSMenuRenderer(); + + this.DoubleBuffered = true; + this.FormBorderStyle = FormBorderStyle.None; + this.WindowState = FormWindowState.Maximized; + desktoppanel.BackColor = Color.Green; + + //upgrades + + if (SaveSystem.CurrentSave != null) + { + desktoppanel.Visible = Shiftorium.UpgradeInstalled("desktop"); + lbtime.Visible = Shiftorium.UpgradeInstalled("desktop_clock_widget"); + + //skinning + lbtime.ForeColor = LoadedSkin.DesktopPanelClockColor; + + panelbuttonholder.Top = 0; + panelbuttonholder.Left = LoadedSkin.PanelButtonHolderFromLeft; + panelbuttonholder.Height = desktoppanel.Height; + panelbuttonholder.BackColor = Color.Transparent; + panelbuttonholder.Margin = new Padding(0, 0, 0, 0); + + sysmenuholder.Visible = Shiftorium.UpgradeInstalled("app_launcher"); + + //The Color Picker can give us transparent colors - which Windows Forms fucking despises when dealing with form backgrounds. + //To compensate, we must recreate the desktop color and make the alpha channel '255'. + this.BackColor = Color.FromArgb(LoadedSkin.DesktopColor.R, LoadedSkin.DesktopColor.G, LoadedSkin.DesktopColor.B); + //Not doing this will cause an ArgumentException. + + DitheringEngine.DitherImage(SkinEngine.GetImage("desktopbackground"), new Action((img) => + { + this.BackgroundImage = img; + })); + this.BackgroundImageLayout = GetImageLayout("desktopbackground"); + desktoppanel.BackgroundImage = GetImage("desktoppanel"); + menuStrip1.BackgroundImage = GetImage("applauncher"); + lbtime.ForeColor = LoadedSkin.DesktopPanelClockColor; + lbtime.Font = LoadedSkin.DesktopPanelClockFont; + if (desktoppanel.BackgroundImage == null) + { + lbtime.BackColor = LoadedSkin.DesktopPanelClockBackgroundColor; + } + else + { + lbtime.BackColor = Color.Transparent; + } + apps.Text = LoadedSkin.AppLauncherText; + sysmenuholder.Location = LoadedSkin.AppLauncherFromLeft; + sysmenuholder.Size = LoadedSkin.AppLauncherHolderSize; + apps.Size = sysmenuholder.Size; + menuStrip1.Renderer = new ShiftOSMenuRenderer(new AppLauncherColorTable()); + desktoppanel.BackColor = LoadedSkin.DesktopPanelColor; + desktoppanel.BackgroundImageLayout = GetImageLayout("desktoppanel"); + desktoppanel.Height = LoadedSkin.DesktopPanelHeight; + if (LoadedSkin.DesktopPanelPosition == 1) + { + desktoppanel.Dock = DockStyle.Bottom; + } + else + { + desktoppanel.Dock = DockStyle.Top; + } + } + + PopulatePanelButtons(); + } + + public void PopulateAppLauncher(LauncherItem[] items) + { + apps.DropDownItems.Clear(); + + foreach (var kv in items) + { + var item = new ToolStripMenuItem(); + item.Text = kv.DisplayData.Name; + item.Click += (o, a) => + { + Engine.AppearanceManager.SetupWindow(Activator.CreateInstance(kv.LaunchType) as IShiftOSWindow); + }; + apps.DropDownItems.Add(item); + } + + if (Shiftorium.UpgradeInstalled("al_shutdown")) + { + apps.DropDownItems.Add(new ToolStripSeparator()); + var item = new ToolStripMenuItem(); + item.Text = Localization.Parse("{SHUTDOWN}"); + item.Click += (o, a) => + { + TerminalBackend.InvokeCommand("sos.shutdown"); + }; + apps.DropDownItems.Add(item); + + } + } + + + + private void Desktop_Load(object sender, EventArgs e) + { + + SaveSystem.Begin(); + + SetupDesktop(); + } + + public void ShowWindow(IWindowBorder border) + { + var brdr = border as Form; + brdr.FormBorderStyle = FormBorderStyle.None; + brdr.Show(); + brdr.TopMost = true; + } + + public void KillWindow(IWindowBorder border) + { + throw new NotImplementedException(); + } + + public void MinimizeWindow(IWindowBorder brdr) + { + throw new NotImplementedException(); + } + + public void MaximizeWindow(IWindowBorder brdr) + { + throw new NotImplementedException(); + } + + public void RestoreWindow(IWindowBorder brdr) + { + throw new NotImplementedException(); + } + + public void InvokeOnWorkerThread(Action act) + { + this.Invoke(act); + } + + public Size GetSize() + { + return this.Size; + } + } +} diff --git a/ShiftOS.WinForms/WinformsWindowManager.cs b/ShiftOS.WinForms/WinformsWindowManager.cs new file mode 100644 index 0000000..cec69a4 --- /dev/null +++ b/ShiftOS.WinForms/WinformsWindowManager.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; +using ShiftOS.WinForms.Tools; + +namespace ShiftOS.WinForms +{ + internal class WinformsWindowManager : WindowManager + { + public override void Close(IShiftOSWindow win) + { + (win as UserControl).Close(); + } + + public override void InvokeAction(Action act) + { + Desktop.InvokeOnWorkerThread(act); + } + + public override void Maximize(IWindowBorder form) + { + try + { + var deskSize = new Size(0, 0); + deskSize.Width = Screen.PrimaryScreen.Bounds.Width; + deskSize.Height = Screen.PrimaryScreen.Bounds.Height; + + deskSize.Height -= SkinEngine.LoadedSkin.DesktopPanelHeight; + + var deskStart = new Point((SkinEngine.LoadedSkin.DesktopPanelPosition == 0) ? SkinEngine.LoadedSkin.DesktopPanelHeight : 0, 0); + + (form as WindowBorder).Location = deskStart; + (form as WindowBorder).Size = deskSize; + + + } + catch + { + } + } + + public override void Minimize(IWindowBorder border) + { + try + { + + } + catch { } + } + + public override void SetupDialog(IShiftOSWindow form) + { + if (!Shiftorium.UpgradeAttributesUnlocked(form.GetType())) + { + Console.WriteLine("{APP_NOT_FOUND}"); + return; + } + + var wb = new WindowBorder(form as UserControl); + wb.IsDialog = true; + + + wb.Show(); + } + + public override void SetupWindow(IShiftOSWindow form) + { + if (!AppearanceManager.CanOpenWindow(form)) + { + Infobox.Show("{MULTIPLAYER_ONLY}", "{MULTIPLAYER_ONLY_EXP}"); + return; + } + + + if (!Shiftorium.UpgradeAttributesUnlocked(form.GetType())) + { + Console.WriteLine("{APP_NOT_FOUND}"); + return; + } + + if (SaveSystem.CurrentSave != null) + { + if (!form.GetType().Name.Contains(typeof(Applications.Dialog).Name)) + { + int maxWindows = 0; + + //Window manager will step in here. + if (Shiftorium.UpgradeInstalled("wm_unlimited_windows")) + { + maxWindows = 0; + } + else if (Shiftorium.UpgradeInstalled("wm_4_windows")) + { + maxWindows = 4; + } + else if (Shiftorium.UpgradeInstalled("window_manager")) + { + maxWindows = 2; + } + else + { + maxWindows = 1; + } + + + if (maxWindows > 0) + { + List formstoclose = new List(); + + foreach (WindowBorder frm in AppearanceManager.OpenForms) + { + formstoclose.Add(frm); + + } + + while (formstoclose.Count > maxWindows - 1) + { + formstoclose[0].Close(); + formstoclose.RemoveAt(0); + } + } + } + } + + var wb = new WindowBorder(form as UserControl); + + ControlManager.SetupWindows(); + } + } +} diff --git a/ShiftOS.WinForms/packages.config b/ShiftOS.WinForms/packages.config new file mode 100644 index 0000000..9d64bf3 --- /dev/null +++ b/ShiftOS.WinForms/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ShiftOS.Wpf/App.config b/ShiftOS.Wpf/App.config new file mode 100644 index 0000000..71a06ba --- /dev/null +++ b/ShiftOS.Wpf/App.config @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ShiftOS.Wpf/App.xaml b/ShiftOS.Wpf/App.xaml new file mode 100644 index 0000000..c958acd --- /dev/null +++ b/ShiftOS.Wpf/App.xaml @@ -0,0 +1,60 @@ + + + + + 24 + Bottom + + + + + + + + + + + + + + + + + + + + diff --git a/ShiftOS.Wpf/App.xaml.cs b/ShiftOS.Wpf/App.xaml.cs new file mode 100644 index 0000000..0bf4ecf --- /dev/null +++ b/ShiftOS.Wpf/App.xaml.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using ShiftOS.Engine; + +namespace ShiftOS.Wpf +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + private void Application_Exit(object sender, ExitEventArgs e) + { + global::ShiftOS.Wpf.Startup.DestroyShiftOSEngine(); + } + + private void Application_Startup(object sender, StartupEventArgs e) + { + SkinEngine.SkinLoaded += () => + { + Resources["desktoppanelbg"] = SkinEngine.LoadedSkin.DesktopPanelColor.CreateBrush(); + Resources["desktoppanelheight"] = (double)SkinEngine.LoadedSkin.DesktopPanelHeight; + switch (SkinEngine.LoadedSkin.DesktopPanelPosition) + { + case 0: + Resources["desktoppanelpos"] = VerticalAlignment.Top; + break; + case 1: + Resources["desktoppanelpos"] = VerticalAlignment.Bottom; + break; + } + + Resources["MenuBG"] = SkinEngine.LoadedSkin.Menu_MenuStripGradientBegin.CreateBrush(); + + Resources["MenuItem"] = SkinEngine.LoadedSkin.Menu_MenuStripGradientBegin.CreateBrush(); + Resources["MenuItemText"] = SkinEngine.LoadedSkin.Menu_TextColor.CreateBrush(); + + Resources["MenuItemPressed"] = SkinEngine.LoadedSkin.Menu_MenuItemPressedGradientBegin.CreateBrush(); + Resources["MenuItemPressedText"] = SkinEngine.LoadedSkin.Menu_SelectedTextColor.CreateBrush(); + + Resources["MenuItemHover"] = SkinEngine.LoadedSkin.Menu_MenuItemSelectedGradientBegin.CreateBrush(); + Resources["MenuItemHoverText"] = SkinEngine.LoadedSkin.Menu_SelectedTextColor.CreateBrush(); + + + Resources["MainBackColor"] = SkinEngine.LoadedSkin.ControlColor.CreateBrush(); + Resources["MainForeColor"] = SkinEngine.LoadedSkin.ControlTextColor.CreateBrush(); + Resources["TerminalBG"] = SkinEngine.LoadedSkin.TerminalBackColor.CreateBrush(); + Resources["TerminalFG"] = SkinEngine.LoadedSkin.TerminalForeColor.CreateBrush(); + + }; + } + } +} diff --git a/ShiftOS.Wpf/Applications/FileDialog.xaml b/ShiftOS.Wpf/Applications/FileDialog.xaml new file mode 100644 index 0000000..bdf3253 --- /dev/null +++ b/ShiftOS.Wpf/Applications/FileDialog.xaml @@ -0,0 +1,29 @@ + + + + + + + + Filename: + + + + + + + + + + + + + + diff --git a/ShiftOS.Wpf/Applications/FileDialog.xaml.cs b/ShiftOS.Wpf/Applications/FileDialog.xaml.cs new file mode 100644 index 0000000..820ceeb --- /dev/null +++ b/ShiftOS.Wpf/Applications/FileDialog.xaml.cs @@ -0,0 +1,285 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using ShiftOS.Objects.ShiftFS; +using ShiftOS.Engine; + +namespace ShiftOS.Wpf.Applications +{ + /// + /// Interaction logic for FileDialog.xaml + /// + public partial class FileDialog : UserControl, IShiftOSWindow + { + public FileDialog(string[] filters, FileOpenerStyle style, Action callback) + { + InitializeComponent(); + Filters = filters; + OpenerStyle = style; + Callback = callback; + } + + public string[] Filters { get; set; } + public FileOpenerStyle OpenerStyle { get; set; } + public Action Callback { get; set; } + + private string currentFolder = "0:"; + + public void OnLoad() + { + Reset(); + foreach(var f in Filters) + { + filter.Items.Add(f); + } + filter.SelectedIndex = 0; + } + + public string GetParent(string path) + { + string[] pathlist = path.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + if (pathlist.Length > 1) + { + if (path.EndsWith("/")) + { + path = path.Remove(path.Length - 1, 1); + } + path = path.Remove(path.LastIndexOf('/'), path.Length - path.LastIndexOf('/')); + return path; + } + else + { + return "__system"; + } + } + + public void Reset() + { + if (currentFolder != "__system") + this.SetTitle("File Skimmer - " + currentFolder); + else + this.SetTitle("File Skimmer"); + + lbfiles.Children.Clear(); + if (currentFolder == "__system") + { + foreach (var dir in Utils.Mounts) + { + var sp = new StackPanel(); + sp.Width = 50; + sp.Margin = new Thickness(5); + var label = new TextBlock(); + label.Text = dir.Name; + label.TextWrapping = TextWrapping.Wrap; + label.TextAlignment = TextAlignment.Center; + + var img = new Image(); + img.Width = 42; + img.Height = 42; + img.Source = FileSkimmerBackend.GetImage(Utils.Mounts.IndexOf(dir) + ":").ToBitmapImage(); + + sp.Children.Add(img); + sp.Children.Add(label); + + sp.PreviewMouseLeftButtonDown += (o, a) => + { + if (a.ClickCount == 2) + { + ChangeDirectory(Utils.Mounts.IndexOf(dir) + ":"); + } + }; + + lbfiles.Children.Add(sp); + + } + } + else + { + var __up = CreateUpOneDirectory(); + lbfiles.Children.Add(__up); + + foreach (var dir in Utils.GetDirectories(currentFolder)) + { + var sp = new StackPanel(); + sp.Margin = new Thickness(5); + sp.Width = 50; + var label = new TextBlock(); + label.Text = Utils.GetDirectoryInfo(dir).Name; + label.TextWrapping = TextWrapping.Wrap; + label.TextAlignment = TextAlignment.Center; + + var img = new Image(); + img.Width = 42; + img.Height = 42; + img.Source = FileSkimmerBackend.GetImage(dir).ToBitmapImage(); + + sp.Children.Add(img); + sp.Children.Add(label); + + sp.PreviewMouseLeftButtonDown += (o, a) => + { + if (a.ClickCount == 2) + { + ChangeDirectory(dir); + } + }; + + lbfiles.Children.Add(sp); + + } + + foreach (var dir in Utils.GetFiles(currentFolder)) + { + if (dir.EndsWith(filter.SelectedItem.ToString())) + { + var sp = new StackPanel(); + sp.Margin = new Thickness(5); + sp.Width = 50; + var label = new TextBlock(); + label.Text = Utils.GetFileInfo(dir).Name; + label.TextWrapping = TextWrapping.Wrap; + label.TextAlignment = TextAlignment.Center; + + var img = new Image(); + img.Width = 42; + img.Height = 42; + img.Source = FileSkimmerBackend.GetImage(dir).ToBitmapImage(); + + sp.Children.Add(img); + sp.Children.Add(label); + + sp.PreviewMouseLeftButtonDown += (o, a) => + { + if (a.ClickCount == 2) + { + if(OpenerStyle == FileOpenerStyle.Open) + { + Callback?.Invoke(dir); + AppearanceManager.Close(this); + } + } + else + { + txtfilename.Text = Utils.GetFileInfo(dir).Name; + } + }; + + lbfiles.Children.Add(sp); + } + } + } + } + + public void ChangeDirectory(string path) + { + currentFolder = path; + Reset(); + } + + private StackPanel CreateUpOneDirectory() + { + var sp = new StackPanel(); + sp.Margin = new Thickness(5); + sp.Width = 50; + var label = new TextBlock(); + label.Text = "Up one directory"; + label.TextWrapping = TextWrapping.Wrap; + label.TextAlignment = TextAlignment.Center; + + var img = new Image(); + img.Width = 42; + img.Height = 42; + img.Source = FileSkimmerBackend.GetImage("__upone").ToBitmapImage(); + + sp.Children.Add(img); + sp.Children.Add(label); + + sp.PreviewMouseLeftButtonDown += (o, a) => + { + if (a.ClickCount == 2) + { + GoUp(); + } + }; + + return sp; + } + + public void GoUp() + { + if (currentFolder.EndsWith(":")) + { + currentFolder = "__system"; + Reset(); + } + else + { + currentFolder = GetParent(currentFolder); + Reset(); + } + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + + } + + + private void btnconfirm_Click(object sender, RoutedEventArgs e) + { + if (!string.IsNullOrWhiteSpace(txtfilename.Text)) + { + if (!txtfilename.Text.EndsWith(filter.SelectedItem.ToString())) + txtfilename.Text += filter.SelectedItem.ToString(); + + switch (OpenerStyle) + { + case FileOpenerStyle.Open: + if(Utils.FileExists(currentFolder + "/" + txtfilename.Text)) + { + Callback?.Invoke(currentFolder + "/" + txtfilename.Text); + AppearanceManager.Close(this); + } + else + { + Infobox.Show("File not found", $"The file {currentFolder}/{txtfilename.Text} was not found."); + } + break; + case FileOpenerStyle.Save: + Callback?.Invoke(currentFolder + "/" + txtfilename.Text); + AppearanceManager.Close(this); + break; + } + } + else + { + Infobox.Show("File Skimmer", "Please provide a filename."); + } + } + + private void filter_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + Reset(); + } + } +} diff --git a/ShiftOS.Wpf/Applications/FileSkimmer.xaml b/ShiftOS.Wpf/Applications/FileSkimmer.xaml new file mode 100644 index 0000000..ae4f435 --- /dev/null +++ b/ShiftOS.Wpf/Applications/FileSkimmer.xaml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + diff --git a/ShiftOS.Wpf/Applications/FileSkimmer.xaml.cs b/ShiftOS.Wpf/Applications/FileSkimmer.xaml.cs new file mode 100644 index 0000000..1abcfc1 --- /dev/null +++ b/ShiftOS.Wpf/Applications/FileSkimmer.xaml.cs @@ -0,0 +1,300 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using ShiftOS.Objects.ShiftFS; +using ShiftOS.Engine; + +namespace ShiftOS.Wpf.Applications +{ + /// + /// Interaction logic for FileSkimmer.xaml + /// + [Launcher("File Skimmer", true, "al_file_skimmer")] + [RequiresUpgrade("file_skimmer")] + public partial class FileSkimmer : UserControl, IShiftOSWindow + { + public FileSkimmer() + { + InitializeComponent(); + } + + private string currentFolder = "0:"; + + static FileSkimmer() + { + FileSkimmerBackend.Init(new WpfFSFrontend()); + } + + public void OnLoad() + { + Reset(); + } + + public string GetParent(string path) + { + string[] pathlist = path.Split(new[] { "/" }, StringSplitOptions.RemoveEmptyEntries); + if (pathlist.Length > 1) + { + if (path.EndsWith("/")) + { + path = path.Remove(path.Length - 1, 1); + } + path = path.Remove(path.LastIndexOf('/'), path.Length - path.LastIndexOf('/')); + return path; + } + else + { + return "__system"; + } + } + + public void Reset() + { + if (currentFolder != "__system") + this.SetTitle("File Skimmer - " + currentFolder); + else + this.SetTitle("File Skimmer"); + + lbfiles.Children.Clear(); + if (currentFolder == "__system") + { + foreach(var dir in Utils.Mounts) + { + var sp = new StackPanel(); + sp.Width = 50; + sp.Margin = new Thickness(5); + var label = new TextBlock(); + label.Text = dir.Name; + label.TextWrapping = TextWrapping.Wrap; + label.TextAlignment = TextAlignment.Center; + + var img = new Image(); + img.Width = 42; + img.Height = 42; + img.Source = FileSkimmerBackend.GetImage(Utils.Mounts.IndexOf(dir) + ":").ToBitmapImage(); + + sp.Children.Add(img); + sp.Children.Add(label); + + sp.PreviewMouseLeftButtonDown += (o, a) => + { + if (a.ClickCount == 2) + { + ChangeDirectory(Utils.Mounts.IndexOf(dir) + ":"); + } + }; + + lbfiles.Children.Add(sp); + + } + } + else + { + var __up = CreateUpOneDirectory(); + lbfiles.Children.Add(__up); + + foreach(var dir in Utils.GetDirectories(currentFolder)) + { + var sp = new StackPanel(); + sp.Margin = new Thickness(5); + sp.Width = 50; + var label = new TextBlock(); + label.Text = Utils.GetDirectoryInfo(dir).Name; + label.TextWrapping = TextWrapping.Wrap; + label.TextAlignment = TextAlignment.Center; + + var img = new Image(); + img.Width = 42; + img.Height = 42; + img.Source = FileSkimmerBackend.GetImage(dir).ToBitmapImage(); + + sp.Children.Add(img); + sp.Children.Add(label); + + sp.PreviewMouseLeftButtonDown += (o, a) => + { + if (a.ClickCount == 2) + { + ChangeDirectory(dir); + } + }; + + lbfiles.Children.Add(sp); + + } + + foreach(var dir in Utils.GetFiles(currentFolder)) + { + var sp = new StackPanel(); + sp.Margin = new Thickness(5); + sp.Width = 50; + var label = new TextBlock(); + label.Text = Utils.GetFileInfo(dir).Name; + label.TextWrapping = TextWrapping.Wrap; + label.TextAlignment = TextAlignment.Center; + + var img = new Image(); + img.Width = 42; + img.Height = 42; + img.Source = FileSkimmerBackend.GetImage(dir).ToBitmapImage(); + + sp.Children.Add(img); + sp.Children.Add(label); + + sp.PreviewMouseLeftButtonDown += (o, a) => + { + if (a.ClickCount == 2) + { + FileSkimmerBackend.OpenFile(dir); + } + }; + + lbfiles.Children.Add(sp); + + } + } + } + + public void ChangeDirectory(string path) + { + currentFolder = path; + Reset(); + } + + private StackPanel CreateUpOneDirectory() + { + var sp = new StackPanel(); + sp.Margin = new Thickness(5); + sp.Width = 50; + var label = new TextBlock(); + label.Text = "Up one directory"; + label.TextWrapping = TextWrapping.Wrap; + label.TextAlignment = TextAlignment.Center; + + var img = new Image(); + img.Width = 42; + img.Height = 42; + img.Source = FileSkimmerBackend.GetImage("__upone").ToBitmapImage(); + + sp.Children.Add(img); + sp.Children.Add(label); + + sp.PreviewMouseLeftButtonDown += (o, a) => + { + if(a.ClickCount == 2) + { + GoUp(); + } + }; + + return sp; + } + + public void GoUp() + { + if (currentFolder.EndsWith(":")) + { + currentFolder = "__system"; + Reset(); + } + else + { + currentFolder = GetParent(currentFolder); + Reset(); + } + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + + } + } + + public class WpfFSFrontend : IFileSkimmer + { + public void GetPath(string[] filetypes, FileOpenerStyle style, Action callback) + { + AppearanceManager.SetupDialog(new FileDialog(filetypes, style, callback)); + } + + public void OpenDirectory(string path) + { + var fs = new FileSkimmer(); + fs.ChangeDirectory(path); + AppearanceManager.SetupWindow(fs); + } + + public void OpenFile(string path) + { + bool opened = true; + + string ext = path.Split('.')[path.Split('.').Length - 1]; + switch(ext) + { + case "txt": + if (Shiftorium.UpgradeInstalled("textpad_open")) + { + var txt = new TextPad(); + txt.LoadFile(path); + AppearanceManager.SetupWindow(txt); + } + else + { + opened = false; + } + break; + case "pic": + case "png": + case "jpg": + case "bmp": + + break; + case "wav": + case "mp3": + + break; + case "lua": + + break; + case "py": + + break; + case "skn": + + break; + case "mfs": + Utils.MountPersistent(path); + string mount = (Utils.Mounts.Count - 1).ToString() + ":"; + OpenDirectory(mount); + break; + default: + opened = false; + break; + } + if(opened == false) + { + Infobox.Show("File Skimmer - Can't open file", "File Skimmer can't find an application to open this file!"); + } + } + } +} diff --git a/ShiftOS.Wpf/Applications/Infobox.xaml b/ShiftOS.Wpf/Applications/Infobox.xaml new file mode 100644 index 0000000..e2ad454 --- /dev/null +++ b/ShiftOS.Wpf/Applications/Infobox.xaml @@ -0,0 +1,13 @@ + + + Message goes here. + + + diff --git a/ShiftOS.Wpf/Applications/Infobox.xaml.cs b/ShiftOS.Wpf/Applications/Infobox.xaml.cs new file mode 100644 index 0000000..b328439 --- /dev/null +++ b/ShiftOS.Wpf/Applications/Infobox.xaml.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using ShiftOS.Engine; + +namespace ShiftOS.Wpf.Applications +{ + /// + /// Interaction logic for Infobox.xaml + /// + public partial class Infobox : UserControl, IShiftOSWindow + { + public Infobox(string title, string msg) + { + InitializeComponent(); + Title = title; + Message = msg; + } + + public static void Show(string title, string msg) + { + ShiftOS.Engine.Infobox.Show(title, msg); + } + + public string Title { get; set; } + public string Message { get; set; } + + public void OnLoad() + { + this.SetTitle(Title); + txtmessage.Text = Message; + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + + private void btnokay_Click(object sender, RoutedEventArgs e) + { + AppearanceManager.Close(this); + } + } +} diff --git a/ShiftOS.Wpf/Applications/MainWindow.xaml b/ShiftOS.Wpf/Applications/MainWindow.xaml new file mode 100644 index 0000000..22b992f --- /dev/null +++ b/ShiftOS.Wpf/Applications/MainWindow.xaml @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/ShiftOS.Wpf/Applications/MainWindow.xaml.cs b/ShiftOS.Wpf/Applications/MainWindow.xaml.cs new file mode 100644 index 0000000..478c652 --- /dev/null +++ b/ShiftOS.Wpf/Applications/MainWindow.xaml.cs @@ -0,0 +1,179 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using ShiftOS.Engine; +using backend = ShiftOS.Engine.TerminalBackend; + +namespace ShiftOS.Wpf +{ + /// + /// Interaction logic for MainWindow.xaml + /// + [Launcher("Terminal", false)] + public partial class Terminal : UserControl, IShiftOSWindow + { + public Terminal() + { + InitializeComponent(); + Startup.ConsoleOut = this.txtterm; + + if (SaveSystem.CurrentSave == null) + { + Startup.InitiateEngine(new WpfTerminalTextWriter()); + SaveSystem.GameReady += () => + { + try + { + Dispatcher.Invoke(new Action(() => + { + txtterm.Text = ""; + backend.PrefixEnabled = true; + backend.InStory = false; + if (SaveSystem.CurrentSave.StoryPosition != 8) + { + Story.RunFromInternalResource("sys_shiftoriumstory"); + SaveSystem.CurrentSave.StoryPosition = 8; + } + Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "); + txtterm.Background = SkinEngine.LoadedSkin.TerminalBackColor.CreateBrush(); + txtterm.Foreground = SkinEngine.LoadedSkin.TerminalForeColor.CreateBrush(); + txtterm.SetFont(SkinEngine.LoadedSkin.TerminalFont); + })); + } + catch { } + }; + } + else + { + Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "); + } + txtterm.Background = SkinEngine.LoadedSkin.TerminalBackColor.CreateBrush(); + txtterm.Foreground = SkinEngine.LoadedSkin.TerminalForeColor.CreateBrush(); + + txtterm.GotFocus += (o, a) => + { + Startup.ConsoleOut = txtterm; + }; + + txtterm.Focus(); + + } + + public void OnLoad() + { + this.SetTitle("Terminal"); + } + + public void OnSkinLoad() + { + txtterm.SetFont(SkinEngine.LoadedSkin.TerminalFont); + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + + public void txtterm_KeyDown(object o, KeyEventArgs a) { + if (a.Key == Key.Enter) + { + try + { + a.Handled = true; + var text2 = txtterm.GetLineText(txtterm.LineCount - 1); + Console.WriteLine(""); + var text3 = ""; + var text4 = Regex.Replace(text2, @"\t|\n|\r", ""); + + if (backend.PrefixEnabled) + { + text3 = text4.Remove(0, $"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ".Length); + } + backend.LastCommand = text3; + if (backend.InStory == false) + { + backend.InvokeCommand(text3); + } + if (backend.PrefixEnabled) + { + Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "); + } + } + catch (Exception ex) + { + Console.WriteLine(ex); + } + } + else if (a.Key == Key.Back) + { + var tostring3 = txtterm.GetLineText(txtterm.LineCount - 1); + var tostringlen = tostring3.Length + 1; + var workaround = $"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "; + var derp = workaround.Length + 1; + if (tostringlen != derp) + { + AppearanceManager.CurrentPosition--; + } + else + { + a.Handled = true; + } + } + else if (a.Key == Key.Left) + { + var getstring = txtterm.GetLineText(txtterm.LineCount - 1); + var stringlen = getstring.Length + 1; + var header = $"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ "; + var headerlen = header.Length + 1; + var selstart = txtterm.SelectionStart; + var remstrlen = txtterm.Text.Length - stringlen; + var finalnum = selstart - remstrlen; + + if (finalnum != headerlen) + { + AppearanceManager.CurrentPosition--; + } + else + { + a.Handled = true; + } + } + //( ͡° ͜ʖ ͡° ) You found the lennyface without looking at the commit message. Message Michael in the #shiftos channel on Discord saying "ladouceur" somewhere in your message if you see this. + else if (a.Key == Key.Up) + { + var tostring3 = txtterm.GetLineText(txtterm.LineCount - 1); + if (tostring3 == $"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ") + Console.Write(backend.LastCommand); + a.Handled = true; + + } + else + { + + AppearanceManager.CurrentPosition++; + } + + } + + private void txtterm_GotFocus(object sender, RoutedEventArgs e) + { + Startup.ConsoleOut = txtterm; + } + } +} diff --git a/ShiftOS.Wpf/Applications/ShiftoriumFrontend.xaml b/ShiftOS.Wpf/Applications/ShiftoriumFrontend.xaml new file mode 100644 index 0000000..f2d0df1 --- /dev/null +++ b/ShiftOS.Wpf/Applications/ShiftoriumFrontend.xaml @@ -0,0 +1,24 @@ + + + + Upgrades + Codepoints: 0 + + + + + + + Cost: {Binding Cost} CP + + {Binding Description} + + + diff --git a/ShiftOS.Wpf/Applications/ShiftoriumFrontend.xaml.cs b/ShiftOS.Wpf/Applications/ShiftoriumFrontend.xaml.cs new file mode 100644 index 0000000..d8385e9 --- /dev/null +++ b/ShiftOS.Wpf/Applications/ShiftoriumFrontend.xaml.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Timers; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using ShiftOS.Engine; + +namespace ShiftOS.Wpf.Applications +{ + /// + /// Interaction logic for ShiftoriumFrontend.xaml + /// + [Launcher("Shiftorium", true, "al_shiftorium")] + [RequiresUpgrade("shiftorium_gui")] + public partial class ShiftoriumFrontend : UserControl, IShiftOSWindow + { + public ShiftoriumFrontend() + { + InitializeComponent(); + this.DataContextChanged += (o, a) => + { + if (this.DataContext is ShiftoriumUpgrade) + { + var upg = this.DataContext as ShiftoriumUpgrade; + title.Text = upg.Name; + this.SetTitle("Shiftorium - " + upg.Name); + description.Text = upg.Description; + cost.Text = upg.Cost.ToString(); + } + }; + this.DataContext = new ShiftoriumUpgrade + { + Name = "Welcome to the Shiftorium", + Description = @"The Shiftorium is an application that lets you buy upgrades for ShiftOS using Codepoints. + +Upgrades can be anything from new apps, to games, to system enhancements, to eyecandy, to anything else. Just be careful! The best thing to do is to buy new ways of earning Codepoints otherwise you'll find yourself unable to earn Codepoints later on.", + Cost = 0, + Dependencies = null + }; + } + + public void Setup() + { + lbupgrades.Items.Clear(); + + foreach(var itm in Shiftorium.GetAvailable()) + { + lbupgrades.Items.Add(itm.Name); + } + } + + public void OnLoad() + { + this.SetTitle("Shiftorium"); + var t = new Timer(); + t.Interval = 500; + t.Elapsed += (o,a) => + { + try + { + currentcodepoints.Text = SaveSystem.CurrentSave.Codepoints.ToString(); + } + catch { t.Stop(); } + + }; + t.Start(); + + lbupgrades.SelectionChanged += (o, a) => + { + try + { + btnbuy.Visibility = Visibility.Visible; + this.DataContext = GetUpgradeFromName(lbupgrades.SelectedItem.ToString()); + } + catch + { + + } + }; + + btnbuy.Visibility = Visibility.Collapsed; + Setup(); + } + + public ShiftoriumUpgrade GetUpgradeFromName(string upg) + { + foreach(var upgrade in Shiftorium.GetDefaults()) + { + if (upgrade.Name == upg) + return upgrade; + } + return null; + } + + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + codepointDisplay.Upgrade("shiftorium_gui_cp_display"); + } + + private void lbupgrades_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + + } + + private void btnbuy_Click_1(object sender, RoutedEventArgs e) + { + var upg = this.DataContext as ShiftoriumUpgrade; + Shiftorium.Silent = true; + if(Shiftorium.Buy(upg.ID, upg.Cost) == true) + { + btnbuy.Visibility = Visibility.Collapsed; + Setup(); + } + else + { + Infobox.Show("Shiftorium", $"You do not have enough Codepoints to buy this upgrade. You need {upg.Cost - SaveSystem.CurrentSave.Codepoints} more."); + } + } + } +} diff --git a/ShiftOS.Wpf/Applications/SkinLoader.xaml b/ShiftOS.Wpf/Applications/SkinLoader.xaml new file mode 100644 index 0000000..48b0f6d --- /dev/null +++ b/ShiftOS.Wpf/Applications/SkinLoader.xaml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + Template + + + + + + + + diff --git a/ShiftOS.Wpf/Applications/TextPad.xaml.cs b/ShiftOS.Wpf/Applications/TextPad.xaml.cs new file mode 100644 index 0000000..66ea797 --- /dev/null +++ b/ShiftOS.Wpf/Applications/TextPad.xaml.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using ShiftOS.Objects.ShiftFS; +using ShiftOS.Engine; + +namespace ShiftOS.Wpf.Applications +{ + /// + /// Interaction logic for TextPad.xaml + /// + [Launcher("TextPad", true, "al_textpad")] + [RequiresUpgrade("textpad")] + public partial class TextPad : UserControl, IShiftOSWindow + { + public TextPad() + { + InitializeComponent(); + } + + private void btnnew_Click(object sender, RoutedEventArgs e) + { + txtbody.Text = ""; + } + + private void btnsave_Click(object sender, RoutedEventArgs e) + { + string filters = ".txt"; + if (Shiftorium.UpgradeInstalled("textpad_lua_support")) + filters += ";.lua"; + if (Shiftorium.UpgradeInstalled("textpad_python_support")) + filters += ";.py"; + + FileSkimmerBackend.GetFile(filters.Split(';'), FileOpenerStyle.Save, new Action((file) => SaveFile(file))); + } + + private void btnopen_Click(object sender, RoutedEventArgs e) + { + string filters = ".txt"; + if (Shiftorium.UpgradeInstalled("textpad_lua_support")) + filters += ";.lua"; + if (Shiftorium.UpgradeInstalled("textpad_python_support")) + filters += ";.py"; + + FileSkimmerBackend.GetFile(filters.Split(';'), FileOpenerStyle.Open, new Action((file) => LoadFile(file))); + + } + + public void LoadFile(string path) + { + txtbody.Text = Utils.ReadAllText(path); + } + + public void SaveFile(string path) + { + Utils.WriteAllText(path, txtbody.Text); + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { +/* btnnew.Upgrade("textpad_new"); + btnopen.Upgrade("textpad_open"); + btnsave.Upgrade("textpad_save"); +*/ } + } +} diff --git a/ShiftOS.Wpf/Desktop.xaml b/ShiftOS.Wpf/Desktop.xaml new file mode 100644 index 0000000..119d9df --- /dev/null +++ b/ShiftOS.Wpf/Desktop.xaml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + diff --git a/ShiftOS.Wpf/Desktop.xaml.cs b/ShiftOS.Wpf/Desktop.xaml.cs new file mode 100644 index 0000000..c2bdc27 --- /dev/null +++ b/ShiftOS.Wpf/Desktop.xaml.cs @@ -0,0 +1,201 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; +using ShiftOS.Engine; +using static ShiftOS.Engine.SkinEngine; +namespace ShiftOS.Wpf +{ + /// + /// Interaction logic for Desktop.xaml + /// + public partial class Desktop : Window + { + public Desktop() + { + InitializeComponent(); + SetupUpgradeable(); + Shiftorium.Installed += () => SetupUpgradeable(); + SaveSystem.GameReady += () => + { + Dispatcher.Invoke(() => + { + SetupDesktop(); + }); + }; + } + + public void SetupUpgradeable() + { + desktoppanel.Upgrade("desktop"); + apps.Upgrade("app_launcher"); + } + + public void SetupDesktop() + { + windowlayer.Background = LoadedSkin.DesktopColor.CreateBrush(); + try + { + windowlayer.Background = new ImageBrush(LoadedSkin.DesktopBackgroundImage.ToBitmapImage()); + } + catch + { + + } + + + desktoppanel.Background = LoadedSkin.DesktopPanelColor.CreateBrush(); + try + { + desktoppanel.Background = new ImageBrush(LoadedSkin.DesktopPanelBackground.ToBitmapImage()); + } + catch { } + + apps.Background = LoadedSkin.Menu_MenuStripGradientBegin.CreateBrush(); + apps.Content = LoadedSkin.AppLauncherText; + apps.Foreground = LoadedSkin.Menu_TextColor.CreateBrush(); + + PopulateAppLauncher(); + + SetupUpgradeable(); + } + + private static event Action onWindowShow; + private static event Action onWindowClose; + + public static void ShowWindow(WpfWindowBorder brdr) + { + + onWindowShow?.Invoke(brdr); + } + + private void Window_Loaded(object sender, RoutedEventArgs e) + { + SaveSystem.GameReady += () => Dispatcher.Invoke(() => PopulateAppLauncher()); + Shiftorium.Installed += () => Dispatcher.Invoke(() => PopulateAppLauncher()); + SkinEngine.SkinLoaded += () => Dispatcher.Invoke(() => PopulateAppLauncher()); + + + onWindowShow += (brdr) => + { + brdr.Measure(windowlayer.DesiredSize); + brdr.SetValue(System.Windows.Controls.Canvas.LeftProperty, (windowlayer.ActualWidth - brdr.Width) / 2); + brdr.SetValue(System.Windows.Controls.Canvas.TopProperty, (windowlayer.ActualHeight - brdr.ActualActualHeight) / 2); + windowlayer.Children.Add(brdr); + brdr.PreviewMouseDown += (o, a) => + { + brdr.BringToFront(windowlayer); + }; + }; + onWindowClose += (brdr) => + { + if (windowlayer.Children.Contains(brdr)) + { + windowlayer.Children.Remove(brdr); + brdr.ParentWindow.OnUnload(); + brdr = null; + } + }; + AppearanceManager.SetupWindow(new Terminal()); + } + + + public static void RemoveWindow(WpfWindowBorder brdr) + { + onWindowClose?.Invoke(brdr); + } + + public void PopulateAppLauncher() + { + appsmenu.Children.Clear(); + + double biggestWidth = 0; + + appsmenu.Background = LoadedSkin.Menu_ToolStripDropDownBackground.CreateBrush(); + + foreach (var kv in AppLauncherDaemon.Available()) + { + var item = new Button(); + if (kv.LaunchType.BaseType == typeof(System.Windows.Forms.UserControl)) + item.Content = kv.DisplayData.Name + " (Legacy)"; + else + item.Content = kv.DisplayData.Name; + item.Margin = new Thickness(2); + double measure = item.Content.ToString().Measure(LoadedSkin.MainFont); + if (measure > biggestWidth) + biggestWidth = measure; + item.Click += (o, a) => + { + AppearanceManager.SetupWindow(Activator.CreateInstance(kv.LaunchType) as IShiftOSWindow); + appsmenu.Visibility = Visibility.Hidden; + }; + item.HorizontalAlignment = HorizontalAlignment.Stretch; + appsmenu.Children.Add(item); + } + + if (Shiftorium.UpgradeInstalled("al_shutdown")) + { + var item = new Button(); + item.Content = ShiftOS.Engine.Localization.Parse("{SHUTDOWN}"); + item.Margin = new Thickness(2); + double measure = item.Content.ToString().Measure(LoadedSkin.MainFont); + if (measure > biggestWidth) + biggestWidth = measure; + + + item.Click += (o, a) => + { + TerminalBackend.InvokeCommand("sos.shutdown"); + }; + appsmenu.Children.Add(item); + + } + + appsmenu.Width = biggestWidth + 50; + + SkinAppLauncher(); + } + + public void SkinAppLauncher() + { + apps.Background = LoadedSkin.Menu_MenuStripGradientBegin.CreateBrush(); + apps.Foreground = LoadedSkin.Menu_TextColor.CreateBrush(); + apps.BorderThickness = new Thickness(0.0); + + appsmenu.Height = 0; + + foreach (Control app in appsmenu.Children) + { + app.Background = LoadedSkin.Menu_ToolStripDropDownBackground.CreateBrush(); + app.Foreground = LoadedSkin.Menu_TextColor.CreateBrush(); + app.BorderThickness = new Thickness(0.0); + app.HorizontalContentAlignment = HorizontalAlignment.Left; + app.SetMouseOverStyle("menuitem"); + appsmenu.Height += app.Height; + } + } + + private void apps_Click(object sender, RoutedEventArgs e) + { + if (appsmenu.Visibility == Visibility.Hidden) + { + appsmenu.Visibility = Visibility.Visible; + } + else + { + appsmenu.Visibility = Visibility.Hidden; + } + + } + } +} diff --git a/ShiftOS.Wpf/OOBE.xaml b/ShiftOS.Wpf/OOBE.xaml new file mode 100644 index 0000000..b081637 --- /dev/null +++ b/ShiftOS.Wpf/OOBE.xaml @@ -0,0 +1,58 @@ + + + + + Welcome to ShiftOS. + + You have been selected to be part of the testing and development of an experimental operating system named ShiftOS. + + + This wizard will guide you through the process of setting up ShiftOS. + + + First: Select your language. + + + + + + Next: System Information + + + Username: + + + + Password: + + + + System name: + + + + + + + + + + + + + + Header + + This is some text. + + + + + diff --git a/ShiftOS.Wpf/OOBE.xaml.cs b/ShiftOS.Wpf/OOBE.xaml.cs new file mode 100644 index 0000000..39a0093 --- /dev/null +++ b/ShiftOS.Wpf/OOBE.xaml.cs @@ -0,0 +1,276 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using ShiftOS.Objects; +using ShiftOS.Objects.ShiftFS; +using ShiftOS.Engine; + +namespace ShiftOS.Wpf +{ + /// + /// Interaction logic for OOBE.xaml + /// + public partial class OOBE : UserControl, IOobe, IShiftOSWindow + { + public OOBE() + { + InitializeComponent(); + } + + private Save MySave = null; + + public void StartShowing(Save save) + { + MySave = save; + AppearanceManager.SetupWindow(this); + SetupLanguages(); + SaveSystem.GameReady += () => + { + Dispatcher.Invoke(() => + { + AppearanceManager.Close(this); + }); + }; + } + + public void SetupLanguages() + { + lblanguages.Items.Clear(); + + foreach(var lang in AppearanceManager.GetLanguages()) + { + lblanguages.Items.Add(lang); + } + } + + public void OnLoad() + { + } + + public void OnSkinLoad() + { + } + + public bool OnUnload() + { + return true; + } + + public void OnUpgrade() + { + } + + private void lblanguages_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + try + { + MySave.Language = lblanguages.SelectedItem.ToString(); + userInfo.Visibility = Visibility.Visible; + } + catch { } + } + + private void txtusername_TextChanged(object sender, TextChangedEventArgs e) + { + string usr = MySave.Username; + + MySave.Username = txtusername.Text; + + if(string.IsNullOrWhiteSpace(txtsysname.Text) || txtsysname.Text == usr + "-PC") + { + txtsysname.Text = MySave.Username + "-PC"; + } + nextLabel.Visibility = Visibility.Visible; + } + + public void moveforward_Click(object s, RoutedEventArgs a) + { + tabControl.SelectedItem = tabControl.Items[1]; + StartInstall(); + } + + public void StartInstall() + { + Startup.ConsoleOut = txtterm; + pgprogress.Value = 0; + + StartOOBESlideshow(); + + } + + public void StartOOBESlideshow() + { + var t = new System.Timers.Timer(10000); + + int currentslide = 0; + + t.Elapsed += (o, a) => + { + Dispatcher.Invoke(() => + { + switch (currentslide) + { + case 0: + oobehead.Text = "Introduction"; + oobedesc.Text = @"Welcome to ShiftOS. + +You have successfully registered to take part in the testing and development of ShiftOS. We are currently installing the system's core components. + +This may take a while. There is a progress indicator at the bottom of this window. You can also see a log of everything that's happening in the terminal on the right. + +While you wait, we'll take the time to tell you about what you'll be doing."; + break; + case 1: + oobehead.Text = "About the project"; + oobedesc.Text = @"You may wanna know what exactly we're working on here. Basically, we want to make ShiftOS one of the most powerful, customizable, user-friendly operating systems in the world. Not just ONE of the most, we want to make it THE most. + +We'll do whatever we can to do this - and having you onboard is just the beginning. At ShiftOS, we strive to make things user-friendly, and versatile. We want to put a barebones operating system on your computer and see what you do with it, what you make, so we can use that data to make ShiftOS awesome."; + break; + case 2: + oobehead.Text = "The Humble Beginnings"; + oobedesc.Text = @"It may look complicated but we're really just wasting your time installing a blank desktop with a terminal. Seriously, that's all ShiftOS is right now. It's not about that, though. + +It's about what you do in this blank desktop with just a terminal. We want to see what you make of it. It's a build-your-own-system type deal - one of the best in the world, in fact."; + break; + case 3: + oobehead.Text = "Stay connected."; + oobedesc.Text = @"With ShiftOS, you're always connected to something. Like literally. Even if you turn off your home router, unplug the computer or smash it you're still connected to ShiftOS's multi-user domain. There's just no escape. + +Uhhhhhhh whoops.... I meant to make that not sound fishy."; + + break; + case 4: + oobehead.Text = "Now it's too late to go back."; + oobedesc.Text = @"I guess you weren't paying attention to that terminal seeings as you're reading this. Now, it's too late for you to go back to your old system. You're enrolled as a tester for the ShiftOS project and all your files have been deleted. + +There's no turning back. And now that you can't leave.... I don't have to keep inticing you."; + break; + case 5: + oobehead.Text = "Thanks for not choosing ShiftOS!"; + oobedesc.Text = @"By now it's definitely too late. We really value our users to the point where they can never uninstall ShiftOS. ShiftOS will haunt you in your sleep and take over your entire network. It will spread to all your friends, your family, your coworkers and even other worlds. + +We hope you enjoy your.... eternal stay."; + break; + } + }); + + if (currentslide == 5) + currentslide = 0; + else + currentslide++; + }; + + t.Start(); + + var th = new System.Threading.Thread(new ThreadStart(() => + { + Console.WriteLine("Loading useless out-of-box-experience stuff..."); + Thread.Sleep(10000); + Console.WriteLine("Introducing ShiftOS to the user..."); + Thread.Sleep(1000); + Console.Write("Formatting drive 0:/ with ShiftFS 2.0..."); + Thread.Sleep(100); + Console.WriteLine(" done"); + Thread.Sleep(500); + Console.WriteLine("Pirating programming music..."); + Thread.Sleep(250); + Console.Write("Deafening the user... "); + for (int i = 0; i < 100; i++) + { + var th2 = new Thread(new ThreadStart(() => + { + Console.Beep(1024, 1000); + })); + th2.Start(); + + } + Console.WriteLine("failed, whatever"); + + Thread.Sleep(750); + Console.WriteLine("Writing directories to the system..."); + foreach(var path in Paths.GetAllWithoutKey()) + { + Thread.Sleep(50); + if(path.StartsWith("0") && Utils.DirectoryExists(path)) + Console.WriteLine(path); + } + Thread.Sleep(500); + Console.WriteLine("Procrastinating..."); + Thread.Sleep(2000); + Console.WriteLine("Making it look like we're doing things..."); + + var rand = new Random(); + + for (int i = 0; i < 100; i++) + { + try + { + Thread.Sleep(1000 / i); + Console.WriteLine(rand.Next(int.MaxValue - 1000000000, Int32.MaxValue)); + } + catch (DivideByZeroException e) + { + Console.WriteLine($"Attempting to divide by zero.... but getting {e.GetType().Name}s..."); + Thread.Sleep(1000); + } + } + Console.WriteLine("Still procrastinating..."); + + Thread.Sleep(5000); + Console.Write("Enabling all the upgrades for free..."); + foreach(var upg in Shiftorium.GetDefaults()) + { + Shiftorium.Silent = true; + Thread.Sleep(100); + Dispatcher.Invoke(() => + { + Shiftorium.Buy(upg.ID, 0); + }); + } + Shiftorium.Silent = false; + foreach(var upg in Shiftorium.GetDefaults()) + { + SaveSystem.CurrentSave.Upgrades[upg.ID] = false; + } + Console.WriteLine(" ...and disabling them because we can."); + Dispatcher.Invoke(() => Shiftorium.InvokeUpgradeInstalled()); + + Console.WriteLine("Showing more useless stuff..."); + + while(currentslide != 0) + { + + } + Console.WriteLine("Done installing."); + + SaveSystem.CurrentSave = this.MySave; + SaveSystem.CurrentSave.StoryPosition = 5; + SaveSystem.SaveGame(); + })); + th.IsBackground = true; + th.Start(); + } + + private void txtpassword_PasswordChanged(object sender, RoutedEventArgs e) + { + MySave.Password = txtpassword.Password; + } + + private void txtsysname_TextChanged(object sender, TextChangedEventArgs e) + { + MySave.SystemName = txtsysname.Text; + } + } +} diff --git a/ShiftOS.Wpf/Properties/AssemblyInfo.cs b/ShiftOS.Wpf/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..eda1602 --- /dev/null +++ b/ShiftOS.Wpf/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ShiftOS.Wpf")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ShiftOS.Wpf")] +[assembly: AssemblyCopyright("Copyright © 2016")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ShiftOS.Wpf/Properties/Resources.Designer.cs b/ShiftOS.Wpf/Properties/Resources.Designer.cs new file mode 100644 index 0000000..88ea4ff --- /dev/null +++ b/ShiftOS.Wpf/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ShiftOS.Wpf.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ShiftOS.Wpf.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ShiftOS.Wpf/Properties/Resources.resx b/ShiftOS.Wpf/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ShiftOS.Wpf/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShiftOS.Wpf/Properties/Settings.Designer.cs b/ShiftOS.Wpf/Properties/Settings.Designer.cs new file mode 100644 index 0000000..879280f --- /dev/null +++ b/ShiftOS.Wpf/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ShiftOS.Wpf.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ShiftOS.Wpf/Properties/Settings.settings b/ShiftOS.Wpf/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/ShiftOS.Wpf/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/ShiftOS.Wpf/ShiftOS.Wpf.csproj b/ShiftOS.Wpf/ShiftOS.Wpf.csproj new file mode 100644 index 0000000..cf3b712 --- /dev/null +++ b/ShiftOS.Wpf/ShiftOS.Wpf.csproj @@ -0,0 +1,192 @@ + + + + + Debug + AnyCPU + {A589969D-227A-48AF-A176-81022CF01E62} + WinExe + Properties + ShiftOS.Wpf + ShiftOS.Wpf + v4.5.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + True + + + + + + + + + + + + + 4.0 + + + + + + + + + + MSBuild:Compile + Designer + + + FileDialog.xaml + + + FileSkimmer.xaml + + + Infobox.xaml + + + ShiftoriumFrontend.xaml + + + SkinLoader.xaml + + + TextPad.xaml + + + Desktop.xaml + + + OOBE.xaml + + + + + + WpfWindowBorder.xaml + + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + {A069089A-8962-4607-B2B2-4CF4A371066E} + ShiftOS.Objects + + + {7c979b07-0585-4033-a110-e5555b9d6651} + ShiftOS.Engine + + + + + \ No newline at end of file diff --git a/ShiftOS.Wpf/SkinFrontend.cs b/ShiftOS.Wpf/SkinFrontend.cs new file mode 100644 index 0000000..3e8cd73 --- /dev/null +++ b/ShiftOS.Wpf/SkinFrontend.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; +using ShiftOS.Engine; +using static ShiftOS.Engine.SkinEngine; +namespace ShiftOS.Wpf +{ + public class SkinFrontend : FrameworkElement + { + public Brush GetDesktopBrush() + { + try + { + return new ImageBrush(LoadedSkin.DesktopBackgroundImage.ToBitmapImage()); + } + catch + { + if (LoadedSkin != null) + { + return LoadedSkin.DesktopColor.CreateBrush(); + } + else + { + return new Skin().DesktopColor.CreateBrush(); + } + } + } + } +} diff --git a/ShiftOS.Wpf/Startup.cs b/ShiftOS.Wpf/Startup.cs new file mode 100644 index 0000000..371f560 --- /dev/null +++ b/ShiftOS.Wpf/Startup.cs @@ -0,0 +1,327 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Threading; +using ShiftOS.Engine; +using static ShiftOS.Engine.SkinEngine; + +namespace ShiftOS.Wpf +{ + public static class ShiftOSSkin + { + public static Brush GetAppButtonHoverBrush(DependencyObject obj) + { + return (Brush)obj.GetValue(AppButtonHoverBrushProperty); + } + + public static void SetAppButtonHoverBrush(DependencyObject obj, Brush value) + { + obj.SetValue(AppButtonHoverBrushProperty, value); + } + + public static readonly DependencyProperty AppButtonHoverBrushProperty = + DependencyProperty.RegisterAttached( + "AppButtonHoverBrush", + typeof(Brush), + typeof(ShiftOSSkin), + new FrameworkPropertyMetadata(LoadedSkin.Menu_MenuItemSelected.CreateBrush())); + } + + public static class Startup + { + private static Visibility getVisibility(string upg) + { + if (Shiftorium.UpgradeInstalled(upg)) + { + return Visibility.Visible; + } + else + { + return Visibility.Collapsed; + + } + } + + + public static void Upgrade(this Control ctrl, string upg) + { + ctrl.Visibility = getVisibility(upg); + + } + + public static void Upgrade(this UIElement ctrl, string upg) + { + ctrl.Visibility = getVisibility(upg); + + } + + static public void BringToFront(this UserControl pToMove, Canvas pParent) + { + int currentIndex = Canvas.GetZIndex(pToMove); + int zIndex = 0; + int maxZ = 0; + UserControl child; + for (int i = 0; i < pParent.Children.Count; i++) + { + if (pParent.Children[i] is UserControl && + pParent.Children[i] != pToMove) + { + child = pParent.Children[i] as UserControl; + zIndex = Canvas.GetZIndex(child); + maxZ = Math.Max(maxZ, zIndex); + if (zIndex > currentIndex) + { + Canvas.SetZIndex(child, zIndex - 1); + } + } + } + Canvas.SetZIndex(pToMove, maxZ); + + } + + public static void SetTitle(this IShiftOSWindow win, string title) + { + foreach(var frm in AppearanceManager.OpenForms) + { + if(frm.ParentWindow == win) + { + frm.Text = title; + } + } + } + + public static void InitiateEngine(System.IO.TextWriter writer) + { + OutOfBoxExperience.Init(new OOBE()); + AppearanceManager.Initiate(new WpfWindowManager()); + Infobox.Init(new WpfInfoboxFrontend()); + FileSkimmerBackend.Init(new Applications.WpfFSFrontend()); + if (writer != null) + { + Console.SetOut(writer); + } + SaveSystem.Begin(false); + AppearanceManager.OnExit += () => + { + Environment.Exit(0); + }; + } + + public static void SetMouseOverStyle(this Control button, string style = "") + { + var bg = button.Background; + var fg = button.Foreground; + var border = button.BorderThickness; + var borderfg = button.BorderBrush; + + button.MouseEnter += (o, a) => + { + try + { + switch (style) + { + case "menuitem": + button.Background = LoadedSkin.Menu_MenuItemSelected.CreateBrush(); + button.Foreground = LoadedSkin.Menu_SelectedTextColor.CreateBrush(); + button.BorderBrush = LoadedSkin.Menu_MenuItemBorder.CreateBrush(); + break; + } + } + catch { } + }; + button.MouseLeave += (o, a) => + { + try + { + button.Background = bg; + button.Foreground = fg; + button.BorderThickness = border; + button.BorderBrush = borderfg; + } + catch + { + + } + }; + + + } + + public static void DestroyShiftOSEngine() + { + ServerManager.Disconnect(); + } + + public static TextBox ConsoleOut { get; set; } + + public static SolidColorBrush CreateBrush(this System.Drawing.Color color) + { + return new SolidColorBrush(Color.FromArgb(color.A, color.R, color.G, color.B)); + } + + public struct Font + { + public FontFamily FontFamily { get; set; } + public double FontSize { get; set; } + public FontStyle FontStyle { get; set; } + public FontWeight FontWeight { get; set; } + } + + private static Font createFont(System.Drawing.Font f) + { + var font = new Font(); + font.FontFamily = new FontFamily(f.Name); + font.FontSize = f.Size; + switch (f.Style) + { + case System.Drawing.FontStyle.Bold: + font.FontWeight = FontWeights.Bold; + break; + case System.Drawing.FontStyle.Italic: + font.FontStyle = FontStyles.Oblique; + break; + default: + case System.Drawing.FontStyle.Regular: + font.FontStyle = FontStyles.Normal; + break; + + + } + return font; + } + + public static void SetFont(this Control ctrl, System.Drawing.Font f) + { + var font = createFont(f); + ctrl.FontFamily = font.FontFamily; + ctrl.FontSize = PointsToPixels(font.FontSize); + ctrl.FontStyle = font.FontStyle; + ctrl.FontWeight = font.FontWeight; + } + + private static double PointsToPixels(double points) + { + return points * (96.0 / 72.0); + } + + public static void SetFont(this TextBlock ui, System.Drawing.Font f) + { + var font = createFont(f); + ui.FontFamily = font.FontFamily; + ui.FontSize = PointsToPixels(font.FontSize); + ui.FontStyle = font.FontStyle; + ui.FontWeight = font.FontWeight; + } + + public static BitmapImage ToBitmapImage(this System.Drawing.Image img) + { + using(var str = new MemoryStream()) + { + img.Save(str, System.Drawing.Imaging.ImageFormat.Png); + return ToBitmapImage(str.ToArray()); + } + } + + public static BitmapImage ToBitmapImage(this byte[] imgSource) + { + using(MemoryStream ms = new MemoryStream(imgSource)) + { + var img = new BitmapImage(); + img.BeginInit(); + img.StreamSource = ms; + img.CacheOption = BitmapCacheOption.OnLoad; + img.EndInit(); + return img; + } + } + } + + public class WpfTerminalTextWriter : TextWriter + { + public override Encoding Encoding + { + get + { + return Encoding.Unicode; + } + } + + public TextBox UnderlyingControl + { + get + { + return Startup.ConsoleOut; + } + } + + public void select() + { + try + { + UnderlyingControl.Select(UnderlyingControl.Text.Length, 0); + UnderlyingControl.ScrollToEnd(); + UnderlyingControl.Focus(); + AppearanceManager.CurrentPosition = 1; + AppearanceManager.LastLength = UnderlyingControl.Text.Length - 1; + } + catch { } + } + + public override void Write(char value) + { + try + { + UnderlyingControl.Dispatcher.Invoke(new Action(() => + { + UnderlyingControl.AppendText(value.ToString()); + select(); + })); + } + catch { } + } + + public override void WriteLine(string value) + { + try + { + UnderlyingControl.Dispatcher.Invoke(new Action(() => + { + UnderlyingControl.AppendText(ShiftOS.Engine.Localization.Parse(value) + Environment.NewLine); + select(); + })); + } + catch { } + } + + public void SetLastText() + { + if (SaveSystem.CurrentSave != null) + { + if (!Shiftorium.UpgradeInstalled("window_manager")) + AppearanceManager.LastTerminalText = UnderlyingControl.Text; + } + } + + public override void Write(string value) + { + try + { + UnderlyingControl.Dispatcher.Invoke(new Action(() => + { + UnderlyingControl.AppendText(ShiftOS.Engine.Localization.Parse(value)); + select(); + })); + } + catch { } + } + + + } +} diff --git a/ShiftOS.Wpf/WpfInfoboxFrontend.cs b/ShiftOS.Wpf/WpfInfoboxFrontend.cs new file mode 100644 index 0000000..c40c614 --- /dev/null +++ b/ShiftOS.Wpf/WpfInfoboxFrontend.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using ShiftOS.Engine; + +namespace ShiftOS.Wpf +{ + class WpfInfoboxFrontend : IInfobox + { + public void Open(string title, string msg) + { + var inf = new Applications.Infobox(title, msg); + AppearanceManager.SetupDialog(inf); + } + } +} diff --git a/ShiftOS.Wpf/WpfWindowBorder.xaml b/ShiftOS.Wpf/WpfWindowBorder.xaml new file mode 100644 index 0000000..49de84d --- /dev/null +++ b/ShiftOS.Wpf/WpfWindowBorder.xaml @@ -0,0 +1,77 @@ + + + + + + This is a title. + +