diff options
| author | MichaelTheShifter <[email protected]> | 2016-06-25 08:10:03 -0400 |
|---|---|---|
| committer | MichaelTheShifter <[email protected]> | 2016-06-25 08:10:03 -0400 |
| commit | 84f689b91a73e512b035df40bbcf556b008a3b81 (patch) | |
| tree | da1020b2b5866c7ce300ac7b9c97112fe80fa1b3 /source/WindowsFormsApplication1/Apps | |
| parent | 6707e2076a63dafab686fd533c95fb8ceb6c23fa (diff) | |
| download | shiftos-c-_theultimatehacker-84f689b91a73e512b035df40bbcf556b008a3b81.tar.gz shiftos-c-_theultimatehacker-84f689b91a73e512b035df40bbcf556b008a3b81.tar.bz2 shiftos-c-_theultimatehacker-84f689b91a73e512b035df40bbcf556b008a3b81.zip | |
Sort source code into folders.
It feels better to know what's responsible for what... Plus I removed
some un-needed C# stuff.
Diffstat (limited to 'source/WindowsFormsApplication1/Apps')
74 files changed, 35000 insertions, 0 deletions
diff --git a/source/WindowsFormsApplication1/Apps/Appscape.Designer.cs b/source/WindowsFormsApplication1/Apps/Appscape.Designer.cs new file mode 100644 index 0000000..e8ef295 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Appscape.Designer.cs @@ -0,0 +1,862 @@ +namespace ShiftOS +{ + partial class Appscape + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Appscape)); + this.panel3 = new System.Windows.Forms.Panel(); + this.pnlchoosenetwork = new System.Windows.Forms.Panel(); + this.btnrequest = new System.Windows.Forms.Button(); + this.label14 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.lvnets = new System.Windows.Forms.ListView(); + this.clhostnameheader = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.pnlpackageeditor = new System.Windows.Forms.Panel(); + this.label12 = new System.Windows.Forms.Label(); + this.btndonecustomizing = new System.Windows.Forms.Button(); + this.btnsaa = new System.Windows.Forms.Button(); + this.txtprice = new System.Windows.Forms.TextBox(); + this.lbprice = new System.Windows.Forms.Label(); + this.lbaddress = new System.Windows.Forms.Label(); + this.cbsell = new System.Windows.Forms.CheckBox(); + this.txtpackagedescription = new System.Windows.Forms.TextBox(); + this.label10 = new System.Windows.Forms.Label(); + this.txtpackagename = new System.Windows.Forms.TextBox(); + this.label11 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.pnllounge = new System.Windows.Forms.Panel(); + this.btnedit = new System.Windows.Forms.Button(); + this.btnupload = new System.Windows.Forms.Button(); + this.btnsave = new System.Windows.Forms.Button(); + this.txtbitnoteaddress = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.txtbio = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.txtmoddername = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.lbmybio = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.lbmyname = new System.Windows.Forms.Label(); + this.lvmypackages = new System.Windows.Forms.ListView(); + this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.pnlpackageinfo = new System.Windows.Forms.Panel(); + this.pnlauthordetails = new System.Windows.Forms.Panel(); + this.lbauthordescription = new System.Windows.Forms.Label(); + this.lbauthorname = new System.Windows.Forms.Label(); + this.pbappicon = new System.Windows.Forms.PictureBox(); + this.pbappscreenshot = new System.Windows.Forms.PictureBox(); + this.pnldownload = new System.Windows.Forms.Panel(); + this.lbdownloadpath = new System.Windows.Forms.Label(); + this.btndownload = new System.Windows.Forms.Button(); + this.lbpkgdescription = new System.Windows.Forms.Label(); + this.lbpkgname = new System.Windows.Forms.Label(); + this.pnllist = new System.Windows.Forms.Panel(); + this.lvpackages = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.pnlsearch = new System.Windows.Forms.Panel(); + this.btnlounge = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.btngetkey = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.txtsearch = new System.Windows.Forms.TextBox(); + this.btnskins = new System.Windows.Forms.Button(); + this.btnapps = new System.Windows.Forms.Button(); + this.imgpackageicons = new System.Windows.Forms.ImageList(this.components); + this.panel3.SuspendLayout(); + this.pnlchoosenetwork.SuspendLayout(); + this.pnlpackageeditor.SuspendLayout(); + this.pnllounge.SuspendLayout(); + this.pnlpackageinfo.SuspendLayout(); + this.pnlauthordetails.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbappicon)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbappscreenshot)).BeginInit(); + this.pnldownload.SuspendLayout(); + this.pnllist.SuspendLayout(); + this.pnlsearch.SuspendLayout(); + this.SuspendLayout(); + // + // panel3 + // + this.panel3.Controls.Add(this.pnlchoosenetwork); + this.panel3.Controls.Add(this.pnlpackageeditor); + this.panel3.Controls.Add(this.pnllounge); + this.panel3.Controls.Add(this.pnlpackageinfo); + this.panel3.Controls.Add(this.pnllist); + this.panel3.Controls.Add(this.pnlsearch); + this.panel3.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel3.Location = new System.Drawing.Point(0, 0); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(886, 469); + this.panel3.TabIndex = 3; + // + // pnlchoosenetwork + // + this.pnlchoosenetwork.Controls.Add(this.lvnets); + this.pnlchoosenetwork.Controls.Add(this.btnrequest); + this.pnlchoosenetwork.Controls.Add(this.label14); + this.pnlchoosenetwork.Controls.Add(this.label13); + this.pnlchoosenetwork.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlchoosenetwork.Location = new System.Drawing.Point(0, 47); + this.pnlchoosenetwork.Name = "pnlchoosenetwork"; + this.pnlchoosenetwork.Size = new System.Drawing.Size(886, 422); + this.pnlchoosenetwork.TabIndex = 16; + // + // btnrequest + // + this.btnrequest.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnrequest.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnrequest.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnrequest.Location = new System.Drawing.Point(799, 385); + this.btnrequest.Name = "btnrequest"; + this.btnrequest.Size = new System.Drawing.Size(75, 23); + this.btnrequest.TabIndex = 7; + this.btnrequest.Text = "Request Key"; + this.btnrequest.UseVisualStyleBackColor = true; + this.btnrequest.Click += new System.EventHandler(this.btnrequest_Click); + // + // label14 + // + this.label14.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label14.Location = new System.Drawing.Point(17, 31); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(857, 30); + this.label14.TabIndex = 6; + this.label14.Text = resources.GetString("label14.Text"); + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Font = new System.Drawing.Font("Times New Roman", 13F); + this.label13.Location = new System.Drawing.Point(16, 7); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(157, 20); + this.label13.TabIndex = 5; + this.label13.Text = "Choose a repository."; + // + // lvnets + // + this.lvnets.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.lvnets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.clhostnameheader}); + this.lvnets.FullRowSelect = true; + this.lvnets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvnets.Location = new System.Drawing.Point(12, 64); + this.lvnets.Name = "lvnets"; + this.lvnets.Size = new System.Drawing.Size(868, 307); + this.lvnets.TabIndex = 0; + this.lvnets.UseCompatibleStateImageBehavior = false; + this.lvnets.View = System.Windows.Forms.View.Details; + // + // clhostnameheader + // + this.clhostnameheader.Text = "Hostname"; + // + // pnlpackageeditor + // + this.pnlpackageeditor.Controls.Add(this.label12); + this.pnlpackageeditor.Controls.Add(this.btndonecustomizing); + this.pnlpackageeditor.Controls.Add(this.btnsaa); + this.pnlpackageeditor.Controls.Add(this.txtprice); + this.pnlpackageeditor.Controls.Add(this.lbprice); + this.pnlpackageeditor.Controls.Add(this.lbaddress); + this.pnlpackageeditor.Controls.Add(this.cbsell); + this.pnlpackageeditor.Controls.Add(this.txtpackagedescription); + this.pnlpackageeditor.Controls.Add(this.label10); + this.pnlpackageeditor.Controls.Add(this.txtpackagename); + this.pnlpackageeditor.Controls.Add(this.label11); + this.pnlpackageeditor.Controls.Add(this.label9); + this.pnlpackageeditor.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlpackageeditor.Location = new System.Drawing.Point(0, 47); + this.pnlpackageeditor.Name = "pnlpackageeditor"; + this.pnlpackageeditor.Size = new System.Drawing.Size(886, 422); + this.pnlpackageeditor.TabIndex = 15; + // + // label12 + // + this.label12.Location = new System.Drawing.Point(96, 349); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(275, 22); + this.label12.TabIndex = 19; + this.label12.Text = "This allows you to release a patch for your application."; + this.label12.Visible = false; + // + // btndonecustomizing + // + this.btndonecustomizing.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btndonecustomizing.AutoSize = true; + this.btndonecustomizing.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndonecustomizing.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndonecustomizing.Font = new System.Drawing.Font("Times New Roman", 10F); + this.btndonecustomizing.Location = new System.Drawing.Point(824, 385); + this.btndonecustomizing.Name = "btndonecustomizing"; + this.btndonecustomizing.Size = new System.Drawing.Size(50, 28); + this.btndonecustomizing.TabIndex = 18; + this.btndonecustomizing.Text = "Done"; + this.btndonecustomizing.UseVisualStyleBackColor = true; + this.btndonecustomizing.Click += new System.EventHandler(this.btndonecustomizing_Click); + // + // btnsaa + // + this.btnsaa.AutoSize = true; + this.btnsaa.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnsaa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsaa.Font = new System.Drawing.Font("Times New Roman", 10F); + this.btnsaa.Location = new System.Drawing.Point(99, 318); + this.btnsaa.Name = "btnsaa"; + this.btnsaa.Size = new System.Drawing.Size(123, 28); + this.btnsaa.TabIndex = 17; + this.btnsaa.Text = "Release New SAA"; + this.btnsaa.UseVisualStyleBackColor = true; + this.btnsaa.Click += new System.EventHandler(this.btnsaa_Click); + // + // txtprice + // + this.txtprice.Location = new System.Drawing.Point(541, 267); + this.txtprice.Name = "txtprice"; + this.txtprice.Size = new System.Drawing.Size(89, 20); + this.txtprice.TabIndex = 16; + this.txtprice.Visible = false; + // + // lbprice + // + this.lbprice.AutoSize = true; + this.lbprice.Location = new System.Drawing.Point(504, 270); + this.lbprice.Name = "lbprice"; + this.lbprice.Size = new System.Drawing.Size(34, 13); + this.lbprice.TabIndex = 15; + this.lbprice.Text = "Price:"; + this.lbprice.Visible = false; + // + // lbaddress + // + this.lbaddress.Location = new System.Drawing.Point(210, 270); + this.lbaddress.Name = "lbaddress"; + this.lbaddress.Size = new System.Drawing.Size(275, 45); + this.lbaddress.TabIndex = 14; + this.lbaddress.Text = "All profit made from this package will be sent to the Bitnote Address defined in " + + "your Dev Lounge; if it is non-existent, Bitnotes simply won\'t arrive."; + this.lbaddress.Visible = false; + // + // cbsell + // + this.cbsell.Appearance = System.Windows.Forms.Appearance.Button; + this.cbsell.AutoSize = true; + this.cbsell.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbsell.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.cbsell.Location = new System.Drawing.Point(97, 263); + this.cbsell.Name = "cbsell"; + this.cbsell.Size = new System.Drawing.Size(92, 24); + this.cbsell.TabIndex = 13; + this.cbsell.Text = "Sell for Bitnotes"; + this.cbsell.UseVisualStyleBackColor = true; + this.cbsell.CheckedChanged += new System.EventHandler(this.cbsell_CheckedChanged); + // + // txtpackagedescription + // + this.txtpackagedescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtpackagedescription.Location = new System.Drawing.Point(99, 72); + this.txtpackagedescription.Multiline = true; + this.txtpackagedescription.Name = "txtpackagedescription"; + this.txtpackagedescription.Size = new System.Drawing.Size(591, 189); + this.txtpackagedescription.TabIndex = 12; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(12, 75); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(60, 13); + this.label10.TabIndex = 11; + this.label10.Text = "Description"; + // + // txtpackagename + // + this.txtpackagename.Location = new System.Drawing.Point(99, 43); + this.txtpackagename.Name = "txtpackagename"; + this.txtpackagename.Size = new System.Drawing.Size(258, 20); + this.txtpackagename.TabIndex = 10; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(12, 46); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(81, 13); + this.label11.TabIndex = 9; + this.label11.Text = "Package Name"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("Times New Roman", 13F); + this.label9.Location = new System.Drawing.Point(12, 17); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(118, 20); + this.label9.TabIndex = 0; + this.label9.Text = "Package Editor"; + // + // pnllounge + // + this.pnllounge.Controls.Add(this.btnedit); + this.pnllounge.Controls.Add(this.btnupload); + this.pnllounge.Controls.Add(this.btnsave); + this.pnllounge.Controls.Add(this.txtbitnoteaddress); + this.pnllounge.Controls.Add(this.label8); + this.pnllounge.Controls.Add(this.txtbio); + this.pnllounge.Controls.Add(this.label7); + this.pnllounge.Controls.Add(this.txtmoddername); + this.pnllounge.Controls.Add(this.label6); + this.pnllounge.Controls.Add(this.label5); + this.pnllounge.Controls.Add(this.label4); + this.pnllounge.Controls.Add(this.lbmybio); + this.pnllounge.Controls.Add(this.label3); + this.pnllounge.Controls.Add(this.lbmyname); + this.pnllounge.Controls.Add(this.lvmypackages); + this.pnllounge.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnllounge.Location = new System.Drawing.Point(0, 47); + this.pnllounge.Name = "pnllounge"; + this.pnllounge.Size = new System.Drawing.Size(886, 422); + this.pnllounge.TabIndex = 1; + // + // btnedit + // + this.btnedit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnedit.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnedit.Location = new System.Drawing.Point(239, 377); + this.btnedit.Name = "btnedit"; + this.btnedit.Size = new System.Drawing.Size(75, 23); + this.btnedit.TabIndex = 14; + this.btnedit.Text = "Edit"; + this.btnedit.UseVisualStyleBackColor = true; + this.btnedit.Click += new System.EventHandler(this.btnedit_Click); + // + // btnupload + // + this.btnupload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnupload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnupload.Location = new System.Drawing.Point(320, 377); + this.btnupload.Name = "btnupload"; + this.btnupload.Size = new System.Drawing.Size(75, 23); + this.btnupload.TabIndex = 13; + this.btnupload.Text = "Add"; + this.btnupload.UseVisualStyleBackColor = true; + this.btnupload.Click += new System.EventHandler(this.btnupload_Click); + // + // btnsave + // + this.btnsave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsave.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnsave.Location = new System.Drawing.Point(799, 390); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(75, 23); + this.btnsave.TabIndex = 12; + this.btnsave.Text = "Save"; + this.btnsave.UseVisualStyleBackColor = true; + this.btnsave.Click += new System.EventHandler(this.btnsave_Click); + // + // txtbitnoteaddress + // + this.txtbitnoteaddress.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtbitnoteaddress.Location = new System.Drawing.Point(490, 333); + this.txtbitnoteaddress.Name = "txtbitnoteaddress"; + this.txtbitnoteaddress.Size = new System.Drawing.Size(384, 20); + this.txtbitnoteaddress.TabIndex = 11; + this.txtbitnoteaddress.TextChanged += new System.EventHandler(this.txtbitnoteaddress_TextChanged); + // + // label8 + // + this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(407, 339); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(73, 13); + this.label8.TabIndex = 10; + this.label8.Text = "BTN Address:"; + // + // txtbio + // + this.txtbio.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtbio.Location = new System.Drawing.Point(490, 110); + this.txtbio.Multiline = true; + this.txtbio.Name = "txtbio"; + this.txtbio.Size = new System.Drawing.Size(384, 217); + this.txtbio.TabIndex = 9; + this.txtbio.TextChanged += new System.EventHandler(this.txtbio_TextChanged); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(407, 116); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(22, 13); + this.label7.TabIndex = 8; + this.label7.Text = "Bio"; + // + // txtmoddername + // + this.txtmoddername.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtmoddername.Location = new System.Drawing.Point(490, 84); + this.txtmoddername.Name = "txtmoddername"; + this.txtmoddername.Size = new System.Drawing.Size(384, 20); + this.txtmoddername.TabIndex = 7; + this.txtmoddername.TextChanged += new System.EventHandler(this.txtmoddername_TextChanged); + // + // label6 + // + this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(407, 90); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(77, 13); + this.label6.TabIndex = 6; + this.label6.Text = "Modder Name:"; + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label5.Location = new System.Drawing.Point(404, 31); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(378, 32); + this.label5.TabIndex = 5; + this.label5.Text = "This screen allows you to customize your profile, add a biography, modder name an" + + "d Bitnote Address for your profile."; + // + // label4 + // + this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Times New Roman", 13F); + this.label4.Location = new System.Drawing.Point(403, 11); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(112, 20); + this.label4.TabIndex = 4; + this.label4.Text = "Customization"; + // + // lbmybio + // + this.lbmybio.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.lbmybio.Location = new System.Drawing.Point(17, 46); + this.lbmybio.Name = "lbmybio"; + this.lbmybio.Size = new System.Drawing.Size(378, 110); + this.lbmybio.TabIndex = 3; + this.lbmybio.Text = "label4"; + // + // 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(17, 156); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(208, 13); + this.label3.TabIndex = 2; + this.label3.Text = "This is a list of all packages owned by you."; + // + // lbmyname + // + this.lbmyname.AutoSize = true; + this.lbmyname.Font = new System.Drawing.Font("Times New Roman", 13F); + this.lbmyname.Location = new System.Drawing.Point(13, 11); + this.lbmyname.Name = "lbmyname"; + this.lbmyname.Size = new System.Drawing.Size(51, 20); + this.lbmyname.TabIndex = 1; + this.lbmyname.Text = "label3"; + // + // lvmypackages + // + this.lvmypackages.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lvmypackages.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader4}); + this.lvmypackages.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvmypackages.Location = new System.Drawing.Point(20, 172); + this.lvmypackages.Name = "lvmypackages"; + this.lvmypackages.Size = new System.Drawing.Size(375, 199); + this.lvmypackages.TabIndex = 0; + this.lvmypackages.UseCompatibleStateImageBehavior = false; + this.lvmypackages.View = System.Windows.Forms.View.Details; + // + // columnHeader4 + // + this.columnHeader4.Text = "Name"; + // + // pnlpackageinfo + // + this.pnlpackageinfo.Controls.Add(this.pnlauthordetails); + this.pnlpackageinfo.Controls.Add(this.pbappicon); + this.pnlpackageinfo.Controls.Add(this.pbappscreenshot); + this.pnlpackageinfo.Controls.Add(this.pnldownload); + this.pnlpackageinfo.Controls.Add(this.lbpkgdescription); + this.pnlpackageinfo.Controls.Add(this.lbpkgname); + this.pnlpackageinfo.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlpackageinfo.Location = new System.Drawing.Point(0, 47); + this.pnlpackageinfo.Name = "pnlpackageinfo"; + this.pnlpackageinfo.Size = new System.Drawing.Size(886, 422); + this.pnlpackageinfo.TabIndex = 1; + // + // pnlauthordetails + // + this.pnlauthordetails.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnlauthordetails.Controls.Add(this.lbauthordescription); + this.pnlauthordetails.Controls.Add(this.lbauthorname); + this.pnlauthordetails.Location = new System.Drawing.Point(12, 213); + this.pnlauthordetails.Name = "pnlauthordetails"; + this.pnlauthordetails.Size = new System.Drawing.Size(468, 197); + this.pnlauthordetails.TabIndex = 5; + // + // lbauthordescription + // + this.lbauthordescription.Location = new System.Drawing.Point(13, 46); + this.lbauthordescription.Name = "lbauthordescription"; + this.lbauthordescription.Size = new System.Drawing.Size(452, 141); + this.lbauthordescription.TabIndex = 5; + this.lbauthordescription.Text = "label4"; + // + // lbauthorname + // + this.lbauthorname.AutoSize = true; + this.lbauthorname.Font = new System.Drawing.Font("Times New Roman", 13F); + this.lbauthorname.Location = new System.Drawing.Point(9, 11); + this.lbauthorname.Name = "lbauthorname"; + this.lbauthorname.Size = new System.Drawing.Size(51, 20); + this.lbauthorname.TabIndex = 4; + this.lbauthorname.Text = "label3"; + // + // pbappicon + // + this.pbappicon.Location = new System.Drawing.Point(12, 11); + this.pbappicon.Name = "pbappicon"; + this.pbappicon.Size = new System.Drawing.Size(32, 32); + this.pbappicon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbappicon.TabIndex = 4; + this.pbappicon.TabStop = false; + // + // pbappscreenshot + // + this.pbappscreenshot.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pbappscreenshot.Location = new System.Drawing.Point(500, 213); + this.pbappscreenshot.Name = "pbappscreenshot"; + this.pbappscreenshot.Size = new System.Drawing.Size(374, 197); + this.pbappscreenshot.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pbappscreenshot.TabIndex = 3; + this.pbappscreenshot.TabStop = false; + // + // pnldownload + // + this.pnldownload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.pnldownload.Controls.Add(this.lbdownloadpath); + this.pnldownload.Controls.Add(this.btndownload); + this.pnldownload.Location = new System.Drawing.Point(646, 7); + this.pnldownload.Name = "pnldownload"; + this.pnldownload.Size = new System.Drawing.Size(237, 97); + this.pnldownload.TabIndex = 2; + // + // lbdownloadpath + // + this.lbdownloadpath.Location = new System.Drawing.Point(4, 57); + this.lbdownloadpath.Name = "lbdownloadpath"; + this.lbdownloadpath.Size = new System.Drawing.Size(224, 31); + this.lbdownloadpath.TabIndex = 1; + this.lbdownloadpath.Text = "label1"; + this.lbdownloadpath.TextAlign = System.Drawing.ContentAlignment.TopRight; + // + // btndownload + // + this.btndownload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndownload.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btndownload.Location = new System.Drawing.Point(112, 13); + this.btndownload.Name = "btndownload"; + this.btndownload.Size = new System.Drawing.Size(116, 39); + this.btndownload.TabIndex = 0; + this.btndownload.Text = "Download This Package"; + this.btndownload.UseVisualStyleBackColor = true; + this.btndownload.Click += new System.EventHandler(this.btndownload_Click); + // + // lbpkgdescription + // + this.lbpkgdescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.lbpkgdescription.Location = new System.Drawing.Point(17, 47); + this.lbpkgdescription.Name = "lbpkgdescription"; + this.lbpkgdescription.Size = new System.Drawing.Size(347, 156); + this.lbpkgdescription.TabIndex = 1; + this.lbpkgdescription.Text = "label1"; + // + // lbpkgname + // + this.lbpkgname.AutoSize = true; + this.lbpkgname.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F); + this.lbpkgname.Location = new System.Drawing.Point(50, 19); + this.lbpkgname.Name = "lbpkgname"; + this.lbpkgname.Size = new System.Drawing.Size(60, 24); + this.lbpkgname.TabIndex = 0; + this.lbpkgname.Text = "label1"; + // + // pnllist + // + this.pnllist.Controls.Add(this.lvpackages); + this.pnllist.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnllist.Location = new System.Drawing.Point(0, 47); + this.pnllist.Name = "pnllist"; + this.pnllist.Size = new System.Drawing.Size(886, 422); + this.pnllist.TabIndex = 3; + // + // lvpackages + // + this.lvpackages.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2, + this.columnHeader3}); + this.lvpackages.Dock = System.Windows.Forms.DockStyle.Fill; + this.lvpackages.FullRowSelect = true; + this.lvpackages.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvpackages.Location = new System.Drawing.Point(0, 0); + this.lvpackages.Name = "lvpackages"; + this.lvpackages.Size = new System.Drawing.Size(886, 422); + this.lvpackages.TabIndex = 0; + this.lvpackages.UseCompatibleStateImageBehavior = false; + this.lvpackages.View = System.Windows.Forms.View.Details; + this.lvpackages.SelectedIndexChanged += new System.EventHandler(this.lvpackages_SelectedIndexChanged); + this.lvpackages.DoubleClick += new System.EventHandler(this.lvpackages_DoubleClick); + // + // columnHeader1 + // + this.columnHeader1.Text = "Name"; + // + // columnHeader2 + // + this.columnHeader2.Text = "Author"; + // + // columnHeader3 + // + this.columnHeader3.Text = "Cost (BTN)"; + // + // pnlsearch + // + this.pnlsearch.BackColor = System.Drawing.Color.Gray; + this.pnlsearch.Controls.Add(this.btnlounge); + this.pnlsearch.Controls.Add(this.label2); + this.pnlsearch.Controls.Add(this.btngetkey); + this.pnlsearch.Controls.Add(this.label1); + this.pnlsearch.Controls.Add(this.txtsearch); + this.pnlsearch.Controls.Add(this.btnskins); + this.pnlsearch.Controls.Add(this.btnapps); + this.pnlsearch.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlsearch.ForeColor = System.Drawing.Color.White; + this.pnlsearch.Location = new System.Drawing.Point(0, 0); + this.pnlsearch.Name = "pnlsearch"; + this.pnlsearch.Size = new System.Drawing.Size(886, 47); + this.pnlsearch.TabIndex = 0; + // + // btnlounge + // + this.btnlounge.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnlounge.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnlounge.Location = new System.Drawing.Point(377, 14); + this.btnlounge.Name = "btnlounge"; + this.btnlounge.Size = new System.Drawing.Size(114, 23); + this.btnlounge.TabIndex = 6; + this.btnlounge.Text = "Access My Lounge"; + this.btnlounge.UseVisualStyleBackColor = true; + this.btnlounge.Click += new System.EventHandler(this.btnlounge_Click); + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(643, 16); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(71, 13); + this.label2.TabIndex = 5; + this.label2.Text = "Search (slow)"; + // + // btngetkey + // + this.btngetkey.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btngetkey.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btngetkey.Location = new System.Drawing.Point(296, 14); + this.btngetkey.Name = "btngetkey"; + this.btngetkey.Size = new System.Drawing.Size(75, 23); + this.btngetkey.TabIndex = 4; + this.btngetkey.Text = "Get one!"; + this.btngetkey.UseVisualStyleBackColor = true; + this.btngetkey.Click += new System.EventHandler(this.btngetkey_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(169, 19); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(121, 13); + this.label1.TabIndex = 3; + this.label1.Text = "Need a Developer Key?"; + // + // txtsearch + // + this.txtsearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.txtsearch.Location = new System.Drawing.Point(721, 13); + this.txtsearch.Name = "txtsearch"; + this.txtsearch.Size = new System.Drawing.Size(153, 20); + this.txtsearch.TabIndex = 2; + this.txtsearch.TextChanged += new System.EventHandler(this.txtsearch_TextChanged); + // + // btnskins + // + this.btnskins.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnskins.Font = new System.Drawing.Font("Times New Roman", 10F); + this.btnskins.Location = new System.Drawing.Point(86, 4); + this.btnskins.Name = "btnskins"; + this.btnskins.Size = new System.Drawing.Size(76, 40); + this.btnskins.TabIndex = 1; + this.btnskins.Text = "Skins"; + this.btnskins.UseVisualStyleBackColor = true; + this.btnskins.Click += new System.EventHandler(this.btnskins_Click); + // + // btnapps + // + this.btnapps.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapps.Font = new System.Drawing.Font("Times New Roman", 10F); + this.btnapps.Location = new System.Drawing.Point(4, 4); + this.btnapps.Name = "btnapps"; + this.btnapps.Size = new System.Drawing.Size(76, 40); + this.btnapps.TabIndex = 0; + this.btnapps.Text = "Apps"; + this.btnapps.UseVisualStyleBackColor = true; + this.btnapps.Click += new System.EventHandler(this.btnapps_Click); + // + // imgpackageicons + // + this.imgpackageicons.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; + this.imgpackageicons.ImageSize = new System.Drawing.Size(16, 16); + this.imgpackageicons.TransparentColor = System.Drawing.Color.Transparent; + // + // Appscape + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Control; + this.ClientSize = new System.Drawing.Size(886, 469); + this.Controls.Add(this.panel3); + this.Name = "Appscape"; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.panel3.ResumeLayout(false); + this.pnlchoosenetwork.ResumeLayout(false); + this.pnlchoosenetwork.PerformLayout(); + this.pnlpackageeditor.ResumeLayout(false); + this.pnlpackageeditor.PerformLayout(); + this.pnllounge.ResumeLayout(false); + this.pnllounge.PerformLayout(); + this.pnlpackageinfo.ResumeLayout(false); + this.pnlpackageinfo.PerformLayout(); + this.pnlauthordetails.ResumeLayout(false); + this.pnlauthordetails.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbappicon)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.pbappscreenshot)).EndInit(); + this.pnldownload.ResumeLayout(false); + this.pnllist.ResumeLayout(false); + this.pnlsearch.ResumeLayout(false); + this.pnlsearch.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.ImageList imgpackageicons; + private System.Windows.Forms.Panel pnlsearch; + private System.Windows.Forms.Button btnskins; + private System.Windows.Forms.Button btnapps; + private System.Windows.Forms.Panel pnlpackageinfo; + private System.Windows.Forms.Label lbpkgname; + private System.Windows.Forms.Label lbpkgdescription; + private System.Windows.Forms.Panel pnldownload; + private System.Windows.Forms.Label lbdownloadpath; + private System.Windows.Forms.Button btndownload; + private System.Windows.Forms.Panel pnllist; + private System.Windows.Forms.ListView lvpackages; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.ColumnHeader columnHeader3; + private System.Windows.Forms.PictureBox pbappscreenshot; + private System.Windows.Forms.PictureBox pbappicon; + private System.Windows.Forms.TextBox txtsearch; + private System.Windows.Forms.Button btnlounge; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btngetkey; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel pnllounge; + private System.Windows.Forms.ListView lvmypackages; + private System.Windows.Forms.ColumnHeader columnHeader4; + private System.Windows.Forms.Label lbmyname; + private System.Windows.Forms.Label lbmybio; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox txtbitnoteaddress; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.TextBox txtbio; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox txtmoddername; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button btnsave; + private System.Windows.Forms.Button btnupload; + private System.Windows.Forms.Button btnedit; + private System.Windows.Forms.Panel pnlpackageeditor; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.TextBox txtprice; + private System.Windows.Forms.Label lbprice; + private System.Windows.Forms.Label lbaddress; + private System.Windows.Forms.CheckBox cbsell; + private System.Windows.Forms.TextBox txtpackagedescription; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TextBox txtpackagename; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Button btndonecustomizing; + private System.Windows.Forms.Button btnsaa; + private System.Windows.Forms.Panel pnlauthordetails; + private System.Windows.Forms.Label lbauthordescription; + private System.Windows.Forms.Label lbauthorname; + private System.Windows.Forms.Panel pnlchoosenetwork; + private System.Windows.Forms.Button btnrequest; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.ListView lvnets; + private System.Windows.Forms.ColumnHeader clhostnameheader; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Appscape.cs b/source/WindowsFormsApplication1/Apps/Appscape.cs new file mode 100644 index 0000000..92171d9 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Appscape.cs @@ -0,0 +1,976 @@ +using NetSockets; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Appscape : Form + { + /// <summary> + /// Front-end for the Appscape Package Manager. + /// </summary> + public Appscape() + { + InitializeComponent(); + } + + private List<AppscapeClient> clients = null; + + private void Form1_Load(object sender, EventArgs e) + { + clients = new List<AppscapeClient>(); + foreach(var ip in Package_Grabber.clients.Keys) + { + if (Package_Grabber.clients[ip].IsConnected) + { + var client = new AppscapeClient(ip); + client.OnSuccessfulDownload += (object s, EventArgs a) => + { + this.Invoke(new Action(() => + { + if (AddressToSendTo != null) + { + var w = new BitnoteWallet(); + while(w.Clients == null) + { + + } + if (API.BitnoteAddress.Bitnotes >= CurrentItemCost) + { + if (w.AddBitnotesToAddress(AddressToSendTo, CurrentItemCost)) + { + API.CreateInfoboxSession("Package downloaded.", "The package has been successfully downloaded to your system.", infobox.InfoboxMode.Info); + API.BitnoteAddress.Bitnotes -= CurrentItemCost; + } + else + { + API.CreateInfoboxSession("Server-side Bitnote Error", "We couldn't complete the transaction, but the package was still downloaded. No Bitnotes have been taken from your account.", infobox.InfoboxMode.Info); + } + } + else + { + File.Delete((string)s); + API.CreateInfoboxSession("Insufficient funds.", "You do not have enough Bitnotes to complete the transaction.", infobox.InfoboxMode.Info); + } + } + })); + }; + client.OnPackagesReceived += (object s, EventArgs a) => + { + this.Invoke(new Action(() => { lvmypackages.Items.Clear(); })); + foreach (AppscapePackage package in client.Packages) + { + ListViewItem lvitem = new ListViewItem(); + lvitem.Text = package.Name; + package.Server = client.IP; + lvitem.Tag = package; + this.Invoke(new Action(() => + { + lvmypackages.Columns[0].Width = lvmypackages.Width; + if (MyDevProfile != null && LoungeClient != null) + { + if (package.DevKey == MyDevProfile.DevKey) + { + var lvmy = new ListViewItem(); + lvmy.Text = package.Name; + lvmy.Tag = package; + lvmypackages.Items.Add(lvmy); + lvmy.SubItems.Add(package.Cost.ToString()); + } + } + lvpackages.Items.Add(lvitem); + if (package.DevKey != null) + { + client.GetDevList(); + try { + var obj = client.DevList[package.DevKey]; + if (obj != null) + { + lvitem.SubItems.Add(obj.Name); + } + else + { + lvitem.SubItems.Add("Unknown"); + } + } + catch + { + lvitem.SubItems.Add("Unknown"); + } + + } + else { + lvitem.SubItems.Add("Unknown"); + } + lvitem.SubItems.Add(package.Cost.ToString()); + })); + } + }; + client.OnSkinDataReceived += (object s, EventArgs a) => + { + foreach (SkinData skin in client.Skins) + { + var item = new ListViewItem(); + item.Text = skin.Name; + skin.Server = client.IP; + item.Tag = skin; + this.Invoke(new Action(() => + { + lvpackages.Items.Add(item); + item.SubItems.Add("<NYI>"); + item.SubItems.Add(skin.Cost.ToString()); + })); + } + }; + client.OnDevListSync += (object s, EventArgs a) => + { + API.CurrentSession.Invoke(new Action(() => + { + foreach (ListViewItem itm in lvpackages.Items) + { + if (DataType == "apps") + { + var pkg = (AppscapePackage)itm.Tag; + foreach (ListViewItem.ListViewSubItem subItem in itm.SubItems) + { + if (subItem.Text == "Unknown") + { /********************************************************************************************************************************************************************************/ + if (client.DevList != null && pkg.DevKey != null) + { + if (client.DevList.ContainsKey(pkg.DevKey)) + { + var dev = client.DevList[pkg.DevKey]; + subItem.Text = dev.Name; + } + } + } + } + } + } + })); + }; + client.GetDevList(); + clients.Add(client); + } + } + SetupList(); + pnllist.BringToFront(); + + } + + + /// <summary> + /// Sets up Appscape's package listing. + /// </summary> + public void SetupList() + { + if (DataType == "apps") + { + btnapps.BackColor = Color.Black; + btnapps.ForeColor = Color.White; + btnskins.BackColor = Color.White; + btnskins.ForeColor = Color.Black; + } + else + { + btnapps.BackColor = Color.White; + btnapps.ForeColor = Color.Black; + btnskins.BackColor = Color.Black; + btnskins.ForeColor = Color.White; + } + columnHeader1.Width = lvpackages.Width / 3; + columnHeader2.Width = lvpackages.Width / 3; + columnHeader3.Width = lvpackages.Width / 3; + + lvpackages.Items.Clear(); + pnlsearch.BackColor = API.CurrentSkin.titlebarcolour; + pnlsearch.ForeColor = API.CurrentSkin.titletextcolour; + if (DataType == "apps") + { + foreach (var client in clients) + { + client.GetDevList(); + client.GetPackageData(); + } + + } + else + { + foreach (var client in clients) + { + client.GetSkinData(); + } + + } + } + + private string DownloadPath = ""; + + private void lvpackages_SelectedIndexChanged(object sender, EventArgs e) + { + if (lvpackages.SelectedItems.Count > 0) + { + lvpackages.SelectedItems[0].BackColor = Color.Gray; + pnldownload.Show(); + foreach (ListViewItem lv in lvpackages.Items) + { + lv.BackColor = Color.White; + } + if (DataType == "apps") + { + AppscapePackage pkg = (AppscapePackage)lvpackages.SelectedItems[0].Tag; + lbpkgname.Text = pkg.Name; + lbpkgdescription.Text = pkg.Description; + try { + pbappscreenshot.Show(); + pbappscreenshot.Load(pkg.ScreenshotPath); + } + catch + { + pbappscreenshot.Hide(); + } + if (pkg.SetupFile == "" || pkg.SetupFile == null) + { + pnldownload.Hide(); + } + else + { + pnldownload.Show(); + lbdownloadpath.Text = "This package will download to: " + pkg.Name + ".stp."; + if (!pkg.SetupFile.EndsWith(".stp")) + { + pkg.SetupFile = pkg.SetupFile + ".stp"; + } + + foreach(var c in clients) + { + if(c.IP == pkg.Server) + { + DownloadClient = c; + } + } + DownloadPath = pkg.SetupFile; + } + try { + pbappicon.Show(); + pbappicon.Load("http://playshiftos.ml/appscape/packages/" + pkg.PkgIconPath); + } + catch + { + pbappicon.Hide(); + } + if (pkg.Cost == 0) + { + CurrentItemCost = Convert.ToDecimal(pkg.Cost); + } + else { + CurrentItemCost = Convert.ToDecimal(pkg.Cost.ToString("#.#####")); + } + if(pkg.DevKey != null) + { + pnlauthordetails.Show(); + lbauthorname.Text = "Author: " + GetModderByDevID(pkg.DevKey).Key.Name; + lbauthordescription.Text = GetModderByDevID(pkg.DevKey).Key.Bio; + AddressToSendTo = GetModderByDevID(pkg.DevKey).Key.BitnoteAddress; + } + else + { + pnlauthordetails.Hide(); + //Classic packages. + if(pkg.Address != null) + { + AddressToSendTo = pkg.Address; + } + else + { + AddressToSendTo = null; + } + } + } + else + { + var skin = (SkinData)lvpackages.SelectedItems[0].Tag; + lbpkgname.Text = skin.Name; + lbpkgdescription.Text = "Author: " + skin.Author + Environment.NewLine; + if (skin.Download.EndsWith(".skn")) + { + lbpkgdescription.Text += "Type: Single Skin (.skn)" + Environment.NewLine; + } + else + { + lbpkgdescription.Text += "Type: Skin Pack (.spk)" + Environment.NewLine; + } + if (skin.Screenshot != null) + { + pbappscreenshot.Show(); + pbappscreenshot.Load(skin.Screenshot); + } + else + { + pbappscreenshot.Hide(); + } + if (skin.Icon != null) + { + pbappicon.Show(); + pbappicon.Load("http://shiftos.shiftgames.ml/appscape/skins/" + skin.Icon); + } + else + { + pbappicon.Hide(); + } + if (skin.Cost == 0) + { + CurrentItemCost = Convert.ToDecimal(skin.Cost); + } + else { + CurrentItemCost = Convert.ToDecimal(skin.Cost.ToString("#.#####")); + } + lbpkgdescription.Text += Environment.NewLine + skin.Description; + lbdownloadpath.Text = "This skin will download to C:\\ShiftOS\\Home\\Downloads\\" + skin.Download; + foreach(var c in clients) + { + if(c.IP == skin.Server) + { + DownloadClient = c; + } + } + DownloadPath = skin.Download; + } + } + } + + public decimal CurrentItemCost = 0; + public string AddressToSendTo = null; + public AppscapeClient DownloadClient = null; + public AppscapeClient LoungeClient = null; + + private void btndownload_Click(object sender, EventArgs e) + { + if (API.BitnoteAddress != null) + { + try + { + if (API.BitnoteAddress.Bitnotes >= CurrentItemCost) + { + WebClient wc = new WebClient(); + if (!Directory.Exists(Paths.Home + OSInfo.DirectorySeparator + "Downloads")) + { + Directory.CreateDirectory(Paths.Home + OSInfo.DirectorySeparator + "Downloads"); + } + switch(DataType) + { + case "apps": + DownloadClient.DownloadPackage(DownloadPath); + break; + default: + DownloadClient.DownloadSkin(DownloadPath); + break; + } + + } + else + { + API.CreateInfoboxSession("Appscape - Not enough bitnotes!", "You do not have enough Bitnotes to buy this package.", infobox.InfoboxMode.Info); + } + } + catch (Exception wex) + { + API.CreateInfoboxSession("Error", "An error has occurred while downloading the package." + Environment.NewLine + Environment.NewLine + wex.Message, infobox.InfoboxMode.Info); + } + } + else + { + API.CreateInfoboxSession("No Bitnote Address Found", "It seems that your computer is not linked with a Bitnote address. Please go to shiftnet://main/bitnote/home.rnp for more information.", infobox.InfoboxMode.Info); + } + } + + private void btnupload_Click(object sender, EventArgs e) + { + var u = new AppscapeUploader(MyDevProfile, LoungeClient); + API.CreateForm(u, "Appscape Uploader", Properties.Resources.iconAppscape); + } + + public string DataType = "apps"; + + private void btnapps_Click(object sender, EventArgs e) + { + pnllist.BringToFront(); + DataType = "apps"; + SetupList(); + } + + private void btnskins_Click(object sender, EventArgs e) + { + pnllist.BringToFront(); + DataType = "skins"; + SetupList(); + } + + private void lvpackages_DoubleClick(object sender, EventArgs e) + { + if(lvpackages.SelectedItems.Count > 0) + { + pnlpackageinfo.BringToFront(); + } + } + + private void txtsearch_TextChanged(object sender, EventArgs e) + { + var bw = new BackgroundWorker(); + bw.DoWork += (object s, DoWorkEventArgs a) => + { + this.Invoke(new Action(() => + { + SetupList(); + })); + if (txtsearch.Text != "") + { + this.Invoke(new Action(() => + { + pnllist.BringToFront(); + })); + var newlst = new List<ListViewItem>(); + this.Invoke(new Action(() => + { + foreach (ListViewItem item in lvpackages.Items) + { + if (item.Text.ToLower().Replace(" ", "").Contains(txtsearch.Text.ToLower().Replace(" ", ""))) + { + newlst.Add(item); + } + } + lvpackages.Items.Clear(); + })); + foreach (ListViewItem itm in newlst) + { + this.Invoke(new Action(() => + { + lvpackages.Items.Add(itm); + })); + } + } + }; + bw.RunWorkerAsync(); + } + + /// <summary> + /// Gets developer info using the specified key. + /// + /// Bugs: If two servers contain the same key, the first key the method sees will be returned. + /// </summary> + /// <param name="DevID">The key to search for.</param> + /// <returns>A pair containing the developer info as well as the client that contained the key.</returns> + public KeyValuePair<AppscapeModder, AppscapeClient> GetModderByDevID(string DevID) + { + AppscapeModder dev = null; + AppscapeClient clt = null; + foreach (var client in clients) + { + if (client.DevList.ContainsKey(DevID)) + { + if (dev == null) + { + dev = client.DevList[DevID]; + clt = client; + } + } + + } + return new KeyValuePair<AppscapeModder, AppscapeClient>(dev, clt); + } + + /// <summary> + /// Adds a new developer key to the specified client's listing. + /// </summary> + /// <param name="client">The client to add to.</param> + public void GenerateNewDevKey(AppscapeClient client) + { + if(client.DevList == null) + { + client.DevList = new Dictionary<string, AppscapeModder>(); + } + var rnd = new Random(); + int key = rnd.Next(1, 99999999); + var dev = new AppscapeModder(); + dev.DevKey = key.ToString(); + dev.Name = "Modder"; + bool done = false; + if (!client.DevList.ContainsKey(key.ToString())) + { + if (done != true) + { + client.DevList.Add(dev.DevKey, dev); + client.UploadDevList(client.DevList); + done = true; + API.CreateInfoboxSession("Success.", $"Your new developer key is {dev.DevKey}. As long as you are connected to the {client.IP} repository, you can use this key to enter the Appscape Lounge, make a name for yourself, and start uploading.", infobox.InfoboxMode.Info); + } + } + } + + private void btngetkey_Click(object sender, EventArgs e) + { + pnlchoosenetwork.BringToFront(); + SetupNetworks(); + } + + /// <summary> + /// Lists all available Appscape repositories a key can be added to. + /// </summary> + private void SetupNetworks() + { + clhostnameheader.Width = lvnets.Width; + lvnets.Items.Clear(); + foreach(var c in clients) + { + var lv = new ListViewItem(); + lv.Text = c.IP; + lv.Tag = c; + lvnets.Items.Add(lv); + } + } + + private AppscapeModder MyDevProfile = null; + + /// <summary> + /// Sets up the Developer Lounge. + /// </summary> + public void SetupLounge() + { + pnllounge.BringToFront(); + //List of all my packages + lvmypackages.Items.Clear(); + foreach (var client in clients) + { + client.GetPackageData(); + } + + //My name. + lbmyname.Text = MyDevProfile.Name; + txtmoddername.Text = MyDevProfile.Name; + //Biography. + lbmybio.Text = MyDevProfile.Bio; + txtbio.Text = MyDevProfile.Bio; + //My Bitnote Address + txtbitnoteaddress.Text = MyDevProfile.BitnoteAddress; + + } + + private void btnlounge_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Appscape Developer Lounge", "Please enter your Developer Key to enter the Lounge.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + bool cont = true; + if (res != "fail") + { + try + { + var dev = GetModderByDevID(res); + MyDevProfile = dev.Key; + LoungeClient = dev.Value; + SetupLounge(); + } + catch + { + cont = false; + } + } + if (cont != true) + API.CreateInfoboxSession("Appscape Developer Lounge", "That Developer Key was not found in the database.", infobox.InfoboxMode.Info); + }; + } + + private void btnsave_Click(object sender, EventArgs e) + { + var c = LoungeClient; + c.DevList[MyDevProfile.DevKey] = MyDevProfile; + c.UploadDevList(c.DevList); + btnapps_Click(sender, e); + } + + private void txtbitnoteaddress_TextChanged(object sender, EventArgs e) + { + MyDevProfile.BitnoteAddress = txtbitnoteaddress.Text; + } + + private void txtbio_TextChanged(object sender, EventArgs e) + { + MyDevProfile.Bio = txtbio.Text; + } + + private void txtmoddername_TextChanged(object sender, EventArgs e) + { + MyDevProfile.Name = txtmoddername.Text; + } + + private AppscapePackage PackageToEdit = null; + + private void btnedit_Click(object sender, EventArgs e) + { + if(lvmypackages.SelectedItems.Count > 0) + { + ListViewItem itm = lvmypackages.SelectedItems[0]; + AppscapePackage pkg = (AppscapePackage)itm.Tag; + PackageToEdit = pkg; + pnlpackageeditor.BringToFront(); + SetupEditor(); + } + } + + /// <summary> + /// Sets up the package editor. + /// </summary> + private void SetupEditor() + { + if(PackageToEdit.Cost > 0) + { + cbsell.Checked = true; + } + txtprice.Text = PackageToEdit.Cost.ToString(); + txtpackagename.Text = PackageToEdit.Name; + txtpackagedescription.Text = PackageToEdit.Description; + SAAFile = null; + } + + private string SAAFile = null; + + private void cbsell_CheckedChanged(object sender, EventArgs e) + { + lbprice.Visible = cbsell.Checked; + lbaddress.Visible = cbsell.Checked; + txtprice.Visible = cbsell.Checked; + + } + + private void btndonecustomizing_Click(object sender, EventArgs e) + { + bool ContinueUpload = true; + //Create new package and assign values + var pkg = PackageToEdit; + var OldName = pkg.Name.Replace(" ", "_"); + pkg.Name = txtpackagename.Text; + pkg.Description = txtpackagedescription.Text; + if (cbsell.Checked == true) + { + try + { + pkg.Cost = Convert.ToDecimal(Convert.ToDecimal(txtprice.Text).ToString("#.#####")); + } + catch + { + ContinueUpload = false; + API.CreateInfoboxSession("Error", "You have entered an incorrect price value.", infobox.InfoboxMode.Info); + } + } + else { + pkg.Cost = 0; + } + pkg.PkgIconPath = ""; + if (ContinueUpload == true) + { + + if (!Directory.Exists(Paths.Mod_Temp + "newapm")) + { + Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); + } + else + { + Directory.Delete(Paths.Mod_Temp + "newapm", true); + Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); + } + + //Copy app SAA and icon to package folder + if (SAAFile != null) + { + File.Copy(SAAFile, Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "app.saa"); + } + else + { + var wc = new WebClient(); + wc.DownloadFile("http://playshiftos.ml/appscape/packages/" + OldName + ".stp", Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "app.saa"); + } + Properties.Resources.iconShiftnet.Save(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "Icon.bmp"); + + //Create AL meta file for package (so it will display in the app launcher) + var al = new ModApplauncherItem(); + al.Display = true; + al.Icon = "Icon.bmp"; + al.Name = pkg.Name; + al.ShiftCode = "runSAA:app.saa"; + al.AppDirectory = al.Name; + + //Serialize AL meta file and copy to package + var json = JsonConvert.SerializeObject(al); + File.WriteAllText(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "applauncher", json); + + //Package file to .stp and upload to Appscape + ZipFile.CreateFromDirectory(Paths.Mod_Temp + "newapm", Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp"); + LoungeClient.UploadPackage(pkg, File.ReadAllBytes(Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp")); + btnapps_Click(sender, e); + + SetupLounge(); + pnllounge.BringToFront(); + } + } + + private void btnsaa_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".saa", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + SAAFile = res; + btnsaa.Text = new FileInfo(SAAFile).Name; + } + }; + } + + private void btnrequest_Click(object sender, EventArgs e) + { + if(lvnets.SelectedItems.Count > 0) + { + //try + //{ + GenerateNewDevKey((AppscapeClient)lvnets.SelectedItems[0].Tag); + /*} + catch (Exception ex) + { + API.CreateInfoboxSession("Error", "An error has occurred trying to process the request: {ex.Message}", infobox.InfoboxMode.Info); + }*/ + } + } + } + + public class AppscapeClient + { + #region Constructor + + /// <summary> + /// Represents a client that communicates with an Appscape repository. + /// + /// Generally you shouldn't need to create an instance of this unless you messed up Appscape and are desperately trying to fix it by rewriting it, in which case you really should've just rolled back the source code. xD + /// </summary> + /// <param name="ip_address">IP address of the repo. This can be found in Package_Grabber.clients.Keys.</param> + public AppscapeClient(string ip_address) + { + try { + var c = Package_Grabber.clients[ip_address]; + c.OnReceived += (object s, NetReceivedEventArgs<NetObject> a) => + { + var obj = (ObjectModel)a.Data.Object; + switch (_mode) + { + case "getapps": + try + { + Packages = (List<AppscapePackage>)obj.OptionalObject; + var h = OnPackagesReceived; + if (h != null) + { + h(obj, new EventArgs()); + } + } + catch + { + + } + + break; + case "get_devlist": + try { + if (obj.OptionalObject != null) + { + if (DevList == null) + { + DevList = new Dictionary<string, AppscapeModder>(); + } + var lst = (List<string>)obj.OptionalObject; + foreach (string json in lst) + { + var dev = JsonConvert.DeserializeObject<AppscapeModder>(json); + if (!DevList.ContainsKey(dev.DevKey)) + { + DevList.Add(dev.DevKey, dev); + } + } + var h = OnDevListSync; + if (h != null) + { + h(obj, new EventArgs()); + } + } + } + catch + { + + } + break; + case "getskins": + try + { + Skins = (List<SkinData>)obj.OptionalObject; + var h = OnSkinDataReceived; + if (h != null) + { + h(obj, new EventArgs()); + } + } + catch + { + + } + break; + default: + try { + var command = (ObjectModel)a.Data.Object; + string[] args = command.Command.Split(' '); + switch (args[0]) + { + case "package_bytes": + byte[] package = (byte[])command.OptionalObject; + File.WriteAllBytes($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{OSInfo.DirectorySeparator}{args[1]}", package); + var h = OnSuccessfulDownload; + if (h != null) + { + h($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{ OSInfo.DirectorySeparator}{args[1]}", new EventArgs()); + } + break; + case "skin_bytes": + byte[] skin = (byte[])command.OptionalObject; + File.WriteAllBytes($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{OSInfo.DirectorySeparator}{args[1]}", skin); + var ha = OnSuccessfulDownload; + if (ha != null) + { + ha($"{Paths.Home}{OSInfo.DirectorySeparator}Downloads{ OSInfo.DirectorySeparator}{args[1]}", new EventArgs()); + } + break; + } + } + catch + { + + } + break; + } + }; + _IP = ip_address; + } + catch + { + throw new ArgumentException("IP address not found in client list."); + } + } + + #endregion + + #region Events + + public event EventHandler OnPackagesReceived; + public event EventHandler OnSkinDataReceived; + public event EventHandler OnDevListSync; + public event EventHandler OnDevGrabbed; + public event EventHandler OnSuccessfulDownload; + + #endregion + + #region Variables + + public List<AppscapePackage> Packages = null; + public List<SkinData> Skins = null; + public Dictionary<string, AppscapeModder> DevList = null; + private string _mode = ""; + private string _IP = ""; + public string IP { get { return _IP; } } + + #endregion + + #region Methods + + /// <summary> + /// Connects to Appscape server and grabs app package listings. + /// </summary> + public void GetPackageData() + { + _mode = "getapps"; + Package_Grabber.SendMessage(_IP, "apm getapps"); + + } + + /// <summary> + /// Connects to server and requests a list of all developers. + /// </summary> + public void GetDevList() + { + _mode = "get_devlist"; + Package_Grabber.SendMessage(_IP, "get_devlist"); + } + + /// <summary> + /// Downloads a package. + /// </summary> + /// <param name="pkg">Package name to download.</param> + public void DownloadPackage(string pkg) + { + _mode = ""; + Package_Grabber.SendMessage(_IP, $"apm getpackage {pkg}"); + } + + /// <summary> + /// Downloads a skin. + /// </summary> + /// <param name="skn">The skin name to download.</param> + public void DownloadSkin(string skn) + { + _mode = ""; + Package_Grabber.SendMessage(_IP, $"apm getskin {skn}"); + } + + + /// <summary> + /// Uploads a new package to the server. + /// </summary> + /// <param name="pkgMeta">Package metadata (name, description, etc)</param> + /// <param name="pkg">Byte array representing the .stp file to upload.</param> + public void UploadPackage(AppscapePackage pkgMeta, byte[] pkg) + { + pkgMeta.SetupFile = pkgMeta.Name.Replace(" ", "_") + ".stp"; + Package_Grabber.SendMessage(_IP, $"apm uploadmeta {pkgMeta.Name.Replace(" ", "_")}.json", pkgMeta); + Package_Grabber.SendMessage(_IP, $"apm upload {pkgMeta.SetupFile}", pkg); + } + + /// <summary> + /// Connects to Appscape server and grabs skin listings. + /// </summary> + public void GetSkinData() + { + _mode = "getskins"; + Package_Grabber.SendMessage(_IP, "apm getskins"); + + } + + /// <summary> + /// Contacts the server to save the devlist. + /// </summary> + /// <param name="dict">Updated dev list to save.</param> + public void UploadDevList(Dictionary<string, AppscapeModder> dict) + { + Package_Grabber.SendMessage(_IP, "apm uploaddevlist", dict); + } + + #endregion + } +} diff --git a/source/WindowsFormsApplication1/Apps/Appscape.resx b/source/WindowsFormsApplication1/Apps/Appscape.resx new file mode 100644 index 0000000..524af34 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Appscape.resx @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="label14.Text" xml:space="preserve"> + <value>Please choose a repository you would like your developer key to be associated with. Any uploads made using the new key will be sent to this repository and viewers of this repository will see your new package.</value> + </data> + <metadata name="imgpackageicons.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/AppscapeUploader.Designer.cs b/source/WindowsFormsApplication1/Apps/AppscapeUploader.Designer.cs new file mode 100644 index 0000000..e23ef2d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/AppscapeUploader.Designer.cs @@ -0,0 +1,423 @@ +namespace ShiftOS +{ + partial class AppscapeUploader + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.lbtitle = new System.Windows.Forms.Label(); + this.pnlmain = new System.Windows.Forms.Panel(); + this.Page0 = new System.Windows.Forms.Panel(); + this.txtprice = new System.Windows.Forms.TextBox(); + this.lbprice = new System.Windows.Forms.Label(); + this.lbaddress = new System.Windows.Forms.Label(); + this.cbsell = new System.Windows.Forms.CheckBox(); + this.txtpackagedescription = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.txtpackagename = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.Page1 = new System.Windows.Forms.Panel(); + this.btncompilesaa = new System.Windows.Forms.Button(); + this.btnscreenshot = new System.Windows.Forms.Button(); + this.btnicon = new System.Windows.Forms.Button(); + this.btnsaa = new System.Windows.Forms.Button(); + this.Page2 = new System.Windows.Forms.Panel(); + this.txtconfirm = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.lbldescription = new System.Windows.Forms.Label(); + this.pnlactions = new System.Windows.Forms.FlowLayoutPanel(); + this.btndone = new System.Windows.Forms.Button(); + this.btnnext = new System.Windows.Forms.Button(); + this.btnback = new System.Windows.Forms.Button(); + this.btncancel = new System.Windows.Forms.Button(); + this.pnlmain.SuspendLayout(); + this.Page0.SuspendLayout(); + this.Page1.SuspendLayout(); + this.Page2.SuspendLayout(); + this.pnlactions.SuspendLayout(); + this.SuspendLayout(); + // + // lbtitle + // + this.lbtitle.BackColor = System.Drawing.Color.Gray; + this.lbtitle.Dock = System.Windows.Forms.DockStyle.Top; + this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.lbtitle.ForeColor = System.Drawing.Color.White; + this.lbtitle.Location = new System.Drawing.Point(0, 0); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Padding = new System.Windows.Forms.Padding(15, 0, 0, 0); + this.lbtitle.Size = new System.Drawing.Size(711, 49); + this.lbtitle.TabIndex = 0; + this.lbtitle.Text = "Welcome!"; + this.lbtitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // pnlmain + // + this.pnlmain.BackColor = System.Drawing.Color.Gray; + this.pnlmain.Controls.Add(this.Page0); + this.pnlmain.Controls.Add(this.Page1); + this.pnlmain.Controls.Add(this.Page2); + this.pnlmain.Controls.Add(this.lbldescription); + this.pnlmain.Controls.Add(this.pnlactions); + this.pnlmain.Controls.Add(this.lbtitle); + this.pnlmain.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlmain.Location = new System.Drawing.Point(0, 0); + this.pnlmain.Name = "pnlmain"; + this.pnlmain.Size = new System.Drawing.Size(711, 485); + this.pnlmain.TabIndex = 1; + // + // Page0 + // + this.Page0.Controls.Add(this.txtprice); + this.Page0.Controls.Add(this.lbprice); + this.Page0.Controls.Add(this.lbaddress); + this.Page0.Controls.Add(this.cbsell); + this.Page0.Controls.Add(this.txtpackagedescription); + this.Page0.Controls.Add(this.label2); + this.Page0.Controls.Add(this.txtpackagename); + this.Page0.Controls.Add(this.label1); + this.Page0.Dock = System.Windows.Forms.DockStyle.Fill; + this.Page0.Location = new System.Drawing.Point(0, 135); + this.Page0.Name = "Page0"; + this.Page0.Size = new System.Drawing.Size(711, 314); + this.Page0.TabIndex = 3; + // + // txtprice + // + this.txtprice.Location = new System.Drawing.Point(542, 239); + this.txtprice.Name = "txtprice"; + this.txtprice.Size = new System.Drawing.Size(89, 20); + this.txtprice.TabIndex = 8; + this.txtprice.Visible = false; + this.txtprice.TextChanged += new System.EventHandler(this.txtprice_TextChanged); + // + // lbprice + // + this.lbprice.AutoSize = true; + this.lbprice.Location = new System.Drawing.Point(505, 242); + this.lbprice.Name = "lbprice"; + this.lbprice.Size = new System.Drawing.Size(34, 13); + this.lbprice.TabIndex = 7; + this.lbprice.Text = "Price:"; + this.lbprice.Visible = false; + this.lbprice.Click += new System.EventHandler(this.lbprice_Click); + // + // lbaddress + // + this.lbaddress.Location = new System.Drawing.Point(211, 242); + this.lbaddress.Name = "lbaddress"; + this.lbaddress.Size = new System.Drawing.Size(275, 45); + this.lbaddress.TabIndex = 5; + this.lbaddress.Text = "All profit made from this package will be sent to the Bitnote Address defined in " + + "your Dev Lounge; if it is non-existent, Bitnotes simply won\'t arrive."; + this.lbaddress.Visible = false; + this.lbaddress.Click += new System.EventHandler(this.lbaddress_Click); + // + // cbsell + // + this.cbsell.Appearance = System.Windows.Forms.Appearance.Button; + this.cbsell.AutoSize = true; + this.cbsell.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbsell.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.cbsell.Location = new System.Drawing.Point(98, 235); + this.cbsell.Name = "cbsell"; + this.cbsell.Size = new System.Drawing.Size(92, 24); + this.cbsell.TabIndex = 4; + this.cbsell.Text = "Sell for Bitnotes"; + this.cbsell.UseVisualStyleBackColor = true; + this.cbsell.CheckedChanged += new System.EventHandler(this.cbsell_CheckedChanged); + // + // txtpackagedescription + // + this.txtpackagedescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtpackagedescription.Location = new System.Drawing.Point(100, 44); + this.txtpackagedescription.Multiline = true; + this.txtpackagedescription.Name = "txtpackagedescription"; + this.txtpackagedescription.Size = new System.Drawing.Size(591, 189); + this.txtpackagedescription.TabIndex = 3; + this.txtpackagedescription.TextChanged += new System.EventHandler(this.txtpackagedescription_TextChanged); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(13, 47); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(60, 13); + this.label2.TabIndex = 2; + this.label2.Text = "Description"; + this.label2.Click += new System.EventHandler(this.label2_Click); + // + // txtpackagename + // + this.txtpackagename.Location = new System.Drawing.Point(100, 15); + this.txtpackagename.Name = "txtpackagename"; + this.txtpackagename.Size = new System.Drawing.Size(258, 20); + this.txtpackagename.TabIndex = 1; + this.txtpackagename.TextChanged += new System.EventHandler(this.txtpackagename_TextChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 18); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(81, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Package Name"; + this.label1.Click += new System.EventHandler(this.label1_Click); + // + // Page1 + // + this.Page1.Controls.Add(this.btncompilesaa); + this.Page1.Controls.Add(this.btnscreenshot); + this.Page1.Controls.Add(this.btnicon); + this.Page1.Controls.Add(this.btnsaa); + this.Page1.Dock = System.Windows.Forms.DockStyle.Fill; + this.Page1.Location = new System.Drawing.Point(0, 135); + this.Page1.Name = "Page1"; + this.Page1.Size = new System.Drawing.Size(711, 314); + this.Page1.TabIndex = 4; + // + // btncompilesaa + // + this.btncompilesaa.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btncompilesaa.AutoSize = true; + this.btncompilesaa.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btncompilesaa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncompilesaa.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btncompilesaa.Location = new System.Drawing.Point(4, 282); + this.btncompilesaa.Name = "btncompilesaa"; + this.btncompilesaa.Size = new System.Drawing.Size(82, 26); + this.btncompilesaa.TabIndex = 7; + this.btncompilesaa.Text = "Compile SAA"; + this.btncompilesaa.UseVisualStyleBackColor = true; + this.btncompilesaa.Click += new System.EventHandler(this.btncompilesaa_Click); + // + // btnscreenshot + // + this.btnscreenshot.AutoSize = true; + this.btnscreenshot.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnscreenshot.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnscreenshot.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnscreenshot.Location = new System.Drawing.Point(12, 76); + this.btnscreenshot.Name = "btnscreenshot"; + this.btnscreenshot.Size = new System.Drawing.Size(121, 26); + this.btnscreenshot.TabIndex = 6; + this.btnscreenshot.Text = "Select App Screenshot"; + this.btnscreenshot.UseVisualStyleBackColor = true; + this.btnscreenshot.Click += new System.EventHandler(this.btnscreenshot_Click); + // + // btnicon + // + this.btnicon.AutoSize = true; + this.btnicon.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnicon.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnicon.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnicon.Location = new System.Drawing.Point(12, 44); + this.btnicon.Name = "btnicon"; + this.btnicon.Size = new System.Drawing.Size(92, 26); + this.btnicon.TabIndex = 5; + this.btnicon.Text = "Select App Icon"; + this.btnicon.UseVisualStyleBackColor = true; + this.btnicon.Click += new System.EventHandler(this.btnicon_Click); + // + // btnsaa + // + this.btnsaa.AutoSize = true; + this.btnsaa.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnsaa.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsaa.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnsaa.Location = new System.Drawing.Point(12, 9); + this.btnsaa.Name = "btnsaa"; + this.btnsaa.Size = new System.Drawing.Size(92, 26); + this.btnsaa.TabIndex = 4; + this.btnsaa.Text = "Select App SAA"; + this.btnsaa.UseVisualStyleBackColor = true; + this.btnsaa.Click += new System.EventHandler(this.btnsaa_Click); + // + // Page2 + // + this.Page2.Controls.Add(this.txtconfirm); + this.Page2.Controls.Add(this.label3); + this.Page2.Dock = System.Windows.Forms.DockStyle.Fill; + this.Page2.Location = new System.Drawing.Point(0, 135); + this.Page2.Name = "Page2"; + this.Page2.Size = new System.Drawing.Size(711, 314); + this.Page2.TabIndex = 7; + // + // txtconfirm + // + this.txtconfirm.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.txtconfirm.Location = new System.Drawing.Point(19, 49); + this.txtconfirm.Multiline = true; + this.txtconfirm.Name = "txtconfirm"; + this.txtconfirm.Size = new System.Drawing.Size(672, 259); + this.txtconfirm.TabIndex = 1; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(16, 18); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(132, 13); + this.label3.TabIndex = 0; + this.label3.Text = "Confirm Package Settings:"; + // + // lbldescription + // + this.lbldescription.Dock = System.Windows.Forms.DockStyle.Top; + this.lbldescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.lbldescription.ForeColor = System.Drawing.Color.White; + this.lbldescription.Location = new System.Drawing.Point(0, 49); + this.lbldescription.Name = "lbldescription"; + this.lbldescription.Padding = new System.Windows.Forms.Padding(15, 0, 0, 0); + this.lbldescription.Size = new System.Drawing.Size(711, 86); + this.lbldescription.TabIndex = 2; + this.lbldescription.Text = "label1"; + // + // pnlactions + // + this.pnlactions.Controls.Add(this.btndone); + this.pnlactions.Controls.Add(this.btnnext); + this.pnlactions.Controls.Add(this.btnback); + this.pnlactions.Controls.Add(this.btncancel); + this.pnlactions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlactions.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.pnlactions.ForeColor = System.Drawing.Color.White; + this.pnlactions.Location = new System.Drawing.Point(0, 449); + this.pnlactions.Name = "pnlactions"; + this.pnlactions.Size = new System.Drawing.Size(711, 36); + this.pnlactions.TabIndex = 1; + // + // btndone + // + this.btndone.AutoSize = true; + this.btndone.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndone.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btndone.Location = new System.Drawing.Point(660, 3); + this.btndone.Name = "btndone"; + this.btndone.Size = new System.Drawing.Size(48, 26); + this.btndone.TabIndex = 0; + this.btndone.Text = "Done!"; + this.btndone.UseVisualStyleBackColor = true; + this.btndone.Click += new System.EventHandler(this.btndone_Click); + // + // btnnext + // + this.btnnext.AutoSize = true; + this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnnext.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnnext.Location = new System.Drawing.Point(612, 3); + this.btnnext.Name = "btnnext"; + this.btnnext.Size = new System.Drawing.Size(42, 26); + this.btnnext.TabIndex = 1; + this.btnnext.Text = "Next"; + this.btnnext.UseVisualStyleBackColor = true; + this.btnnext.Click += new System.EventHandler(this.btnnext_Click); + // + // btnback + // + this.btnback.AutoSize = true; + this.btnback.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnback.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnback.Location = new System.Drawing.Point(564, 3); + this.btnback.Name = "btnback"; + this.btnback.Size = new System.Drawing.Size(42, 26); + this.btnback.TabIndex = 2; + this.btnback.Text = "Back"; + this.btnback.UseVisualStyleBackColor = true; + this.btnback.Click += new System.EventHandler(this.btnback_Click); + // + // btncancel + // + this.btncancel.AutoSize = true; + this.btncancel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btncancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncancel.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btncancel.Location = new System.Drawing.Point(508, 3); + this.btncancel.Name = "btncancel"; + this.btncancel.Size = new System.Drawing.Size(50, 26); + this.btncancel.TabIndex = 3; + this.btncancel.Text = "Cancel"; + this.btncancel.UseVisualStyleBackColor = true; + this.btncancel.Click += new System.EventHandler(this.btncancel_Click); + // + // AppscapeUploader + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(711, 485); + this.Controls.Add(this.pnlmain); + this.Name = "AppscapeUploader"; + this.Text = "AppscapeUploader"; + this.Load += new System.EventHandler(this.AppscapeUploader_Load); + this.pnlmain.ResumeLayout(false); + this.Page0.ResumeLayout(false); + this.Page0.PerformLayout(); + this.Page1.ResumeLayout(false); + this.Page1.PerformLayout(); + this.Page2.ResumeLayout(false); + this.Page2.PerformLayout(); + this.pnlactions.ResumeLayout(false); + this.pnlactions.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.Panel pnlmain; + private System.Windows.Forms.FlowLayoutPanel pnlactions; + private System.Windows.Forms.Button btndone; + private System.Windows.Forms.Button btnnext; + private System.Windows.Forms.Button btnback; + private System.Windows.Forms.Button btncancel; + private System.Windows.Forms.Label lbldescription; + private System.Windows.Forms.Panel Page0; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox txtpackagedescription; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox txtpackagename; + private System.Windows.Forms.Panel Page1; + private System.Windows.Forms.Button btnsaa; + private System.Windows.Forms.Button btnscreenshot; + private System.Windows.Forms.Button btnicon; + private System.Windows.Forms.Panel Page2; + private System.Windows.Forms.TextBox txtconfirm; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btncompilesaa; + private System.Windows.Forms.TextBox txtprice; + private System.Windows.Forms.Label lbprice; + private System.Windows.Forms.Label lbaddress; + private System.Windows.Forms.CheckBox cbsell; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/AppscapeUploader.cs b/source/WindowsFormsApplication1/Apps/AppscapeUploader.cs new file mode 100644 index 0000000..5cc8560 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/AppscapeUploader.cs @@ -0,0 +1,380 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class AppscapeUploader : Form + { + /// <summary> + /// Front-end to handle uploading of an Appscape package. + /// </summary> + /// <param name="modder">The developer of the new package.</param> + /// <param name="repo">The client representing the repository to upload to.</param> + public AppscapeUploader(AppscapeModder modder, AppscapeClient repo) + { + InitializeComponent(); + MyProfile = modder; + Repo = repo; + } + + private AppscapeModder MyProfile = null; + private AppscapeClient Repo = null; + + private void btncancel_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void btndone_Click(object sender, EventArgs e) + { + bool ContinueUpload = true; + //Create new package and assign values + var pkg = new AppscapePackage(); + pkg.Name = txtpackagename.Text; + pkg.DevKey = MyProfile.DevKey; + pkg.Description = txtpackagedescription.Text; + if (cbsell.Checked == true) + { + try + { + pkg.Cost = Convert.ToDecimal(Convert.ToDecimal(txtprice.Text).ToString("#.#####")); + } + catch + { + ContinueUpload = false; + API.CreateInfoboxSession("Error", "You have entered an incorrect price value.", infobox.InfoboxMode.Info); + } + } + else { + pkg.Cost = 0; + } + pkg.SetupFile = pkg.Name.Replace(" ", "_"); + pkg.PkgIconPath = ""; + if(AppScreenshot != null) + { + pkg.ScreenshotPath = new FileInfo(AppScreenshot).Name.Replace(" ", "_"); + } + else + { + pkg.ScreenshotPath = "none.jpg"; + } + if (ContinueUpload == true) { + //Upload the package meta file + + if (!Directory.Exists(Paths.Mod_Temp + "newapm")) { + Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); + } + else + { + Directory.Delete(Paths.Mod_Temp + "newapm", true); + Directory.CreateDirectory(Paths.Mod_Temp + "newapm"); + } + + //Copy app SAA and icon to package folder + File.Copy(SAAFile, Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "app.saa"); + if (AppIcon != null) + { + File.Copy(AppIcon, Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "Icon.bmp"); + } + else + { + Properties.Resources.iconShiftnet.Save(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "Icon.bmp"); + } + + //Create AL meta file for package (so it will display in the app launcher) + var al = new ModApplauncherItem(); + al.Display = true; + al.Icon = "Icon.bmp"; + al.Name = pkg.Name; + al.ShiftCode = "runSAA:app.saa"; + al.AppDirectory = al.Name; + + //Serialize AL meta file and copy to package + var json = JsonConvert.SerializeObject(al); + File.WriteAllText(Paths.Mod_Temp + "newapm" + OSInfo.DirectorySeparator + "applauncher", json); + + //Package file to .stp and upload to Appscape + ZipFile.CreateFromDirectory(Paths.Mod_Temp + "newapm", Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp"); + Repo.UploadPackage(pkg, File.ReadAllBytes(Paths.Mod_Temp + pkg.Name.Replace(" ", "_") + ".stp")); + + + + this.Close(); + } + } + + + int page = 0; + + /// <summary> + /// Makes the specified control and ALL of it's children, grand children, great grand children, and so on, appear "dark". + /// </summary> + /// <param name="ctrl">The top of the hierarchy; the start of it all.</param> + private void RecursiveControlSetup(Control ctrl) + { + ctrl.BackColor = API.CurrentSkin.titlebarcolour; + ctrl.ForeColor = API.CurrentSkin.titletextcolour; + try + { + var pnl = (Panel)ctrl; + foreach(Control c in pnl.Controls) + { + RecursiveControlSetup(c); + } + } + catch { + + } + } + + /// <summary> + /// Sets up the user interface. + /// </summary> + private void SetupUI() + { + RecursiveControlSetup(pnlmain); + switch (page) + { + case 0: + lbtitle.Text = "Welcome!"; + lbldescription.Text = "This wizard will guide you through the creation of an Appscape Package which will be uploaded to Appscape for all to see. First, let's start with some basics."; + Page0.BringToFront(); + btndone.Hide(); + btnback.Hide(); + break; + case 1: + lbtitle.Text = "Packaged Files"; + lbldescription.Text = "Now that we have a name and description, it's time to get some files into your package. Namely, an icon and the app itself."; + btnback.Show(); + Page1.BringToFront(); + break; + case 2: + lbtitle.Text = "Ready!"; + lbldescription.Text = "That's all we need from you. Assuming everything is correct, as soon as you click 'Done!', the package will be generated and uploaded to Appscape quicker than you can say \"Appscape Package Manager is so freakin' awesome.\"."; + btnnext.Hide(); + btndone.Show(); + Page2.BringToFront(); + txtconfirm.Font = new Font(OSInfo.GetMonospaceFont(), 9); + ConfirmPKG(); + break; + } + } + + /// <summary> + /// Makes sure the package is ready for upload. + /// </summary> + private void ConfirmPKG() + { + txtconfirm.Text = ""; + WriteLine(" == Basics == "); + WriteLine($"Name: {txtpackagename.Text}"); + WriteLine($"Description: {txtpackagedescription.Text}"); + WriteLine(""); + WriteLine(" == Files == "); + if(SAAFile != null) + { + WriteLine(SAAFile); + } + else + { + WriteLine("no saa file"); + } + WriteLine(AppIcon); + WriteLine(AppScreenshot); + WriteLine(""); + WriteLine(" == Package Check == "); + CheckForErrors(); + foreach(string err in Errors) + { + WriteLine(" - " + err); + btndone.Hide(); + } + if(Errors.Count > 0) + { + WriteLine("Please go back and correct these errors."); + } + } + + private List<string> Errors = null; + + /// <summary> + /// Checks for package errors. + /// </summary> + private void CheckForErrors() + { + Errors = new List<string>(); + if(txtpackagename.Text.Length < 1) + { + Errors.Add("Your package doesn't have a name."); + } + if(SAAFile == null) + { + Errors.Add("Your package won't contain a .saa file, therefore it won't be installed by ShiftOS!"); + } + } + + /// <summary> + /// Writes a line to the summary box. + /// </summary> + /// <param name="text">Text to write.</param> + private void WriteLine(string text) + { + if(txtconfirm.Text == "") + { + txtconfirm.Text = text; + } + else + { + txtconfirm.Text += Environment.NewLine + text; + } + } + + private void btnnext_Click(object sender, EventArgs e) + { + page += 1; + SetupUI(); + } + + private void btnback_Click(object sender, EventArgs e) + { + page -= 1; + SetupUI(); + } + + private void AppscapeUploader_Load(object sender, EventArgs e) + { + SetupUI(); + } + + private string SAAFile = null; + private string AppIcon = null; + private string AppScreenshot = null; + + private void btnsaa_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".saa", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + SAAFile = res; + btnsaa.Text = new FileInfo(SAAFile).Name; + } + }; + } + + private void btnicon_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".bmp;.png;.jpg;.pic", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + AppIcon = res; + btnicon.Text = new FileInfo(res).Name; + } + }; + } + + private void btnscreenshot_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".bmp;.png;.jpg;.pic", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + AppScreenshot = res; + btnscreenshot.Text = new FileInfo(res).Name; + } + }; + } + + private void btncompilesaa_Click(object sender, EventArgs e) + { + //Source code folder finder + API.CreateFileSkimmerSession("dir", File_Skimmer.FileSkimmerMode.OpenFolder); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + if(File.Exists(res + OSInfo.DirectorySeparator + "main.lua")) { + string dir = res; + API.CreateFileSkimmerSession(".saa", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s2, FormClosingEventArgs a2) => + { + try + { + ZipFile.CreateFromDirectory(dir, API.GetFSResult()); + API.CreateInfoboxSession("Success", "The SAA file has been created successfully.", infobox.InfoboxMode.Info); + } + catch + { + API.CreateInfoboxSession("Error", "Could not create the SAA file.", infobox.InfoboxMode.Info); + } + }; + } + else { + API.CreateInfoboxSession("Invalid source", "Your source directory doesn't contain a main script (main.lua) file.", infobox.InfoboxMode.Info); + } + } + }; + } + + private void cbsell_CheckedChanged(object sender, EventArgs e) + { + lbprice.Visible = cbsell.Checked; + lbaddress.Visible = cbsell.Checked; + txtprice.Visible = cbsell.Checked; + } + + private void lbprice_Click(object sender, EventArgs e) + { + + } + + private void txtprice_TextChanged(object sender, EventArgs e) + { + + } + + private void lbaddress_Click(object sender, EventArgs e) + { + + } + + private void txtpackagedescription_TextChanged(object sender, EventArgs e) + { + + } + + private void label2_Click(object sender, EventArgs e) + { + + } + + private void txtpackagename_TextChanged(object sender, EventArgs e) + { + + } + + private void label1_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/AppscapeUploader.resx b/source/WindowsFormsApplication1/Apps/AppscapeUploader.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/AppscapeUploader.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Artpad.Designer.cs b/source/WindowsFormsApplication1/Apps/Artpad.Designer.cs new file mode 100644 index 0000000..13bfba1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Artpad.Designer.cs @@ -0,0 +1,3589 @@ +namespace ShiftOS +{ + partial class Artpad + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + 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.pnlpalletsize = 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.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.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.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.pnlpalletsize.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picdrawingdisplay)).BeginInit(); + this.pnlbottompanel.SuspendLayout(); + this.pnlpallet.SuspendLayout(); + this.flowcolours.SuspendLayout(); + this.pnltoolproperties.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.pnlpixelplacersettings.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.pnlpalletsize); + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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:"; + // + // pnlpalletsize + // + this.pnlpalletsize.BackColor = System.Drawing.Color.White; + this.pnlpalletsize.Controls.Add(this.txttopspace); + this.pnlpalletsize.Controls.Add(this.Label40); + this.pnlpalletsize.Controls.Add(this.txtsidespace); + this.pnlpalletsize.Controls.Add(this.Label41); + this.pnlpalletsize.Controls.Add(this.btnchangesizecancel); + this.pnlpalletsize.Controls.Add(this.btnsetsize); + this.pnlpalletsize.Controls.Add(this.txtcolorpalletheight); + this.pnlpalletsize.Controls.Add(this.Label42); + this.pnlpalletsize.Controls.Add(this.txtcolorpalletwidth); + this.pnlpalletsize.Controls.Add(this.Label43); + this.pnlpalletsize.Location = new System.Drawing.Point(207, 178); + this.pnlpalletsize.Name = "pnlpalletsize"; + this.pnlpalletsize.Size = new System.Drawing.Size(259, 100); + this.pnlpalletsize.TabIndex = 2; + this.pnlpalletsize.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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.pnlpixelplacersettings); + this.pnltoolproperties.Controls.Add(this.pnlovaltoolsettings); + this.pnltoolproperties.Controls.Add(this.pnleracertoolsettings); + 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; + // + // 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadsquarerubberselected; + this.btneracersquare.FlatAppearance.BorderSize = 0; + this.btneracersquare.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadcirclerubber; + this.btneracercircle.FlatAppearance.BorderSize = 0; + this.btneracercircle.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadsquarerubber; + this.btnpaintsquareshape.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnpaintsquareshape.FlatAppearance.BorderSize = 0; + this.btnpaintsquareshape.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadcirclerubberselected; + this.btnpaintcircleshape.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btnpaintcircleshape.FlatAppearance.BorderSize = 0; + this.btnpaintcircleshape.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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; + // + // 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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; + // + // 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadpixelplacer; + this.btnpixelplacer.FlatAppearance.BorderSize = 0; + this.btnpixelplacer.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadpencil; + this.btnpencil.FlatAppearance.BorderSize = 0; + this.btnpencil.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadfloodfill; + this.btnfloodfill.FlatAppearance.BorderSize = 0; + this.btnfloodfill.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadOval; + this.btnoval.FlatAppearance.BorderSize = 0; + this.btnoval.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadRectangle; + this.btnsquare.FlatAppearance.BorderSize = 0; + this.btnsquare.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadlinetool; + this.btnlinetool.FlatAppearance.BorderSize = 0; + this.btnlinetool.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadpaintbrush; + this.btnpaintbrush.FlatAppearance.BorderSize = 0; + this.btnpaintbrush.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadtexttool; + this.btntexttool.FlatAppearance.BorderSize = 0; + this.btntexttool.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPaderacer; + this.btneracer.FlatAppearance.BorderSize = 0; + this.btneracer.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadnew; + this.btnnew.FlatAppearance.BorderSize = 0; + this.btnnew.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadmagnify; + this.btnmagnify.FlatAppearance.BorderSize = 0; + this.btnmagnify.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadopen; + this.btnopen.FlatAppearance.BorderSize = 0; + this.btnopen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadsave; + this.btnsave.FlatAppearance.BorderSize = 0; + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadundo; + this.btnundo.FlatAppearance.BorderSize = 0; + this.btnundo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.Properties.Resources.ArtPadredo; + this.btnredo.FlatAppearance.BorderSize = 0; + this.btnredo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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.ClientSize = new System.Drawing.Size(802, 598); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MinimumSize = new System.Drawing.Size(502, 398); + this.Name = "Artpad"; + this.Text = "ArtPad"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Template_Load); + this.pgcontents.ResumeLayout(false); + this.pnldrawingbackground.ResumeLayout(false); + this.pnlinitialcanvassettings.ResumeLayout(false); + this.pnlinitialcanvassettings.PerformLayout(); + this.pnlpalletsize.ResumeLayout(false); + this.pnlpalletsize.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.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.pnlpixelplacersettings.ResumeLayout(false); + 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 pnlpalletsize; + 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/source/WindowsFormsApplication1/Apps/Artpad.cs b/source/WindowsFormsApplication1/Apps/Artpad.cs new file mode 100644 index 0000000..c393ae0 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Artpad.cs @@ -0,0 +1,1783 @@ +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 System.Drawing.Text; +using System.Drawing.Imaging; +using System.Drawing.Drawing2D; + +namespace ShiftOS +{ + public partial class Artpad : Form + { + /// <summary> + /// Artpad's GUI. + /// </summary> + public Artpad() + { + InitializeComponent(); + } + + #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(); + determinevisiblepallets(); + 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 (API.Upgrades["artpadpixelplacer"] == true) + btnpixelplacer.Show(); + if (API.Upgrades["artpadpencil"] == true) + btnpencil.Show(); + if (API.Upgrades["artpadfilltool"] == true) + btnfloodfill.Show(); + if (API.Upgrades["artpadovaltool"] == true) + btnoval.Show(); + if (API.Upgrades["artpadrectangletool"] == true) + btnsquare.Show(); + if (API.Upgrades["artpadlinetool"] == true) + btnlinetool.Show(); + if (API.Upgrades["artpadpaintbrush"] == true) + btnpaintbrush.Show(); + if (API.Upgrades["artpadtexttool"] == true) + btntexttool.Show(); + if (API.Upgrades["artpaderaser"] == true) + btneracer.Show(); + if (API.Upgrades["artpadnew"] == true) + btnnew.Show(); + if (API.Upgrades["artpadload"] == true) + btnopen.Show(); + if (API.Upgrades["artpadsave"] == true) + btnsave.Show(); + if (API.Upgrades["artpadundo"] == true) + btnundo.Show(); + if (API.Upgrades["artpadredo"] == true) + btnredo.Show(); + if (API.Upgrades["artpadppmovementmode"] == 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 + { + API.CreateInfoboxSession("ArtPad - Placement Error!", "You have specified invalid coordinates for the pixel setter." + Environment.NewLine + Environment.NewLine + "Remember that the top left pixel has the coordinates 0, 0", infobox.InfoboxMode.Info); + } + } + + // 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 colourpallet1_MouseClick(object sender, MouseEventArgs e) + { + var s = (Control)sender; + if (e.Button == MouseButtons.Left) + { + drawingcolour = s.BackColor; + setuppreview(); + settoolcolours(); + } + else { + API.CreateColorPickerSession("Artpad Pallete Color", s.BackColor); + API.ColorPickerSession.FormClosing += (object se, FormClosingEventArgs a) => + { + s.BackColor = API.GetLastColorFromSession(); + }; + } + } + + //<unused> + public void loadcolors() + { + /*bool allwhite = true; + for (int i = 0; i <= 127; i++) + { + if (ShiftOSDesktop.artpadcolourpallets(i) == null) + { + } + else { + allwhite = false; + } + } + if (allwhite == true) + { + for (i = 0; i <= 127; i++) + { + ShiftOSDesktop.artpadcolourpallets(i) = Color.Black; + } + } + colourpallet1.BackColor = ShiftOSDesktop.artpadcolourpallets(0); + colourpallet2.BackColor = ShiftOSDesktop.artpadcolourpallets(1); + colourpallet3.BackColor = ShiftOSDesktop.artpadcolourpallets(2); + colourpallet4.BackColor = ShiftOSDesktop.artpadcolourpallets(3); + colourpallet5.BackColor = ShiftOSDesktop.artpadcolourpallets(4); + colourpallet6.BackColor = ShiftOSDesktop.artpadcolourpallets(5); + colourpallet7.BackColor = ShiftOSDesktop.artpadcolourpallets(6); + colourpallet8.BackColor = ShiftOSDesktop.artpadcolourpallets(7); + colourpallet9.BackColor = ShiftOSDesktop.artpadcolourpallets(8); + colourpallet10.BackColor = ShiftOSDesktop.artpadcolourpallets(9); + colourpallet11.BackColor = ShiftOSDesktop.artpadcolourpallets(10); + colourpallet12.BackColor = ShiftOSDesktop.artpadcolourpallets(11); + colourpallet13.BackColor = ShiftOSDesktop.artpadcolourpallets(12); + colourpallet14.BackColor = ShiftOSDesktop.artpadcolourpallets(13); + colourpallet15.BackColor = ShiftOSDesktop.artpadcolourpallets(14); + colourpallet16.BackColor = ShiftOSDesktop.artpadcolourpallets(15); + colourpallet17.BackColor = ShiftOSDesktop.artpadcolourpallets(16); + colourpallet18.BackColor = ShiftOSDesktop.artpadcolourpallets(17); + colourpallet19.BackColor = ShiftOSDesktop.artpadcolourpallets(18); + colourpallet20.BackColor = ShiftOSDesktop.artpadcolourpallets(19); + colourpallet21.BackColor = ShiftOSDesktop.artpadcolourpallets(20); + colourpallet22.BackColor = ShiftOSDesktop.artpadcolourpallets(21); + colourpallet23.BackColor = ShiftOSDesktop.artpadcolourpallets(22); + colourpallet24.BackColor = ShiftOSDesktop.artpadcolourpallets(23); + colourpallet25.BackColor = ShiftOSDesktop.artpadcolourpallets(24); + colourpallet26.BackColor = ShiftOSDesktop.artpadcolourpallets(25); + colourpallet27.BackColor = ShiftOSDesktop.artpadcolourpallets(26); + colourpallet28.BackColor = ShiftOSDesktop.artpadcolourpallets(27); + colourpallet29.BackColor = ShiftOSDesktop.artpadcolourpallets(28); + colourpallet30.BackColor = ShiftOSDesktop.artpadcolourpallets(29); + colourpallet31.BackColor = ShiftOSDesktop.artpadcolourpallets(30); + colourpallet32.BackColor = ShiftOSDesktop.artpadcolourpallets(31); + colourpallet33.BackColor = ShiftOSDesktop.artpadcolourpallets(32); + colourpallet34.BackColor = ShiftOSDesktop.artpadcolourpallets(33); + colourpallet35.BackColor = ShiftOSDesktop.artpadcolourpallets(34); + colourpallet36.BackColor = ShiftOSDesktop.artpadcolourpallets(35); + colourpallet37.BackColor = ShiftOSDesktop.artpadcolourpallets(36); + colourpallet38.BackColor = ShiftOSDesktop.artpadcolourpallets(37); + colourpallet39.BackColor = ShiftOSDesktop.artpadcolourpallets(38); + colourpallet40.BackColor = ShiftOSDesktop.artpadcolourpallets(39); + colourpallet41.BackColor = ShiftOSDesktop.artpadcolourpallets(40); + colourpallet42.BackColor = ShiftOSDesktop.artpadcolourpallets(41); + colourpallet43.BackColor = ShiftOSDesktop.artpadcolourpallets(42); + colourpallet44.BackColor = ShiftOSDesktop.artpadcolourpallets(43); + colourpallet45.BackColor = ShiftOSDesktop.artpadcolourpallets(44); + colourpallet46.BackColor = ShiftOSDesktop.artpadcolourpallets(45); + colourpallet47.BackColor = ShiftOSDesktop.artpadcolourpallets(46); + colourpallet48.BackColor = ShiftOSDesktop.artpadcolourpallets(47); + colourpallet49.BackColor = ShiftOSDesktop.artpadcolourpallets(48); + colourpallet50.BackColor = ShiftOSDesktop.artpadcolourpallets(49); + colourpallet51.BackColor = ShiftOSDesktop.artpadcolourpallets(50); + colourpallet52.BackColor = ShiftOSDesktop.artpadcolourpallets(51); + colourpallet53.BackColor = ShiftOSDesktop.artpadcolourpallets(52); + colourpallet54.BackColor = ShiftOSDesktop.artpadcolourpallets(53); + colourpallet55.BackColor = ShiftOSDesktop.artpadcolourpallets(54); + colourpallet56.BackColor = ShiftOSDesktop.artpadcolourpallets(55); + colourpallet57.BackColor = ShiftOSDesktop.artpadcolourpallets(56); + colourpallet58.BackColor = ShiftOSDesktop.artpadcolourpallets(57); + colourpallet59.BackColor = ShiftOSDesktop.artpadcolourpallets(58); + colourpallet60.BackColor = ShiftOSDesktop.artpadcolourpallets(59); + colourpallet61.BackColor = ShiftOSDesktop.artpadcolourpallets(60); + colourpallet62.BackColor = ShiftOSDesktop.artpadcolourpallets(61); + colourpallet63.BackColor = ShiftOSDesktop.artpadcolourpallets(62); + colourpallet64.BackColor = ShiftOSDesktop.artpadcolourpallets(63); + colourpallet65.BackColor = ShiftOSDesktop.artpadcolourpallets(64); + colourpallet66.BackColor = ShiftOSDesktop.artpadcolourpallets(65); + colourpallet67.BackColor = ShiftOSDesktop.artpadcolourpallets(66); + colourpallet68.BackColor = ShiftOSDesktop.artpadcolourpallets(67); + colourpallet69.BackColor = ShiftOSDesktop.artpadcolourpallets(68); + colourpallet70.BackColor = ShiftOSDesktop.artpadcolourpallets(69); + colourpallet71.BackColor = ShiftOSDesktop.artpadcolourpallets(70); + colourpallet72.BackColor = ShiftOSDesktop.artpadcolourpallets(71); + colourpallet73.BackColor = ShiftOSDesktop.artpadcolourpallets(72); + colourpallet74.BackColor = ShiftOSDesktop.artpadcolourpallets(73); + colourpallet75.BackColor = ShiftOSDesktop.artpadcolourpallets(74); + colourpallet76.BackColor = ShiftOSDesktop.artpadcolourpallets(75); + colourpallet77.BackColor = ShiftOSDesktop.artpadcolourpallets(76); + colourpallet78.BackColor = ShiftOSDesktop.artpadcolourpallets(77); + colourpallet79.BackColor = ShiftOSDesktop.artpadcolourpallets(78); + colourpallet80.BackColor = ShiftOSDesktop.artpadcolourpallets(79); + colourpallet81.BackColor = ShiftOSDesktop.artpadcolourpallets(80); + colourpallet82.BackColor = ShiftOSDesktop.artpadcolourpallets(81); + colourpallet83.BackColor = ShiftOSDesktop.artpadcolourpallets(82); + colourpallet84.BackColor = ShiftOSDesktop.artpadcolourpallets(83); + colourpallet85.BackColor = ShiftOSDesktop.artpadcolourpallets(84); + colourpallet86.BackColor = ShiftOSDesktop.artpadcolourpallets(85); + colourpallet87.BackColor = ShiftOSDesktop.artpadcolourpallets(86); + colourpallet88.BackColor = ShiftOSDesktop.artpadcolourpallets(87); + colourpallet89.BackColor = ShiftOSDesktop.artpadcolourpallets(88); + colourpallet90.BackColor = ShiftOSDesktop.artpadcolourpallets(89); + colourpallet91.BackColor = ShiftOSDesktop.artpadcolourpallets(90); + colourpallet92.BackColor = ShiftOSDesktop.artpadcolourpallets(91); + colourpallet93.BackColor = ShiftOSDesktop.artpadcolourpallets(92); + colourpallet94.BackColor = ShiftOSDesktop.artpadcolourpallets(93); + colourpallet95.BackColor = ShiftOSDesktop.artpadcolourpallets(94); + colourpallet96.BackColor = ShiftOSDesktop.artpadcolourpallets(95); + colourpallet97.BackColor = ShiftOSDesktop.artpadcolourpallets(96); + colourpallet98.BackColor = ShiftOSDesktop.artpadcolourpallets(97); + colourpallet99.BackColor = ShiftOSDesktop.artpadcolourpallets(98); + colourpallet100.BackColor = ShiftOSDesktop.artpadcolourpallets(99); + colourpallet101.BackColor = ShiftOSDesktop.artpadcolourpallets(100); + colourpallet102.BackColor = ShiftOSDesktop.artpadcolourpallets(101); + colourpallet103.BackColor = ShiftOSDesktop.artpadcolourpallets(102); + colourpallet104.BackColor = ShiftOSDesktop.artpadcolourpallets(103); + colourpallet105.BackColor = ShiftOSDesktop.artpadcolourpallets(104); + colourpallet106.BackColor = ShiftOSDesktop.artpadcolourpallets(105); + colourpallet107.BackColor = ShiftOSDesktop.artpadcolourpallets(106); + colourpallet108.BackColor = ShiftOSDesktop.artpadcolourpallets(107); + colourpallet109.BackColor = ShiftOSDesktop.artpadcolourpallets(108); + colourpallet110.BackColor = ShiftOSDesktop.artpadcolourpallets(109); + colourpallet111.BackColor = ShiftOSDesktop.artpadcolourpallets(110); + colourpallet112.BackColor = ShiftOSDesktop.artpadcolourpallets(111); + colourpallet113.BackColor = ShiftOSDesktop.artpadcolourpallets(112); + colourpallet114.BackColor = ShiftOSDesktop.artpadcolourpallets(113); + colourpallet115.BackColor = ShiftOSDesktop.artpadcolourpallets(114); + colourpallet116.BackColor = ShiftOSDesktop.artpadcolourpallets(115); + colourpallet117.BackColor = ShiftOSDesktop.artpadcolourpallets(116); + colourpallet118.BackColor = ShiftOSDesktop.artpadcolourpallets(117); + colourpallet119.BackColor = ShiftOSDesktop.artpadcolourpallets(118); + colourpallet120.BackColor = ShiftOSDesktop.artpadcolourpallets(119); + colourpallet121.BackColor = ShiftOSDesktop.artpadcolourpallets(120); + colourpallet122.BackColor = ShiftOSDesktop.artpadcolourpallets(121); + colourpallet123.BackColor = ShiftOSDesktop.artpadcolourpallets(122); + colourpallet124.BackColor = ShiftOSDesktop.artpadcolourpallets(123); + colourpallet125.BackColor = ShiftOSDesktop.artpadcolourpallets(124); + colourpallet126.BackColor = ShiftOSDesktop.artpadcolourpallets(125); + colourpallet127.BackColor = ShiftOSDesktop.artpadcolourpallets(126); + colourpallet128.BackColor = ShiftOSDesktop.artpadcolourpallets(127); + */} + + public void savecolors() + {/* + ShiftOSDesktop.artpadcolourpallets(0) = colourpallet1.BackColor; + ShiftOSDesktop.artpadcolourpallets(1) = colourpallet2.BackColor; + ShiftOSDesktop.artpadcolourpallets(2) = colourpallet3.BackColor; + ShiftOSDesktop.artpadcolourpallets(3) = colourpallet4.BackColor; + ShiftOSDesktop.artpadcolourpallets(4) = colourpallet5.BackColor; + ShiftOSDesktop.artpadcolourpallets(5) = colourpallet6.BackColor; + ShiftOSDesktop.artpadcolourpallets(6) = colourpallet7.BackColor; + ShiftOSDesktop.artpadcolourpallets(7) = colourpallet8.BackColor; + ShiftOSDesktop.artpadcolourpallets(8) = colourpallet9.BackColor; + ShiftOSDesktop.artpadcolourpallets(9) = colourpallet10.BackColor; + ShiftOSDesktop.artpadcolourpallets(10) = colourpallet11.BackColor; + ShiftOSDesktop.artpadcolourpallets(11) = colourpallet12.BackColor; + ShiftOSDesktop.artpadcolourpallets(12) = colourpallet13.BackColor; + ShiftOSDesktop.artpadcolourpallets(13) = colourpallet14.BackColor; + ShiftOSDesktop.artpadcolourpallets(14) = colourpallet15.BackColor; + ShiftOSDesktop.artpadcolourpallets(15) = colourpallet16.BackColor; + ShiftOSDesktop.artpadcolourpallets(16) = colourpallet17.BackColor; + ShiftOSDesktop.artpadcolourpallets(17) = colourpallet18.BackColor; + ShiftOSDesktop.artpadcolourpallets(18) = colourpallet19.BackColor; + ShiftOSDesktop.artpadcolourpallets(19) = colourpallet20.BackColor; + ShiftOSDesktop.artpadcolourpallets(20) = colourpallet21.BackColor; + ShiftOSDesktop.artpadcolourpallets(21) = colourpallet22.BackColor; + ShiftOSDesktop.artpadcolourpallets(22) = colourpallet23.BackColor; + ShiftOSDesktop.artpadcolourpallets(23) = colourpallet24.BackColor; + ShiftOSDesktop.artpadcolourpallets(24) = colourpallet25.BackColor; + ShiftOSDesktop.artpadcolourpallets(25) = colourpallet26.BackColor; + ShiftOSDesktop.artpadcolourpallets(26) = colourpallet27.BackColor; + ShiftOSDesktop.artpadcolourpallets(27) = colourpallet28.BackColor; + ShiftOSDesktop.artpadcolourpallets(28) = colourpallet29.BackColor; + ShiftOSDesktop.artpadcolourpallets(29) = colourpallet30.BackColor; + ShiftOSDesktop.artpadcolourpallets(30) = colourpallet31.BackColor; + ShiftOSDesktop.artpadcolourpallets(31) = colourpallet32.BackColor; + ShiftOSDesktop.artpadcolourpallets(32) = colourpallet33.BackColor; + ShiftOSDesktop.artpadcolourpallets(33) = colourpallet34.BackColor; + ShiftOSDesktop.artpadcolourpallets(34) = colourpallet35.BackColor; + ShiftOSDesktop.artpadcolourpallets(35) = colourpallet36.BackColor; + ShiftOSDesktop.artpadcolourpallets(36) = colourpallet37.BackColor; + ShiftOSDesktop.artpadcolourpallets(37) = colourpallet38.BackColor; + ShiftOSDesktop.artpadcolourpallets(38) = colourpallet39.BackColor; + ShiftOSDesktop.artpadcolourpallets(39) = colourpallet40.BackColor; + ShiftOSDesktop.artpadcolourpallets(40) = colourpallet41.BackColor; + ShiftOSDesktop.artpadcolourpallets(41) = colourpallet42.BackColor; + ShiftOSDesktop.artpadcolourpallets(42) = colourpallet43.BackColor; + ShiftOSDesktop.artpadcolourpallets(43) = colourpallet44.BackColor; + ShiftOSDesktop.artpadcolourpallets(44) = colourpallet45.BackColor; + ShiftOSDesktop.artpadcolourpallets(45) = colourpallet46.BackColor; + ShiftOSDesktop.artpadcolourpallets(46) = colourpallet47.BackColor; + ShiftOSDesktop.artpadcolourpallets(47) = colourpallet48.BackColor; + ShiftOSDesktop.artpadcolourpallets(48) = colourpallet49.BackColor; + ShiftOSDesktop.artpadcolourpallets(49) = colourpallet50.BackColor; + ShiftOSDesktop.artpadcolourpallets(50) = colourpallet51.BackColor; + ShiftOSDesktop.artpadcolourpallets(51) = colourpallet52.BackColor; + ShiftOSDesktop.artpadcolourpallets(52) = colourpallet53.BackColor; + ShiftOSDesktop.artpadcolourpallets(53) = colourpallet54.BackColor; + ShiftOSDesktop.artpadcolourpallets(54) = colourpallet55.BackColor; + ShiftOSDesktop.artpadcolourpallets(55) = colourpallet56.BackColor; + ShiftOSDesktop.artpadcolourpallets(56) = colourpallet57.BackColor; + ShiftOSDesktop.artpadcolourpallets(57) = colourpallet58.BackColor; + ShiftOSDesktop.artpadcolourpallets(58) = colourpallet59.BackColor; + ShiftOSDesktop.artpadcolourpallets(59) = colourpallet60.BackColor; + ShiftOSDesktop.artpadcolourpallets(60) = colourpallet61.BackColor; + ShiftOSDesktop.artpadcolourpallets(61) = colourpallet62.BackColor; + ShiftOSDesktop.artpadcolourpallets(62) = colourpallet63.BackColor; + ShiftOSDesktop.artpadcolourpallets(63) = colourpallet64.BackColor; + ShiftOSDesktop.artpadcolourpallets(64) = colourpallet65.BackColor; + ShiftOSDesktop.artpadcolourpallets(65) = colourpallet66.BackColor; + ShiftOSDesktop.artpadcolourpallets(66) = colourpallet67.BackColor; + ShiftOSDesktop.artpadcolourpallets(67) = colourpallet68.BackColor; + ShiftOSDesktop.artpadcolourpallets(68) = colourpallet69.BackColor; + ShiftOSDesktop.artpadcolourpallets(69) = colourpallet70.BackColor; + ShiftOSDesktop.artpadcolourpallets(70) = colourpallet71.BackColor; + ShiftOSDesktop.artpadcolourpallets(71) = colourpallet72.BackColor; + ShiftOSDesktop.artpadcolourpallets(72) = colourpallet73.BackColor; + ShiftOSDesktop.artpadcolourpallets(73) = colourpallet74.BackColor; + ShiftOSDesktop.artpadcolourpallets(74) = colourpallet75.BackColor; + ShiftOSDesktop.artpadcolourpallets(75) = colourpallet76.BackColor; + ShiftOSDesktop.artpadcolourpallets(76) = colourpallet77.BackColor; + ShiftOSDesktop.artpadcolourpallets(77) = colourpallet78.BackColor; + ShiftOSDesktop.artpadcolourpallets(78) = colourpallet79.BackColor; + ShiftOSDesktop.artpadcolourpallets(79) = colourpallet80.BackColor; + ShiftOSDesktop.artpadcolourpallets(80) = colourpallet81.BackColor; + ShiftOSDesktop.artpadcolourpallets(81) = colourpallet82.BackColor; + ShiftOSDesktop.artpadcolourpallets(82) = colourpallet83.BackColor; + ShiftOSDesktop.artpadcolourpallets(83) = colourpallet84.BackColor; + ShiftOSDesktop.artpadcolourpallets(84) = colourpallet85.BackColor; + ShiftOSDesktop.artpadcolourpallets(85) = colourpallet86.BackColor; + ShiftOSDesktop.artpadcolourpallets(86) = colourpallet87.BackColor; + ShiftOSDesktop.artpadcolourpallets(87) = colourpallet88.BackColor; + ShiftOSDesktop.artpadcolourpallets(88) = colourpallet89.BackColor; + ShiftOSDesktop.artpadcolourpallets(89) = colourpallet90.BackColor; + ShiftOSDesktop.artpadcolourpallets(90) = colourpallet91.BackColor; + ShiftOSDesktop.artpadcolourpallets(91) = colourpallet92.BackColor; + ShiftOSDesktop.artpadcolourpallets(92) = colourpallet93.BackColor; + ShiftOSDesktop.artpadcolourpallets(93) = colourpallet94.BackColor; + ShiftOSDesktop.artpadcolourpallets(94) = colourpallet95.BackColor; + ShiftOSDesktop.artpadcolourpallets(95) = colourpallet96.BackColor; + ShiftOSDesktop.artpadcolourpallets(96) = colourpallet97.BackColor; + ShiftOSDesktop.artpadcolourpallets(97) = colourpallet98.BackColor; + ShiftOSDesktop.artpadcolourpallets(98) = colourpallet99.BackColor; + ShiftOSDesktop.artpadcolourpallets(99) = colourpallet100.BackColor; + ShiftOSDesktop.artpadcolourpallets(100) = colourpallet101.BackColor; + ShiftOSDesktop.artpadcolourpallets(101) = colourpallet102.BackColor; + ShiftOSDesktop.artpadcolourpallets(102) = colourpallet103.BackColor; + ShiftOSDesktop.artpadcolourpallets(103) = colourpallet104.BackColor; + ShiftOSDesktop.artpadcolourpallets(104) = colourpallet105.BackColor; + ShiftOSDesktop.artpadcolourpallets(105) = colourpallet106.BackColor; + ShiftOSDesktop.artpadcolourpallets(106) = colourpallet107.BackColor; + ShiftOSDesktop.artpadcolourpallets(107) = colourpallet108.BackColor; + ShiftOSDesktop.artpadcolourpallets(108) = colourpallet109.BackColor; + ShiftOSDesktop.artpadcolourpallets(109) = colourpallet110.BackColor; + ShiftOSDesktop.artpadcolourpallets(110) = colourpallet111.BackColor; + ShiftOSDesktop.artpadcolourpallets(111) = colourpallet112.BackColor; + ShiftOSDesktop.artpadcolourpallets(112) = colourpallet113.BackColor; + ShiftOSDesktop.artpadcolourpallets(113) = colourpallet114.BackColor; + ShiftOSDesktop.artpadcolourpallets(114) = colourpallet115.BackColor; + ShiftOSDesktop.artpadcolourpallets(115) = colourpallet116.BackColor; + ShiftOSDesktop.artpadcolourpallets(116) = colourpallet117.BackColor; + ShiftOSDesktop.artpadcolourpallets(117) = colourpallet118.BackColor; + ShiftOSDesktop.artpadcolourpallets(118) = colourpallet119.BackColor; + ShiftOSDesktop.artpadcolourpallets(119) = colourpallet120.BackColor; + ShiftOSDesktop.artpadcolourpallets(120) = colourpallet121.BackColor; + ShiftOSDesktop.artpadcolourpallets(121) = colourpallet122.BackColor; + ShiftOSDesktop.artpadcolourpallets(122) = colourpallet123.BackColor; + ShiftOSDesktop.artpadcolourpallets(123) = colourpallet124.BackColor; + ShiftOSDesktop.artpadcolourpallets(124) = colourpallet125.BackColor; + ShiftOSDesktop.artpadcolourpallets(125) = colourpallet126.BackColor; + ShiftOSDesktop.artpadcolourpallets(126) = colourpallet127.BackColor; + ShiftOSDesktop.artpadcolourpallets(127) = colourpallet128.BackColor; + */} + //</unused> + + 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 { + API.CreateInfoboxSession("ArtPad - Magnification Error!" + , "You are unable to increase the magnification level any further." + Environment.NewLine + Environment.NewLine + "256x is the highest level of magnification supported by ArtPad!", infobox.InfoboxMode.Info); + } + 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 { + API.CreateInfoboxSession("ArtPad - Magnification Error!" + ,"You are unable to decrease the magnification level any further." + Environment.NewLine + Environment.NewLine + "Artpad is unable to scale pixels at a level smaller than their actual size!", infobox.InfoboxMode.Info); + } + 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() + { + API.CreateFileSkimmerSession(".pic", File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + savelocation = res; + saveimage(); + } + }; + } + + public void saveimage() + { + canvasbitmap.Save(savelocation, ImageFormat.Bmp); + } + #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 (API.Upgrades["artpadlimitlesspixels"] == 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(API.Upgrades["artpadpixellimit4"]) + { + value = 4; + if (API.Upgrades["artpadpixellimit8"]) + { + value = 8; + if (API.Upgrades["artpadpixellimit16"]) + { + value = 16; + if (API.Upgrades["artpadpixellimit64"]) + { + value = 64; + if (API.Upgrades["artpadpixellimit256"]) + { + value = 256; + if (API.Upgrades["artpadpixellimit1024"]) + { + value = 1024; + if (API.Upgrades["artpadpixellimit4096"]) + { + value = 4096; + if (API.Upgrades["artpadpixellimit16384"]) + { + value = 16384; + if (API.Upgrades["artpadpixellimit65536"]) + { + 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) + { + API.CreateInfoboxSession("Artpad - Error", "Artpad cannot create the image. It is too big.", infobox.InfoboxMode.Info); + } + 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.Show(); + } + + // 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 + { + API.CreateInfoboxSession("ArtPad - Undo Error!" + ,"There doesn't appear to be any more actions to undo." + Environment.NewLine + Environment.NewLine + "One more step back would undo the creation of the canvas. If this is your goal just click new.", infobox.InfoboxMode.Info); + } + } + + // 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 + { + API.CreateInfoboxSession("ArtPad - Redo Error!" + , "There doesn't appear to be any more actions to redo." + Environment.NewLine + Environment.NewLine + "If you have drawn on the canvas recently all future history would have been wiped!", infobox.InfoboxMode.Info); + } + } + + #endregion + + #region File Loading + + // ERROR: Handles clauses are not supported in C# + private void btnopen_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".pic", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string res = API.GetFSResult(); + if(res != "fail") + { + savelocation = res; + openpic(); + } + }; + } + + public void openpic() + { + pnlinitialcanvassettings.Hide(); + picdrawingdisplay.Show(); + magnificationlevel = 1; + setmagnification(); + canvasbitmap = (Bitmap)Image.FromFile(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<Point> pts = new Stack<Point>(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<Point> 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 { + eracerwidth = (Convert.ToInt32(txteracersize.Text)); + } + 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 determinevisiblepallets() + { + int panelstoadd = 2; + + if (API.Upgrades["artpad4colorpallets"] == true) + { + panelstoadd = 4; + } + if (API.Upgrades["artpad8colorpallets"] == true) + { + panelstoadd = 8; + } + if (API.Upgrades["artpad16colorpallets"] == true) + { + panelstoadd = 16; + } + if (API.Upgrades["artpad32colorpallets"] == true) + { + panelstoadd = 32; + } + if (API.Upgrades["artpad64colorpallets"] == true) + { + panelstoadd = 64; + } + if (API.Upgrades["artpad128colorpallets"] == 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.colourpallet1_MouseClick); + pnl.Show(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnchangesizecancel_Click(object sender, EventArgs e) + { + pnlpalletsize.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) + { + if(API.CurrentSkin != null) + { + pnldrawingbackground.BackColor = API.CurrentSkin.titlebarcolour; + } + } + + private void btnpixelplacer_Click(object sender, EventArgs e) + { + selectedtool = "Pixel Placer"; + gettoolsettings(pnlpixelplacersettings); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Artpad.resx b/source/WindowsFormsApplication1/Apps/Artpad.resx new file mode 100644 index 0000000..4175077 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Artpad.resx @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="tmrcodepointcooldown.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="tmrshowearnedcodepoints.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>197, 17</value> + </metadata> + <metadata name="pullbs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>394, 17</value> + </metadata> + <metadata name="pullbottom.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>478, 17</value> + </metadata> + <metadata name="pullside.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>591, 17</value> + </metadata> + <metadata name="tmrsetupui.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>685, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteConverter.Designer.cs b/source/WindowsFormsApplication1/Apps/BitnoteConverter.Designer.cs new file mode 100644 index 0000000..2ad4885 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteConverter.Designer.cs @@ -0,0 +1,106 @@ +namespace ShiftOS +{ + partial class BitnoteConverter + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.txtcodepoints = new System.Windows.Forms.TextBox(); + this.lbstatus = new System.Windows.Forms.Label(); + this.btnconvert = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // txtcodepoints + // + this.txtcodepoints.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.txtcodepoints.Location = new System.Drawing.Point(28, 12); + this.txtcodepoints.Name = "txtcodepoints"; + this.txtcodepoints.Size = new System.Drawing.Size(44, 26); + this.txtcodepoints.TabIndex = 0; + this.txtcodepoints.TextChanged += new System.EventHandler(this.txtcodepoints_TextChanged); + // + // lbstatus + // + this.lbstatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbstatus.AutoSize = true; + this.lbstatus.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.lbstatus.Location = new System.Drawing.Point(78, 16); + this.lbstatus.Name = "lbstatus"; + this.lbstatus.Size = new System.Drawing.Size(78, 22); + this.lbstatus.TabIndex = 1; + this.lbstatus.Text = "> 0 BTN"; + // + // btnconvert + // + this.btnconvert.Dock = System.Windows.Forms.DockStyle.Bottom; + this.btnconvert.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnconvert.Location = new System.Drawing.Point(0, 76); + this.btnconvert.Name = "btnconvert"; + this.btnconvert.Size = new System.Drawing.Size(229, 23); + this.btnconvert.TabIndex = 2; + this.btnconvert.Text = "Convert"; + this.btnconvert.UseVisualStyleBackColor = true; + this.btnconvert.Click += new System.EventHandler(this.btnconvert_Click); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.btnconvert); + this.panel1.Controls.Add(this.lbstatus); + this.panel1.Controls.Add(this.txtcodepoints); + 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(229, 99); + this.panel1.TabIndex = 3; + // + // BitnoteConverter + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(229, 99); + this.Controls.Add(this.panel1); + this.Name = "BitnoteConverter"; + this.Text = "BitnoteConverter"; + this.Load += new System.EventHandler(this.BitnoteConverter_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TextBox txtcodepoints; + private System.Windows.Forms.Label lbstatus; + private System.Windows.Forms.Button btnconvert; + private System.Windows.Forms.Panel panel1; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteConverter.cs b/source/WindowsFormsApplication1/Apps/BitnoteConverter.cs new file mode 100644 index 0000000..d28b970 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteConverter.cs @@ -0,0 +1,65 @@ +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 +{ + public partial class BitnoteConverter : Form + { + /// <summary> + /// GUI for the Bitnote Converter package. + /// </summary> + public BitnoteConverter() + { + InitializeComponent(); + } + + private decimal BitnotesToAdd = 0; + + private void txtcodepoints_TextChanged(object sender, EventArgs e) + { + try + { + int cp = Convert.ToInt16(txtcodepoints.Text); + if(cp > API.CurrentSave.codepoints) + { + txtcodepoints.Text = API.CurrentSave.codepoints.ToString(); + } + string decstr = ((decimal)cp / 24).ToString("#.#####"); + + + lbstatus.Text = "> " + decstr + " BTN"; + BitnotesToAdd = Convert.ToDecimal(decstr); + } + catch + { + BitnotesToAdd = 0; + } + } + + private void btnconvert_Click(object sender, EventArgs e) + { + if(BitnotesToAdd > 0) + { + API.RemoveCodepoints((int)(BitnotesToAdd * 24)); + API.BitnoteAddress.Bitnotes += BitnotesToAdd; + API.CreateInfoboxSession("Bitnote Converter", "Your codepoints have been converted to Bitnotes successfully.", infobox.InfoboxMode.Info); + } + else + { + API.CreateInfoboxSession("Bitnote Converter", "An invalid ammount of Codepoints was entered. We couldn't convert them.", infobox.InfoboxMode.Info); + } + } + + private void BitnoteConverter_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/BitnoteConverter.resx b/source/WindowsFormsApplication1/Apps/BitnoteConverter.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteConverter.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteDigger.Designer.cs b/source/WindowsFormsApplication1/Apps/BitnoteDigger.Designer.cs new file mode 100644 index 0000000..b1fa081 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteDigger.Designer.cs @@ -0,0 +1,337 @@ +using System; + +namespace ShiftOS +{ + partial class BitnoteDigger + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.Label10 = new System.Windows.Forms.Label(); + this.btnsend = new System.Windows.Forms.Button(); + this.txtsendaddress = new System.Windows.Forms.TextBox(); + this.Label7 = new System.Windows.Forms.Label(); + this.lbltotalbitcoinsmined = new System.Windows.Forms.Label(); + this.Panel1 = new System.Windows.Forms.Panel(); + this.Label6 = new System.Windows.Forms.Label(); + this.Label8 = new System.Windows.Forms.Label(); + this.turbomodespeed = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.lbldiggerstatsspeed = new System.Windows.Forms.Label(); + this.lbldiggerstatsgrade = new System.Windows.Forms.Label(); + this.lbldiggerstatsname = new System.Windows.Forms.Label(); + this.btnturbomode = new System.Windows.Forms.Button(); + this.btnstop = new System.Windows.Forms.Button(); + this.btnstart = new System.Windows.Forms.Button(); + this.PictureBox1 = new System.Windows.Forms.PictureBox(); + this.Label1 = new System.Windows.Forms.Label(); + this.tmrcalcbitnotesmined = new System.Windows.Forms.Timer(this.components); + this.tmrturbomode = new System.Windows.Forms.Timer(this.components); + this.btnupgrade = new System.Windows.Forms.Button(); + this.pgcontents.SuspendLayout(); + this.Panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.Label10); + this.pgcontents.Controls.Add(this.btnsend); + this.pgcontents.Controls.Add(this.txtsendaddress); + this.pgcontents.Controls.Add(this.Label7); + this.pgcontents.Controls.Add(this.lbltotalbitcoinsmined); + this.pgcontents.Controls.Add(this.Panel1); + this.pgcontents.Controls.Add(this.Label1); + 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(560, 297); + this.pgcontents.TabIndex = 20; + // + // Label10 + // + 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(205, 182); + this.Label10.Name = "Label10"; + this.Label10.Size = new System.Drawing.Size(261, 35); + this.Label10.TabIndex = 6; + this.Label10.Text = "Insert your Bitnote wallet address above then click send to transfer your earning" + + "s"; + this.Label10.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnsend + // + this.btnsend.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnsend.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsend.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsend.Location = new System.Drawing.Point(472, 181); + this.btnsend.Name = "btnsend"; + this.btnsend.Size = new System.Drawing.Size(73, 36); + this.btnsend.TabIndex = 5; + this.btnsend.Text = "Send"; + this.btnsend.UseVisualStyleBackColor = true; + this.btnsend.Click += new System.EventHandler(this.btnsend_Click); + // + // txtsendaddress + // + this.txtsendaddress.BackColor = System.Drawing.Color.White; + this.txtsendaddress.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtsendaddress.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtsendaddress.Location = new System.Drawing.Point(205, 155); + this.txtsendaddress.Multiline = true; + this.txtsendaddress.Name = "txtsendaddress"; + this.txtsendaddress.Size = new System.Drawing.Size(340, 21); + this.txtsendaddress.TabIndex = 4; + this.txtsendaddress.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // Label7 + // + this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(203, 128); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(350, 27); + this.Label7.TabIndex = 3; + this.Label7.Text = "Send Bitnotes To:"; + this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbltotalbitcoinsmined + // + this.lbltotalbitcoinsmined.Font = new System.Drawing.Font("Microsoft Sans Serif", 32.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltotalbitcoinsmined.Location = new System.Drawing.Point(206, 57); + this.lbltotalbitcoinsmined.Name = "lbltotalbitcoinsmined"; + this.lbltotalbitcoinsmined.Size = new System.Drawing.Size(344, 51); + this.lbltotalbitcoinsmined.TabIndex = 2; + this.lbltotalbitcoinsmined.Text = "0.00000"; + this.lbltotalbitcoinsmined.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Panel1 + // + this.Panel1.Controls.Add(this.btnupgrade); + this.Panel1.Controls.Add(this.Label6); + this.Panel1.Controls.Add(this.Label8); + this.Panel1.Controls.Add(this.turbomodespeed); + this.Panel1.Controls.Add(this.Label5); + this.Panel1.Controls.Add(this.lbldiggerstatsspeed); + this.Panel1.Controls.Add(this.lbldiggerstatsgrade); + this.Panel1.Controls.Add(this.lbldiggerstatsname); + this.Panel1.Controls.Add(this.btnturbomode); + this.Panel1.Controls.Add(this.btnstop); + this.Panel1.Controls.Add(this.btnstart); + this.Panel1.Controls.Add(this.PictureBox1); + this.Panel1.Dock = System.Windows.Forms.DockStyle.Left; + this.Panel1.Location = new System.Drawing.Point(0, 0); + this.Panel1.Name = "Panel1"; + this.Panel1.Size = new System.Drawing.Size(199, 297); + this.Panel1.TabIndex = 1; + // + // Label6 + // + this.Label6.AutoSize = true; + this.Label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label6.Location = new System.Drawing.Point(2, 88); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(157, 20); + this.Label6.TabIndex = 13; + this.Label6.Text = "Turbo Mode Stats:"; + // + // Label8 + // + this.Label8.AutoSize = true; + this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label8.Location = new System.Drawing.Point(3, 126); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(162, 16); + this.Label8.TabIndex = 11; + this.Label8.Text = "Codepoint Cost: 1CP / 10s"; + // + // turbomodespeed + // + this.turbomodespeed.AutoSize = true; + this.turbomodespeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.turbomodespeed.Location = new System.Drawing.Point(3, 109); + this.turbomodespeed.Name = "turbomodespeed"; + this.turbomodespeed.Size = new System.Drawing.Size(183, 16); + this.turbomodespeed.TabIndex = 10; + this.turbomodespeed.Text = "Turbo Speed: 0.00002 BTN/S"; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(5, 5); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(115, 20); + this.Label5.TabIndex = 9; + this.Label5.Text = "Digger Stats:"; + // + // lbldiggerstatsspeed + // + this.lbldiggerstatsspeed.AutoSize = true; + this.lbldiggerstatsspeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbldiggerstatsspeed.Location = new System.Drawing.Point(6, 60); + this.lbldiggerstatsspeed.Name = "lbldiggerstatsspeed"; + this.lbldiggerstatsspeed.Size = new System.Drawing.Size(144, 16); + this.lbldiggerstatsspeed.TabIndex = 8; + this.lbldiggerstatsspeed.Text = "Speed: 0.00001 BTN/S"; + // + // lbldiggerstatsgrade + // + this.lbldiggerstatsgrade.AutoSize = true; + this.lbldiggerstatsgrade.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbldiggerstatsgrade.Location = new System.Drawing.Point(6, 43); + this.lbldiggerstatsgrade.Name = "lbldiggerstatsgrade"; + this.lbldiggerstatsgrade.Size = new System.Drawing.Size(103, 16); + this.lbldiggerstatsgrade.TabIndex = 7; + this.lbldiggerstatsgrade.Text = "Digger Grade: 1"; + // + // lbldiggerstatsname + // + this.lbldiggerstatsname.AutoSize = true; + this.lbldiggerstatsname.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbldiggerstatsname.Location = new System.Drawing.Point(6, 26); + this.lbldiggerstatsname.Name = "lbldiggerstatsname"; + this.lbldiggerstatsname.Size = new System.Drawing.Size(157, 16); + this.lbldiggerstatsname.TabIndex = 6; + this.lbldiggerstatsname.Text = "Name: Surface Scratcher"; + // + // btnturbomode + // + this.btnturbomode.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnturbomode.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnturbomode.Location = new System.Drawing.Point(6, 188); + this.btnturbomode.Name = "btnturbomode"; + this.btnturbomode.Size = new System.Drawing.Size(186, 29); + this.btnturbomode.TabIndex = 5; + this.btnturbomode.Text = "Activate Turbo Mode"; + this.btnturbomode.UseVisualStyleBackColor = true; + this.btnturbomode.Click += new System.EventHandler(this.btnturbomode_Click); + // + // btnstop + // + this.btnstop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnstop.Location = new System.Drawing.Point(101, 156); + this.btnstop.Name = "btnstop"; + this.btnstop.Size = new System.Drawing.Size(91, 29); + this.btnstop.TabIndex = 4; + this.btnstop.Text = "Stop"; + this.btnstop.UseVisualStyleBackColor = true; + this.btnstop.Click += new System.EventHandler(this.btnstop_Click); + // + // btnstart + // + this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstart.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnstart.Location = new System.Drawing.Point(6, 156); + this.btnstart.Name = "btnstart"; + this.btnstart.Size = new System.Drawing.Size(91, 29); + this.btnstart.TabIndex = 3; + this.btnstart.Text = "Start"; + this.btnstart.UseVisualStyleBackColor = true; + this.btnstart.Click += new System.EventHandler(this.btnstart_Click); + // + // PictureBox1 + // + this.PictureBox1.BackColor = System.Drawing.Color.Black; + this.PictureBox1.Dock = System.Windows.Forms.DockStyle.Right; + this.PictureBox1.Location = new System.Drawing.Point(198, 0); + this.PictureBox1.Name = "PictureBox1"; + this.PictureBox1.Size = new System.Drawing.Size(1, 297); + this.PictureBox1.TabIndex = 2; + this.PictureBox1.TabStop = false; + // + // Label1 + // + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(205, 16); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(345, 43); + this.Label1.TabIndex = 0; + this.Label1.Text = "Bitnotes Found"; + this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // tmrcalcbitnotesmined + // + this.tmrcalcbitnotesmined.Interval = 1000; + this.tmrcalcbitnotesmined.Tick += new System.EventHandler(this.tmrcalcbitnotesmined_Tick); + // + // tmrturbomode + // + this.tmrturbomode.Interval = 10000; + this.tmrturbomode.Tick += new System.EventHandler(this.tmrturbomode_Tick); + // + // btnupgrade + // + this.btnupgrade.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnupgrade.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnupgrade.Location = new System.Drawing.Point(6, 223); + this.btnupgrade.Name = "btnupgrade"; + this.btnupgrade.Size = new System.Drawing.Size(186, 29); + this.btnupgrade.TabIndex = 14; + this.btnupgrade.Text = "Upgrade My Digger"; + this.btnupgrade.UseVisualStyleBackColor = true; + this.btnupgrade.Click += new System.EventHandler(this.btnupgrade_Click); + // + // BitnoteDigger + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(560, 297); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "BitnoteDigger"; + this.Text = "Bitnote_Digger"; + this.TopMost = true; + this.Load += new System.EventHandler(this.BitnoteDigger_Load); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.Panel1.ResumeLayout(false); + this.Panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Panel Panel1; + internal System.Windows.Forms.PictureBox PictureBox1; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Label lbltotalbitcoinsmined; + internal System.Windows.Forms.Button btnturbomode; + internal System.Windows.Forms.Button btnstop; + internal System.Windows.Forms.Button btnstart; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.Label Label8; + internal System.Windows.Forms.Label turbomodespeed; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Label lbldiggerstatsspeed; + internal System.Windows.Forms.Label lbldiggerstatsgrade; + internal System.Windows.Forms.Label lbldiggerstatsname; + internal System.Windows.Forms.Label Label10; + internal System.Windows.Forms.Button btnsend; + internal System.Windows.Forms.TextBox txtsendaddress; + internal System.Windows.Forms.Label Label7; + internal System.Windows.Forms.Timer tmrcalcbitnotesmined; + internal System.Windows.Forms.Timer tmrturbomode; + internal System.Windows.Forms.Button btnupgrade; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteDigger.cs b/source/WindowsFormsApplication1/Apps/BitnoteDigger.cs new file mode 100644 index 0000000..df0b124 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteDigger.cs @@ -0,0 +1,234 @@ +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 System.IO; +using Newtonsoft.Json; + +namespace ShiftOS +{ + public partial class BitnoteDigger : Form + { + /// <summary> + /// GUI for the Bitnote Digger fake Appscape Package. + /// </summary> + public BitnoteDigger() + { + InitializeComponent(); + } + + private void BitnoteDigger_Load(object sender, EventArgs e) + { + getdiggergrade(); + updatestats(); + } + + /// <summary> + /// Model for a digger grade. + /// </summary> + public class diggergrade + { + public string Name { get; set; } + public int Level { get; set; } + } + + /// <summary> + /// Retrieves the proper digger grade. + /// </summary> + public void getdiggergrade() + { + if(!File.Exists(Paths.Drivers + "BNDigger.dri")) + { + var d = new diggergrade(); + d.Level = 1; + d.Name = "Surface Scratcher"; + bitnotediggergrade = d; + File.WriteAllText(Paths.Drivers + "BNDigger.dri", API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(d))); + } + else + { + string enc = File.ReadAllText(Paths.Drivers + "BNDigger.dri"); + bitnotediggergrade = JsonConvert.DeserializeObject<diggergrade>(API.BitnoteEncryption.Decrypt(enc)); + } + } + + /// <summary> + /// Saves the digger grade to the save game. + /// </summary> + public void SaveDigger() + { + var d = bitnotediggergrade; + File.WriteAllText(Paths.Drivers + "BNDigger.dri", API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(d))); + } + + public decimal bitnotesmined = 0; + public diggergrade bitnotediggergrade = null; + public double miningspeed = 0.00005; + + /// <summary> + /// Sets up digger statistics. + /// </summary> + public void updatestats() + { + lbldiggerstatsgrade.Text = "Digger Grade: " + bitnotediggergrade.Name; + switch (bitnotediggergrade.Level) + { + case 1: + lbldiggerstatsname.Text = "Surface Scratcher"; + lbldiggerstatsspeed.Text = "Speed: 0.00001"; + miningspeed = 0.00001; + break; + case 2: + lbldiggerstatsname.Text = "Name: Sediment Mover"; + lbldiggerstatsspeed.Text = "Speed: 0.00002"; + miningspeed = 0.00002; + break; + case 3: + lbldiggerstatsname.Text = "Name: Rock Crusher"; + lbldiggerstatsspeed.Text = "0.00004"; + miningspeed = 0.00004; + break; + case 4: + lbldiggerstatsname.Text = "Name: Massive Drill"; + lbldiggerstatsspeed.Text = "Speed: 0.00008"; + miningspeed = 0.00008; + break; + case 5: + lbldiggerstatsname.Text = "Name: Kola"; + lbldiggerstatsspeed.Text = "Speed: 0.00016"; + miningspeed = 0.00016; + break; + } + turbomodespeed.Text = (miningspeed * 2).ToString(); + } + + /// <summary> + /// Updates the digger. + /// </summary> + /// <param name="grade">New grade.</param> + /// <param name="price">Price (BTN) to subtract.</param> + /// <param name="name">New name.</param> + public void updategrade(int grade, decimal price, string name) + { + if (API.BitnoteAddress.Bitnotes >= price) + { + if (bitnotediggergrade.Level < grade) + { + bitnotediggergrade.Level = grade; + bitnotediggergrade.Name = name; + API.BitnoteAddress.Bitnotes -= price; + API.CreateInfoboxSession("Upgraded to " + name, + "Your digger has been successfully upgraded to grade " + grade + ". The '" + name + "'", + infobox.InfoboxMode.Info); + SaveDigger(); + updatestats(); + } + else { + API.CreateInfoboxSession("Aready Upgraded", + "The Bitnote Digger is already upgraded to grade " + bitnotediggergrade.Level.ToString() + ". There is no point in downgrading to grade " + grade, + infobox.InfoboxMode.Info); + } + } + else { + API.CreateInfoboxSession("Insufficient Funds", + "You do not have enough Bitnotes to complete this purchase", + infobox.InfoboxMode.Info); + } + } + + // ERROR: Handles clauses are not supported in C# + private void tmrcalcbitnotesmined_Tick(object sender, EventArgs e) + { + bitnotesmined += Convert.ToDecimal(miningspeed); + lbltotalbitcoinsmined.Text = (Math.Round(bitnotesmined, 5)).ToString("#.#####"); + } + + // ERROR: Handles clauses are not supported in C# + private void btnstart_Click(object sender, EventArgs e) + { + tmrcalcbitnotesmined.Start(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnstop_Click(object sender, EventArgs e) + { + tmrcalcbitnotesmined.Stop(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnsend_Click(object sender, EventArgs e) + { + if (txtsendaddress.Text == API.BitnoteAddress.Address) + { + API.BitnoteAddress.Bitnotes += bitnotesmined; + } + bitnotesmined = 0; + lbltotalbitcoinsmined.Text = (Math.Round(bitnotesmined, 5)).ToString("#.#####"); + } + + // ERROR: Handles clauses are not supported in C# + private void btnturbomode_Click(object sender, EventArgs e) + { + if (tmrturbomode.Enabled == false) + { + miningspeed = (miningspeed * 2); + tmrturbomode.Start(); + btnturbomode.Text = "Disable Turbo Mode"; + } + else { + miningspeed = (miningspeed / 2); + tmrturbomode.Stop(); + btnturbomode.Text = "Activate Turbo Mode"; + } + } + + // ERROR: Handles clauses are not supported in C# + private void tmrturbomode_Tick(object sender, EventArgs e) + { + if (API.Codepoints >= 1) + { + API.RemoveCodepoints(1); + } + else { + miningspeed = (miningspeed / 2); + tmrturbomode.Stop(); + btnturbomode.Text = "Activate Turbo Mode"; + API.CreateInfoboxSession("Turbo Mode disabled", + "Turbo Mode has been disabled due to your lack of Code Points.", + infobox.InfoboxMode.Info); + } + } + + private void btnupgrade_Click(object sender, EventArgs e) + { + string newname = "Surface Scratcher"; + double price = 1; + switch (bitnotediggergrade.Name) { + case "Surface Scratcher": + newname = "Name: Sediment Mover"; + price = 1.5; + break; + case "Sediment Mover": + newname = "Name: Rock Crusher"; + price = 2; + break; + case "Rock Crusher": + newname = "Name: Massive Drill"; + price = 4; + break; + case "Massive Drill": + newname = "Name: Kola"; + price = 8; + break; + + } + updategrade(bitnotediggergrade.Level + 1, (decimal)price, newname); + + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/BitnoteDigger.resx b/source/WindowsFormsApplication1/Apps/BitnoteDigger.resx new file mode 100644 index 0000000..7beae4d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteDigger.resx @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="tmrcalcbitnotesmined.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="tmrturbomode.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>187, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteWallet.Designer.cs b/source/WindowsFormsApplication1/Apps/BitnoteWallet.Designer.cs new file mode 100644 index 0000000..df0b7d8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteWallet.Designer.cs @@ -0,0 +1,243 @@ +namespace ShiftOS +{ + partial class BitnoteWallet + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.fltopbar = new System.Windows.Forms.FlowLayoutPanel(); + this.btnsend = new System.Windows.Forms.Button(); + this.btnsync = new System.Windows.Forms.Button(); + this.sendpanel = new System.Windows.Forms.Panel(); + this.txtamount = new System.Windows.Forms.TextBox(); + this.txtrecipient = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnconfirmsend = new System.Windows.Forms.PictureBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lbmybitnotes = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.txtmyaddress = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.tmrrefresh = new System.Windows.Forms.Timer(this.components); + this.fltopbar.SuspendLayout(); + this.sendpanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.btnconfirmsend)).BeginInit(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // fltopbar + // + this.fltopbar.BackColor = System.Drawing.Color.Gray; + this.fltopbar.Controls.Add(this.btnsend); + this.fltopbar.Controls.Add(this.btnsync); + this.fltopbar.Dock = System.Windows.Forms.DockStyle.Top; + this.fltopbar.ForeColor = System.Drawing.Color.White; + this.fltopbar.Location = new System.Drawing.Point(0, 0); + this.fltopbar.Name = "fltopbar"; + this.fltopbar.Size = new System.Drawing.Size(551, 30); + this.fltopbar.TabIndex = 0; + // + // btnsend + // + this.btnsend.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.btnsend.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsend.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnsend.Location = new System.Drawing.Point(3, 3); + this.btnsend.Name = "btnsend"; + this.btnsend.Size = new System.Drawing.Size(75, 23); + this.btnsend.TabIndex = 0; + this.btnsend.Text = "Send"; + this.btnsend.UseVisualStyleBackColor = true; + this.btnsend.Click += new System.EventHandler(this.btnsend_Click); + // + // btnsync + // + this.btnsync.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsync.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnsync.Location = new System.Drawing.Point(84, 3); + this.btnsync.Name = "btnsync"; + this.btnsync.Size = new System.Drawing.Size(113, 23); + this.btnsync.TabIndex = 1; + this.btnsync.Text = "Sync My Bitnotes"; + this.btnsync.UseVisualStyleBackColor = true; + this.btnsync.Click += new System.EventHandler(this.btnsync_Click); + // + // sendpanel + // + this.sendpanel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.sendpanel.Controls.Add(this.txtamount); + this.sendpanel.Controls.Add(this.txtrecipient); + this.sendpanel.Controls.Add(this.label2); + this.sendpanel.Controls.Add(this.label1); + this.sendpanel.Controls.Add(this.btnconfirmsend); + this.sendpanel.Location = new System.Drawing.Point(306, 143); + this.sendpanel.Name = "sendpanel"; + this.sendpanel.Size = new System.Drawing.Size(233, 105); + this.sendpanel.TabIndex = 1; + this.sendpanel.Visible = false; + // + // txtamount + // + this.txtamount.Location = new System.Drawing.Point(82, 34); + this.txtamount.Name = "txtamount"; + this.txtamount.Size = new System.Drawing.Size(148, 20); + this.txtamount.TabIndex = 4; + // + // txtrecipient + // + this.txtrecipient.Location = new System.Drawing.Point(82, 4); + this.txtrecipient.Name = "txtrecipient"; + this.txtrecipient.Size = new System.Drawing.Size(148, 20); + this.txtrecipient.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label2.Location = new System.Drawing.Point(4, 34); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(60, 17); + this.label2.TabIndex = 2; + this.label2.Text = "Amount:"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label1.Location = new System.Drawing.Point(4, 4); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(71, 17); + this.label1.TabIndex = 1; + this.label1.Text = "Recipient:"; + // + // btnconfirmsend + // + this.btnconfirmsend.Image = global::ShiftOS.Properties.Resources.Send; + this.btnconfirmsend.Location = new System.Drawing.Point(129, 75); + this.btnconfirmsend.Name = "btnconfirmsend"; + this.btnconfirmsend.Size = new System.Drawing.Size(101, 27); + this.btnconfirmsend.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize; + this.btnconfirmsend.TabIndex = 0; + this.btnconfirmsend.TabStop = false; + this.btnconfirmsend.Click += new System.EventHandler(this.btnconfirmsend_Click); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.lbmybitnotes); + this.panel1.Controls.Add(this.label4); + this.panel1.Controls.Add(this.txtmyaddress); + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.fltopbar); + this.panel1.Controls.Add(this.sendpanel); + 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(551, 260); + this.panel1.TabIndex = 2; + // + // lbmybitnotes + // + this.lbmybitnotes.AutoSize = true; + this.lbmybitnotes.Font = new System.Drawing.Font("Microsoft Sans Serif", 20F); + this.lbmybitnotes.Location = new System.Drawing.Point(7, 203); + this.lbmybitnotes.Name = "lbmybitnotes"; + this.lbmybitnotes.Size = new System.Drawing.Size(91, 31); + this.lbmybitnotes.TabIndex = 6; + this.lbmybitnotes.Text = "0 BTN"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label4.Location = new System.Drawing.Point(7, 177); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(50, 17); + this.label4.TabIndex = 5; + this.label4.Text = "I have:"; + // + // txtmyaddress + // + this.txtmyaddress.Location = new System.Drawing.Point(10, 136); + this.txtmyaddress.Name = "txtmyaddress"; + this.txtmyaddress.Size = new System.Drawing.Size(290, 20); + this.txtmyaddress.TabIndex = 4; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label3.Location = new System.Drawing.Point(7, 116); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(86, 17); + this.label3.TabIndex = 2; + this.label3.Text = "My Address:"; + // + // tmrrefresh + // + this.tmrrefresh.Enabled = true; + this.tmrrefresh.Tick += new System.EventHandler(this.tmrrefresh_Tick); + // + // BitnoteWallet + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(551, 260); + this.Controls.Add(this.panel1); + this.Name = "BitnoteWallet"; + this.Text = "BitnoteWallet"; + this.Load += new System.EventHandler(this.BitnoteWallet_Load); + this.fltopbar.ResumeLayout(false); + this.sendpanel.ResumeLayout(false); + this.sendpanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.btnconfirmsend)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.FlowLayoutPanel fltopbar; + private System.Windows.Forms.Button btnsend; + private System.Windows.Forms.Button btnsync; + private System.Windows.Forms.Panel sendpanel; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.PictureBox btnconfirmsend; + private System.Windows.Forms.TextBox txtamount; + private System.Windows.Forms.TextBox txtrecipient; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lbmybitnotes; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox txtmyaddress; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Timer tmrrefresh; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/BitnoteWallet.cs b/source/WindowsFormsApplication1/Apps/BitnoteWallet.cs new file mode 100644 index 0000000..6d5cb9f --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteWallet.cs @@ -0,0 +1,247 @@ +using NetSockets; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class BitnoteWallet : Form + { + /// <summary> + /// GUI for the Bitnote Wallet package. + /// </summary> + public BitnoteWallet() + { + InitializeComponent(); + Clients = new List<BitnoteClient>(); + foreach(var c in Package_Grabber.clients) + { + if(c.Value.IsConnected) + { + var client = new BitnoteClient(c.Key); + client.GetBank(); + Clients.Add(client); + } + } + } + + public List<BitnoteClient> Clients = null; + + public bool AddBitnotesToAddress(string addr, decimal amount) + { + bool res = false; + foreach(var c in Clients) + { + if(c.Addresses != null) + { + foreach(var a in c.Addresses) + { + if(a.Address == addr) + { + if (res == false) + { + a.Bitnotes += amount; + res = true; + } + } + } + c.UploadBank(c.Addresses); + } + } + return res; + } + + private void btnsync_Click(object sender, EventArgs e) + { + try + { + var t = new BackgroundWorker(); + t.DoWork += (object s, DoWorkEventArgs a) => + { + + foreach(var c in Clients) + { + SyncBitnotes(c.Addresses); + c.UploadBank(c.Addresses); + } + }; + t.RunWorkerAsync(); + } + catch + { + SyncBitnotes(new List<SaveSystem.PrivateBitnoteAddress>()); + API.CreateInfoboxSession("Error", "You cannot sync your Bitnotes as the connection to the server has failed.", infobox.InfoboxMode.Info); + } + } + + /// <summary> + /// Syncs your private address with the provided list IF yours exists in there. If not, it'll add it. + /// </summary> + /// <param name="lst">The list to sync.</param> + public void SyncBitnotes(List<SaveSystem.PrivateBitnoteAddress> lst) + { + bool cont = false; + int my_itm = 0; + foreach (var itm in lst) + { + if(itm.Address == API.BitnoteAddress.Address) + { + cont = true; + my_itm = lst.IndexOf(itm); + } + } + if(cont == true) + { + if(lst[my_itm].Bitnotes < API.BitnoteAddress.Bitnotes) + { + lst[my_itm].Bitnotes = API.BitnoteAddress.Bitnotes; + } + else + { + API.BitnoteAddress.Bitnotes = lst[my_itm].Bitnotes; + } + } + else + { + lst.Add(API.BitnoteAddress); + } + } + + public void UploadList(BitnoteClient client, List<SaveSystem.PrivateBitnoteAddress> lst) + { + client.UploadBank(lst); + } + + + private void btnsend_Click(object sender, EventArgs e) + { + sendpanel.Show(); + } + + public void Info(string message) => API.CreateInfoboxSession("Error", message, infobox.InfoboxMode.Info); + + private void btnconfirmsend_Click(object sender, EventArgs e) + { + if (txtrecipient.Text != "") + { + if (AddBitnotesToAddress(txtrecipient.Text, Convert.ToDecimal(Convert.ToDecimal(txtamount.Text).ToString("#.#####")))) + { + Info("The Bitnotes have been sent successfully."); + } + else + { + Info("That address doesn't exist in the database."); + } + } + else + { + Info("You must enter a recipient Bitnote address!"); + } + sendpanel.Hide(); + } + + private void tmrrefresh_Tick(object sender, EventArgs e) + { + if(API.BitnoteAddress == null) + { + SaveSystem.Utilities.BitnoteAddress = new SaveSystem.PrivateBitnoteAddress(); + SaveSystem.Utilities.BitnoteAddress.Bitnotes = 0; + SaveSystem.Utilities.BitnoteAddress.Address = SaveSystem.Utilities.GenerateNewBitnoteAddress(); + } + txtmyaddress.Text = API.BitnoteAddress.Address; + if(API.BitnoteAddress.Bitnotes == 0) + { + lbmybitnotes.Text = "0 BTN"; + } + else + { + lbmybitnotes.Text = API.BitnoteAddress.Bitnotes.ToString("#.#####") + " BTN"; + } + } + + private void BitnoteWallet_Load(object sender, EventArgs e) + { + fltopbar.BackColor = API.CurrentSkin.titlebarcolour; + fltopbar.ForeColor = API.CurrentSkin.titletextcolour; + } + } + + public class BitnoteClient + { + /// <summary> + /// Creates a new Bitnote Client. + /// </summary> + /// <param name="IP">IP address of the server to look at.</param> + public BitnoteClient(string IP) + { + try + { + var c = Package_Grabber.clients[IP]; + c.OnReceived += (object s, NetReceivedEventArgs<NetObject> a) => + { + var obj = (ObjectModel)a.Data.Object; + switch (obj.Command) + { + case "fail": + Addresses = new List<SaveSystem.PrivateBitnoteAddress>(); + break; + case "bitnote_bank": + try + { + Addresses = JsonConvert.DeserializeObject<List<SaveSystem.PrivateBitnoteAddress>>(API.BitnoteEncryption.Decrypt((string)obj.OptionalObject)); + if(Addresses == null) + { + Addresses = new List<SaveSystem.PrivateBitnoteAddress>(); + } + } + catch { + Addresses = new List<SaveSystem.PrivateBitnoteAddress>(); + } + break; + } + }; + _IP = IP; + } + catch + { + throw new ArgumentException("IP address not found in client list."); + } + } + + private string _IP = ""; + public List<SaveSystem.PrivateBitnoteAddress> Addresses = null; + + public void GetBank() + { + try + { + Package_Grabber.SendMessage(_IP, "btn getbank"); + } + catch + { + + } + } + + public void UploadBank(List<SaveSystem.PrivateBitnoteAddress> bank) + { + try + { + Package_Grabber.SendMessage(_IP, "btn setbank", API.BitnoteEncryption.Encrypt(JsonConvert.SerializeObject(bank))); + } + catch + { + + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/BitnoteWallet.resx b/source/WindowsFormsApplication1/Apps/BitnoteWallet.resx new file mode 100644 index 0000000..09c4313 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/BitnoteWallet.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="tmrrefresh.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Dodge.Designer.cs b/source/WindowsFormsApplication1/Apps/Dodge.Designer.cs new file mode 100644 index 0000000..46fce33 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Dodge.Designer.cs @@ -0,0 +1,230 @@ +using System; + +namespace ShiftOS +{ + partial class Dodge + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.player = new System.Windows.Forms.PictureBox(); + this.QuitButton = new System.Windows.Forms.PictureBox(); + this.BeginButton = new System.Windows.Forms.PictureBox(); + this.DescriptionLabel = new System.Windows.Forms.Label(); + this.object_small2 = new System.Windows.Forms.PictureBox(); + this.object_mid2 = new System.Windows.Forms.PictureBox(); + this.object_large = new System.Windows.Forms.PictureBox(); + this.object_small = new System.Windows.Forms.PictureBox(); + this.object_mid = new System.Windows.Forms.PictureBox(); + this.scorelabel = new System.Windows.Forms.Label(); + this.PicBonus = new System.Windows.Forms.PictureBox(); + this.clock = new System.Windows.Forms.Timer(this.components); + this.pgcontents.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.player)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.QuitButton)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.BeginButton)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_small2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_mid2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_large)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_small)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_mid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.PicBonus)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.player); + this.pgcontents.Controls.Add(this.QuitButton); + this.pgcontents.Controls.Add(this.BeginButton); + this.pgcontents.Controls.Add(this.DescriptionLabel); + this.pgcontents.Controls.Add(this.object_small2); + this.pgcontents.Controls.Add(this.object_mid2); + this.pgcontents.Controls.Add(this.object_large); + this.pgcontents.Controls.Add(this.object_small); + this.pgcontents.Controls.Add(this.object_mid); + this.pgcontents.Controls.Add(this.scorelabel); + this.pgcontents.Controls.Add(this.PicBonus); + 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(418, 478); + this.pgcontents.TabIndex = 20; + // + // player + // + this.player.Anchor = System.Windows.Forms.AnchorStyles.Bottom; + this.player.BackColor = System.Drawing.Color.Transparent; + this.player.Image = global::ShiftOS.Properties.Resources.player_Image; + this.player.Location = new System.Drawing.Point(192, 445); + this.player.Name = "player"; + this.player.Size = new System.Drawing.Size(32, 32); + this.player.TabIndex = 18; + this.player.TabStop = false; + // + // QuitButton + // + this.QuitButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.QuitButton.Image = global::ShiftOS.Properties.Resources.QuitButton_Image; + this.QuitButton.InitialImage = global::ShiftOS.Properties.Resources.QuitButton_Image; + this.QuitButton.Location = new System.Drawing.Point(216, 424); + this.QuitButton.Name = "QuitButton"; + this.QuitButton.Size = new System.Drawing.Size(200, 50); + this.QuitButton.TabIndex = 12; + this.QuitButton.TabStop = false; + this.QuitButton.Click += new System.EventHandler(this.QuitButton_Click); + // + // BeginButton + // + this.BeginButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.BeginButton.Image = global::ShiftOS.Properties.Resources.BeginButton1; + this.BeginButton.InitialImage = global::ShiftOS.Properties.Resources.BeginButton_Image; + this.BeginButton.Location = new System.Drawing.Point(3, 424); + this.BeginButton.Name = "BeginButton"; + this.BeginButton.Size = new System.Drawing.Size(200, 50); + this.BeginButton.TabIndex = 11; + this.BeginButton.TabStop = false; + this.BeginButton.Click += new System.EventHandler(this.BeginButton_Click); + // + // DescriptionLabel + // + this.DescriptionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.DescriptionLabel.Location = new System.Drawing.Point(3, 3); + this.DescriptionLabel.Name = "DescriptionLabel"; + this.DescriptionLabel.Size = new System.Drawing.Size(413, 409); + this.DescriptionLabel.TabIndex = 10; + this.DescriptionLabel.Text = "Placeholder"; + // + // object_small2 + // + this.object_small2.Image = global::ShiftOS.Properties.Resources.object_small2_Image; + this.object_small2.Location = new System.Drawing.Point(75, 43); + this.object_small2.Name = "object_small2"; + this.object_small2.Size = new System.Drawing.Size(75, 20); + this.object_small2.TabIndex = 17; + this.object_small2.TabStop = false; + // + // object_mid2 + // + this.object_mid2.Image = global::ShiftOS.Properties.Resources.object_mid2_Image; + this.object_mid2.Location = new System.Drawing.Point(279, 134); + this.object_mid2.Name = "object_mid2"; + this.object_mid2.Size = new System.Drawing.Size(125, 20); + this.object_mid2.TabIndex = 16; + this.object_mid2.TabStop = false; + // + // object_large + // + this.object_large.Image = global::ShiftOS.Properties.Resources.object_large_Image; + this.object_large.Location = new System.Drawing.Point(49, 208); + this.object_large.Name = "object_large"; + this.object_large.Size = new System.Drawing.Size(175, 20); + this.object_large.TabIndex = 15; + this.object_large.TabStop = false; + // + // object_small + // + this.object_small.Image = global::ShiftOS.Properties.Resources.object_small_Image; + this.object_small.Location = new System.Drawing.Point(290, 294); + this.object_small.Name = "object_small"; + this.object_small.Size = new System.Drawing.Size(75, 20); + this.object_small.TabIndex = 13; + this.object_small.TabStop = false; + // + // object_mid + // + this.object_mid.Image = global::ShiftOS.Properties.Resources.object_mid_Image; + this.object_mid.Location = new System.Drawing.Point(58, 371); + this.object_mid.Name = "object_mid"; + this.object_mid.Size = new System.Drawing.Size(125, 20); + this.object_mid.TabIndex = 14; + this.object_mid.TabStop = false; + // + // scorelabel + // + this.scorelabel.AutoSize = true; + this.scorelabel.BackColor = System.Drawing.Color.Transparent; + this.scorelabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.scorelabel.Location = new System.Drawing.Point(3, 4); + this.scorelabel.Name = "scorelabel"; + this.scorelabel.Size = new System.Drawing.Size(51, 55); + this.scorelabel.TabIndex = 19; + this.scorelabel.Text = "0"; + // + // PicBonus + // + this.PicBonus.Image = global::ShiftOS.Properties.Resources.PicBonus_Image; + this.PicBonus.Location = new System.Drawing.Point(187, 84); + this.PicBonus.Name = "PicBonus"; + this.PicBonus.Size = new System.Drawing.Size(16, 11); + this.PicBonus.TabIndex = 20; + this.PicBonus.TabStop = false; + this.PicBonus.Visible = false; + // + // clock + // + this.clock.Interval = 20; + this.clock.Tick += new System.EventHandler(this.clock_Tick); + // + // Dodge + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(418, 478); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MaximizeBox = false; + this.Name = "Dodge"; + this.Text = "Dodge"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Form1_Load); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_keydown); + this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyUp); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.player)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.QuitButton)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.BeginButton)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_small2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_mid2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_large)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_small)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.object_mid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.PicBonus)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.PictureBox player; + internal System.Windows.Forms.PictureBox QuitButton; + internal System.Windows.Forms.PictureBox BeginButton; + internal System.Windows.Forms.Label DescriptionLabel; + internal System.Windows.Forms.PictureBox object_small2; + internal System.Windows.Forms.PictureBox object_mid2; + internal System.Windows.Forms.PictureBox object_large; + internal System.Windows.Forms.PictureBox object_small; + internal System.Windows.Forms.PictureBox object_mid; + internal System.Windows.Forms.Label scorelabel; + internal System.Windows.Forms.Timer clock; + internal System.Windows.Forms.PictureBox PicBonus; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Dodge.cs b/source/WindowsFormsApplication1/Apps/Dodge.cs new file mode 100644 index 0000000..320347d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Dodge.cs @@ -0,0 +1,291 @@ +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 +{ + public partial class Dodge : Form + { + /// <summary> + /// C# port of Dodge made by william.1008 in ShiftOS 0.0.8. + /// </summary> + public Dodge() + { + InitializeComponent(); + } + + //the speed the game runs at + decimal speed; + //the score/code points the player gets + int score; + //user can use mouse or keyboard, mouse by default, chnages to true if key pressed + bool usingkeys = false; + //Records the time spent playing, used for codepoints formula + decimal time = 0; + //Number or bonus play collects + int bonusesfound; + //for smooth keyboard gameplay, 1=left, 2=right, 0=none + int keyboardinput = 0; + + //When quit clicked + // ERROR: Handles clauses are not supported in C# + private void QuitButton_Click(object sender, EventArgs e) + { + this.Close(); + } + + // ERROR: Handles clauses are not supported in C# + private void Form1_KeyUp(object sender, KeyEventArgs e) + { + keyboardinput = 0; + } + + // ERROR: Handles clauses are not supported in C# + private void Form1_Load(object sender, EventArgs e) + { + player.Visible = false; + // hide player and score until game starts + scorelabel.Visible = false; + DescriptionLabel.Text = "Welcome to Dodge. Dodge is a simple arcade game with one objective: survive the falling objects! Use the arrow or mouse to move the player and avoid as many objects as you can. The longer you survive, the more code point you will be rewarded with. Beware, it gets harder..."; + // set the description text + + //to impliment skinning, simply set the picturebox to the new skinned image. + //For example: + //player.Image = Image.FromFile("PATH TO SKINNED IMAGE") + } + + //When begin click + // ERROR: Handles clauses are not supported in C# + private void BeginButton_Click(object sender, EventArgs e) + { + + //Hide buttons + BeginButton.Visible = false; + QuitButton.Visible = false; + DescriptionLabel.Visible = false; + + player.Visible = true; + // show the player + speed = 2; + // controls speed of game, will increase as game progresses + scorelabel.Visible = true; + // show score label + bonusesfound = 0; + + //Make sure all objects are in the correct position + object_small.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 300); + object_small2.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 49); + object_mid.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 377); + object_mid2.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 140); + object_large.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), 214); + PicBonus.Location = new Point((int)(Math.Ceiling((decimal)(Rnd()))), -20); + + //Reset time + time = 0; + + usingkeys = false; + + System.Threading.Thread.Sleep(100); + // slight delay before game starts (in milliseconds) + + main(); + // start the main game sub + + //sig() 'infobox sigs - COMMENT THIS OUT + } + + public decimal Rnd() + { + return new Random().Next(0, pgcontents.Width); + } + + public void Form1_keydown(System.Object sender, System.Windows.Forms.KeyEventArgs e) + { + switch (e.KeyCode) + { + case Keys.Right: + // detect right key press + usingkeys = true; + // turn off mouse control + keyboardinput = 2; + break; + case Keys.Left: + usingkeys = true; + keyboardinput = 1; + break; + } + + } + + private bool BlindMode = false; + + private void main() + { + if(BlindMode == true) + { + object_large.Image = null; + object_mid.Image = null; + object_mid2.Image = null; + object_small.Image = null; + object_small2.Image = null; + object_large.BackColor = Color.Black; + object_mid.BackColor = Color.Black; + object_mid2.BackColor = Color.Black; + object_small.BackColor = Color.Black; + object_small2.BackColor = Color.Black; + } + else + { + object_large.Image = Properties.Resources.object_large_Image; + object_mid.Image = null; + object_mid2.Image = null; + object_small.Image = null; + object_small2.Image = null; + object_large.BackColor = Color.Black; + object_mid.BackColor = Color.Black; + object_mid2.BackColor = Color.Black; + object_small.BackColor = Color.Black; + object_small2.BackColor = Color.Black; + } + + clock.Start(); + //the timer restart this sub every tick, making an endless loop between them. + + //score system + scorelabel.Text = score.ToString(); + score = Convert.ToInt16((speed / 10) + (time / 20) + bonusesfound); + + //Speed increase + speed = speed + (speed * (decimal)0.001); + + //increase time + time = time + (decimal)0.05; + //loops every 0.05 seconds so time increases by 1 every second (have I done the maths correctly?) + + //Make objects fall + object_large.Location = new Point(object_large.Location.X, object_large.Location.Y + (int)speed); + object_mid.Location = new Point(object_mid.Location.X, object_mid.Location.Y + (int)speed); + object_mid2.Location = new Point(object_mid2.Location.X, object_mid2.Location.Y + (int)speed); + object_small.Location = new Point(object_small.Location.X, object_small.Location.Y + (int)speed); + object_small2.Location = new Point(object_small2.Location.X, object_small2.Location.Y + (int)speed); + + //mouse controls + // tests if mouse control is enabled + if (usingkeys == false) + { + player.Location = new Point(MousePosition.X - this.Location.X - (player.Size.Width / 2) - 5, player.Location.Y); + //sets the x location to that of the mouse + } + + //keyboard controls + if (usingkeys == true) + { + if (keyboardinput == 1) + { + player.Location = new Point(player.Location.X - ((int)speed * 4), player.Location.Y); + } + if (keyboardinput == 2) + { + player.Location = new Point(player.Location.X + ((int)speed * 4), player.Location.Y); + // move right + } + } + + //move object back to the top of the screen + if (object_small.Location.Y > 522) + { + object_small.Location = new Point((int)(Math.Ceiling((decimal)Rnd())), -20); + //picks a random number between 0 and 453 (window width) and sets the x position to this value. uses -20 for y as it is above the top of window + } + if (object_small2.Location.Y > 522) + { + object_small2.Location = new Point((int)(Math.Ceiling((decimal)Rnd())), -20); + } + if (object_mid.Location.Y > 522) + { + object_mid.Location = new Point((int)(Math.Ceiling(Rnd())), -20); + } + if (object_mid2.Location.Y > 522) + { + object_mid2.Location = new Point((int)(Math.Ceiling(Rnd())), -20); + } + if (object_large.Location.Y > 522) + { + object_large.Location = new Point((int)(Math.Ceiling(Rnd())), -20); + } + + //Makes sure the player is on the screen (Anti-cheating) + if (player.Location.X > 375) + { + player.Location = new Point(385, player.Location.Y); + } + if (player.Location.X < 0) + { + player.Location = new Point(0, player.Location.Y); + } + + //Bonus + if (PicBonus.Visible == false) + { + int ran = (int)Math.Ceiling(Rnd() * 300); + //random 1 in 500 chance + if (ran == 1) + { + PicBonus.Visible = true; + } + } + else { + PicBonus.Location = new Point(PicBonus.Location.X, PicBonus.Location.Y + (int)speed); + if (PicBonus.Location.Y > 522) + { + PicBonus.Location = new Point((int)Math.Ceiling(Rnd()), -20); + PicBonus.Visible = false; + } + } + + //check collisions + if (player.Bounds.IntersectsWith(object_mid.Bounds) | player.Bounds.IntersectsWith(object_mid2.Bounds) | player.Bounds.IntersectsWith(object_large.Bounds) | player.Bounds.IntersectsWith(object_small.Bounds) | player.Bounds.IntersectsWith(object_small2.Bounds)) + { + clock.Stop(); + //breaks loop + System.Threading.Thread.Sleep(333); + //delay for a third of a second + player.Visible = false; + //hide game + DescriptionLabel.Text = "Sorry, you just lost the game, however, you earnt a total of " + score + " code points. To earn more code points, press the begin button now. To exit, press the quit button"; + // change the description to the die message + API.AddCodepoints(score); + DescriptionLabel.Visible = true; + //show non-game elements + BeginButton.Visible = true; + QuitButton.Visible = true; + scorelabel.Visible = false; + } + if (player.Bounds.IntersectsWith(PicBonus.Bounds)) + { + PicBonus.Visible = false; + bonusesfound = bonusesfound + 1; + PicBonus.Location = new Point((int)(Math.Ceiling(Rnd())), -20); + } + + } + + // ERROR: Handles clauses are not supported in C# + private void clock_Tick(object sender, EventArgs e) + { + main(); + //repeat the main sub (endless loop) + } + + private void sig() + { + API.CreateInfoboxSession("FLAG", "There is no foul on the play, the punt was blocked.", infobox.InfoboxMode.Info); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Dodge.resx b/source/WindowsFormsApplication1/Apps/Dodge.resx new file mode 100644 index 0000000..f6e2b3b --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Dodge.resx @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="clock.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>48</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs b/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs new file mode 100644 index 0000000..30d41d8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/File Skimmer.Designer.cs @@ -0,0 +1,245 @@ +namespace ShiftOS +{ + partial class File_Skimmer + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(File_Skimmer)); + this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); + this.toolStrip2 = new System.Windows.Forms.ToolStrip(); + this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); + this.txtfilename = new System.Windows.Forms.ToolStripTextBox(); + this.cbfiletypes = new System.Windows.Forms.ToolStripComboBox(); + this.btnperformaction = new System.Windows.Forms.ToolStripButton(); + this.btncancel = new System.Windows.Forms.ToolStripButton(); + this.lvfiles = new System.Windows.Forms.ListView(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.newFolderToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.lbcurrentfolder = new System.Windows.Forms.ToolStripLabel(); + this.imgtypes = new System.Windows.Forms.ImageList(this.components); + this.toolStripContainer1.BottomToolStripPanel.SuspendLayout(); + this.toolStripContainer1.ContentPanel.SuspendLayout(); + this.toolStripContainer1.TopToolStripPanel.SuspendLayout(); + this.toolStripContainer1.SuspendLayout(); + this.toolStrip2.SuspendLayout(); + this.menuStrip1.SuspendLayout(); + this.toolStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // toolStripContainer1 + // + // + // toolStripContainer1.BottomToolStripPanel + // + this.toolStripContainer1.BottomToolStripPanel.Controls.Add(this.toolStrip2); + // + // toolStripContainer1.ContentPanel + // + this.toolStripContainer1.ContentPanel.Controls.Add(this.lvfiles); + this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(763, 348); + 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(763, 413); + this.toolStripContainer1.TabIndex = 0; + this.toolStripContainer1.Text = "toolStripContainer1"; + // + // toolStripContainer1.TopToolStripPanel + // + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1); + this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1); + // + // toolStrip2 + // + this.toolStrip2.AutoSize = false; + this.toolStrip2.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripLabel1, + this.txtfilename, + this.cbfiletypes, + this.btnperformaction, + this.btncancel}); + this.toolStrip2.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow; + this.toolStrip2.Location = new System.Drawing.Point(0, 0); + this.toolStrip2.Name = "toolStrip2"; + this.toolStrip2.Size = new System.Drawing.Size(763, 23); + this.toolStrip2.Stretch = true; + this.toolStrip2.TabIndex = 0; + // + // toolStripLabel1 + // + this.toolStripLabel1.Name = "toolStripLabel1"; + this.toolStripLabel1.Size = new System.Drawing.Size(63, 15); + this.toolStripLabel1.Text = "File Name:"; + // + // txtfilename + // + this.txtfilename.Name = "txtfilename"; + this.txtfilename.Size = new System.Drawing.Size(500, 23); + // + // cbfiletypes + // + this.cbfiletypes.Name = "cbfiletypes"; + this.cbfiletypes.Size = new System.Drawing.Size(75, 23); + this.cbfiletypes.Text = ".txt"; + this.cbfiletypes.SelectedIndexChanged += new System.EventHandler(this.cbfiletypes_SelectedIndexChanged); + // + // btnperformaction + // + this.btnperformaction.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btnperformaction.Image = ((System.Drawing.Image)(resources.GetObject("btnperformaction.Image"))); + this.btnperformaction.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btnperformaction.Name = "btnperformaction"; + this.btnperformaction.Size = new System.Drawing.Size(40, 19); + this.btnperformaction.Text = "Open"; + this.btnperformaction.Click += new System.EventHandler(this.btnperformaction_Click); + // + // btncancel + // + this.btncancel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.btncancel.Image = ((System.Drawing.Image)(resources.GetObject("btncancel.Image"))); + this.btncancel.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btncancel.Name = "btncancel"; + this.btncancel.Size = new System.Drawing.Size(47, 19); + this.btncancel.Text = "Cancel"; + this.btncancel.Click += new System.EventHandler(this.btncancel_Click); + // + // lvfiles + // + this.lvfiles.Dock = System.Windows.Forms.DockStyle.Fill; + this.lvfiles.Location = new System.Drawing.Point(0, 0); + this.lvfiles.Name = "lvfiles"; + this.lvfiles.Size = new System.Drawing.Size(763, 348); + this.lvfiles.TabIndex = 0; + this.lvfiles.UseCompatibleStateImageBehavior = false; + this.lvfiles.SelectedIndexChanged += new System.EventHandler(this.lvfiles_SelectedIndexChanged); + // + // menuStrip1 + // + this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.newFolderToolStripMenuItem, + this.deleteToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(763, 24); + this.menuStrip1.TabIndex = 0; + this.menuStrip1.Text = "menuStrip1"; + // + // newFolderToolStripMenuItem + // + this.newFolderToolStripMenuItem.Name = "newFolderToolStripMenuItem"; + this.newFolderToolStripMenuItem.Size = new System.Drawing.Size(79, 20); + this.newFolderToolStripMenuItem.Text = "New Folder"; + this.newFolderToolStripMenuItem.Click += new System.EventHandler(this.newFolderToolStripMenuItem_Click); + // + // deleteToolStripMenuItem + // + this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem"; + this.deleteToolStripMenuItem.Size = new System.Drawing.Size(52, 20); + this.deleteToolStripMenuItem.Text = "Delete"; + this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click); + // + // toolStrip1 + // + this.toolStrip1.AutoSize = false; + this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.lbcurrentfolder}); + this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Table; + this.toolStrip1.Location = new System.Drawing.Point(0, 24); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.ShowItemToolTips = false; + this.toolStrip1.Size = new System.Drawing.Size(763, 18); + this.toolStrip1.Stretch = true; + this.toolStrip1.TabIndex = 1; + // + // lbcurrentfolder + // + this.lbcurrentfolder.Name = "lbcurrentfolder"; + this.lbcurrentfolder.Size = new System.Drawing.Size(12, 15); + this.lbcurrentfolder.Text = "/"; + // + // imgtypes + // + this.imgtypes.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgtypes.ImageStream"))); + this.imgtypes.TransparentColor = System.Drawing.Color.Transparent; + this.imgtypes.Images.SetKeyName(0, "application"); + this.imgtypes.Images.SetKeyName(1, "package"); + this.imgtypes.Images.SetKeyName(2, "none"); + this.imgtypes.Images.SetKeyName(3, "doc"); + this.imgtypes.Images.SetKeyName(4, "dir"); + this.imgtypes.Images.SetKeyName(5, "skin"); + // + // File_Skimmer + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(763, 413); + this.Controls.Add(this.toolStripContainer1); + this.Name = "File_Skimmer"; + this.Text = "File_Skimmer"; + this.Load += new System.EventHandler(this.File_Skimmer_Load); + this.toolStripContainer1.BottomToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.ContentPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false); + this.toolStripContainer1.TopToolStripPanel.PerformLayout(); + this.toolStripContainer1.ResumeLayout(false); + this.toolStripContainer1.PerformLayout(); + this.toolStrip2.ResumeLayout(false); + this.toolStrip2.PerformLayout(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ToolStripContainer toolStripContainer1; + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem newFolderToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ListView lvfiles; + private System.Windows.Forms.ToolStripLabel lbcurrentfolder; + private System.Windows.Forms.ImageList imgtypes; + private System.Windows.Forms.ToolStrip toolStrip2; + private System.Windows.Forms.ToolStripLabel toolStripLabel1; + private System.Windows.Forms.ToolStripTextBox txtfilename; + private System.Windows.Forms.ToolStripComboBox cbfiletypes; + private System.Windows.Forms.ToolStripButton btnperformaction; + private System.Windows.Forms.ToolStripButton btncancel; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/File Skimmer.cs b/source/WindowsFormsApplication1/Apps/File Skimmer.cs new file mode 100644 index 0000000..4ee8531 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/File Skimmer.cs @@ -0,0 +1,602 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class File_Skimmer : Form + { + /// <summary> + /// Opens a file in the proper program. + /// </summary> + /// <param name="filepath">Path to the file.</param> + public void OpenFile(string filepath) + { + bool success = true; + FileInfo finf = new FileInfo(filepath); + switch(finf.Extension) + { + case ".saa": + if(API.Upgrades["shiftnet"] == true) + { + API.LaunchMod(finf.FullName); + } + else + { + success = false; + } + break; + case ".txt": + if (API.Upgrades["textpadopen"] == true) + { + var pad = new TextPad(); + pad.txtuserinput.Text = File.ReadAllText(finf.FullName); + API.CreateForm(pad, "TextPad", Properties.Resources.iconTextPad); + } else + { + success = false; + } + break; + case ".pkg": + case ".stp": + if (API.Upgrades["shiftnet"] == true) + { + API.CreateInfoboxSession("Package Installation", "Would you like to install the package?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var result = API.GetInfoboxResult(); + if (result == "Yes") + { + try + { + var res = Package_Grabber.ExtractPackage(finf.FullName); + if (res == "fail") + { + throw new Exception("Michael was dumb and messed something up."); + } + else + { + Package_Grabber.InstallPackage(res + "\\"); + API.CreateInfoboxSession("Package Installer - Success", "The package has been installed successfully!", infobox.InfoboxMode.Info); + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + } + } + catch (Exception ex) + { + if (API.DeveloperMode == true) + { + API.CreateInfoboxSession("Package Installer - Error", ex.Message, infobox.InfoboxMode.Info); + } + else + { + API.CreateInfoboxSession("Package Installer - Error", "An error has occurred while installing the package.", infobox.InfoboxMode.Info); + } + } + } + }; + } + else { + success = false; + } + break; + case ".skn": + if(API.Upgrades["skinning"] == true) + { + var loader = new SkinLoader(); + API.CreateForm(loader, API.LoadedNames.SkinLoaderName, Properties.Resources.iconSkinLoader); + loader.LoadSkin(finf.FullName); + } + else + { + success = false; + } + break; + case ".spk": + if (API.Upgrades["skinning"] == true) + { + var loader = new SkinLoader(); + loader.LoadedPack = finf.FullName; + API.CreateForm(loader, API.LoadedNames.SkinLoaderName, Properties.Resources.iconSkinLoader); + loader.SetupPackUI(); + } + else + { + success = false; + } + break; + default: + success = false; + break; + } + //If we made it this far and nothing happened, tell the user. + if(success == false) + { + API.CreateInfoboxSession("File Skimmer", "File Skimmer cannot find a program to open this file.", infobox.InfoboxMode.Info); + } + } + + /// <summary> + /// The File Skimmer. + /// </summary> + public File_Skimmer() + { + MountMgr.Init(); + InitializeComponent(); + } + + public File_Skimmer(FileSkimmerMode mode, string filters) + { + InitializeComponent(); + Mode = mode; + Filters = filters.Split(';'); + } + + public string CurrentFolder = Paths.SaveRoot; + + private void File_Skimmer_Load(object sender, EventArgs e) + { + SetupUI(); + ListFiles(); + lvfiles.DoubleClick += (object s, EventArgs a) => + { + if(lvfiles.SelectedItems.Count > 0) + { + var item = lvfiles.SelectedItems[0]; + string tag = (string)item.Tag; + if(Directory.Exists(tag)) + { + txtfilename.Text = new DirectoryInfo(tag).Name; + CurrentFolder = tag; + ListFiles(); + + } else + { + if(File.Exists(tag)) + { + if(Mode == FileSkimmerMode.Open) + { + FileInfo finf = new FileInfo(tag); + txtfilename.Text = finf.Name.Replace(finf.Extension, ""); + btnperformaction_Click(s, a); + } + else if(Mode == FileSkimmerMode.Default) + { + OpenFile(tag); + } + } else + { + if(tag == "_uponedir") + { + if (lbcurrentfolder.Text != "/") + { + if (MountPoint != null && lbcurrentfolder.Text == MountPoint.Replace("\\", "/")) + { + CurrentFolder = Paths.SaveRoot; + ListFiles(); + + } + else + { + CurrentFolder = Directory.GetParent(CurrentFolder).FullName; + ListFiles(); + } + } else + { + API.CreateInfoboxSession("Can't read directory", "File Skimmer is not able to read the requested directory as it is not formatted with the ShiftFS file system.", infobox.InfoboxMode.Info); + } + } + else if(tag.StartsWith("drv:")) + { + string drivepath = tag.Remove(0, 4); + CurrentFolder = drivepath; + MountPoint = drivepath; + ListFiles(); + } + } + } + } + }; + + txtfilename.KeyDown += (object s, KeyEventArgs a) => + { + if (a.KeyCode == Keys.Enter) + { + a.SuppressKeyPress = true; + btnperformaction_Click(s, (EventArgs)a); + } + }; + } + + string MountPoint = null; + + /// <summary> + /// Lists all the files in the current folder. + /// </summary> + public void ListFiles() + { + MountMgr.Init(); + SetupImages(); + txtfilename.Text = ""; + //SetupUI(); + newFolderToolStripMenuItem.Visible = API.Upgrades["fsnewfolder"]; + deleteToolStripMenuItem.Visible = API.Upgrades["fsdelete"]; + if(newFolderToolStripMenuItem.Visible == false && deleteToolStripMenuItem.Visible == false) + { + menuStrip1.Hide(); + } else + { + menuStrip1.Show(); + } + lbcurrentfolder.Text = CurrentFolder.Replace(Paths.SaveRoot, "/").Replace("\\", "/").Replace("//", "/"); + lvfiles.Items.Clear(); + lvfiles.LargeImageList = imgtypes; + ListViewItem upone = new ListViewItem(); + upone.Text = "Up One Level"; + upone.Tag = "_uponedir"; + upone.ImageKey = "directory"; + lvfiles.Items.Add(upone); + if(CurrentFolder == Paths.SaveRoot) + { + foreach(var drive in MountMgr.links) + { + var dinf = new DirectoryInfo(drive.Key); + var item = new ListViewItem(); + item.Text = drive.Value; + item.Tag = "drv:" + dinf.FullName; + lvfiles.Items.Add(item); + item.ImageKey = "directory"; + } + } + foreach (string dir in Directory.GetDirectories(CurrentFolder)) + { + var dirinf = new DirectoryInfo(dir); + ListViewItem lvitem = new ListViewItem(); + lvitem.Text = dirinf.Name; + lvitem.Tag = dirinf.FullName; + lvitem.ImageKey = "directory"; + if (!dirinf.Name.StartsWith("_")) + { + lvfiles.Items.Add(lvitem); + } + else { + if (API.DeveloperMode == true) + { + lvfiles.Items.Add(lvitem); + } + } + } + foreach (string file in Directory.GetFiles(CurrentFolder)) + { + var dirinf = new FileInfo(file); + ListViewItem lvitem = new ListViewItem(); + lvitem.Text = dirinf.Name; + lvitem.Tag = dirinf.FullName; + lvitem.ImageKey = GetFileType(dirinf.Extension); + if (!dirinf.Name.StartsWith("_")) + { + AddItem(lvitem); + } + else { + if (API.DeveloperMode == true) + { + AddItem(lvitem); + } + } + } + + } + + public FileSkimmerMode Mode = FileSkimmerMode.Default; + public string FileName = ""; + private string[] Filters = null; + + /// <summary> + /// Sets up the user interface. + /// </summary> + private void SetupUI() + { + switch(Mode) + { + case FileSkimmerMode.Default: + Filters = null; + this.toolStrip2.Hide(); + break; + case FileSkimmerMode.Open: + this.toolStrip2.Show(); + this.btnperformaction.Text = "Open"; + cbfiletypes.Items.Clear(); + foreach (string filter in Filters) + { + cbfiletypes.Items.Add(filter); + } + selectedFilter = Filters[0]; + cbfiletypes.Text = Filters[0]; + break; + case FileSkimmerMode.Save: + this.toolStrip2.Show(); + this.btnperformaction.Text = "Save"; + cbfiletypes.Items.Clear(); + foreach (string filter in Filters) + { + cbfiletypes.Items.Add(filter); + } + selectedFilter = Filters[0]; + cbfiletypes.Text = Filters[0]; + break; + case FileSkimmerMode.OpenFolder: + this.toolStrip2.Show(); + this.btnperformaction.Text = "Open"; + cbfiletypes.Visible = false; + selectedFilter = "dir"; + break; + } + } + + /// <summary> + /// UI mode. + /// </summary> + public enum FileSkimmerMode + { + Default, + Open, + Save, + OpenFolder + } + + /// <summary> + /// Adds an item to the file list. + /// </summary> + /// <param name="item">Item to add.</param> + private void AddItem(ListViewItem item) + { + if (Mode == FileSkimmerMode.Default) + { + lvfiles.Items.Add(item); + } else if(Mode == FileSkimmerMode.OpenFolder) { + if (Directory.Exists(item.Tag.ToString())) + { + lvfiles.Items.Add(item); + } + } else + { + if (item.Text.ToLower().EndsWith(selectedFilter.ToLower())) + { + lvfiles.Items.Add(item); + } + } + } + + /// <summary> + /// Adds appropriate icons from icon registry to display files. + /// </summary> + public void SetupImages() + { + imgtypes.Images.Clear(); + imgtypes.Images.Add("application", API.GetIcon("SAAFile")); + imgtypes.Images.Add("directory", API.GetIcon("Folder")); + imgtypes.Images.Add("doc", API.GetIcon("TextFile")); + imgtypes.Images.Add("skin", API.GetIcon("SkinFile")); + imgtypes.Images.Add("package", API.GetIcon("SetupPackage")); + imgtypes.Images.Add("none", API.GetIcon("UnrecognizedFile")); + } + + /// <summary> + /// Returns proper file ID based on extension + /// </summary> + /// <param name="extension">Extension to test.</param> + /// <returns>The File ID.</returns> + public string GetFileType(string extension) + { + SetupImages(); + switch(extension) + { + case ".owd": + case ".doc": + case ".docx": + case ".txt": + return "doc"; + case ".exe": + case ".saa": + return "application"; + case ".stp": + case ".pkg": + case ".mod": + return "package"; + case ".skn": + case ".spk": + return "skin"; + default: + return "none"; + } + } + + private void newFolderToolStripMenuItem_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Create New Folder", "Please enter the name of the folder.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string dname = API.GetInfoboxResult(); + if (dname != "" && dname != "Cancelled") + { + string dirsepchar = ""; + switch (OSInfo.GetPlatformID()) + { + case "microsoft": + dirsepchar = "\\"; + break; + default: + dirsepchar = "/"; + break; + } + if (dname.Contains("/") || dname.Contains("\\")) + { + API.CreateInfoboxSession("Error", "Directories cannot have '\\' or '/' in their names!", infobox.InfoboxMode.Info); + } + else { + string fullname = CurrentFolder + dirsepchar + dname; + try + { + if (!Directory.Exists(fullname)) + { + Directory.CreateDirectory(fullname); + } + } + catch + { + API.CreateInfoboxSession("Error", "File Skimmer could not create the directory.", infobox.InfoboxMode.Info); + } + } + } + ListFiles(); + }; + } + + private void deleteToolStripMenuItem_Click(object sender, EventArgs e) + { + string res = "nothing"; + if(lvfiles.SelectedItems.Count > 0) + { + var lvitem = lvfiles.SelectedItems[0]; + string lvtag = (string)lvitem.Tag; + switch(lvtag) + { + + case "_upOne": + res = "up"; + break; + default: + if(Directory.Exists(lvtag)) + { + res = "dir"; + } else + { + if(File.Exists(lvtag)) + { + res = "file"; + } + } + break; + } + switch(res) + { + case "file": + API.CreateInfoboxSession("Delete File", "Are you sure you want to delete this file?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + if(API.GetInfoboxResult() == "Yes") + { + File.Delete(lvtag); + ListFiles(); + } + }; + break; + case "dir": + var fname = lvtag; + if(CheckTag(fname) == true) + { + API.CreateInfoboxSession("Permission denied", "You cannot delete this directory as you are denied permission.", infobox.InfoboxMode.Info); + } + else + { + API.CreateInfoboxSession("Delete Folder", "Are you sure you want to delete this folder? Everything inside it will be permanently lost!", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + if (API.GetInfoboxResult() == "Yes") + { + Directory.Delete(lvtag, true); + ListFiles(); + } + }; + } + break; + case "up": + API.CreateInfoboxSession("File Skimmer", "You cannot delete the 'Up One Level' file because it is not a real file.", infobox.InfoboxMode.Info); + break; + } + } + } + + /// <summary> + /// No idea what this does but it seems to be needed so don't touch it. + /// </summary> + /// <param name="fullpath">Path to a file.</param> + /// <returns>Oh NOW I know what this does. It returns whether this file can be deleted or if it's a vital save file.</returns> + private bool CheckTag(string fullpath) + { + var correct = fullpath + OSInfo.DirectorySeparator; + if (correct == Paths.SystemDir || correct == Paths.Applications || correct == Paths.Skins || correct == Paths.ToBeLoaded || correct == Paths.LoadedSkin || correct == Paths.SoftwareData || correct == Paths.Drivers || correct == Paths.Mod_AppLauncherEntries || correct == Paths.Mod_Temp) + { + return true; + } + else + { + return false; + } + } + + private string selectedFilter = null; + + private void cbfiletypes_SelectedIndexChanged(object sender, EventArgs e) + { + selectedFilter = (string)cbfiletypes.SelectedItem; + ListFiles(); + } + + private void btnperformaction_Click(object sender, EventArgs e) + { + if (txtfilename.Text != "") + { + string dirsepchar = "\\"; + switch (OSInfo.GetPlatformID()) + { + case "microsoft": + dirsepchar = "\\"; + break; + default: + dirsepchar = "/"; + break; + } + string fullPath = null; + if (Mode == FileSkimmerMode.OpenFolder) + { + fullPath = CurrentFolder + dirsepchar + txtfilename.Text; + } + else { + fullPath = CurrentFolder + dirsepchar + txtfilename.Text.Replace(selectedFilter, "") + selectedFilter; + } + FileName = fullPath; + this.Close(); + } + } + + private void btncancel_Click(object sender, EventArgs e) + { + FileName = ""; + this.Close(); + } + + private void lvfiles_SelectedIndexChanged(object sender, EventArgs e) + { + try + { + var itm = lvfiles.SelectedItems[0]; + if(File.Exists(itm.Tag.ToString())) + { + txtfilename.Text = itm.Text; + } + } + catch + { + + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/File Skimmer.resx b/source/WindowsFormsApplication1/Apps/File Skimmer.resx new file mode 100644 index 0000000..2d817a4 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/File Skimmer.resx @@ -0,0 +1,338 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>339, 17</value> + </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="btnperformaction.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== +</value> + </data> + <data name="btncancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== +</value> + </data> + <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>132, 17</value> + </metadata> + <metadata name="imgtypes.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>237, 17</value> + </metadata> + <data name="imgtypes.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64"> + <value> + AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w + LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 + ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAm + JwAAAk1TRnQBSQFMAgEBBgEAAVABAAFQAQABQAEAAUABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo + BAABAQIAAYADAAEBAQABCAYAAYAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA + AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5 + AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA + AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm + AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM + AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA + ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz + AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ + AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM + AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA + AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA + AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ + AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/ + AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA + AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm + ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ + Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz + AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA + AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM + AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM + ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM + Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA + AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM + AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ + AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz + AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm + AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw + AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/wEAQPTAAAH/Afc87AEH + AfTAAAH/ARQBDjoQAQ4B7AH0wAAB/wIUOuwBEAHsAfTAAAH/AhQ67AEQAewB9MAAAf8CFDrsARAB7AH0 + wAAB/wIUOuwBEAHsAfTAAAH/AhQ67AEQAewB9MAAAf8CFDrsARAB7AH0wAAB/wIUOuwBEAHsAfQ/9wHw + gAAB/wIUOuwBEAHsAfQBAAEQOxUBQwEOAeyAAAH/AhQ67AEQAewB9AEAAe088QEUAeyAAAH/AhQ67AEQ + AewB9AEAAe87/wH0ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AfI1vAHwAfQB/wH0ARIB7IAAAf8CFDrs + ARAB7AH0AQAB7wL/Afg1EQFDAQcB/wH0ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW01AAEOAe8B/wH0 + ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAEOCBEBDwEAAQ8IEQIOARAHEQEQAQ4BAAEOAe8B/wH0 + ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAESCLwB7AEAAewIvAFtARAB7we8AQcBQwEAAQ4B7wH/ + AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0B9AHvBewB8AHvAQ4BkgHxBewB9wH0AfgBQwHw + AQcF7AEHAfIBFAEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0B8wEUBQAB9wHv + AQ4BkgHvAQ4EAAEVAfEB6wFDAfAB+AUAAW0B8gEUAQABDgHvAf8B9AESAeyAAAH/AhQ67AEQAewB9AEA + Ae8C/wFtFAABbQHzARQFAAH3Ae8BDgGSAe8BDgQAARUB8QHrAUMB8AH4BQABbQHyARQBAAEOAe8B/wH0 + ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAFtAfMBFAUAAfcB7wEOAZIB7wEOBAABFQHxAesBQwHw + AfgFAAFtAfIBFAEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0B8wEUBQAB9wHv + AQ4BkgHvAQ4EAAEVAfEB6wFDAfAB+AUAAW0B8gEUAQABDgHvAf8B9AESAeyAAAH/AhQ67AEQAewB9AEA + Ae8C/wFtFAABbQHzARQFAAH3Ae8BDgGSAe8BDgQAARUB8QHrAUMB8AH4BQABbQHyARQBAAEOAe8B/wH0 + ARIB7IAAAf8CFDrsARAB7AH0AQAB7wL/AW0UAAFtAfQB7QVtAbwB7wEOAZIB8AHrBG0B7AHzAesBQwHw + Ae8FbQHvAfIBFAEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbRQAAW0I8wH3AQ4B7Qjz + AesBEQG8B/MB8QEVAQABDgHvAf8B9AESAeyAAAH/AhQ67AEQAewB9AEAAe8C/wFtFAABDwETBhQBEwFD + AQABEQETBhQBEwEQAQ4BFQETBxQBDgEAAQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbTUA + AQ4B7wH/AfQBEgHsgAAB/wIUOuwBEAHsAfQBAAHvAv8BbTYOAQcB/wH0ARIB7IAAAf8CFDrsARAB7AH0 + AQAB7wL/Abw27wHzAf8B9AESAeyAAAH/ARQBQzptAQ8B7AH0AQAB7zv/AfQBEgHsgAAB/wEUPAAB7AH0 + AQAB7zv/AfQBEgHsgAAB/wG8AW0BDxNtARMBAAHsJAcB8QH0AQAB7zv/AfQBEgHsgAAC/wHsARAS7AFt + ARIB7AHxJf8B9AEAAe87/wH0ARIB7IAAAv8B7AEQEuwCFCf/AfQBAAHvO/8B9AESAeyAAAL/AewBEBLs + AhQn/wH0AQAB7wL/Abw27wHzAf8B9AESAeyAAAL/AewBEBHsARUB6wG8J/8B9AEAAe8C/wHvNuwB8QH/ + AfQBEgHsgAAC/wHsARAP7AHrARQB6wEHKP8B9AEAAe8C/wHvNuwB8QH/AfQBEgHsgAAC/wHsARAO7AHr + AeoBFAG8Kf8B9AEAAe8C/wHvFOwBbQhDARMB+AESCEMB6gHrARQHQwEVAW0C7AHxAf8B9AESAeyAAAL/ + AewBEA7sAhQr/wH0AQAB7wL/Ae8U7AETCAABEQH4AUMIAAEUAW0BDgcAAQ4BbQLsAfEB/wH0ARIB7IAA + Av8B8QHtDhAB6wG8K/8B9AEAAe8C/wHvFOwBEwgAAREB+AFDCAABFAFtAQ4HAAEOAW0C7AHxAf8B9AES + AeyAAAP/AfEO7AEHLP8B9AEAAe8C/wHvFOwBEwgAAREB+AFDCAABFAFtAQ4HAAEOAW0C7AHxAf8B9AES + AeyAAD//AfQBAAHvAv8B7xTsARMIAAERAfgBQwgAARQBbQEOBwABDgFtAuwB8QH/AfQBEgHsgAA//wH0 + AQAB7wL/Ae8U7AETCAABEQH4AUMIAAEUAW0BDgcAAQ4BbQLsAfEB/wH0ARIB7IAAP/8B9AEAAe8C/wHv + FOwBEwgAAREB+AFDCAABFAFtAQ4HAAEOAW0C7AHxAf8B9AESAeyAAD//AfQBAAHvAv8B7xTsARMIAAER + AfgBQwgAARQBbQEOBwABDgFtAuwB8QH/AfQBEgHsgAA//wH0AQAB7wL/Ae8U7AETCAABEQH4AUMIAAEU + AW0BDgcAAQ4BbQLsAfEB/wH0ARIB7IAAP/8B9AEAAe8C/wHvFOwBbQgUARIB+AHqCBQBbQHrARMIFAHr + AuwB8QH/AfQBEgHsgAA//wH0AQAB7wL/Ae827AHxAf8B9AESAeyAAD//AfQBAAHvAv8B7zbsAfEB/wH0 + ARIB7IAAP/8B9AEAAe8C/wHwNgcB8wH/AfQBEgHsgAA//wH0AQAB7zv/AfQBEgHsgAA//wH0AQAB7zv/ + AfQBEgHsgAA//wH0AQAB6jvtAewBEQHsgAA//wH0PxEBkoAAP/8B9D/yAfSAAD//AfTAAD//AfTAAD// + AfTAAD//AfTAAD//AfTAAD//AfTAAD//AfTAAD//AfT/AEEAgPSAAAH/Afc87AEHAfQB/wH3POwBBwH0 + gAAB/wEUARA6FAEOAewB9AH/ARQBEDoUAQ4B7AH0gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0 + gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0 + gAAB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0AgAB/znzAfQFAAH/OfMB9AMAAf8BFAHsOv8BFAHs + AfQB/wEUAewc/wL2A/8B9hj/ARQB7AH0AgAB8wGSOO0BvAUAAfMBkjjtAbwDAAH/ARQB7Dr/ARQB7AH0 + Af8BFAHsGf8J9gb/AbwPFAHrAf8BFAHsAfQCAAHzAewB7zYHAe0BBwUAAfMB7AHvNgcB7QEHAwAB/wEU + Aew6/wEUAewB9AH/ARQB7Bj/CvYG/wHxD+wB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8 + Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsFv8M9hj/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUA + AfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsFv8M9hj/ARQB7AH0AgAB8wHsAbw1/wH0 + AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsEv8K9gH/BfYB9AT2Af8BvA8U + AesB/wEUAewB9AIAAfMB7AG8Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAew6/wEUAewB9AH/ + ARQB7BP/CvYF/wL2Av8C9gHxD+wB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3 + AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsE/8J9gH0Cf8B9AH2Ev8BFAHsAfQCAAHzAewBvDX/AfQB9wEH + BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsOv8BFAHsAfQB/wEUAewS/wT2Ev8B9hH/ARQB7AH0AgAB8wHs + Abw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ARQB7AH0Af8BFAHsE/8D9gH0I/8BFAHs + AfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsOv8BFAHsAfQB/wEUAewB8RXs + Ausg7AH3Af8BFAHsAfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsOv8BFAHs + AfQB/wEUAewBvBMUAxUhFAHrAf8BFAHsAfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMA + Af8BFAHsGf8B9iD/ARQB7AH0Af8BFAHsFP8B9gEbAfYd/wH2Bf8BFAHsAfQCAAHzAewBvDX/AfQB9wEH + BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsGP8B8AHrAeoB7wH2Hf8BFAHsAfQB/wEUAewV/wH2JP8BFAHs + AfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsF/8B9AHvARABDwHrAfMd/wEU + AewB9AH/ARQB7AHxN+wB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ + ARQB7Bf/AfIBkgIOAW0B8R3/ARQB7AH0Af8BFAHsAbw3FAHrAf8BFAHsAfQCAAHzAewBvDX/AfQB9wEH + BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsF/8B9AEHARQBQwHtAfYd/wEUAewB9AH/ARQB7BL/AfYn/wEU + AewB9AIAAfMB7AG8Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAewY/wH0ArwB8h7/ARQB7AH0 + Af8BFAHsMv8B9Af/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Dr/ + ARQB7AH0Af8BFAHsAfEx7ALrBOwB9wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3 + AQcDAAH/ARQB7Bj/AfMBBwHwAfMe/wEUAewB9AH/ARQB7AG8KRQCFQYUAUMBFQQUAesB/wEUAewB9AIA + AfMB7AG8Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAewX/wH0Ae8BAAESAQce/wEUAewB9AH/ + ARQB7Cr/AfMB9Ab/AfAB8gb/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ + ARQB7Bf/AfIBkgEAAeoBBx7/ARQB7AH0Af8BFAHsMv8D9AX/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUA + AfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Bf/AfIB7QEAARIBBx7/ARQB7AH0Af8BFAHsAfEy7ALrA+wB9wH/ + ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Bf/AfMB9wEOARQB9wH0 + Hf8BFAHsAfQB/wEUAewBvDIUAhUDFAHrAf8BFAHsAfQCAAHzAewBvDX/AfQB9wEHBQAB8wHsAbw1/wH0 + AfcBBwMAAf8BFAHsGP8BvAEUAQ4BEgEHHf8BFAHsAfQB/wEUAewz/wH0AfMF/wEUAewB9AIAAfMB7AG8 + Nf8B9AH3AQcFAAHzAewBvDX/AfQB9wEHAwAB/wEUAewY/wHzAQcBEwERARMBBwHzG/8BFAHsAfQB/wEU + Aewz/wH0ARsC8wP/ARQB7AH0AgAB8wHsAbw1/wH0AfcBBwUAAfMB7AG8Nf8B9AH3AQcDAAH/ARQB7Bn/ + AfQB9wESAREBEgHvAfQa/wEUAewB9AH/ARQB7AHxMuwF6wH3Af8BFAHsAfQCAAHzAewBvDX/AfQB9wEH + BQAB8wHsAbw1/wH0AfcBBwMAAf8BFAHsGv8B9gHvARIBAAFtAQca/wEUAewB9AH/ARQB7AG8NRQCFQHr + Af8BFAHsAfQCAAHzAewBvDX/AfQB9wGSAgcB8gIAAfMB7AG8AfMBvAEHAu8CvALvAQcB9AHxAQcB9AH/ + AfME7wHwAf8BvAHwHf8B9AH3AZICBwHyAf8BFAHsHP8BBwEAASIBcwHzGf8BFAHsAfQB/wEUAew2/wHz + AfQC/wEUAewB9AIAAfMB7AG8Nf8B9AH3AewB9wHsAQcCAAHzAewBvAHzAQcB7wGSAewC7wHsAZIBBwH0 + AQcBkgHzAfQB8ALtAfcB7AHvAfQBkgH3AfIB9Bv/AfQB9wHsAfcB7AEHAf8BFAHsHP8B8QHsAREBEgHv + Gf8BFAHsAfQB/wEUAew6/wEUAewB9AIAAfMB7AG8Nf8B9AH3Ae8B9AH3AQcCAAHzAewBvAL/AfIBBwHs + AfcCBwHxAv8BBwGSAfMB8gIHAfAB8wGSAe8B9AHsAesB7wHyG/8B9AH3Ae8B9AH3AQcB/wEUAewU/wH0 + AfIB9AX/AfMB9wERARQB9xn/ARQB7AH0Af8BFAHsAfE37AH3Af8BFAHsAfQCAAHzAewBvDX/AfQB9wHv + Af8B7wEHAgAB8wHsAbwB9AHwAQcB7wMHAe8BvAHzAf8BBwGSAfMB8gIHAfEB9AHsAZIB9ALtAgcB8Br/ + AfQB9wHvAf8B7wEHAf8BFAHsFP8B8wHvAbwB8wT/AfEB7AEQARQB7xn/ARQB7AH0Af8BFAHsAbwRFAIV + JBQB6wH/ARQB7AH0AgAB8wHsAbw1/wH0AfcB7wH/Ae8BBwIAAfMB7AG8AfIB7wGSAe8B8QHwAQcBkgHv + AfAB8wEHAe0C8QIHAfEB8wHrAe0B/wL3AfAB7wEHGv8B9AH3Ae8B/wHvAQcB/wEUAewU/wHxAewB6wEH + A/8B9AEHARQBDgETAe8Z/wEUAewB9AH/ARQB7BL/AfMB9Cb/ARQB7AH0AgAB8wHsAbw1/wH0AfcB7wH/ + Ae8BBwIAAfMB7AG8AfEB7QHvBAcBkgHvAQcB8AH3AewB7wEHAe8BBwHxAfMB6wHtAfQB7QHsAQcB9wEH + Gv8B9AH3Ae8B/wHvAQcB/wEUAewU/wHyAZIBFQFDARMC6wHqARQBDgEPAewBGxn/ARQB7AH0Af8BFAHs + Ov8BFAHsAfQCAAHzAewBvDX/AfQB9wHvAf8B7wEHAgAB8wHsAbwB9AG8AgcBvALwAe8CBwG8Ae8B9wIH + AbwB8AHzAfQB7wEHAf8BBwHvAQcBvAHyGv8B9AH3Ae8B/wHvAQcB/wEUAewU/wH0AbwB7AETAREDEAER + ARUB7AG8Gv8BFAHsAfQB/wEUAewB8TfsAfcB/wEUAewB9AIAAfMB7AG8Nf8B9AH3Ae8B/wHvAQcCAAHz + AewBvAL/AfIB8AHxAfIB8wPwAfED8AHxAfIB8wH0Af8B8gHzAf8B8QHwAfEB9Bv/AfQB9wHvAf8B7wEH + Af8BFAHsFv8B8QHvAesCFAETAW0B7QHxG/8BFAHsAfQB/wEUAewBvDIUAhUDFAHrAf8BFAHsAfQCAAHz + AewBvDX/AfQB9wHvAf8B7wEHAgAB8wHsAbw1/wH0AfcB7wH/Ae8BBwH/ARQB7Dr/ARQB7AH0Af8BFAHs + M/8B9AHzBf8BFAHsAfQCAAHzAewBvDX/AfQB9wHvAf8B7wEHAgAB8wHsAbw1/wH0AfcB7wH/Ae8BBwH/ + ARQB7Dr/ARQB7AH0Af8BFAHsMv8C9Ab/ARQB7AH0AgAB8wHsAQc28gGSAe8B/wHvAQcCAAHzAewBBzby + AZIB7wH/Ae8BBwH/ARQB7Dr/ARQB7AH0Af8BFAHsAfEx7ALrBOwB9wH/ARQB7AH0AgAB8wLsNu0B7AHv + Af8B7wEHAgAB8wLsNu0B7AHvAf8B7wEHAf8BFAHsOv8BFAHsAfQB/wEUAewBvCYUBBUNFAHrAf8BFAHs + AfQCAAHzK+wB6wETARQBEwHrAW0CFAHqAewBEgIUAW0B7wH/Ae8BBwIAAfMr7AHrARMBFAETAesBbQIU + AeoB7AESAhQBbQHvAf8B7wEHAf8BFAHsOv8BFAHsAfQB/wEUAewn/wH0AhsB9g//ARQB7AH0AgAB8yvs + AW0BDgEAAQ4BbQEUAgABFQHrARABAAEOAeoB7wH/Ae8BBwIAAfMr7AFtAQ4BAAEOAW0BFAIAARUB6wEQ + AQABDgHqAe8B/wHvAQcB/wEUAew6/wEUAewB9AH/ARQB7Cj/AvYQ/wEUAewB9AIAAfMr7AFtAQ4BAAEO + AW0BFAIAARUB6wEQAQABDgHqAe8B/wHvAQcCAAHzK+wBbQEOAQABDgFtARQCAAEVAesBEAEAAQ4B6gHv + Af8B7wEHAf8BFAHsOv8BFAHsAfQB/wEUAewB8TfsAfcB/wEUAewB9AIAAfMr7AHrARQBFQEUAesBbQIV + AeoB7AETARUBFAFtAe8B/wHvAQcCAAHzK+wB6wEUARUBFAHrAW0CFQHqAewBEwEVARQBbQHvAf8B7wEH + Af8BFAHsOv8BFAHsAfQB/wEUAewBvDcUAesB/wEUAewB9AIAAfMFkgHtAuwx7QEHAf8B7wEHAgAB8wWS + Ae0C7DHtAQcB/wHvAQcB/wEUAew6/wEUAewB9AH/ARQB7Dr/ARQB7AH0AgAB/wX0AfEB7AHvMfIB8wH/ + Ae8BBwIAAf8F9AHxAewB7zHyAfMB/wHvAQcB/wEUAeww/wG8CRQBDgHsAfQB/wEUAeww/wG8CRQBDgHs + AfQIAAHzAe0BBzP/Ae8BBwgAAfMB7QEHM/8B7wEHAf8BFAHsMP8BBwEAAW0H7AEQAewB9AH/ARQB7AHx + LuwCBwEAAW0H7AEQAewB9AgAAfMB7QEHM/8B7wEHCAAB8wHtAQcz/wHvAQcB/wEUAeww/wEHAQABBwX/ + AfMBBwFtAfcB9AH/ARQB7AG8LhQB9wEHAQABBwX/AfMBBwFtAfcB9AgAAfMB7QEHM/8B7wEHCAAB8wHt + AQcz/wHvAQcB/wEUAeww/wEHAQABBwX/AQcBAAEHAf8B9AH/ARQB7DD/AQcBAAEHBf8BBwEAAQcB/wH0 + CAAB8wHtAe8zvAGSAQcIAAHzAe0B7zO8AZIBBwH/ARQB7DD/AQcBAAEHBP8B9wFtAQcB8wH/AfQB/wEU + Aeww/wEHAQABBwT/AfcBbQEHAfMB/wH0CAAB8wHtNewBBwgAAfMB7TXsAQcB/wEUAeww/wEHAQABBwP/ + AfcB7AH3A/8B9AH/ARQB7AHxLuwCBwEAAQcD/wH3AewB9wP/AfQIAAHzAe0n7AHrAUMBEAFDAW0B6gIQ + ARMB7AEVAhABbQEHCAAB8wHtJ+wB6wFDARABQwFtAeoCEAETAewBFQIQAW0BBwH/ARQB7DD/AQcBAAEH + Af8B8wEHAW0B9wT/AfQB/wEUAewBvC4UAfcBBwEAAQcB/wHzAQcBbQH3BP8B9AgAAfMB7SfsAW0BDwEA + AQ4BbQETAgABQwHsARACAAHqAQcIAAHzAe0n7AFtAQ8BAAEOAW0BEwIAAUMB7AEQAgAB6gEHAf8BFAHs + MP8BBwEAAQcB/wEHAQABBwX/AfQB/wEUAeww/wEHAQABBwH/AQcBAAEHBf8B9AgAAfMB7SfsAW0BDwEA + AQ4BbQETAgABQwHsARABAAEOAeoBBwgAAfMB7SfsAW0BDwEAAQ4BbQETAgABQwHsARABAAEOAeoBBwH/ + ARQB7DD/AQcBAAEHAfcBbQEHAfMF/wH0Af8BFAHsMP8BBwEAAQcB9wFtAQcB8wX/AfQIAAHzAe0o7AFt + AuoB6wFtAuoBbQHsAW0C6gHrAQcIAAHzAe0o7AFtAuoB6wFtAuoBbQHsAW0C6gHrAQcB/wIUMOwBbQEA + AW0B7AH3B/8B9AH/AhQw7AFtAQABbQHsAfcH/wH0CAAB9DYHAfEIAAH0NgcB8QH/Aes0FAH3CP8B9AH/ + Aes0FAH3CP8B9IAAP/8B9D//AfQBQgFNAT4HAAE+AwABKAQAAQECAAGAAwABAQEAAQEGAAEQFgAD/wkA + CP8YAAj/GAAI/xgACP8YAAj/GAAI/xgACP8YAAj/GAAI//8A/wD/AP8A/wD9AAj/GAAI/xgACP8YAAj/ + GAAI/xgACP8YAAj/GAAI/xAAEP8QABD/EAAQ/xAAEP8QABD/EAAQ/xAAEP8QAAHABgABBwHABgABBxAA + AcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYA + AQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHA + BgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEH + EAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHA + BgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEH + AcAGAAEHEAABwAYAAQcBwAYAAQcQAAHABgABBwHABgABBxAAAcAGAAEHAcAGAAEHEAABwAYAAQcBwAYA + AQcQAAHABgABBwHABgABBxAAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAcAHAAHAFwABwAcAAcAXAAHA + BwABwBcAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAcAHAAHA + FwABwAcAAcAXAAHABwABwBcAAcAHAAHAFwABwAcAAcAXAAHABwABwBcAAf8HAAH/FwAB/wcAAf8XAAH/ + BwAB/xcAAf8HAAH/FwAB/wcAAf8XAAH/BwAB/xcAAf8HAAH/FwAB/wcAAf8XAAH/BwAB/xcAAf8HAAH/ + FwAQ/xAACw== +</value> + </data> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/HoloChat.Designer.cs b/source/WindowsFormsApplication1/Apps/HoloChat.Designer.cs new file mode 100644 index 0000000..6f040ec --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/HoloChat.Designer.cs @@ -0,0 +1,254 @@ +namespace ShiftOS +{ + partial class HoloChat + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HoloChat)); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlintro = new System.Windows.Forms.Panel(); + this.flintrobuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnconnect = new System.Windows.Forms.Button(); + this.btnrefresh = new System.Windows.Forms.Button(); + this.lbrooms = new System.Windows.Forms.ListBox(); + this.label1 = new System.Windows.Forms.Label(); + this.lblintro = new System.Windows.Forms.Label(); + this.lblheader = new System.Windows.Forms.Label(); + this.txtchat = new System.Windows.Forms.RichTextBox(); + this.txtsend = new System.Windows.Forms.TextBox(); + this.pnlusers = new System.Windows.Forms.Panel(); + this.lbusers = new System.Windows.Forms.ListBox(); + this.lbtopic = new System.Windows.Forms.Label(); + this.tmrui = new System.Windows.Forms.Timer(this.components); + this.panel1.SuspendLayout(); + this.pnlintro.SuspendLayout(); + this.flintrobuttons.SuspendLayout(); + this.pnlusers.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.pnlintro); + this.panel1.Controls.Add(this.txtchat); + this.panel1.Controls.Add(this.txtsend); + this.panel1.Controls.Add(this.pnlusers); + this.panel1.Controls.Add(this.lbtopic); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.ForeColor = System.Drawing.Color.Black; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(772, 431); + this.panel1.TabIndex = 0; + // + // pnlintro + // + this.pnlintro.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.pnlintro.Controls.Add(this.flintrobuttons); + this.pnlintro.Controls.Add(this.lbrooms); + this.pnlintro.Controls.Add(this.label1); + this.pnlintro.Controls.Add(this.lblintro); + this.pnlintro.Controls.Add(this.lblheader); + this.pnlintro.Location = new System.Drawing.Point(36, 35); + this.pnlintro.Name = "pnlintro"; + this.pnlintro.Size = new System.Drawing.Size(706, 341); + this.pnlintro.TabIndex = 3; + // + // flintrobuttons + // + this.flintrobuttons.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.flintrobuttons.Controls.Add(this.btnconnect); + this.flintrobuttons.Controls.Add(this.btnrefresh); + this.flintrobuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.flintrobuttons.Location = new System.Drawing.Point(337, 284); + this.flintrobuttons.Name = "flintrobuttons"; + this.flintrobuttons.Size = new System.Drawing.Size(350, 42); + this.flintrobuttons.TabIndex = 4; + // + // btnconnect + // + this.btnconnect.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnconnect.Location = new System.Drawing.Point(272, 3); + this.btnconnect.Name = "btnconnect"; + this.btnconnect.Size = new System.Drawing.Size(75, 33); + this.btnconnect.TabIndex = 0; + this.btnconnect.Text = "Connect"; + this.btnconnect.UseVisualStyleBackColor = true; + this.btnconnect.Click += new System.EventHandler(this.btnconnect_Click); + // + // btnrefresh + // + this.btnrefresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnrefresh.Location = new System.Drawing.Point(191, 3); + this.btnrefresh.Name = "btnrefresh"; + this.btnrefresh.Size = new System.Drawing.Size(75, 33); + this.btnrefresh.TabIndex = 1; + this.btnrefresh.Text = "Refresh"; + this.btnrefresh.UseVisualStyleBackColor = true; + this.btnrefresh.Click += new System.EventHandler(this.btnrefresh_Click); + // + // lbrooms + // + this.lbrooms.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbrooms.FormattingEnabled = true; + this.lbrooms.Location = new System.Drawing.Point(337, 75); + this.lbrooms.Name = "lbrooms"; + this.lbrooms.Size = new System.Drawing.Size(350, 199); + this.lbrooms.TabIndex = 3; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.label1.Location = new System.Drawing.Point(342, 38); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(330, 34); + this.label1.TabIndex = 2; + this.label1.Text = "Choose a Room"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblintro + // + this.lblintro.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.lblintro.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lblintro.Location = new System.Drawing.Point(4, 38); + this.lblintro.Name = "lblintro"; + this.lblintro.Size = new System.Drawing.Size(289, 288); + this.lblintro.TabIndex = 1; + this.lblintro.Text = resources.GetString("lblintro.Text"); + this.lblintro.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblheader + // + this.lblheader.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lblheader.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F); + this.lblheader.Location = new System.Drawing.Point(4, 4); + this.lblheader.Name = "lblheader"; + this.lblheader.Size = new System.Drawing.Size(699, 34); + this.lblheader.TabIndex = 0; + this.lblheader.Text = "Welcome to HoloChat!"; + this.lblheader.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtchat + // + this.txtchat.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtchat.Location = new System.Drawing.Point(0, 23); + this.txtchat.Name = "txtchat"; + this.txtchat.ReadOnly = true; + this.txtchat.Size = new System.Drawing.Size(641, 388); + this.txtchat.TabIndex = 2; + this.txtchat.Text = ""; + this.txtchat.TextChanged += new System.EventHandler(this.txtchat_TextChanged); + // + // txtsend + // + this.txtsend.Dock = System.Windows.Forms.DockStyle.Bottom; + this.txtsend.Location = new System.Drawing.Point(0, 411); + this.txtsend.Name = "txtsend"; + this.txtsend.Size = new System.Drawing.Size(641, 20); + this.txtsend.TabIndex = 1; + this.txtsend.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtsend_KeyDown); + // + // pnlusers + // + this.pnlusers.Controls.Add(this.lbusers); + this.pnlusers.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlusers.Location = new System.Drawing.Point(641, 23); + this.pnlusers.Name = "pnlusers"; + this.pnlusers.Size = new System.Drawing.Size(131, 408); + this.pnlusers.TabIndex = 0; + // + // lbusers + // + this.lbusers.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbusers.FormattingEnabled = true; + this.lbusers.Location = new System.Drawing.Point(0, 0); + this.lbusers.Name = "lbusers"; + this.lbusers.Size = new System.Drawing.Size(131, 408); + this.lbusers.TabIndex = 0; + // + // lbtopic + // + this.lbtopic.Dock = System.Windows.Forms.DockStyle.Top; + this.lbtopic.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lbtopic.Location = new System.Drawing.Point(0, 0); + this.lbtopic.Name = "lbtopic"; + this.lbtopic.Size = new System.Drawing.Size(772, 23); + this.lbtopic.TabIndex = 4; + this.lbtopic.Text = "Welcome to HoloChat!"; + this.lbtopic.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // tmrui + // + this.tmrui.Tick += new System.EventHandler(this.tmrui_Tick); + // + // HoloChat + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(772, 431); + this.Controls.Add(this.panel1); + this.Name = "HoloChat"; + this.Text = "HoloChat"; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.me_Closing); + this.Load += new System.EventHandler(this.HoloChat_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.pnlintro.ResumeLayout(false); + this.flintrobuttons.ResumeLayout(false); + this.pnlusers.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.RichTextBox txtchat; + private System.Windows.Forms.TextBox txtsend; + private System.Windows.Forms.Panel pnlusers; + private System.Windows.Forms.ListBox lbusers; + private System.Windows.Forms.Panel pnlintro; + private System.Windows.Forms.FlowLayoutPanel flintrobuttons; + private System.Windows.Forms.Button btnconnect; + private System.Windows.Forms.Button btnrefresh; + private System.Windows.Forms.ListBox lbrooms; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lblintro; + private System.Windows.Forms.Label lblheader; + private System.Windows.Forms.Timer tmrui; + private System.Windows.Forms.Label lbtopic; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/HoloChat.cs b/source/WindowsFormsApplication1/Apps/HoloChat.cs new file mode 100644 index 0000000..1795d7b --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/HoloChat.cs @@ -0,0 +1,666 @@ +using NetSockets; +using Newtonsoft.Json; +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; + +namespace ShiftOS +{ + public partial class HoloChat : Form + { + /// <summary> + /// Front-end for the HoloChat chat system. + /// </summary> + public HoloChat() + { + InitializeComponent(); + } + + public ChatClient Client = null; + public Dictionary<string, string> IPs = null; + + private void HoloChat_Load(object sender, EventArgs e) + { + SetupUI(); + tmrui.Start(); + } + + /// <summary> + /// Sets up the HoloCHat UI. + /// </summary> + public void SetupUI() + { + if (!API.LimitedMode) + { + IPs = new Dictionary<string, string>(); + lbrooms.Items.Clear(); + this.Invoke(new Action(() => + { + if (API.Upgrades["networkbrowser"] == false) + { + lbrooms.Items.Add(Hacker_Alliance.Name); + } + })); + + foreach (var client in Package_Grabber.clients) + { + if (client.Value.IsConnected) + { + client.Value.OnReceived += (object s, NetReceivedEventArgs<NetObject> a) => + { + try + { + if (!IPs.ContainsKey(client.Key)) + { + var obj = (ObjectModel)a.Data.Object; + if (obj.Command == "name") + { + string name = (string)obj.OptionalObject; + IPs.Add(client.Key, name); + } + } + else + { + var obj = (ObjectModel)a.Data.Object; + if (obj.Command == "name") + { + string name = (string)obj.OptionalObject; + IPs[client.Key] = name; + } + } + this.Invoke(new Action(() => + { + string r = ""; + foreach (string room in lbrooms.Items) + { + if (room == IPs[client.Key]) + { + r = room; + } + } + if (r == "") + { + lbrooms.Items.Add(IPs[client.Key]); + } + })); + } + catch + { + + } + }; + Package_Grabber.SendMessage(client.Key, "chat get_name"); + } + } + + } + else + { + if (FinalMission.EndGameHandler.FakeHoloChatRoom != null) + { + lbrooms.Items.Clear(); + lbrooms.Items.Add(FinalMission.EndGameHandler.FakeHoloChatRoom.Name); + } + } + } + + private FakeChatClient Hacker_Alliance + { + get + { + var r = new FakeChatClient(); + r.Name = "The Hacker Alliance"; + r.OtherCharacters = new List<string>(); + if (!API.Upgrades["networkbrowser"]) + { + r.OtherCharacters.Add("Richard Ladouceur"); //Dear djdeedahx0 and other non-ShiftOS members: DEAL with the last name - I'm not creative. - Michael + r.OtherCharacters.Add("Hacker101"); + r.Messages = JsonConvert.DeserializeObject<Dictionary<string, string>>(Properties.Resources.MidGame_Holochat); + r.Topic = "The Hacker Alliance - Please welcome our newest user!"; + } + return r; + + } + } + + private void btnconnect_Click(object sender, EventArgs e) + { + if(lbrooms.SelectedItem != null) + { + if (!API.LimitedMode) + { + string topic = (string)lbrooms.SelectedItem; + if (topic == Hacker_Alliance.Name) + { + SetupFakeClient(Hacker_Alliance); + } + else + { + string ip = ""; + foreach (var obj in IPs) + { + if (obj.Value == topic) + { + ip = obj.Key; + } + } + if (ip != "") + { + API.CreateInfoboxSession("Choose a Nickname", "Please enter a nick name.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetInfoboxResult(); + if (res != "fail") + { + SetupClient(ip, res); + } + }; + } + } + } + else + { + if((string)lbrooms.SelectedItem == FinalMission.EndGameHandler.FakeHoloChatRoom.Name) + { + SetupFakeClient(FinalMission.EndGameHandler.FakeHoloChatRoom); + } + } + } + } + + /// <summary> + /// Set up a new client. + /// </summary> + /// <param name="address">IP address.</param> + /// <param name="nick">User nickname.</param> + public void SetupClient(string address, string nick) + { + var c = new ChatClient(address, nick); + c.OnMessageReceive += (object s, EventArgs a) => + { + var obj = (ChatMessage)s; + this.Invoke(new Action(() => + { + txtchat.AppendText(Environment.NewLine + $"<{obj.User.Name}> {obj.Text}"); + })); + c.GetUsers(); + }; + c.OnUserListReceived += (object s, EventArgs a) => + { + var obj = (List<ChatUser>)s; + this.Invoke(new Action(() => + { + lbusers.Items.Clear(); + foreach (var user in obj) + { + lbusers.Items.Add(user.Name); + } + })); + }; + c.OnUserJoin += (object s, EventArgs a) => + { + var obj = (ChatUser)s; + this.Invoke(new Action(() => + { + + txtchat.AppendText(Environment.NewLine + $"{obj.Name} has joined this room."); + })); + c.GetUsers(); + }; + c.OnTopicReceived += (object s, EventArgs a) => + { + string topic = (string)s; + this.Invoke(new Action(() => + { + lbtopic.Text = topic; + })); + }; + c.OnUserLeave += (object s, EventArgs a) => + { + var obj = (ChatUser)s; + this.Invoke(new Action(() => + { + txtchat.AppendText(Environment.NewLine + $"{obj.Name} has left this room."); + })); + c.GetUsers(); + }; + c.GetUsers(); + c.GetTopic(); + Client = c; + + } + + public void SetupFakeClient(FakeChatClient fClient) + { + lbtopic.Text = fClient.Topic; + var t = new System.Windows.Forms.Timer(); + t.Interval = 500; + t.Tick += (object s, EventArgs a) => + { + //userlist + lbusers.Items.Clear(); + foreach (var user in fClient.OtherCharacters) + { + lbusers.Items.Add(user); + } + }; + t.Start(); + + int m = 0; + //message buffer + var mb = new System.Windows.Forms.Timer(); + mb.Tick += (object s, EventArgs a) => + { + string message = fClient.Messages.Keys.ElementAt(m); + string user = fClient.Messages[message]; + //show message on textbox + if (message.StartsWith("install:")) + { + try + { + string upg = message.Remove(0, 8); + API.Upgrades[upg] = true; + API.CurrentSession.SetupDesktop(); + } + catch + { + + } + } + else + { + txtchat.AppendText(Environment.NewLine + $"<{user}> {message}"); + } + if (m < fClient.Messages.Count - 1) + { + m += 1; + } + else + { + mb.Stop(); + //Completed the objective! + FinalMission.EndGameHandler.GoToNextObjective(); + } + }; + mb.Interval = 4000; + mb.Start(); + tmrui.Stop(); + pnlintro.Hide(); + } + + private void txtsend_KeyDown(object sender, KeyEventArgs e) + { + if(e.KeyCode == Keys.Enter) + { + e.SuppressKeyPress = true; + if (txtsend.Text != "") + { + if (txtsend.Text.ToLower() == "/disconnect") + { + Client.Leave(); + Client = null; + txtsend.Text = ""; + } + else { + Client.Send(txtsend.Text); + txtsend.Text = ""; + } + } + } + } + + private void me_Closing(object sender, FormClosingEventArgs e) + { + if(Client != null) + { + Client.Leave(); + } + } + + private void tmrui_Tick(object sender, EventArgs e) + { + if(Client == null) + { + pnlintro.Show(); + txtsend.Enabled = false; + } + else + { + pnlintro.Hide(); + txtsend.Enabled = true; + } + } + + private void btnrefresh_Click(object sender, EventArgs e) + { + SetupUI(); + } + + private void txtchat_TextChanged(object sender, EventArgs e) + { + txtchat.Select(txtchat.TextLength, 0); + txtchat.ScrollToCaret(); + txtsend.Focus(); + } + } + + public class ChatClient + { + #region Constructors + + /// <summary> + /// Creates a new chat client. + /// </summary> + /// <param name="IP">IP address</param> + /// <param name="nick">User nickname</param> + public ChatClient(string IP, string nick) + { + NetObjectClient c = null; + foreach(var client in Package_Grabber.clients) + { + if(client.Key == IP) + { + if(client.Value.IsConnected == true) + { + c = client.Value; + IP_Address = IP; + } + } + } + if(c != null) + { + c.OnReceived += (object s, NetReceivedEventArgs<NetObject> a) => + { + try { + var obj = (ObjectModel)a.Data.Object; + string[] args = obj.Command.Split(' '); + if (args[0] == "chat") + { + switch (args[1]) + { + case "userbanned": + try + { + var usr = (ChatUser)obj.OptionalObject; + if(usr.Name == nick) + { + API.CurrentSession.Invoke(new Action(() => + { + API.CreateInfoboxSession("You're banned.", "You have been banned from this chat.", infobox.InfoboxMode.Info); + Leave(); + })); + } + } + catch + { + + } + break; + case "auth_req": + try + { + var usr = (ChatUser)obj.OptionalObject; + if (usr.Name == nick) + { + Thread.Sleep(1000); + API.CurrentSession.Invoke(new Action(() => + { + API.CreateInfoboxSession("Enter Password", "Please enter your password.", infobox.InfoboxMode.TextEntry); + API.InfoboxSession.FormClosing += (object sen, FormClosingEventArgs arg) => + { + var result = API.GetInfoboxResult(); + AuthenticateWithServer(usr.Name, result); + }; + })); + } + } + catch + { + + } + break; + case "auth_fail": + try + { + var usr = (ChatUser)obj.OptionalObject; + if (usr.Name == nick) + { + API.CurrentSession.Invoke(new Action(() => + { + API.CreateInfoboxSession("Error", "You have entered an incorrect password.", infobox.InfoboxMode.Info); + })); + } + } + catch + { + + } + + break; + case "joined": + try + { + var usr = (ChatUser)obj.OptionalObject; + if (usr.Name == nick) + { + if (_User == null) + { + _User = usr; + } + } + if (_User != usr) + { + var h = OnUserJoin; + if (h != null) + { + h(usr, new EventArgs()); + } + } + } + catch + { + + } + break; + case "userlist": + try + { + var lst = (List<ChatUser>)obj.OptionalObject; + var h = OnUserListReceived; + if (h != null) + { + h(lst, new EventArgs()); + } + } + catch + { + + } + break; + case "left": + try + { + var usr = (ChatUser)obj.OptionalObject; + var h = OnUserLeave; + if (h != null) + { + h(usr, new EventArgs()); + } + } + catch + { + + } + break; + case "message_received": + try + { + var usr = (ChatMessage)obj.OptionalObject; + var h = OnMessageReceive; + if (h != null) + { + h(usr, new EventArgs()); + } + } + catch + { + + } + break; + } + } + else if (args[0] == "topic") + { + try + { + string name = (string)obj.OptionalObject; + var h = OnTopicReceived; + if(h != null) + { + h(name, new EventArgs()); + } + } + catch + { + + } + } + } + catch + { + + } + }; + Join(nick); + } + else + { + throw new ArgumentException("IP Address not found."); + } + } + #endregion + + #region Events + + public event EventHandler OnUserJoin; + public event EventHandler OnUserLeave; + public event EventHandler OnMessageReceive; + public event EventHandler OnUserListReceived; + public event EventHandler OnTopicReceived; + + + #endregion + + #region Variables + + private string IP_Address = null; + public ChatUser User { get { return _User; } } + private ChatUser _User = null; + #endregion + + #region Methods + + /// <summary> + /// Authenticates with the server. + /// </summary> + /// <param name="password">Password to authenticate using.</param> + public void AuthenticateWithServer(string nick, string password) + { + var usr = new ChatUser(); + usr.Name = nick; + var msg = new ChatMessage(); + msg.Text = password; + msg.User = usr; + Package_Grabber.SendMessage(IP_Address, "chat authenticate", msg); + } + + /// <summary> + /// Joins the server. + /// </summary> + /// <param name="nick">Nickname.</param> + public void Join(string nick) + { + var usr = new ChatUser(); + usr.Name = nick; + var msg = new ChatMessage(); + msg.User = usr; + Package_Grabber.SendMessage(IP_Address, "chat join", msg); + } + + /// <summary> + /// Leaves the server. + /// </summary> + public void Leave() + { + if (_User != null) + { + var msg = new ChatMessage(); + msg.User = _User; + Package_Grabber.SendMessage(IP_Address, "chat leave", msg); + } + } + + /// <summary> + /// Requests a list of online users. + /// </summary> + public void GetUsers() + { + try + { + Package_Grabber.SendMessage(IP_Address, "chat get_users"); + } + catch + { + + } + } + + /// <summary> + /// Requests the topic string of the server. + /// </summary> + public void GetTopic() + { + try + { + Package_Grabber.SendMessage(IP_Address, "chat get_topic"); + } + catch + { + + } + } + + /// <summary> + /// Sends a message to the server. + /// </summary> + /// <param name="Text">Message text.</param> + public void Send(string Text) + { + if (_User != null) + { + var msg = new ChatMessage(); + msg.User = _User; + msg.Text = Text; + Package_Grabber.SendMessage(IP_Address, "chat normal", msg); + + } + } + + #endregion + } + + public class FakeChatClient + { + public string Name { get; set; } + public string Topic { get; set; } + public List<string> OtherCharacters { get; set; } + public Dictionary<string, string> Messages { get; set; } + } +} diff --git a/source/WindowsFormsApplication1/Apps/HoloChat.resx b/source/WindowsFormsApplication1/Apps/HoloChat.resx new file mode 100644 index 0000000..53f34aa --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/HoloChat.resx @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="lblintro.Text" xml:space="preserve"> + <value>HoloChat is a revolutionary new program made only for ShiftOS. + +Come, and explore the various HoloChat communities, and meet some new friends! + +You can send text, files, and other cool things to people in a HoloChat room. + +Have fun!</value> + </data> + <metadata name="tmrui.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/IconManager.Designer.cs b/source/WindowsFormsApplication1/Apps/IconManager.Designer.cs new file mode 100644 index 0000000..3203088 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/IconManager.Designer.cs @@ -0,0 +1,135 @@ +namespace ShiftOS +{ + partial class IconManager + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.pnlactions = new System.Windows.Forms.Panel(); + this.pnlicons = new System.Windows.Forms.FlowLayoutPanel(); + this.panel1 = new System.Windows.Forms.Panel(); + this.btnsave = new System.Windows.Forms.Button(); + this.button1 = new System.Windows.Forms.Button(); + this.button2 = new System.Windows.Forms.Button(); + this.pnlactions.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // pnlactions + // + this.pnlactions.BackColor = System.Drawing.Color.Gray; + this.pnlactions.Controls.Add(this.button2); + this.pnlactions.Controls.Add(this.button1); + this.pnlactions.Controls.Add(this.btnsave); + this.pnlactions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlactions.ForeColor = System.Drawing.Color.White; + this.pnlactions.Location = new System.Drawing.Point(0, 511); + this.pnlactions.Name = "pnlactions"; + this.pnlactions.Size = new System.Drawing.Size(720, 41); + this.pnlactions.TabIndex = 0; + // + // pnlicons + // + this.pnlicons.BackColor = System.Drawing.Color.White; + this.pnlicons.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlicons.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.pnlicons.ForeColor = System.Drawing.Color.Black; + this.pnlicons.Location = new System.Drawing.Point(0, 0); + this.pnlicons.Name = "pnlicons"; + this.pnlicons.Size = new System.Drawing.Size(720, 511); + this.pnlicons.TabIndex = 1; + // + // panel1 + // + this.panel1.Controls.Add(this.pnlicons); + this.panel1.Controls.Add(this.pnlactions); + 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(720, 552); + this.panel1.TabIndex = 0; + // + // btnsave + // + this.btnsave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsave.Location = new System.Drawing.Point(3, 3); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(75, 35); + this.btnsave.TabIndex = 0; + this.btnsave.Text = "Done"; + this.btnsave.UseVisualStyleBackColor = true; + this.btnsave.Click += new System.EventHandler(this.btnsave_Click); + // + // button1 + // + this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Location = new System.Drawing.Point(84, 3); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(75, 35); + this.button1.TabIndex = 1; + this.button1.Text = "Load Pack"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // button2 + // + this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom))); + this.button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button2.Location = new System.Drawing.Point(165, 3); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 35); + this.button2.TabIndex = 2; + this.button2.Text = "Export"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // IconManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(720, 552); + this.Controls.Add(this.panel1); + this.Name = "IconManager"; + this.Text = "IconManager"; + this.Load += new System.EventHandler(this.IconManager_Load); + this.pnlactions.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnlactions; + private System.Windows.Forms.FlowLayoutPanel pnlicons; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button button2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button btnsave; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/IconManager.cs b/source/WindowsFormsApplication1/Apps/IconManager.cs new file mode 100644 index 0000000..2ffa24a --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/IconManager.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class IconManager : Form + { + public IconManager() + { + InitializeComponent(); + } + + private void IconManager_Load(object sender, EventArgs e) + { + GetAllIcons(); + } + + public void GetAllIcons() + { + pnlicons.Controls.Clear(); + pnlicons.Margin = new Padding(0); + foreach(var kv in API.IconRegistry) + { + var ctrl = new IconControl(); + ctrl.Margin = new Padding(0); + ctrl.IconName = kv.Key; + ctrl.LargeImage = kv.Value; + pnlicons.Controls.Add(ctrl); + ctrl.Show(); + } + } + + private void btnsave_Click(object sender, EventArgs e) + { + foreach (Control ctrl in pnlicons.Controls) + { + try + { + IconControl ic = (IconControl)ctrl; + Skinning.Utilities.IconRegistry[ic.IconName] = ic.LargeImage; + } + catch + { + IconControl ic = (IconControl)ctrl; + Skinning.Utilities.IconRegistry.Add(ic.IconName, ic.LargeImage); + } + } + + var rnd = new Random(); + int cp = rnd.Next(0, 10); + Skinning.Utilities.saveimages(); + API.AddCodepoints(cp); + if(API.CurrentSession != null) + { + API.CurrentSession.SetupAppLauncher(); + API.CurrentSession.SetupDesktopIcons(); + } + GetAllIcons(); + API.CreateInfoboxSession("Icon pack set.", $"Your icon pack has been set successfully. You have earned {cp} Codepoints.", infobox.InfoboxMode.Info); + } + + private void button2_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".icn", File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + ZipFile.CreateFromDirectory(Paths.Icons, res); + } + }; + } + + private void button1_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".icn", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + if(Directory.Exists(Paths.Mod_Temp + "icn")) + { + Directory.Delete(Paths.Mod_Temp + "icn", true); + } + ZipFile.ExtractToDirectory(res, Paths.Mod_Temp + "icn"); + foreach (var f in Directory.GetFiles(Paths.Mod_Temp + "icn")) + { + var finf = new FileInfo(f); + try + { + var bytes = File.ReadAllBytes(finf.FullName); + using (var stream = new MemoryStream(bytes)) + { + API.IconRegistry[finf.Name] = Image.FromStream(stream); + } + } + catch + { + API.IconRegistry.Add(finf.Name, Image.FromFile(finf.FullName)); + } + finf = null; + } + if (API.CurrentSession != null) + { + API.CurrentSession.SetupAppLauncher(); + API.CurrentSession.SetupDesktopIcons(); + } + GetAllIcons(); + Directory.Delete(Paths.Mod_Temp + "icn", true); + } + }; + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/IconManager.resx b/source/WindowsFormsApplication1/Apps/IconManager.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/IconManager.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/KnowledgeInput.Designer.cs b/source/WindowsFormsApplication1/Apps/KnowledgeInput.Designer.cs new file mode 100644 index 0000000..3fc5f81 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/KnowledgeInput.Designer.cs @@ -0,0 +1,345 @@ +using System; + +namespace ShiftOS +{ + partial class KnowledgeInput + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + //Required by the Windows Form Designer + + //NOTE: The following procedure is required by the Windows Form Designer + //It can be modified using the Windows Form Designer. + //Do not modify it using the code editor. + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(KnowledgeInput)); + this.ListBox1 = new System.Windows.Forms.ListBox(); + this.pnlintro = new System.Windows.Forms.Panel(); + this.pnlcategorydisplay = new System.Windows.Forms.Panel(); + this.lblnextreward = new System.Windows.Forms.Label(); + this.guessbox = new System.Windows.Forms.TextBox(); + this.lblcurrentlevel = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.listblistedstuff = new System.Windows.Forms.ListBox(); + this.lbltillnextlevel = new System.Windows.Forms.Label(); + this.lbltotal = new System.Windows.Forms.Label(); + this.btnstart = new System.Windows.Forms.Button(); + this.lblcatedescription = new System.Windows.Forms.Label(); + this.lblcategory = new System.Windows.Forms.Label(); + this.Label4 = new System.Windows.Forms.Label(); + this.Label3 = new System.Windows.Forms.Label(); + this.Label2 = new System.Windows.Forms.Label(); + this.Label1 = new System.Windows.Forms.Label(); + this.decider = new System.Windows.Forms.Timer(this.components); + this.Label6 = new System.Windows.Forms.Label(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.tmrstoryline = new System.Windows.Forms.Timer(this.components); + this.pnlintro.SuspendLayout(); + this.pnlcategorydisplay.SuspendLayout(); + this.pgcontents.SuspendLayout(); + this.SuspendLayout(); + // + // ListBox1 + // + this.ListBox1.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.ListBox1.BackColor = System.Drawing.Color.White; + this.ListBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.ListBox1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.ListBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ListBox1.ForeColor = System.Drawing.Color.Black; + this.ListBox1.FormattingEnabled = true; + this.ListBox1.ItemHeight = 24; + this.ListBox1.Items.AddRange(new object[] { + "Animals", + "Countries", + "Fruits"}); + this.ListBox1.Location = new System.Drawing.Point(9, 49); + this.ListBox1.Name = "ListBox1"; + this.ListBox1.Size = new System.Drawing.Size(179, 240); + this.ListBox1.TabIndex = 0; + this.ListBox1.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.ListBox1_DrawItem); + this.ListBox1.SelectedIndexChanged += new System.EventHandler(this.ListBox1_SelectedIndexChanged); + // + // pnlintro + // + this.pnlintro.Controls.Add(this.pnlcategorydisplay); + this.pnlintro.Controls.Add(this.Label4); + this.pnlintro.Controls.Add(this.Label3); + this.pnlintro.Controls.Add(this.Label2); + this.pnlintro.Controls.Add(this.Label1); + this.pnlintro.Location = new System.Drawing.Point(190, 0); + this.pnlintro.Name = "pnlintro"; + this.pnlintro.Size = new System.Drawing.Size(479, 272); + this.pnlintro.TabIndex = 1; + // + // pnlcategorydisplay + // + this.pnlcategorydisplay.Controls.Add(this.lblnextreward); + this.pnlcategorydisplay.Controls.Add(this.guessbox); + this.pnlcategorydisplay.Controls.Add(this.lblcurrentlevel); + this.pnlcategorydisplay.Controls.Add(this.Label5); + this.pnlcategorydisplay.Controls.Add(this.listblistedstuff); + this.pnlcategorydisplay.Controls.Add(this.lbltillnextlevel); + this.pnlcategorydisplay.Controls.Add(this.lbltotal); + this.pnlcategorydisplay.Controls.Add(this.btnstart); + this.pnlcategorydisplay.Controls.Add(this.lblcatedescription); + this.pnlcategorydisplay.Controls.Add(this.lblcategory); + this.pnlcategorydisplay.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlcategorydisplay.ForeColor = System.Drawing.Color.Black; + this.pnlcategorydisplay.Location = new System.Drawing.Point(0, 0); + this.pnlcategorydisplay.Name = "pnlcategorydisplay"; + this.pnlcategorydisplay.Size = new System.Drawing.Size(479, 272); + this.pnlcategorydisplay.TabIndex = 2; + // + // lblnextreward + // + this.lblnextreward.AutoSize = true; + this.lblnextreward.Font = new System.Drawing.Font("Palatino Linotype", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblnextreward.Location = new System.Drawing.Point(36, 110); + this.lblnextreward.Name = "lblnextreward"; + this.lblnextreward.Size = new System.Drawing.Size(244, 20); + this.lblnextreward.TabIndex = 11; + this.lblnextreward.Text = "Reward for completing level 1: 5CP"; + this.lblnextreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // guessbox + // + this.guessbox.BackColor = System.Drawing.Color.White; + this.guessbox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.guessbox.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.guessbox.ForeColor = System.Drawing.Color.Black; + this.guessbox.Location = new System.Drawing.Point(11, 147); + this.guessbox.Multiline = true; + this.guessbox.Name = "guessbox"; + this.guessbox.Size = new System.Drawing.Size(297, 45); + this.guessbox.TabIndex = 9; + this.guessbox.Text = "Enter Guess Here"; + this.guessbox.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.guessbox.Click += new System.EventHandler(this.guessbox_click); + this.guessbox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.guessbox_keydown); + // + // lblcurrentlevel + // + this.lblcurrentlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblcurrentlevel.Location = new System.Drawing.Point(-6, 77); + this.lblcurrentlevel.Name = "lblcurrentlevel"; + this.lblcurrentlevel.Size = new System.Drawing.Size(331, 42); + this.lblcurrentlevel.TabIndex = 8; + this.lblcurrentlevel.Text = "Current Level: 1"; + this.lblcurrentlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(340, 12); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(123, 18); + this.Label5.TabIndex = 7; + this.Label5.Text = "All Ready Done"; + // + // listblistedstuff + // + this.listblistedstuff.BackColor = System.Drawing.Color.Black; + this.listblistedstuff.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.listblistedstuff.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.listblistedstuff.ForeColor = System.Drawing.Color.White; + this.listblistedstuff.FormattingEnabled = true; + this.listblistedstuff.Location = new System.Drawing.Point(340, 41); + this.listblistedstuff.Name = "listblistedstuff"; + this.listblistedstuff.ScrollAlwaysVisible = true; + this.listblistedstuff.Size = new System.Drawing.Size(129, 221); + this.listblistedstuff.TabIndex = 6; + this.listblistedstuff.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.listblistedstuff_DrawItem); + // + // lbltillnextlevel + // + this.lbltillnextlevel.AutoSize = true; + this.lbltillnextlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltillnextlevel.Location = new System.Drawing.Point(8, 250); + this.lbltillnextlevel.Name = "lbltillnextlevel"; + this.lbltillnextlevel.Size = new System.Drawing.Size(146, 16); + this.lbltillnextlevel.TabIndex = 5; + this.lbltillnextlevel.Text = "Words Until Next Level:"; + // + // lbltotal + // + this.lbltotal.AutoSize = true; + this.lbltotal.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbltotal.Location = new System.Drawing.Point(191, 250); + this.lbltotal.Name = "lbltotal"; + this.lbltotal.Size = new System.Drawing.Size(66, 16); + this.lbltotal.TabIndex = 3; + this.lbltotal.Text = "Guessed:"; + // + // btnstart + // + this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstart.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnstart.Location = new System.Drawing.Point(11, 198); + this.btnstart.Name = "btnstart"; + this.btnstart.Size = new System.Drawing.Size(297, 46); + this.btnstart.TabIndex = 2; + this.btnstart.Text = "Submit Word"; + this.btnstart.UseVisualStyleBackColor = true; + this.btnstart.Click += new System.EventHandler(this.btnstart_Click); + // + // lblcatedescription + // + this.lblcatedescription.Location = new System.Drawing.Point(11, 48); + this.lblcatedescription.Name = "lblcatedescription"; + this.lblcatedescription.Size = new System.Drawing.Size(297, 26); + this.lblcatedescription.TabIndex = 1; + this.lblcatedescription.Text = "There are many animals out there! Can you list them all? Note that this is a list" + + " of common animals, not every animal!"; + this.lblcatedescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lblcategory + // + this.lblcategory.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblcategory.Location = new System.Drawing.Point(11, 8); + this.lblcategory.Name = "lblcategory"; + this.lblcategory.Size = new System.Drawing.Size(297, 39); + this.lblcategory.TabIndex = 0; + this.lblcategory.Text = "Animals"; + this.lblcategory.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label4 + // + this.Label4.AutoSize = true; + 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(52, 235); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(382, 20); + this.Label4.TabIndex = 3; + this.Label4.Text = "Select A Category On the Left To Start Playing"; + // + // Label3 + // + this.Label3.AutoSize = true; + this.Label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label3.Location = new System.Drawing.Point(187, 72); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(112, 20); + this.Label3.TabIndex = 2; + this.Label3.Text = "How To Play:"; + // + // Label2 + // + this.Label2.AutoSize = true; + 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(61, 97); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(383, 80); + this.Label2.TabIndex = 1; + this.Label2.Text = resources.GetString("Label2.Text"); + this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.ForeColor = System.Drawing.Color.Black; + this.Label1.Location = new System.Drawing.Point(75, 12); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(316, 25); + this.Label1.TabIndex = 0; + this.Label1.Text = "Welcome to Knowledge Input"; + // + // decider + // + this.decider.Interval = 500; + this.decider.Tick += new System.EventHandler(this.decider_Tick); + // + // Label6 + // + this.Label6.AutoSize = true; + this.Label6.Font = new System.Drawing.Font("Cambria", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label6.Location = new System.Drawing.Point(30, 8); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(130, 28); + this.Label6.TabIndex = 8; + this.Label6.Text = "Categories"; + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.pnlintro); + this.pgcontents.Controls.Add(this.Label6); + this.pgcontents.Controls.Add(this.ListBox1); + 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(673, 304); + this.pgcontents.TabIndex = 10; + // + // tmrstoryline + // + this.tmrstoryline.Interval = 1000; + // + // KnowledgeInput + // + this.AcceptButton = this.btnstart; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Control; + this.ClientSize = new System.Drawing.Size(673, 304); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.Name = "KnowledgeInput"; + this.Text = "Knowledge_Input"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Template_Load); + this.pnlintro.ResumeLayout(false); + this.pnlintro.PerformLayout(); + this.pnlcategorydisplay.ResumeLayout(false); + this.pnlcategorydisplay.PerformLayout(); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.ListBox ListBox1; + internal System.Windows.Forms.Panel pnlintro; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.Label Label3; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Panel pnlcategorydisplay; + internal System.Windows.Forms.Label lblcategory; + internal System.Windows.Forms.Button btnstart; + internal System.Windows.Forms.Label lblcatedescription; + internal System.Windows.Forms.Label lbltillnextlevel; + internal System.Windows.Forms.Label lbltotal; + internal System.Windows.Forms.ListBox listblistedstuff; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.TextBox guessbox; + internal System.Windows.Forms.Label lblcurrentlevel; + internal System.Windows.Forms.Timer decider; + internal System.Windows.Forms.Label lblnextreward; + internal System.Windows.Forms.Label Label6; + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Timer tmrstoryline; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/KnowledgeInput.cs b/source/WindowsFormsApplication1/Apps/KnowledgeInput.cs new file mode 100644 index 0000000..a494a93 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/KnowledgeInput.cs @@ -0,0 +1,1425 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class KnowledgeInput : Form + { + public KnowledgeInput() + { + InitializeComponent(); + } + + public int rolldownsize; + public int oldbordersize; + public int oldtitlebarheight; + public bool justopened = false; + public bool needtorollback = false; + public int minimumsizewidth = 0; + public int minimumsizeheight = 0; + + bool guessalreadydone; + bool guesscorrect; + bool levelup; + int rewardbase; + + int totalguessed; + int level; + + int tillnextlevel; + string[] animalslist = new string[227]; + string[] fruitslist = new string[76]; + string[] countrieslist = new string[205]; + string[] carbrandslist = new string[329]; + string[] gameconsoleslist = new string[125]; + + string[] elementslist = new string[118]; + + // ERROR: Handles clauses are not supported in C# + 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; + + pnlintro.Show(); + pnlintro.BringToFront(); + pnlcategorydisplay.Hide(); + makeanimallist(); + makecarbrandslist(); + makecountrieslist(); + makeelementslist(); + makefruitlist(); + makegameconsoleslist(); + setupcategories(); + if(!Directory.Exists(Paths.KnowledgeInput)) + { + Directory.CreateDirectory(Paths.KnowledgeInput); + } + } + + // ERROR: Handles clauses are not supported in C# + private void ListBox1_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) + { + e.DrawBackground(); + if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) + { + e.Graphics.FillRectangle(Brushes.Black, e.Bounds); + } + StringFormat sf = new StringFormat(); + sf.Alignment = StringAlignment.Center; + using (SolidBrush b = new SolidBrush(Color.Black)) + { + e.Graphics.DrawString(ListBox1.GetItemText(ListBox1.Items[e.Index]), e.Font, b, e.Bounds, sf); + } + e.DrawFocusRectangle(); + } + + // ERROR: Handles clauses are not supported in C# + private void listblistedstuff_DrawItem(object sender, System.Windows.Forms.DrawItemEventArgs e) + { + e.DrawBackground(); + if ((e.State & DrawItemState.Selected) == DrawItemState.Selected) + { + e.Graphics.FillRectangle(Brushes.Black, e.Bounds); + } + + using (SolidBrush b = new SolidBrush(e.ForeColor)) + { + e.Graphics.DrawString(listblistedstuff.GetItemText(listblistedstuff.Items[e.Index]), e.Font, b, e.Bounds); + } + e.DrawFocusRectangle(); + } + + private void setupcategories() + { + ListBox1.Items.Clear(); + ListBox1.Items.Add("Animals"); + ListBox1.Items.Add("Fruits"); + ListBox1.Items.Add("Countries"); + if(API.Upgrades["kielements"]) + { + ListBox1.Items.Add("Elements"); + } + if (API.Upgrades["kicarbrands"]) + { + ListBox1.Items.Add("Car Brands"); + } + if (API.Upgrades["kigameconsoles"]) + { + ListBox1.Items.Add("Game Consoles"); + } + + } + + // ERROR: Handles clauses are not supported in C# + private void ListBox1_SelectedIndexChanged(object sender, EventArgs e) + { + // ERROR: Not supported in C#: OnErrorStatement + + pnlcategorydisplay.Show(); + //Remember to create the files for each category in the hijack screen and add the category in the design view and make the countries list in this load event + switch (ListBox1.SelectedItem.ToString()) + { + case "Animals": + loadsavepoint("Animals", 10, Paths.KnowledgeInput + "Animals.lst", "There are many animals out there! Can you list them all?" + Environment.NewLine + "Note that you get points for listing animals... not animal breeds!", animalslist); + + break; + case "Fruits": + loadsavepoint("Fruits", 10, Paths.KnowledgeInput + "Fruits.lst", "Do you get your daily serving of fruit each day?" + Environment.NewLine + "Really...? See if you can list them then ;)", fruitslist); + + break; + case "Countries": + loadsavepoint("Countries", 10, Paths.KnowledgeInput + "Countries.lst", "Ever wanted to travel the entire world?" + Environment.NewLine + "Well before you do see if you can list every country in the world!", countrieslist); + + break; + case "Car Brands": + loadsavepoint("Car Brands", 10, Paths.KnowledgeInput + "Car Brands.lst", "Can you list every single car brand?" + Environment.NewLine + "Don't use words like automobiles, motors or cars!", carbrandslist); + + break; + case "Game Consoles": + loadsavepoint("Game Consoles", 10, Paths.KnowledgeInput + "Game Consoles.lst", "Do you call yourself a gamer?" + Environment.NewLine + "Earn that title by listing non-handheld game consoles!", gameconsoleslist); + + break; + case "Elements": + loadsavepoint("Elements", 10, Paths.KnowledgeInput + "Elements.lst", "Have you memorized the periodic table of elements?" + Environment.NewLine + "No? Well don't even attempt trying to guess them all here!", elementslist); + break; + } + + } + + + private void handleword() + { + switch (ListBox1.SelectedItem.ToString()) + { + case "Animals": + handlewordtype(animalslist, Paths.KnowledgeInput + "Animals.lst"); + break; + case "Fruits": + handlewordtype(fruitslist, Paths.KnowledgeInput + "Fruits.lst"); + break; + case "Countries": + handlewordtype(countrieslist, Paths.KnowledgeInput + "Countries.lst"); + break; + case "Car Brands": + handlewordtype(carbrandslist, Paths.KnowledgeInput + "Car Brands.lst"); + break; + case "Game Consoles": + handlewordtype(gameconsoleslist, Paths.KnowledgeInput + "Game Consoles.lst"); + break; + case "Elements": + handlewordtype(elementslist, Paths.KnowledgeInput + "Elements.lst"); + break; + } + + guessbox.Text = ""; + listblistedstuff.TopIndex = listblistedstuff.Items.Count - 1; + } + + private void btnquit_Click(object sender, EventArgs e) + { + this.Close(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnstart_Click(object sender, EventArgs e) + { + handleword(); + } + + // ERROR: Handles clauses are not supported in C# + private void guessbox_click(object sender, EventArgs e) + { + guessbox.Text = ""; + } + + // ERROR: Handles clauses are not supported in C# + private void guessbox_keydown(object sender, System.Windows.Forms.KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + e.SuppressKeyPress = true; + handleword(); + } + } + + // ERROR: Handles clauses are not supported in C# + private void decider_Tick(object sender, EventArgs e) + { + lblcurrentlevel.Text = "Current Level: " + level; + lblnextreward.Text = "Reward for completing level " + level + " : " + rewardbase * level + "CP"; + guessalreadydone = false; + guesscorrect = false; + levelup = false; + decider.Interval = 500; + decider.Stop(); + } + + private void loadsavepoint(string title, int reward, string loadpath, string info, string[] listtype) + { + lblcategory.Text = title; + rewardbase = reward; + listblistedstuff.Items.Clear(); + if (File.Exists(loadpath)) + { + listblistedstuff.Items.AddRange(File.ReadAllLines(loadpath)); + } + totalguessed = listblistedstuff.Items.Count; + level = (int)Math.Ceiling((double)(totalguessed / 10)); + tillnextlevel = Math.Abs(totalguessed - (level * 10)); + + if (tillnextlevel == 0) + { + level = level + 1; + tillnextlevel = 10; + } + + lblcatedescription.Text = info; + pnlcategorydisplay.Show(); + lbltillnextlevel.Text = "Words Until Next Level: " + tillnextlevel; + lblcurrentlevel.Text = "Current Level: " + level; + lbltotal.Text = "Guessed: " + totalguessed + "/" + listtype.Length; + lblnextreward.Text = "Reward for completing level " + level + " : " + rewardbase * level + "CP"; + } + + + private void handlewordtype(string[] listtype, string savepath) + { + string userguess = guessbox.Text; + userguess = userguess.ToLower(); + foreach (string Str in listtype) + { + if (Str == userguess) + { + if (listblistedstuff.Items.Contains(userguess)) + { + guessalreadydone = true; + } + else { + guesscorrect = true; + listblistedstuff.Items.Add(userguess); + tillnextlevel = tillnextlevel - 1; + totalguessed = totalguessed + 1; + File.WriteAllLines(savepath, listblistedstuff.Items.Cast<string>().ToArray()); + + if (tillnextlevel == 0) + { + levelup = true; + tillnextlevel = 10; + API.AddCodepoints(rewardbase * level); + level = level + 1; + } + } + } + } + lbltillnextlevel.Text = "Words Until Next Level: " + tillnextlevel; + lblcurrentlevel.Text = "Current Level: " + level; + lbltotal.Text = "Guessed: " + totalguessed + "/" + listtype.Length; + lblnextreward.Text = "Reward for completing level " + level + " : " + rewardbase * level + "CP"; + + if (levelup == true) + { + decider.Interval = 2000; + lblcurrentlevel.Text = "Level Up!"; + lblnextreward.Text = "You have earned " + rewardbase * (level - 1) + " Code Points!"; + decider.Start(); + } + else { + if (guessalreadydone == true) + { + lblcurrentlevel.Text = "Already Guessed"; + decider.Start(); + } + else { + if (guesscorrect == true) + { + lblcurrentlevel.Text = "Correct :)"; + decider.Start(); + } + else { + lblcurrentlevel.Text = "Wrong :("; + decider.Start(); + } + } + } + } + + + // ERROR: Handles clauses are not supported in C# + private void me_closing() + { + tmrstoryline.Stop(); + } + + private void makeanimallist() + { + animalslist[0] = "aardvark"; + animalslist[1] = "albatross"; + animalslist[2] = "alligator"; + animalslist[3] = "alpaca"; + animalslist[4] = "ant"; + animalslist[5] = "anteater"; + animalslist[6] = "antelope"; + animalslist[7] = "ape"; + animalslist[8] = "armadillo"; + animalslist[9] = "ass"; + animalslist[10] = "baboon"; + animalslist[11] = "badger"; + animalslist[12] = "barracuda"; + animalslist[13] = "bat"; + animalslist[14] = "bear"; + animalslist[15] = "beaver"; + animalslist[16] = "bee"; + animalslist[17] = "bison"; + animalslist[18] = "boar"; + animalslist[19] = "buffalo"; + animalslist[20] = "butterfly"; + animalslist[21] = "camel"; + animalslist[22] = "caribou"; + animalslist[23] = "cat"; + animalslist[24] = "caterpillar"; + animalslist[25] = "cow"; + animalslist[26] = "chamois"; + animalslist[27] = "cheetah"; + animalslist[28] = "chicken"; + animalslist[29] = "chimpanzee"; + animalslist[30] = "chinchilla"; + animalslist[31] = "chough"; + animalslist[32] = "clam"; + animalslist[33] = "cobra"; + animalslist[34] = "cockroach"; + animalslist[35] = "cod"; + animalslist[36] = "cormorant"; + animalslist[37] = "coyote"; + animalslist[38] = "crab"; + animalslist[39] = "crane"; + animalslist[40] = "crocodile"; + animalslist[41] = "crow"; + animalslist[42] = "curlew"; + animalslist[43] = "deer"; + animalslist[44] = "dinosaur"; + animalslist[45] = "dog"; + animalslist[46] = "dogfish"; + animalslist[47] = "dolphin"; + animalslist[48] = "donkey"; + animalslist[49] = "dotterel"; + animalslist[50] = "dove"; + animalslist[51] = "dragonfly"; + animalslist[52] = "duck"; + animalslist[53] = "dugong"; + animalslist[54] = "dunlin"; + animalslist[55] = "eagle"; + animalslist[56] = "echidna"; + animalslist[57] = "eel"; + animalslist[58] = "eland"; + animalslist[59] = "elephant"; + animalslist[60] = "elephant seal"; + animalslist[61] = "elk"; + animalslist[62] = "emu"; + animalslist[63] = "falcon"; + animalslist[64] = "ferret"; + animalslist[65] = "finch"; + animalslist[66] = "fish"; + animalslist[67] = "flamingo"; + animalslist[68] = "fly"; + animalslist[69] = "fox"; + animalslist[70] = "frog"; + animalslist[71] = "galago"; + animalslist[72] = "gaur"; + animalslist[73] = "gazelle"; + animalslist[74] = "gerbil"; + animalslist[75] = "giant panda"; + animalslist[76] = "giraffe"; + animalslist[77] = "gnat"; + animalslist[78] = "gnu"; + animalslist[79] = "goat"; + animalslist[80] = "goldfinch"; + animalslist[81] = "goldfish"; + animalslist[82] = "goose"; + animalslist[83] = "gorilla"; + animalslist[84] = "goshawk"; + animalslist[85] = "grasshopper"; + animalslist[86] = "grouse"; + animalslist[87] = "guanaco"; + animalslist[88] = "guineafowl"; + animalslist[89] = "guinea pig"; + animalslist[90] = "gull"; + animalslist[91] = "hamster"; + animalslist[92] = "hare"; + animalslist[93] = "hawk"; + animalslist[94] = "hedgehog"; + animalslist[95] = "heron"; + animalslist[96] = "herring"; + animalslist[97] = "hippopotamus"; + animalslist[98] = "hornet"; + animalslist[99] = "horse"; + animalslist[100] = "human"; + animalslist[101] = "humming bird"; + animalslist[102] = "hyena"; + animalslist[103] = "jackal"; + animalslist[104] = "jaguar"; + animalslist[105] = "jay"; + animalslist[106] = "jellyfish"; + animalslist[107] = "kangaroo"; + animalslist[108] = "koala"; + animalslist[109] = "komodo dragon"; + animalslist[110] = "kouprey"; + animalslist[111] = "kudu"; + animalslist[112] = "lizard"; + animalslist[113] = "lark"; + animalslist[114] = "lemur"; + animalslist[115] = "leopard"; + animalslist[116] = "lion"; + animalslist[117] = "llama"; + animalslist[118] = "lobster"; + animalslist[119] = "locust"; + animalslist[120] = "loris"; + animalslist[121] = "louse"; + animalslist[122] = "lyrebird"; + animalslist[123] = "magpie"; + animalslist[124] = "mallard"; + animalslist[125] = "manatee"; + animalslist[126] = "marten"; + animalslist[127] = "meerkat"; + animalslist[128] = "mink"; + animalslist[129] = "mole"; + animalslist[130] = "monkey"; + animalslist[131] = "moose"; + animalslist[132] = "mosquito"; + animalslist[133] = "mouse"; + animalslist[134] = "mule"; + animalslist[135] = "narwhal"; + animalslist[136] = "newt"; + animalslist[137] = "nightingale"; + animalslist[138] = "octopus"; + animalslist[139] = "okapi"; + animalslist[140] = "opossum"; + animalslist[141] = "oryx"; + animalslist[142] = "ostrich"; + animalslist[143] = "otter"; + animalslist[144] = "owl"; + animalslist[145] = "ox"; + animalslist[146] = "oyster"; + animalslist[147] = "panther"; + animalslist[148] = "parrot"; + animalslist[149] = "partridge"; + animalslist[150] = "peafowl"; + animalslist[151] = "pelican"; + animalslist[152] = "penguin"; + animalslist[153] = "pheasant"; + animalslist[154] = "pig"; + animalslist[155] = "pigeon"; + animalslist[156] = "pony"; + animalslist[157] = "porcupine"; + animalslist[158] = "porpoise"; + animalslist[159] = "prairie dog"; + animalslist[160] = "quail"; + animalslist[161] = "quelea"; + animalslist[162] = "rabbit"; + animalslist[163] = "raccoon"; + animalslist[164] = "rail"; + animalslist[165] = "ram"; + animalslist[166] = "rat"; + animalslist[167] = "raven"; + animalslist[168] = "red deer"; + animalslist[169] = "red panda"; + animalslist[170] = "reindeer"; + animalslist[171] = "rhinoceros"; + animalslist[172] = "rook"; + animalslist[173] = "ruff"; + animalslist[174] = "salamander"; + animalslist[175] = "salmon"; + animalslist[176] = "sand dollar"; + animalslist[177] = "sandpiper"; + animalslist[178] = "sardine"; + animalslist[179] = "scorpion"; + animalslist[180] = "sea lion"; + animalslist[181] = "sea urchin"; + animalslist[182] = "seahorse"; + animalslist[183] = "seal"; + animalslist[184] = "shark"; + animalslist[185] = "sheep"; + animalslist[186] = "shrew"; + animalslist[187] = "shrimp"; + animalslist[188] = "skunk"; + animalslist[189] = "snail"; + animalslist[190] = "snake"; + animalslist[191] = "spider"; + animalslist[192] = "squid"; + animalslist[193] = "squirrel"; + animalslist[194] = "starling"; + animalslist[195] = "stingray"; + animalslist[196] = "stink bug"; + animalslist[197] = "stork"; + animalslist[198] = "swallow"; + animalslist[199] = "swan"; + animalslist[200] = "tapir"; + animalslist[201] = "tarsier"; + animalslist[202] = "termite"; + animalslist[203] = "tiger"; + animalslist[204] = "toad"; + animalslist[205] = "trout"; + animalslist[206] = "turkey"; + animalslist[207] = "turtle"; + animalslist[208] = "vicuña"; + animalslist[209] = "viper"; + animalslist[210] = "vulture"; + animalslist[211] = "wallaby"; + animalslist[212] = "walrus"; + animalslist[213] = "wasp"; + animalslist[214] = "water buffalo"; + animalslist[215] = "weasel"; + animalslist[216] = "whale"; + animalslist[217] = "wolf"; + animalslist[218] = "wolverine"; + animalslist[219] = "wombat"; + animalslist[220] = "woodcock"; + animalslist[221] = "woodpecker"; + animalslist[222] = "worm"; + animalslist[223] = "wren"; + animalslist[224] = "yak"; + animalslist[225] = "zebra"; + animalslist[226] = "bird"; + } + + private void makefruitlist() + { + fruitslist[0] = "apple"; + fruitslist[1] = "apricot"; + fruitslist[2] = "avocado"; + fruitslist[3] = "banana"; + fruitslist[4] = "breadfruit"; + fruitslist[5] = "bilberry"; + fruitslist[6] = "blackberry"; + fruitslist[7] = "blackcurrant"; + fruitslist[8] = "blueberry"; + fruitslist[9] = "boysenberry"; + fruitslist[10] = "cantaloupe"; + fruitslist[11] = "currant"; + fruitslist[12] = "cherry"; + fruitslist[13] = "cherimoya"; + fruitslist[14] = "chili"; + fruitslist[15] = "cloudberry"; + fruitslist[16] = "coconut"; + fruitslist[17] = "damson"; + fruitslist[18] = "date"; + fruitslist[19] = "dragonfruit"; + fruitslist[20] = "durian"; + fruitslist[21] = "elderberry"; + fruitslist[22] = "feijoa"; + fruitslist[23] = "fig"; + fruitslist[24] = "gooseberry"; + fruitslist[25] = "grape"; + fruitslist[26] = "grapefruit"; + fruitslist[27] = "guava"; + fruitslist[28] = "huckleberry"; + fruitslist[29] = "honeydew"; + fruitslist[30] = "jackfruit"; + fruitslist[31] = "jambul"; + fruitslist[32] = "jujube"; + fruitslist[33] = "kiwi fruit"; + fruitslist[34] = "kumquat"; + fruitslist[35] = "legume"; + fruitslist[36] = "lemon"; + fruitslist[37] = "lime"; + fruitslist[38] = "loquat"; + fruitslist[39] = "lychee"; + fruitslist[40] = "mango"; + fruitslist[41] = "melon"; + fruitslist[42] = "canary melon"; + fruitslist[43] = "cantaloupe"; + fruitslist[44] = "honeydew"; + fruitslist[45] = "watermelon"; + fruitslist[46] = "rock melon"; + fruitslist[47] = "nectarine"; + fruitslist[48] = "nut"; + fruitslist[49] = "orange"; + fruitslist[50] = "clementine"; + fruitslist[51] = "mandarine"; + fruitslist[52] = "tangerine"; + fruitslist[53] = "papaya"; + fruitslist[54] = "passionfruit"; + fruitslist[55] = "peach"; + fruitslist[56] = "bell pepper"; + fruitslist[57] = "pear"; + fruitslist[58] = "persimmon"; + fruitslist[59] = "physalis"; + fruitslist[60] = "plum"; + fruitslist[61] = "pineapple"; + fruitslist[62] = "pomegranate"; + fruitslist[63] = "pomelo"; + fruitslist[64] = "purple mangosteen"; + fruitslist[65] = "quince"; + fruitslist[66] = "raspberry"; + fruitslist[67] = "rambutan"; + fruitslist[68] = "redcurrant"; + fruitslist[69] = "salal berry"; + fruitslist[70] = "satsuma"; + fruitslist[71] = "star fruit"; + fruitslist[72] = "strawberry"; + fruitslist[73] = "tamarillo"; + fruitslist[74] = "tomato"; + fruitslist[75] = "ugli fruit"; + } + + //Based off United Nations member list with additions such as Vatican City - see this video about what a coutry is: https://www.youtube.com/watch?v=4AivEQmfPpk + private void makecountrieslist() + { + countrieslist[0] = "afghanistan"; + countrieslist[1] = "albania"; + countrieslist[2] = "algeria"; + countrieslist[3] = "antigua and barbuda"; + countrieslist[4] = "andorra"; + countrieslist[5] = "angola"; + countrieslist[8] = "argentina"; + countrieslist[9] = "armenia"; + countrieslist[10] = "australia"; + countrieslist[12] = "austria"; + countrieslist[14] = "azerbaijan"; + countrieslist[15] = "bahamas"; + countrieslist[16] = "bahrain"; + countrieslist[17] = "bangladesh"; + countrieslist[18] = "barbados"; + countrieslist[19] = "belarus"; + countrieslist[20] = "belgium"; + countrieslist[21] = "belize"; + countrieslist[22] = "benin"; + countrieslist[23] = "bhutan"; + countrieslist[24] = "bolivia"; + countrieslist[25] = "bosnia"; + countrieslist[26] = "botswana"; + countrieslist[27] = "brunei darussalam"; + countrieslist[28] = "brazil"; + countrieslist[29] = "cabo verde"; + countrieslist[30] = "bulgaria"; + countrieslist[31] = "burkina faso"; + countrieslist[32] = "burundi"; + countrieslist[33] = "cambodia"; + countrieslist[34] = "cameroon"; + countrieslist[35] = "canada"; + countrieslist[36] = "central african republic"; + countrieslist[37] = "chad"; + countrieslist[38] = "chile"; + countrieslist[39] = "china"; + countrieslist[40] = "democratic people's republic of korea"; + countrieslist[41] = "colombia"; + countrieslist[42] = "comoros"; + countrieslist[43] = "congo"; + countrieslist[44] = "côte d'ivoire"; + countrieslist[45] = "cook islands"; + countrieslist[46] = "costa rica"; + countrieslist[47] = "croatia"; + countrieslist[48] = "cuba"; + countrieslist[49] = "cyprus"; + countrieslist[50] = "czech republic"; + countrieslist[51] = "denmark"; + countrieslist[52] = "djibouti"; + countrieslist[53] = "dominica"; + countrieslist[54] = "dominican republic"; + countrieslist[55] = "ecuador"; + countrieslist[56] = "egypt"; + countrieslist[57] = "el salvador"; + countrieslist[58] = "equatorial guinea"; + countrieslist[59] = "eritrea"; + countrieslist[60] = "estonia"; + countrieslist[62] = "ethiopia"; + countrieslist[63] = "fiji"; + countrieslist[64] = "finland"; + countrieslist[65] = "france"; + countrieslist[66] = "gabon"; + countrieslist[67] = "gambia"; + countrieslist[68] = "georgia"; + countrieslist[69] = "germany"; + countrieslist[70] = "ghana"; + countrieslist[71] = "greece"; + countrieslist[72] = "greenland"; + countrieslist[73] = "grenada"; + countrieslist[74] = "guatemala"; + countrieslist[75] = "guinea"; + countrieslist[76] = "guinea bissau"; + countrieslist[77] = "guyana"; + countrieslist[78] = "haiti"; + countrieslist[79] = "vatican city"; + countrieslist[80] = "honduras"; + countrieslist[81] = "hungary"; + countrieslist[82] = "iceland"; + countrieslist[83] = "india"; + countrieslist[84] = "indonesia"; + countrieslist[85] = "iran"; + countrieslist[86] = "iraq"; + countrieslist[87] = "ireland"; + countrieslist[88] = "israel"; + countrieslist[89] = "italy"; + countrieslist[90] = "jamaica"; + countrieslist[91] = "japan"; + countrieslist[92] = "jordan"; + countrieslist[93] = "kazakhstan"; + countrieslist[94] = "kenya"; + countrieslist[95] = "kiribati"; + countrieslist[96] = "kuwait"; + countrieslist[97] = "kyrgyzstan"; + countrieslist[98] = "lao people's democratic republic"; + countrieslist[99] = "latvia"; + countrieslist[100] = "lebanon"; + countrieslist[101] = "lesotho"; + countrieslist[102] = "liberia"; + countrieslist[103] = "libya"; + countrieslist[104] = "liechtenstein"; + countrieslist[105] = "lithuania"; + countrieslist[106] = "luxembourg"; + countrieslist[107] = "madagascar"; + countrieslist[108] = "malawi"; + countrieslist[109] = "malaysia"; + countrieslist[110] = "maldives"; + countrieslist[111] = "mali"; + countrieslist[112] = "malta"; + countrieslist[113] = "marshall islands"; + countrieslist[114] = "mauritania"; + countrieslist[115] = "mauritius"; + countrieslist[116] = "mexico"; + countrieslist[117] = "micronesia"; + countrieslist[118] = "monaco"; + countrieslist[119] = "mongolia"; + countrieslist[120] = "montenegro"; + countrieslist[121] = "morocco"; + countrieslist[122] = "mozambique"; + countrieslist[123] = "myanmar"; + countrieslist[124] = "namibia"; + countrieslist[125] = "nauru"; + countrieslist[126] = "nepal"; + countrieslist[127] = "netherlands"; + countrieslist[128] = "new zealand"; + countrieslist[129] = "nicaragua"; + countrieslist[130] = "niger"; + countrieslist[131] = "nigeria"; + countrieslist[132] = "north korea"; + countrieslist[133] = "norway"; + countrieslist[134] = "oman"; + countrieslist[135] = "pakistan"; + countrieslist[136] = "palau"; + countrieslist[137] = "panama"; + countrieslist[138] = "papua new guinea"; + countrieslist[139] = "paraguay"; + countrieslist[140] = "peru"; + countrieslist[141] = "philippines"; + countrieslist[142] = "republic of moldova"; + countrieslist[143] = "poland"; + countrieslist[144] = "polynesia"; + countrieslist[145] = "portugal"; + countrieslist[146] = "republic of korea"; + countrieslist[147] = "romania"; + countrieslist[148] = "russia"; + countrieslist[149] = "rwanda"; + countrieslist[150] = "saint kitts and nevis"; + countrieslist[151] = "saint lucia"; + countrieslist[152] = "saint pierre and miquelon"; + countrieslist[153] = "saint vincent and grenadines"; + countrieslist[154] = "samoa"; + countrieslist[155] = "san marino"; + countrieslist[156] = "sao tome and principe"; + countrieslist[157] = "saudi arabia"; + countrieslist[158] = "senegal"; + countrieslist[159] = "serbia"; + countrieslist[160] = "seychelles"; + countrieslist[161] = "sierra leone"; + countrieslist[162] = "singapore"; + countrieslist[163] = "slovakia"; + countrieslist[164] = "slovenia"; + countrieslist[165] = "solomon islands"; + countrieslist[166] = "somalia"; + countrieslist[167] = "south africa"; + countrieslist[168] = "south korea"; + countrieslist[169] = "south sudan"; + countrieslist[170] = "spain"; + countrieslist[171] = "sri lanka"; + countrieslist[172] = "sudan"; + countrieslist[173] = "suriname"; + countrieslist[174] = "syrian arab republic"; + countrieslist[175] = "swaziland"; + countrieslist[176] = "sweden"; + countrieslist[177] = "switzerland"; + countrieslist[178] = "syria"; + countrieslist[179] = "taiwan"; + countrieslist[180] = "tajikistan"; + countrieslist[181] = "thailand"; + countrieslist[182] = "east timor"; + countrieslist[183] = "togo"; + countrieslist[184] = "tonga"; + countrieslist[185] = "trinidad and tobago"; + countrieslist[186] = "tunisia"; + countrieslist[187] = "turkey"; + countrieslist[188] = "turkmenistan"; + countrieslist[189] = "united republic of tanzania"; + countrieslist[190] = "tuvalu"; + countrieslist[191] = "uganda"; + countrieslist[192] = "ukraine"; + countrieslist[193] = "united arab emirates"; + countrieslist[194] = "united kingdom"; + //(of Great Britian and Northern Ireland) + countrieslist[195] = "united states"; + countrieslist[196] = "uruguay"; + countrieslist[197] = "uzbekistan"; + countrieslist[198] = "vanuatu"; + countrieslist[199] = "venezuela"; + countrieslist[200] = "vietnam"; + countrieslist[201] = "palestine"; + countrieslist[202] = "yemen"; + countrieslist[203] = "zambia"; + countrieslist[204] = "zimbabwe"; + } + + public void makecarbrandslist() + { + carbrandslist[0] = "8 chinkara"; + carbrandslist[1] = "aba"; + carbrandslist[2] = "abarth"; + carbrandslist[3] = "ac"; + carbrandslist[4] = "ac schnitzer"; + carbrandslist[5] = "acura"; + carbrandslist[6] = "adam"; + carbrandslist[7] = "adams-farwell"; + carbrandslist[8] = "adler"; + carbrandslist[9] = "aero"; + carbrandslist[10] = "aga"; + carbrandslist[11] = "agrale"; + carbrandslist[12] = "aixam"; + carbrandslist[13] = "alfa romeo"; + carbrandslist[14] = "allard"; + carbrandslist[15] = "alpine"; + carbrandslist[16] = "alvis"; + carbrandslist[17] = "anadol"; + carbrandslist[18] = "anasagasti"; + carbrandslist[19] = "angkor"; + carbrandslist[20] = "apollo"; + carbrandslist[21] = "armstrong siddeley"; + carbrandslist[22] = "aro"; + carbrandslist[23] = "ascari"; + carbrandslist[24] = "ashok leyland"; + carbrandslist[25] = "aston martin"; + carbrandslist[26] = "auburn"; + carbrandslist[27] = "audi"; + carbrandslist[28] = "austin"; + carbrandslist[29] = "austin-healey"; + carbrandslist[30] = "auto-mixte"; + carbrandslist[31] = "autobianchi"; + carbrandslist[32] = "automobile dacia"; + carbrandslist[33] = "avia"; + carbrandslist[34] = "avtoframos"; + carbrandslist[35] = "awz"; + carbrandslist[36] = "bahman"; + carbrandslist[37] = "bajaj"; + carbrandslist[38] = "barkas"; + carbrandslist[39] = "bate"; + carbrandslist[40] = "bentley"; + carbrandslist[41] = "bharath benz"; + carbrandslist[42] = "bitter"; + carbrandslist[43] = "bmc"; + carbrandslist[44] = "bmw"; + carbrandslist[45] = "bollore"; + carbrandslist[46] = "borgward"; + carbrandslist[47] = "bricklin"; + carbrandslist[48] = "bristol"; + carbrandslist[49] = "british leyland"; + carbrandslist[50] = "bufori"; + carbrandslist[51] = "bugatti"; + carbrandslist[52] = "buick"; + carbrandslist[53] = "bussing"; + carbrandslist[54] = "c-fee"; + carbrandslist[55] = "cadillac"; + carbrandslist[56] = "callaway"; + carbrandslist[57] = "caterham"; + carbrandslist[58] = "cherdchai"; + carbrandslist[59] = "chevrolet"; + carbrandslist[60] = "chrysler"; + carbrandslist[61] = "citroen"; + carbrandslist[62] = "cizeta"; + carbrandslist[63] = "coda"; + carbrandslist[64] = "cord"; + carbrandslist[65] = "crespi"; + carbrandslist[66] = "crobus"; + carbrandslist[67] = "daf"; + carbrandslist[68] = "daihatsu"; + carbrandslist[69] = "daimler"; + carbrandslist[70] = "datsun"; + carbrandslist[71] = "davis"; + carbrandslist[72] = "dc design"; + carbrandslist[73] = "de tomaso"; + carbrandslist[74] = "delorean"; + carbrandslist[75] = "derby"; + carbrandslist[76] = "dina"; + carbrandslist[77] = "dkw"; + carbrandslist[78] = "knowledgeinput"; + carbrandslist[79] = "dok-ing"; + carbrandslist[80] = "dok-ing xd"; + carbrandslist[81] = "dome"; + carbrandslist[82] = "donkervoort"; + carbrandslist[83] = "dr"; + carbrandslist[84] = "duesenberg"; + carbrandslist[85] = "e-z-go"; + carbrandslist[86] = "eagle"; + carbrandslist[87] = "edsel"; + carbrandslist[88] = "eicher"; + carbrandslist[89] = "elfin"; + carbrandslist[90] = "elva"; + carbrandslist[91] = "enzmann"; + carbrandslist[92] = "essex"; + carbrandslist[93] = "esther"; + carbrandslist[94] = "exagon"; + carbrandslist[95] = "falcon"; + carbrandslist[96] = "fap"; + carbrandslist[97] = "ferrari"; + carbrandslist[98] = "fiat"; + carbrandslist[99] = "fisker"; + carbrandslist[100] = "force"; + carbrandslist[101] = "ford"; + carbrandslist[102] = "fpv"; + carbrandslist[103] = "gaz"; + carbrandslist[104] = "gengatharan"; + carbrandslist[105] = "geo"; + carbrandslist[106] = "ghandhara"; + carbrandslist[107] = "ghandhara nissan"; + carbrandslist[108] = "gillet"; + carbrandslist[109] = "ginetta"; + carbrandslist[110] = "gkd"; + carbrandslist[111] = "glas"; + carbrandslist[112] = "global electric"; + carbrandslist[113] = "gm daewoo"; + carbrandslist[114] = "gm uzbekistan"; + carbrandslist[115] = "gmc"; + carbrandslist[116] = "goliath"; + carbrandslist[117] = "gordon keeble"; + carbrandslist[118] = "graham-paige"; + carbrandslist[119] = "guleryuz karoseri"; + carbrandslist[120] = "gumpert"; + carbrandslist[121] = "gurgel"; + carbrandslist[122] = "hansa"; + carbrandslist[123] = "hattat"; + carbrandslist[124] = "heinkel"; + carbrandslist[125] = "hennessey"; + carbrandslist[126] = "hero"; + carbrandslist[127] = "hillman"; + carbrandslist[128] = "hindustan"; + carbrandslist[129] = "hino"; + carbrandslist[130] = "hinopak"; + carbrandslist[131] = "hispano-argentina"; + carbrandslist[132] = "holden"; + carbrandslist[133] = "hommell"; + carbrandslist[134] = "honda"; + carbrandslist[135] = "honda atlas"; + carbrandslist[136] = "horch"; + carbrandslist[137] = "hsv"; + carbrandslist[138] = "huet brothers"; + carbrandslist[139] = "humber"; + carbrandslist[140] = "hummer"; + carbrandslist[141] = "hupmobile"; + carbrandslist[142] = "hyundai"; + carbrandslist[143] = "iame"; + carbrandslist[144] = "icml"; + carbrandslist[145] = "ida-opel"; + carbrandslist[146] = "ika"; + carbrandslist[147] = "ikarbus"; + carbrandslist[148] = "ikco"; + carbrandslist[149] = "indus"; + carbrandslist[150] = "infiniti"; + carbrandslist[151] = "inokom"; + carbrandslist[152] = "intermeccanica"; + carbrandslist[153] = "international harvester"; + carbrandslist[154] = "isuzu"; + carbrandslist[155] = "isuzu anadolu"; + carbrandslist[156] = "italika"; + carbrandslist[157] = "izh"; + carbrandslist[158] = "jaguar cars"; + carbrandslist[159] = "jeep"; + carbrandslist[160] = "jensen"; + carbrandslist[161] = "josse"; + carbrandslist[162] = "jowett"; + carbrandslist[163] = "jv man"; + carbrandslist[164] = "kaipan"; + carbrandslist[165] = "kaiser"; + carbrandslist[166] = "karsan"; + carbrandslist[167] = "kerman"; + carbrandslist[168] = "kia"; + carbrandslist[169] = "kia"; + carbrandslist[170] = "kish khodro"; + carbrandslist[171] = "kissel"; + carbrandslist[172] = "koenigsegg"; + carbrandslist[173] = "lada"; + carbrandslist[174] = "laforza"; + carbrandslist[175] = "lamborghini"; + carbrandslist[176] = "lanchester"; + carbrandslist[177] = "lancia"; + carbrandslist[178] = "land rover"; + carbrandslist[179] = "lasalle"; + carbrandslist[180] = "lexus"; + carbrandslist[181] = "ligier"; + carbrandslist[182] = "lincoln"; + carbrandslist[183] = "lister"; + carbrandslist[184] = "lloyd"; + carbrandslist[185] = "lobini"; + carbrandslist[186] = "locomobile"; + carbrandslist[187] = "lotus"; + carbrandslist[188] = "mahindra"; + carbrandslist[189] = "man"; + carbrandslist[190] = "mansory"; + carbrandslist[191] = "marcos"; + carbrandslist[192] = "marmon"; + carbrandslist[193] = "marussia"; + carbrandslist[194] = "maruti suzuki"; + carbrandslist[195] = "maserati"; + carbrandslist[196] = "master"; + carbrandslist[197] = "mastretta"; + carbrandslist[198] = "matra"; + carbrandslist[199] = "maybach"; + carbrandslist[200] = "mazda"; + carbrandslist[201] = "mclaren"; + carbrandslist[202] = "mdi"; + carbrandslist[203] = "mercedes"; + carbrandslist[204] = "mercury"; + carbrandslist[205] = "micro"; + carbrandslist[206] = "microcar"; + carbrandslist[207] = "mini"; + carbrandslist[208] = "mini cooper"; + carbrandslist[209] = "mitsubishi"; + carbrandslist[210] = "mitsuoka"; + carbrandslist[211] = "morgan"; + carbrandslist[212] = "morris"; + carbrandslist[213] = "moskvitch"; + carbrandslist[214] = "mosler"; + carbrandslist[215] = "multicar"; + carbrandslist[216] = "mvm"; + carbrandslist[217] = "nag"; + carbrandslist[218] = "nagant"; + carbrandslist[219] = "nash"; + carbrandslist[220] = "navistar"; + carbrandslist[221] = "naza"; + carbrandslist[222] = "neobus"; + carbrandslist[223] = "neoplan"; + carbrandslist[224] = "nissan"; + carbrandslist[225] = "noble"; + carbrandslist[226] = "nsu"; + carbrandslist[227] = "oldsmobile"; + carbrandslist[228] = "oltcit"; + carbrandslist[229] = "opel"; + carbrandslist[230] = "orient"; + carbrandslist[231] = "otokar"; + carbrandslist[232] = "otosan"; + carbrandslist[233] = "oyak"; + carbrandslist[234] = "p.a.r.s moto"; + carbrandslist[235] = "packard"; + carbrandslist[236] = "pagani"; + carbrandslist[237] = "pak suzuki"; + carbrandslist[238] = "panoz"; + carbrandslist[239] = "pars khodro"; + carbrandslist[240] = "perodua"; + carbrandslist[241] = "peugeot"; + carbrandslist[242] = "pgo"; + carbrandslist[243] = "pieper"; + carbrandslist[244] = "pierce-arrow"; + carbrandslist[245] = "plymouth"; + carbrandslist[246] = "pontiac"; + carbrandslist[247] = "porsche"; + carbrandslist[248] = "praga"; + carbrandslist[249] = "premier"; + carbrandslist[250] = "proto"; + carbrandslist[251] = "proton"; + carbrandslist[252] = "puma"; + carbrandslist[253] = "ram"; + carbrandslist[254] = "ramirez"; + carbrandslist[255] = "regal"; + carbrandslist[256] = "renault"; + carbrandslist[257] = "renault samsung"; + carbrandslist[258] = "reo"; + carbrandslist[259] = "riley"; + carbrandslist[260] = "rimac"; + carbrandslist[261] = "robur"; + carbrandslist[262] = "rolls royce"; + carbrandslist[263] = "rover"; + carbrandslist[264] = "ruf"; + carbrandslist[265] = "russo-balt"; + carbrandslist[266] = "saab"; + carbrandslist[267] = "saipa"; + carbrandslist[268] = "saleen"; + carbrandslist[269] = "samavto"; + carbrandslist[270] = "saturn"; + carbrandslist[271] = "sbarro"; + carbrandslist[272] = "scania"; + carbrandslist[273] = "scion"; + carbrandslist[274] = "shane moto"; + carbrandslist[275] = "siam v.m.c."; + carbrandslist[276] = "siata"; + carbrandslist[277] = "simson"; + carbrandslist[278] = "singer"; + carbrandslist[279] = "skoda"; + carbrandslist[280] = "sound"; + carbrandslist[281] = "spyker"; + carbrandslist[282] = "ssangyong"; + carbrandslist[283] = "standard"; + carbrandslist[284] = "stealth"; + carbrandslist[285] = "sterling"; + carbrandslist[286] = "studebaker"; + carbrandslist[287] = "subaru"; + carbrandslist[288] = "sunbeam"; + carbrandslist[289] = "suzuki"; + carbrandslist[290] = "tac"; + carbrandslist[291] = "tafe"; + carbrandslist[292] = "tata"; + carbrandslist[293] = "tatra"; + carbrandslist[294] = "td2000"; + carbrandslist[295] = "temsa"; + carbrandslist[296] = "tesla"; + carbrandslist[297] = "th!nk"; + carbrandslist[298] = "thai rung"; + carbrandslist[299] = "the jamie stahley car"; + carbrandslist[300] = "tickford"; + carbrandslist[301] = "toyota"; + carbrandslist[302] = "trabant"; + carbrandslist[303] = "tranvias-cimex"; + carbrandslist[304] = "triumph"; + carbrandslist[305] = "trojan"; + carbrandslist[306] = "troller"; + carbrandslist[307] = "tucker"; + carbrandslist[308] = "turk traktor"; + carbrandslist[309] = "tvr"; + carbrandslist[310] = "tvs"; + carbrandslist[311] = "uaz"; + carbrandslist[312] = "vam sa"; + carbrandslist[313] = "vauxhall"; + carbrandslist[314] = "venturi"; + carbrandslist[315] = "vignale"; + carbrandslist[316] = "volkswagen"; + carbrandslist[317] = "volvo"; + carbrandslist[318] = "wanderer"; + carbrandslist[319] = "wartburg"; + carbrandslist[320] = "wiesmann"; + carbrandslist[321] = "willys"; + carbrandslist[322] = "wolseley"; + carbrandslist[323] = "yamaha"; + carbrandslist[324] = "yo-mobile"; + carbrandslist[325] = "zastava"; + carbrandslist[326] = "zenvo"; + carbrandslist[327] = "zil"; + carbrandslist[328] = "zoragy"; + } + + public void makegameconsoleslist() + { + gameconsoleslist[0] = "magnavox odyssey"; + gameconsoleslist[1] = "ping-o-tronic"; + gameconsoleslist[2] = "telstar"; + gameconsoleslist[3] = "apf tv fun"; + gameconsoleslist[4] = "philips odyssey"; + gameconsoleslist[5] = "radio shack tv scoreboard"; + gameconsoleslist[6] = "binatone tv master mk iv"; + gameconsoleslist[7] = "color tv game 6"; + gameconsoleslist[8] = "color tv game 15"; + gameconsoleslist[9] = "color tv racing 112"; + gameconsoleslist[10] = "color tv game block breaker"; + gameconsoleslist[11] = "computer tv game"; + gameconsoleslist[12] = "bss 01"; + gameconsoleslist[13] = "fairchild channel f"; + gameconsoleslist[14] = "fairchild channel f system ii"; + gameconsoleslist[15] = "rca studio ii"; + gameconsoleslist[16] = "atari 2600"; + gameconsoleslist[17] = "atari 2600 jr"; + gameconsoleslist[18] = "atari 2800"; + gameconsoleslist[19] = "coleco gemini"; + gameconsoleslist[20] = "bally astrocade"; + gameconsoleslist[21] = "vc 4000"; + gameconsoleslist[22] = "magnavox odyssey 2"; + gameconsoleslist[23] = "apf imagination machine"; + gameconsoleslist[24] = "intellivision"; + gameconsoleslist[25] = "playcable"; + gameconsoleslist[26] = "bandai super vision 8000"; + gameconsoleslist[27] = "intellivision ii"; + gameconsoleslist[28] = "vtech creativision"; + gameconsoleslist[29] = "epoch cassette vision"; + gameconsoleslist[30] = "super cassette vision"; + gameconsoleslist[31] = "arcadia 2001"; + gameconsoleslist[32] = "atari 5200"; + gameconsoleslist[33] = "atari 5100"; + gameconsoleslist[34] = "colecovision"; + gameconsoleslist[35] = "entex adventure vision"; + gameconsoleslist[36] = "vectrex"; + gameconsoleslist[37] = "rdi halcyon"; + gameconsoleslist[38] = "pv-1000"; + gameconsoleslist[39] = "commodore 64 games system"; + gameconsoleslist[40] = "amstrad gx4000"; + gameconsoleslist[41] = "atari 7800"; + gameconsoleslist[42] = "atari xegs"; + gameconsoleslist[43] = "sega sg-1000"; + gameconsoleslist[44] = "sega master system"; + gameconsoleslist[45] = "nintendo entertainment system"; + gameconsoleslist[46] = "sharp nintendo television"; + gameconsoleslist[47] = "nes-101"; + gameconsoleslist[48] = "family computer disk system"; + gameconsoleslist[49] = "zemmix"; + gameconsoleslist[50] = "action max"; + gameconsoleslist[51] = "sega genesis"; + gameconsoleslist[52] = "sega pico"; + gameconsoleslist[53] = "pc engine"; + gameconsoleslist[54] = "konix multisystem"; + gameconsoleslist[55] = "neo-geo"; + gameconsoleslist[56] = "neo-geo cd"; + gameconsoleslist[57] = "neo-geo cdz"; + gameconsoleslist[58] = "commodore cdtv"; + gameconsoleslist[59] = "memorex vis"; + gameconsoleslist[60] = "super nintendo entertainment system"; + gameconsoleslist[61] = "sf-1 snes tv"; + gameconsoleslist[62] = "snes 2"; + gameconsoleslist[63] = "snes-cd"; + gameconsoleslist[64] = "satellaview"; + gameconsoleslist[65] = "cd-i"; + gameconsoleslist[66] = "turboduo"; + gameconsoleslist[67] = "super a'can"; + gameconsoleslist[68] = "pioneer laseractive"; + gameconsoleslist[69] = "fm towns marty"; + gameconsoleslist[70] = "apple bandai pippin"; + gameconsoleslist[71] = "pc-fx"; + gameconsoleslist[72] = "atari panther"; + gameconsoleslist[73] = "atari jaguar"; + gameconsoleslist[74] = "atari jaguar cd"; + gameconsoleslist[75] = "playstation"; + gameconsoleslist[76] = "net yaroze"; + gameconsoleslist[77] = "sega saturn"; + gameconsoleslist[78] = "3do interactive multiplayer"; + gameconsoleslist[79] = "amiga cd32"; + gameconsoleslist[80] = "casio loopy"; + gameconsoleslist[81] = "playdia"; + gameconsoleslist[82] = "nintendo 64"; + gameconsoleslist[83] = "nintendo 64dd"; + gameconsoleslist[84] = "sega neptune"; + gameconsoleslist[85] = "apextreme"; + gameconsoleslist[86] = "atari flashback"; + gameconsoleslist[87] = "atari jaguar ii"; + gameconsoleslist[88] = "dreamcast"; + gameconsoleslist[89] = "l600"; + gameconsoleslist[90] = "gamecube"; + gameconsoleslist[91] = "nuon"; + gameconsoleslist[92] = "ique player"; + gameconsoleslist[93] = "panasonic m2"; + gameconsoleslist[94] = "panasonic q"; + gameconsoleslist[95] = "playstation 2"; + gameconsoleslist[96] = "psx"; + gameconsoleslist[97] = "v.smile"; + gameconsoleslist[98] = "xavixport gaming console"; + gameconsoleslist[99] = "xbox"; + gameconsoleslist[100] = "atari flashback 2"; + gameconsoleslist[101] = "atari flashback 3"; + gameconsoleslist[102] = "atari flashback 4"; + gameconsoleslist[103] = "evo smart console"; + gameconsoleslist[104] = "retro duo"; + gameconsoleslist[105] = "game wave"; + gameconsoleslist[106] = "mattel hyperscan"; + gameconsoleslist[107] = "onlive"; + gameconsoleslist[108] = "phantom"; + gameconsoleslist[109] = "playstation 3"; + gameconsoleslist[110] = "wii"; + gameconsoleslist[111] = "xbox 360"; + gameconsoleslist[112] = "sega firecore"; + gameconsoleslist[113] = "zeebo"; + gameconsoleslist[114] = "sega zone"; + gameconsoleslist[115] = "eedoo ct510"; + gameconsoleslist[116] = "wii u"; + gameconsoleslist[117] = "ouya"; + gameconsoleslist[118] = "gamestick"; + gameconsoleslist[119] = "mojo"; + gameconsoleslist[120] = "gamepop"; + gameconsoleslist[121] = "playstation 4"; + gameconsoleslist[122] = "steam machine"; + gameconsoleslist[123] = "xbox one"; + gameconsoleslist[124] = "xi3 piston"; + + } + + public void makeelementslist() + { + elementslist[0] = "hydrogen"; + elementslist[1] = "helium"; + elementslist[2] = "lithium"; + elementslist[3] = "beryllium"; + elementslist[4] = "boron"; + elementslist[5] = "carbon"; + elementslist[6] = "nitrogen"; + elementslist[7] = "oxygen"; + elementslist[8] = "fluorine"; + elementslist[9] = "neon"; + elementslist[10] = "sodium"; + elementslist[11] = "magnesium"; + elementslist[12] = "aluminium"; + elementslist[13] = "silicon"; + elementslist[14] = "phosphorus"; + elementslist[15] = "sulfur"; + elementslist[16] = "chlorine"; + elementslist[17] = "argon"; + elementslist[18] = "potassium"; + elementslist[19] = "calcium"; + elementslist[20] = "scandium"; + elementslist[21] = "titanium"; + elementslist[22] = "vanadium"; + elementslist[23] = "chromium"; + elementslist[24] = "manganese"; + elementslist[25] = "iron"; + elementslist[26] = "cobalt"; + elementslist[27] = "nickel"; + elementslist[28] = "copper"; + elementslist[29] = "zinc"; + elementslist[30] = "gallium"; + elementslist[31] = "germanium"; + elementslist[32] = "arsenic"; + elementslist[33] = "selenium"; + elementslist[34] = "bromine"; + elementslist[35] = "krypton"; + elementslist[36] = "rubidium"; + elementslist[37] = "strontium"; + elementslist[38] = "yttrium"; + elementslist[39] = "zirconium"; + elementslist[40] = "niobium"; + elementslist[41] = "molybdenum"; + elementslist[42] = "technetium"; + elementslist[43] = "ruthenium"; + elementslist[44] = "rhodium"; + elementslist[45] = "palladium"; + elementslist[46] = "silver"; + elementslist[47] = "cadmium"; + elementslist[48] = "indium"; + elementslist[49] = "tin"; + elementslist[50] = "antimony"; + elementslist[51] = "tellurium"; + elementslist[52] = "iodine"; + elementslist[53] = "xenon"; + elementslist[54] = "caesium"; + elementslist[55] = "barium"; + elementslist[56] = "lanthanum"; + elementslist[57] = "cerium"; + elementslist[58] = "praseodymium"; + elementslist[59] = "neodymium"; + elementslist[60] = "promethium"; + elementslist[61] = "samarium"; + elementslist[62] = "europium"; + elementslist[63] = "gadolinium"; + elementslist[64] = "terbium"; + elementslist[65] = "dysprosium"; + elementslist[66] = "holmium"; + elementslist[67] = "erbium"; + elementslist[68] = "thulium"; + elementslist[69] = "ytterbium"; + elementslist[70] = "lutetium"; + elementslist[71] = "hafnium"; + elementslist[72] = "tantalum"; + elementslist[73] = "tungsten"; + elementslist[74] = "rhenium"; + elementslist[75] = "osmium"; + elementslist[76] = "iridium"; + elementslist[77] = "platinum"; + elementslist[78] = "gold"; + elementslist[79] = "mercury"; + elementslist[80] = "thallium"; + elementslist[81] = "lead"; + elementslist[82] = "bismuth"; + elementslist[83] = "polonium"; + elementslist[84] = "astatine"; + elementslist[85] = "radon"; + elementslist[86] = "francium"; + elementslist[87] = "radium"; + elementslist[88] = "actinium"; + elementslist[89] = "thorium"; + elementslist[90] = "protactinium"; + elementslist[91] = "uranium"; + elementslist[92] = "neptunium"; + elementslist[93] = "plutonium"; + elementslist[94] = "americium"; + elementslist[95] = "curium"; + elementslist[96] = "berkelium"; + elementslist[97] = "californium"; + elementslist[98] = "einsteinium"; + elementslist[99] = "fermium"; + elementslist[100] = "mendelevium"; + elementslist[101] = "nobelium"; + elementslist[102] = "lawrencium"; + elementslist[103] = "rutherfordium"; + elementslist[104] = "dubnium"; + elementslist[105] = "seaborgium"; + elementslist[106] = "bohrium"; + elementslist[107] = "hassium"; + elementslist[108] = "meitnerium"; + elementslist[109] = "darmstadtium"; + elementslist[110] = "roentgenium"; + elementslist[111] = "copernicium"; + elementslist[112] = "ununtrium"; + elementslist[113] = "flerovium"; + elementslist[114] = "ununpentium"; + elementslist[115] = "livermorium"; + elementslist[116] = "ununseptium"; + elementslist[117] = "ununoctium"; + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/KnowledgeInput.resx b/source/WindowsFormsApplication1/Apps/KnowledgeInput.resx new file mode 100644 index 0000000..7310dd5 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/KnowledgeInput.resx @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="Label2.Text" xml:space="preserve"> + <value> - Select a category on the left to begin playing. + - Every 10 correct guesses levels you up on that category. + - Each level, the amount of codepoints you earn for levelling up +increases by 10. + - Words you have already guessed do not count.</value> + </data> + <metadata name="decider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="tmrstoryline.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>109, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Labyrinth.Designer.cs b/source/WindowsFormsApplication1/Apps/Labyrinth.Designer.cs new file mode 100644 index 0000000..8efe097 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Labyrinth.Designer.cs @@ -0,0 +1,38 @@ +namespace ShiftOS +{ + partial class Labyrinth + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Text = "Labyrinth"; + } + + #endregion + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Labyrinth.cs b/source/WindowsFormsApplication1/Apps/Labyrinth.cs new file mode 100644 index 0000000..ade5495 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Labyrinth.cs @@ -0,0 +1,20 @@ +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 +{ + public partial class Labyrinth : Form + { + public Labyrinth() + { + InitializeComponent(); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/NameChanger.Designer.cs b/source/WindowsFormsApplication1/Apps/NameChanger.Designer.cs new file mode 100644 index 0000000..c9380a8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NameChanger.Designer.cs @@ -0,0 +1,165 @@ +namespace ShiftOS +{ + partial class NameChanger + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.propertyGrid1 = new System.Windows.Forms.PropertyGrid(); + this.pnlactions = new System.Windows.Forms.FlowLayoutPanel(); + this.btnapply = new System.Windows.Forms.Button(); + this.btnload = new System.Windows.Forms.Button(); + this.btnsave = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlactions.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // propertyGrid1 + // + this.propertyGrid1.BackColor = System.Drawing.Color.White; + this.propertyGrid1.CategoryForeColor = System.Drawing.Color.Black; + this.propertyGrid1.CategorySplitterColor = System.Drawing.Color.Gray; + this.propertyGrid1.CommandsActiveLinkColor = System.Drawing.Color.Black; + this.propertyGrid1.CommandsBackColor = System.Drawing.Color.White; + this.propertyGrid1.CommandsBorderColor = System.Drawing.Color.White; + this.propertyGrid1.CommandsDisabledLinkColor = System.Drawing.Color.Gray; + this.propertyGrid1.CommandsForeColor = System.Drawing.Color.Black; + this.propertyGrid1.CommandsLinkColor = System.Drawing.Color.Gray; + this.propertyGrid1.DisabledItemForeColor = System.Drawing.Color.Gray; + this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill; + this.propertyGrid1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.propertyGrid1.HelpVisible = false; + this.propertyGrid1.LineColor = System.Drawing.Color.White; + this.propertyGrid1.Location = new System.Drawing.Point(0, 28); + this.propertyGrid1.Name = "propertyGrid1"; + this.propertyGrid1.PropertySort = System.Windows.Forms.PropertySort.Alphabetical; + this.propertyGrid1.SelectedItemWithFocusBackColor = System.Drawing.Color.Gray; + this.propertyGrid1.SelectedItemWithFocusForeColor = System.Drawing.Color.White; + this.propertyGrid1.Size = new System.Drawing.Size(403, 400); + this.propertyGrid1.TabIndex = 0; + this.propertyGrid1.ToolbarVisible = false; + this.propertyGrid1.ViewBackColor = System.Drawing.Color.White; + this.propertyGrid1.ViewBorderColor = System.Drawing.Color.White; + this.propertyGrid1.ViewForeColor = System.Drawing.Color.Black; + // + // pnlactions + // + this.pnlactions.BackColor = System.Drawing.Color.Gray; + this.pnlactions.Controls.Add(this.btnapply); + this.pnlactions.Controls.Add(this.btnload); + this.pnlactions.Controls.Add(this.btnsave); + this.pnlactions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlactions.Location = new System.Drawing.Point(0, 428); + this.pnlactions.Name = "pnlactions"; + this.pnlactions.Size = new System.Drawing.Size(403, 39); + this.pnlactions.TabIndex = 1; + // + // btnapply + // + this.btnapply.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapply.ForeColor = System.Drawing.Color.White; + this.btnapply.Location = new System.Drawing.Point(3, 3); + this.btnapply.Name = "btnapply"; + this.btnapply.Size = new System.Drawing.Size(75, 33); + this.btnapply.TabIndex = 0; + this.btnapply.Text = "Apply"; + this.btnapply.UseVisualStyleBackColor = true; + this.btnapply.Click += new System.EventHandler(this.btnapply_Click); + // + // btnload + // + this.btnload.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnload.ForeColor = System.Drawing.Color.White; + this.btnload.Location = new System.Drawing.Point(84, 3); + this.btnload.Name = "btnload"; + this.btnload.Size = new System.Drawing.Size(75, 33); + this.btnload.TabIndex = 1; + this.btnload.Text = "Load Pack"; + this.btnload.UseVisualStyleBackColor = true; + this.btnload.Click += new System.EventHandler(this.btnload_Click); + // + // btnsave + // + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsave.ForeColor = System.Drawing.Color.White; + this.btnsave.Location = new System.Drawing.Point(165, 3); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(75, 33); + this.btnsave.TabIndex = 2; + this.btnsave.Text = "Save Pack"; + this.btnsave.UseVisualStyleBackColor = true; + this.btnsave.Click += new System.EventHandler(this.btnsave_Click); + // + // label1 + // + this.label1.Dock = System.Windows.Forms.DockStyle.Top; + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.label1.Location = new System.Drawing.Point(0, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(403, 28); + this.label1.TabIndex = 2; + this.label1.Text = "Name Changer"; + this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.propertyGrid1); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.pnlactions); + 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(403, 467); + this.panel1.TabIndex = 3; + // + // NameChanger + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(403, 467); + this.Controls.Add(this.panel1); + this.Name = "NameChanger"; + this.Text = "NameChanger"; + this.Load += new System.EventHandler(this.NameChanger_Load); + this.pnlactions.ResumeLayout(false); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + private System.Windows.Forms.FlowLayoutPanel pnlactions; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnapply; + private System.Windows.Forms.Button btnload; + private System.Windows.Forms.Button btnsave; + private System.Windows.Forms.Panel panel1; + public System.Windows.Forms.PropertyGrid propertyGrid1; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NameChanger.cs b/source/WindowsFormsApplication1/Apps/NameChanger.cs new file mode 100644 index 0000000..0dcac90 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NameChanger.cs @@ -0,0 +1,107 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + + public partial class NameChanger : Form + { + public NameChanger() + { + InitializeComponent(); + } + + public NamePackModel np = new NamePackModel(); + + public void LoadModel() + { + var n = Skinning.Utilities.LoadedNames; + np.ArtpadName = n.ArtpadName; + np.TextpadName = n.TextpadName; + np.PongName = n.PongName; + np.TerminalName = n.TerminalName; + np.ShutdownName = n.ShutdownName; + np.ShifterName = n.ShifterName; + np.NameChangerName = n.NameChangerName; + np.ShiftoriumName = n.ShiftoriumName; + np.UnityName = n.UnityName; + np.KnowledgeInputName = n.KnowledgeInputName; + np.SkinLoaderName = n.SkinLoaderName; + np.FileSkimmerName = n.FileSkimmerName; + } + + public void SaveModel() + { + var json = JsonConvert.SerializeObject(np); + File.WriteAllText(Paths.LoadedSkin + "names.npk", json); + } + + private void NameChanger_Load(object sender, EventArgs e) + { + LoadModel(); + propertyGrid1.SelectedObject = np; + } + + private void btnapply_Click(object sender, EventArgs e) + { + int cp = new Random().Next(1, 5); + SaveModel(); + API.CreateInfoboxSession("Name Changer", "The new Name Pack has been applied! You have earned " + cp.ToString() + " Codepoints!", infobox.InfoboxMode.Info); + Skinning.Utilities.saveskin(); + API.CurrentSession.SetupDesktop(); + API.AddCodepoints(cp); + } + + private void btnload_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".npk", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if(res != "fail") + { + string json = File.ReadAllText(res); + np = JsonConvert.DeserializeObject<NamePackModel>(json); + } + }; + } + + private void btnsave_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".npk", File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + string json = JsonConvert.SerializeObject(np); + File.WriteAllText(res, json); + } + }; + } + } + public class NamePackModel + { + public string TerminalName { get; set; } + public string ArtpadName { get; set; } + public string TextpadName { get; set; } + public string ShiftoriumName { get; set; } + public string KnowledgeInputName { get; set; } + public string PongName { get; set; } + public string ShifterName { get; set; } + public string FileSkimmerName { get; set; } + public string SkinLoaderName { get; set; } + public string ShutdownName { get; set; } + public string UnityName { get; set; } + public string NameChangerName { get; set; } + } +} diff --git a/source/WindowsFormsApplication1/Apps/NameChanger.resx b/source/WindowsFormsApplication1/Apps/NameChanger.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NameChanger.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NetGen.Designer.cs b/source/WindowsFormsApplication1/Apps/NetGen.Designer.cs new file mode 100644 index 0000000..b596cdb --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetGen.Designer.cs @@ -0,0 +1,628 @@ +namespace ShiftOS +{ + partial class NetGen + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NetGen)); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlnetdesign = new System.Windows.Forms.Panel(); + this.pnlpcinfo = new System.Windows.Forms.Panel(); + this.btndelete = new System.Windows.Forms.Button(); + this.lbpcinfo = new System.Windows.Forms.Label(); + this.lbmoduletitle = new System.Windows.Forms.Label(); + this.btncloseinfo = new System.Windows.Forms.Button(); + this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); + this.btnaddmodule = new System.Windows.Forms.Button(); + this.pnlbuy = new System.Windows.Forms.Panel(); + this.txthostname = new System.Windows.Forms.TextBox(); + this.lbhostname = new System.Windows.Forms.Label(); + this.txtgrade = new System.Windows.Forms.TextBox(); + this.lbgrade = new System.Windows.Forms.Label(); + this.lbmoduleinfo = new System.Windows.Forms.Label(); + this.cmbbuyable = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.btndonebuying = new System.Windows.Forms.Button(); + this.pnlnetinf = new System.Windows.Forms.Panel(); + this.label6 = new System.Windows.Forms.Label(); + this.cbdifficulty = new System.Windows.Forms.ComboBox(); + this.txtfspeed = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.txtfskill = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.txtnetdesc = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.txtnetname = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.flbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btnnext = new System.Windows.Forms.Button(); + this.btnback = new System.Windows.Forms.Button(); + this.pnlnetinfo = new System.Windows.Forms.Panel(); + this.lbdescription = new System.Windows.Forms.Label(); + this.lbtitle = new System.Windows.Forms.Label(); + this.btnloadfromtemplate = new System.Windows.Forms.Button(); + this.pnltemplates = new System.Windows.Forms.Panel(); + this.label9 = new System.Windows.Forms.Label(); + this.cbnets = new System.Windows.Forms.ComboBox(); + this.label10 = new System.Windows.Forms.Label(); + this.btnrecreate = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.pnlnetdesign.SuspendLayout(); + this.pnlpcinfo.SuspendLayout(); + this.flowLayoutPanel1.SuspendLayout(); + this.pnlbuy.SuspendLayout(); + this.pnlnetinf.SuspendLayout(); + this.flbuttons.SuspendLayout(); + this.pnlnetinfo.SuspendLayout(); + this.pnltemplates.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.pnltemplates); + this.panel1.Controls.Add(this.pnlnetdesign); + this.panel1.Controls.Add(this.pnlnetinf); + this.panel1.Controls.Add(this.flbuttons); + this.panel1.Controls.Add(this.pnlnetinfo); + 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(894, 591); + this.panel1.TabIndex = 0; + this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); + // + // pnlnetdesign + // + this.pnlnetdesign.Controls.Add(this.pnlpcinfo); + this.pnlnetdesign.Controls.Add(this.flowLayoutPanel1); + this.pnlnetdesign.Controls.Add(this.pnlbuy); + this.pnlnetdesign.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlnetdesign.Location = new System.Drawing.Point(0, 76); + this.pnlnetdesign.Name = "pnlnetdesign"; + this.pnlnetdesign.Size = new System.Drawing.Size(894, 484); + this.pnlnetdesign.TabIndex = 6; + this.pnlnetdesign.MouseDown += new System.Windows.Forms.MouseEventHandler(this.place_module); + // + // pnlpcinfo + // + this.pnlpcinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlpcinfo.Controls.Add(this.btndelete); + this.pnlpcinfo.Controls.Add(this.lbpcinfo); + this.pnlpcinfo.Controls.Add(this.lbmoduletitle); + this.pnlpcinfo.Controls.Add(this.btncloseinfo); + this.pnlpcinfo.Location = new System.Drawing.Point(43, 167); + this.pnlpcinfo.Name = "pnlpcinfo"; + this.pnlpcinfo.Size = new System.Drawing.Size(382, 280); + this.pnlpcinfo.TabIndex = 9; + this.pnlpcinfo.Visible = false; + // + // btndelete + // + this.btndelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btndelete.AutoSize = true; + this.btndelete.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndelete.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndelete.Location = new System.Drawing.Point(106, 254); + this.btndelete.Name = "btndelete"; + this.btndelete.Size = new System.Drawing.Size(59, 23); + this.btndelete.TabIndex = 8; + this.btndelete.Text = "Delete"; + this.btndelete.UseVisualStyleBackColor = true; + this.btndelete.Click += new System.EventHandler(this.btndelete_Click); + // + // lbpcinfo + // + this.lbpcinfo.Location = new System.Drawing.Point(12, 41); + this.lbpcinfo.Name = "lbpcinfo"; + this.lbpcinfo.Size = new System.Drawing.Size(367, 86); + this.lbpcinfo.TabIndex = 6; + this.lbpcinfo.Text = resources.GetString("lbpcinfo.Text"); + // + // lbmoduletitle + // + this.lbmoduletitle.AutoSize = true; + this.lbmoduletitle.Location = new System.Drawing.Point(10, 12); + this.lbmoduletitle.Name = "lbmoduletitle"; + this.lbmoduletitle.Size = new System.Drawing.Size(75, 11); + this.lbmoduletitle.TabIndex = 2; + this.lbmoduletitle.Text = "Add Module"; + // + // btncloseinfo + // + this.btncloseinfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btncloseinfo.AutoSize = true; + this.btncloseinfo.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btncloseinfo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btncloseinfo.Location = new System.Drawing.Point(327, 254); + this.btncloseinfo.Name = "btncloseinfo"; + this.btncloseinfo.Size = new System.Drawing.Size(52, 23); + this.btncloseinfo.TabIndex = 1; + this.btncloseinfo.Text = "Done."; + this.btncloseinfo.UseVisualStyleBackColor = true; + this.btncloseinfo.Click += new System.EventHandler(this.btncloseinfo_Click); + // + // flowLayoutPanel1 + // + this.flowLayoutPanel1.Controls.Add(this.btnaddmodule); + this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 453); + this.flowLayoutPanel1.Name = "flowLayoutPanel1"; + this.flowLayoutPanel1.Size = new System.Drawing.Size(894, 31); + this.flowLayoutPanel1.TabIndex = 8; + // + // btnaddmodule + // + this.btnaddmodule.AutoSize = true; + this.btnaddmodule.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnaddmodule.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnaddmodule.Location = new System.Drawing.Point(3, 3); + this.btnaddmodule.Name = "btnaddmodule"; + this.btnaddmodule.Size = new System.Drawing.Size(87, 23); + this.btnaddmodule.TabIndex = 0; + this.btnaddmodule.Text = "Add Module"; + this.btnaddmodule.UseVisualStyleBackColor = true; + this.btnaddmodule.Click += new System.EventHandler(this.btnaddmodule_Click); + // + // pnlbuy + // + this.pnlbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnlbuy.Controls.Add(this.txthostname); + this.pnlbuy.Controls.Add(this.lbhostname); + this.pnlbuy.Controls.Add(this.txtgrade); + this.pnlbuy.Controls.Add(this.lbgrade); + this.pnlbuy.Controls.Add(this.lbmoduleinfo); + this.pnlbuy.Controls.Add(this.cmbbuyable); + this.pnlbuy.Controls.Add(this.label4); + this.pnlbuy.Controls.Add(this.btndonebuying); + this.pnlbuy.Location = new System.Drawing.Point(3, 148); + this.pnlbuy.Name = "pnlbuy"; + this.pnlbuy.Size = new System.Drawing.Size(382, 299); + this.pnlbuy.TabIndex = 7; + this.pnlbuy.Visible = false; + // + // txthostname + // + this.txthostname.BackColor = System.Drawing.Color.Black; + this.txthostname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txthostname.ForeColor = System.Drawing.Color.White; + this.txthostname.Location = new System.Drawing.Point(186, 236); + this.txthostname.Name = "txthostname"; + this.txthostname.Size = new System.Drawing.Size(186, 18); + this.txthostname.TabIndex = 10; + // + // lbhostname + // + this.lbhostname.AutoSize = true; + this.lbhostname.Location = new System.Drawing.Point(112, 240); + this.lbhostname.Name = "lbhostname"; + this.lbhostname.Size = new System.Drawing.Size(68, 11); + this.lbhostname.TabIndex = 9; + this.lbhostname.Text = "Hostname:"; + // + // txtgrade + // + this.txtgrade.BackColor = System.Drawing.Color.Black; + this.txtgrade.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtgrade.ForeColor = System.Drawing.Color.White; + this.txtgrade.Location = new System.Drawing.Point(65, 236); + this.txtgrade.Name = "txtgrade"; + this.txtgrade.Size = new System.Drawing.Size(40, 18); + this.txtgrade.TabIndex = 8; + this.txtgrade.TextChanged += new System.EventHandler(this.txtgrade_TextChanged); + // + // lbgrade + // + this.lbgrade.AutoSize = true; + this.lbgrade.Location = new System.Drawing.Point(12, 240); + this.lbgrade.Name = "lbgrade"; + this.lbgrade.Size = new System.Drawing.Size(47, 11); + this.lbgrade.TabIndex = 7; + this.lbgrade.Text = "Grade:"; + // + // lbmoduleinfo + // + this.lbmoduleinfo.Location = new System.Drawing.Point(10, 63); + this.lbmoduleinfo.Name = "lbmoduleinfo"; + this.lbmoduleinfo.Size = new System.Drawing.Size(367, 156); + this.lbmoduleinfo.TabIndex = 6; + this.lbmoduleinfo.Text = resources.GetString("lbmoduleinfo.Text"); + // + // cmbbuyable + // + this.cmbbuyable.BackColor = System.Drawing.Color.Black; + this.cmbbuyable.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbbuyable.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cmbbuyable.ForeColor = System.Drawing.Color.White; + this.cmbbuyable.FormattingEnabled = true; + this.cmbbuyable.Location = new System.Drawing.Point(12, 38); + this.cmbbuyable.Name = "cmbbuyable"; + this.cmbbuyable.Size = new System.Drawing.Size(360, 19); + this.cmbbuyable.TabIndex = 3; + this.cmbbuyable.SelectedIndexChanged += new System.EventHandler(this.cmbbuyable_SelectedIndexChanged); + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(10, 12); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(75, 11); + this.label4.TabIndex = 2; + this.label4.Text = "Add Module"; + // + // btndonebuying + // + this.btndonebuying.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btndonebuying.AutoSize = true; + this.btndonebuying.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndonebuying.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndonebuying.Location = new System.Drawing.Point(341, 273); + this.btndonebuying.Name = "btndonebuying"; + this.btndonebuying.Size = new System.Drawing.Size(38, 23); + this.btndonebuying.TabIndex = 1; + this.btndonebuying.Text = "Buy"; + this.btndonebuying.UseVisualStyleBackColor = true; + this.btndonebuying.Click += new System.EventHandler(this.btndonebuying_Click); + // + // pnlnetinf + // + this.pnlnetinf.Controls.Add(this.label6); + this.pnlnetinf.Controls.Add(this.cbdifficulty); + this.pnlnetinf.Controls.Add(this.txtfspeed); + this.pnlnetinf.Controls.Add(this.label5); + this.pnlnetinf.Controls.Add(this.txtfskill); + this.pnlnetinf.Controls.Add(this.label3); + this.pnlnetinf.Controls.Add(this.txtnetdesc); + this.pnlnetinf.Controls.Add(this.label2); + this.pnlnetinf.Controls.Add(this.txtnetname); + this.pnlnetinf.Controls.Add(this.label1); + this.pnlnetinf.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlnetinf.Location = new System.Drawing.Point(0, 76); + this.pnlnetinf.Name = "pnlnetinf"; + this.pnlnetinf.Size = new System.Drawing.Size(894, 484); + this.pnlnetinf.TabIndex = 0; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(40, 225); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(124, 11); + this.label6.TabIndex = 11; + this.label6.Text = "Difficulty (Tier)"; + // + // cbdifficulty + // + this.cbdifficulty.BackColor = System.Drawing.Color.Black; + this.cbdifficulty.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbdifficulty.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbdifficulty.ForeColor = System.Drawing.Color.Green; + this.cbdifficulty.FormattingEnabled = true; + this.cbdifficulty.Items.AddRange(new object[] { + "easy", + "medium", + "hard"}); + this.cbdifficulty.Location = new System.Drawing.Point(170, 222); + this.cbdifficulty.Name = "cbdifficulty"; + this.cbdifficulty.Size = new System.Drawing.Size(121, 19); + this.cbdifficulty.TabIndex = 10; + // + // txtfspeed + // + this.txtfspeed.BackColor = System.Drawing.Color.Black; + this.txtfspeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtfspeed.ForeColor = System.Drawing.Color.Green; + this.txtfspeed.Location = new System.Drawing.Point(142, 172); + this.txtfspeed.Name = "txtfspeed"; + this.txtfspeed.Size = new System.Drawing.Size(41, 18); + this.txtfspeed.TabIndex = 9; + this.txtfspeed.TextChanged += new System.EventHandler(this.txtfspeed_TextChanged); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(40, 174); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(61, 11); + this.label5.TabIndex = 8; + this.label5.Text = "F. Speed"; + // + // txtfskill + // + this.txtfskill.BackColor = System.Drawing.Color.Black; + this.txtfskill.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtfskill.ForeColor = System.Drawing.Color.Green; + this.txtfskill.Location = new System.Drawing.Point(142, 146); + this.txtfskill.Name = "txtfskill"; + this.txtfskill.Size = new System.Drawing.Size(41, 18); + this.txtfskill.TabIndex = 7; + this.txtfskill.TextChanged += new System.EventHandler(this.txtfskill_TextChanged); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(40, 148); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(61, 11); + this.label3.TabIndex = 6; + this.label3.Text = "F. Skill"; + // + // txtnetdesc + // + this.txtnetdesc.BackColor = System.Drawing.Color.Black; + this.txtnetdesc.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtnetdesc.ForeColor = System.Drawing.Color.Green; + this.txtnetdesc.Location = new System.Drawing.Point(142, 80); + this.txtnetdesc.Name = "txtnetdesc"; + this.txtnetdesc.Size = new System.Drawing.Size(492, 18); + this.txtnetdesc.TabIndex = 5; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(40, 82); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(89, 11); + this.label2.TabIndex = 4; + this.label2.Text = "Description:"; + // + // txtnetname + // + this.txtnetname.BackColor = System.Drawing.Color.Black; + this.txtnetname.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtnetname.ForeColor = System.Drawing.Color.Green; + this.txtnetname.Location = new System.Drawing.Point(142, 56); + this.txtnetname.Name = "txtnetname"; + this.txtnetname.Size = new System.Drawing.Size(231, 18); + this.txtnetname.TabIndex = 3; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(40, 58); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(96, 11); + this.label1.TabIndex = 2; + this.label1.Text = "Network Name:"; + // + // flbuttons + // + this.flbuttons.Controls.Add(this.btnnext); + this.flbuttons.Controls.Add(this.btnback); + this.flbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.flbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.flbuttons.Location = new System.Drawing.Point(0, 560); + this.flbuttons.Name = "flbuttons"; + this.flbuttons.Size = new System.Drawing.Size(894, 31); + this.flbuttons.TabIndex = 0; + // + // btnnext + // + this.btnnext.AutoSize = true; + this.btnnext.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnnext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnnext.Location = new System.Drawing.Point(846, 3); + this.btnnext.Name = "btnnext"; + this.btnnext.Size = new System.Drawing.Size(45, 23); + this.btnnext.TabIndex = 0; + this.btnnext.Text = "Next"; + this.btnnext.UseVisualStyleBackColor = true; + this.btnnext.Click += new System.EventHandler(this.btnnext_Click); + // + // btnback + // + this.btnback.AutoSize = true; + this.btnback.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnback.Location = new System.Drawing.Point(795, 3); + this.btnback.Name = "btnback"; + this.btnback.Size = new System.Drawing.Size(45, 23); + this.btnback.TabIndex = 1; + this.btnback.Text = "Back"; + this.btnback.UseVisualStyleBackColor = true; + this.btnback.Click += new System.EventHandler(this.btnback_Click); + // + // pnlnetinfo + // + this.pnlnetinfo.Controls.Add(this.btnloadfromtemplate); + this.pnlnetinfo.Controls.Add(this.lbdescription); + this.pnlnetinfo.Controls.Add(this.lbtitle); + this.pnlnetinfo.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlnetinfo.Location = new System.Drawing.Point(0, 0); + this.pnlnetinfo.Name = "pnlnetinfo"; + this.pnlnetinfo.Size = new System.Drawing.Size(894, 76); + this.pnlnetinfo.TabIndex = 1; + // + // lbdescription + // + this.lbdescription.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbdescription.Location = new System.Drawing.Point(15, 31); + this.lbdescription.Name = "lbdescription"; + this.lbdescription.Size = new System.Drawing.Size(867, 36); + this.lbdescription.TabIndex = 1; + this.lbdescription.Text = "Information about the network."; + // + // lbtitle + // + this.lbtitle.AutoSize = true; + this.lbtitle.Font = new System.Drawing.Font("Lucida Console", 13F); + this.lbtitle.Location = new System.Drawing.Point(12, 9); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Size = new System.Drawing.Size(217, 18); + this.lbtitle.TabIndex = 0; + this.lbtitle.Text = "Network Information"; + // + // btnloadfromtemplate + // + this.btnloadfromtemplate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnloadfromtemplate.AutoSize = true; + this.btnloadfromtemplate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnloadfromtemplate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnloadfromtemplate.Location = new System.Drawing.Point(683, 47); + this.btnloadfromtemplate.Name = "btnloadfromtemplate"; + this.btnloadfromtemplate.Size = new System.Drawing.Size(199, 23); + this.btnloadfromtemplate.TabIndex = 2; + this.btnloadfromtemplate.Text = "This button breaks things."; + this.btnloadfromtemplate.UseVisualStyleBackColor = true; + this.btnloadfromtemplate.Visible = false; + this.btnloadfromtemplate.Click += new System.EventHandler(this.btnloadfromtemplate_Click); + // + // pnltemplates + // + this.pnltemplates.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnltemplates.Controls.Add(this.label9); + this.pnltemplates.Controls.Add(this.cbnets); + this.pnltemplates.Controls.Add(this.label10); + this.pnltemplates.Controls.Add(this.btnrecreate); + this.pnltemplates.Location = new System.Drawing.Point(256, 146); + this.pnltemplates.Name = "pnltemplates"; + this.pnltemplates.Size = new System.Drawing.Size(382, 299); + this.pnltemplates.TabIndex = 8; + this.pnltemplates.Visible = false; + // + // label9 + // + this.label9.Location = new System.Drawing.Point(10, 63); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(367, 156); + this.label9.TabIndex = 6; + this.label9.Text = "Please choose a network from the above list. Net Generator will attempt to grab d" + + "ata about the network and recreate it for you."; + // + // cbnets + // + this.cbnets.BackColor = System.Drawing.Color.Black; + this.cbnets.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbnets.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbnets.ForeColor = System.Drawing.Color.White; + this.cbnets.FormattingEnabled = true; + this.cbnets.Location = new System.Drawing.Point(12, 38); + this.cbnets.Name = "cbnets"; + this.cbnets.Size = new System.Drawing.Size(360, 19); + this.cbnets.TabIndex = 3; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Location = new System.Drawing.Point(10, 12); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(124, 11); + this.label10.TabIndex = 2; + this.label10.Text = "Load from Network"; + // + // btnrecreate + // + this.btnrecreate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnrecreate.AutoSize = true; + this.btnrecreate.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnrecreate.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnrecreate.Location = new System.Drawing.Point(334, 273); + this.btnrecreate.Name = "btnrecreate"; + this.btnrecreate.Size = new System.Drawing.Size(45, 23); + this.btnrecreate.TabIndex = 1; + this.btnrecreate.Text = "Done"; + this.btnrecreate.UseVisualStyleBackColor = true; + this.btnrecreate.Click += new System.EventHandler(this.btnrecreate_Click); + // + // NetGen + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 11F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(894, 591); + this.Controls.Add(this.panel1); + this.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.ForeColor = System.Drawing.Color.LightGreen; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "NetGen"; + this.Text = "NetGen"; + this.Load += new System.EventHandler(this.NetGen_Load); + this.panel1.ResumeLayout(false); + this.pnlnetdesign.ResumeLayout(false); + this.pnlpcinfo.ResumeLayout(false); + this.pnlpcinfo.PerformLayout(); + this.flowLayoutPanel1.ResumeLayout(false); + this.flowLayoutPanel1.PerformLayout(); + this.pnlbuy.ResumeLayout(false); + this.pnlbuy.PerformLayout(); + this.pnlnetinf.ResumeLayout(false); + this.pnlnetinf.PerformLayout(); + this.flbuttons.ResumeLayout(false); + this.flbuttons.PerformLayout(); + this.pnlnetinfo.ResumeLayout(false); + this.pnlnetinfo.PerformLayout(); + this.pnltemplates.ResumeLayout(false); + this.pnltemplates.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.FlowLayoutPanel flbuttons; + private System.Windows.Forms.TextBox txtnetname; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Panel pnlnetinfo; + private System.Windows.Forms.Label lbdescription; + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.TextBox txtnetdesc; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btnnext; + private System.Windows.Forms.Button btnback; + private System.Windows.Forms.Panel pnlnetdesign; + private System.Windows.Forms.Panel pnlnetinf; + private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; + private System.Windows.Forms.Button btnaddmodule; + private System.Windows.Forms.Panel pnlbuy; + private System.Windows.Forms.TextBox txthostname; + private System.Windows.Forms.Label lbhostname; + private System.Windows.Forms.TextBox txtgrade; + private System.Windows.Forms.Label lbgrade; + private System.Windows.Forms.Label lbmoduleinfo; + private System.Windows.Forms.ComboBox cmbbuyable; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button btndonebuying; + private System.Windows.Forms.Panel pnlpcinfo; + private System.Windows.Forms.Button btndelete; + private System.Windows.Forms.Label lbpcinfo; + private System.Windows.Forms.Label lbmoduletitle; + private System.Windows.Forms.Button btncloseinfo; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox cbdifficulty; + private System.Windows.Forms.TextBox txtfspeed; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox txtfskill; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btnloadfromtemplate; + private System.Windows.Forms.Panel pnltemplates; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.ComboBox cbnets; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Button btnrecreate; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NetGen.cs b/source/WindowsFormsApplication1/Apps/NetGen.cs new file mode 100644 index 0000000..616505d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetGen.cs @@ -0,0 +1,361 @@ +using Newtonsoft.Json; +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 +{ + public partial class NetGen : Form + { + public NetGen() + { + InitializeComponent(); + } + + private EnemyHacker network = null; + private int stage = 0; + private List<Computer> potentialModules = null; + private Module fmod = null; + + private void NetGen_Load(object sender, EventArgs e) + { + SetupUI(); + potentialModules = new List<Computer>(); + } + + private void panel1_Paint(object sender, PaintEventArgs e) + { + + } + + public void SetupUI() + { + btnback.Hide(); + + switch(stage) + { + case 0: + lbtitle.Text = "Network Information"; + lbdescription.Text = "Information about the network."; + pnlnetinf.BringToFront(); + break; + case 1: + //clear potential + if(potentialModules != null) + { + foreach(var p in potentialModules) + { + pnlnetdesign.Controls.Remove(p); + p.Hide(); + + } + potentialModules = new List<Computer>(); + } + //create net + if (overwrite_net == true) + { + network = new EnemyHacker(txtnetname.Text, txtnetdesc.Text, txtnetdesc.Text, this.skill, this.speed, cbdifficulty.Text); + } + else + { + network = new EnemyHacker(txtnetname.Text, txtnetdesc.Text, txtnetdesc.Text, this.skill, this.speed, cbdifficulty.Text); + network.Network = TemplateNet; + } + network.Network[0].HP = network.Network[0].GetTotalHP(); + var c = network.Network[0].Deploy(); + c.Left = (pnlnetdesign.Width - 64) / 2; + c.Top = (pnlnetdesign.Height - 64) / 2; + pnlnetdesign.Controls.Add(c); + c.Select += (s, a) => + { + ShowSysInf(c); + }; + c.Show(); + lbtitle.Text = "Playfield Designer"; + lbdescription.Text = "Design the playfield of the network. Strategically place defensive and offensive modules to protect the Core from attacks. You can have a maximum of 20 objects (minus core) on-screen."; + pnlnetdesign.BringToFront(); + btnnext.Text = "Finish"; + break; + case 2: + var tp = new TextPad(); + var core = network.Network[0]; + core.X = 0; + core.Y = 0; + foreach (var pc in potentialModules) + { + var m = new Module(pc.Type, pc.Grade, pc.Hostname); + m.X = pc.Left; + m.Y = pc.Top; + network.AddModule(m); + } + var json = JsonConvert.SerializeObject(network); + API.CreateForm(tp, "Network JSON", API.GetIcon("TextPad")); + tp.txtuserinput.Text = json; + this.Close(); + break; + } + + } + + private void btnnext_Click(object sender, EventArgs e) + { + stage += 1; + SetupUI(); + } + + private void btnback_Click(object sender, EventArgs e) + { + stage -= 1; + } + + private void btnaddmodule_Click(object sender, EventArgs e) + { + SetupBuyable(); + pnlbuy.Visible = !pnlbuy.Visible; + } + + List<FutureModule> BuyableModules = null; + + public void SetupBuyable() + { + BuyableModules = Hacking.GetFutureModules(); + cmbbuyable.Items.Clear(); + foreach (var m in BuyableModules) + { + cmbbuyable.Items.Add(m.Name); + } + lbmoduleinfo.Text = ""; + txtgrade.Text = "1"; + } + + private void SetupModuleInfo() + { + bool cont = false; + FutureModule m = null; + foreach (var mod in BuyableModules) + { + if (mod.Name == cmbbuyable.Text) + { + m = mod; + cont = true; + } + } + if (cont == true) + { + lbmoduleinfo.Text = m.Name; + lbmoduleinfo.Text += Environment.NewLine + $"Cost: {m.Cost * Convert.ToInt32(txtgrade.Text)} CP"; + lbmoduleinfo.Text += Environment.NewLine + $"Description: {Environment.NewLine}{m.Description}"; + } + } + + private void cmbbuyable_SelectedIndexChanged(object sender, EventArgs e) + { + SetupModuleInfo(); + } + + private void txtgrade_TextChanged(object sender, EventArgs e) + { + int grade = 0; + int.TryParse(txtgrade.Text, out grade); + if(grade < 1) + { + txtgrade.Text = "1"; + } + else if(grade > 4) + { + txtgrade.Text = "4"; + } + } + + bool PlacingNewModule = false; + + private void btndonebuying_Click(object sender, EventArgs e) + { + if(!string.IsNullOrEmpty(cmbbuyable.Text)) + { + if(!string.IsNullOrEmpty(cmbbuyable.Text)) + { + int grade = Convert.ToInt32(txtgrade.Text); + string hostname = txthostname.Text; + FutureModule m = null; + foreach(var mod in BuyableModules) + { + if(mod.Name == cmbbuyable.Text) + { + m = mod; + } + } + if(m != null) + { + bool cont = true; + if (potentialModules.Count <= 20) + { + foreach (var pc in potentialModules) + { + if (pc.Hostname == hostname) + { + cont = false; + } + } + } + else + { + cont = false; + } + if(cont) + { + var newModule = new Module(m.Type, grade, hostname); + fmod = newModule; + PlacingNewModule = true; + pnlbuy.Hide(); + } + else + { + API.CreateInfoboxSession("Can't place new module", "Either an existing module with the same hostname already exists in the field, or you have hit the maximum.", infobox.InfoboxMode.Info); + } + } + } + } + } + + private void place_module(object sender, MouseEventArgs e) + { + if (PlacingNewModule == true) + { + if (e.Button == MouseButtons.Left) + { + var coordinates = pnlnetdesign.PointToClient(Cursor.Position); + int x = coordinates.X; + int y = coordinates.Y; + fmod.HP = fmod.GetTotalHP(); + var computerToPlace = fmod.Deploy(); + computerToPlace.Location = new Point(x, y); + pnlnetdesign.Controls.Add(computerToPlace); + potentialModules.Add(computerToPlace); + computerToPlace.Select += (s, a) => + { + ShowSysInf(computerToPlace); + }; + computerToPlace.Show(); + } + else + { + PlacingNewModule = false; + } + } + } + + private Computer SelectedSystem = null; + + public void ShowSysInf(Computer pc) + { + pnlpcinfo.Left = pnlbuy.Left; + var nl = Environment.NewLine; + SelectedSystem = pc; + pnlpcinfo.Show(); + lbpcinfo.Text = $"Hostname: {SelectedSystem.Hostname}"; + lbpcinfo.Text += $"{nl}Max HP: {SelectedSystem.HP}"; + lbpcinfo.Text += $"{nl}Grade: {SelectedSystem.Grade}"; + lbpcinfo.Text += $"{nl}Type: {SelectedSystem.Type}"; + } + + private void btndelete_Click(object sender, EventArgs e) + { + if(SelectedSystem != null) + { + potentialModules.Remove(SelectedSystem); + pnlnetdesign.Controls.Remove(SelectedSystem); + SelectedSystem.Dispose(); + } + SelectedSystem = null; + pnlpcinfo.Hide(); + } + + private void btncloseinfo_Click(object sender, EventArgs e) + { + SelectedSystem = null; + pnlpcinfo.Hide(); + } + + int skill = 0; + int speed = 0; + + private void txtfskill_TextChanged(object sender, EventArgs e) + { + try + { + skill = Convert.ToInt32(txtfskill.Text); + } + catch + { + txtfskill.Text = skill.ToString(); + } + } + + private void txtfspeed_TextChanged(object sender, EventArgs e) + { + try + { + speed = Convert.ToInt32(txtfspeed.Text); + } + catch + { + txtfspeed.Text = speed.ToString(); + } + } + + Dictionary<string, EnemyHacker> Templates = null; + + public void SetupTemplates() + { + Templates = JsonConvert.DeserializeObject<Dictionary<string, EnemyHacker>>(Properties.Resources.NetBrowser_Enemies); + cbnets.Items.Clear(); + foreach(var t in Templates) + { + cbnets.Items.Add(t.Key); + } + } + + private void btnloadfromtemplate_Click(object sender, EventArgs e) + { + SetupTemplates(); + pnltemplates.BringToFront(); + pnltemplates.Visible = !pnltemplates.Visible; + } + + bool overwrite_net = true; + List<Module> TemplateNet = null; + + public void SetupTemplate(EnemyHacker t) + { + txtnetname.Text = t.Name; + txtnetdesc.Text = t.Description; + txtfskill.Text = t.FriendSkill.ToString(); + txtfspeed.Text = t.FriendSpeed.ToString(); + cbdifficulty.SelectedItem = t.Difficulty; + stage = 0; + overwrite_net = false; + TemplateNet = t.Network; + SetupUI(); + } + + private void btnrecreate_Click(object sender, EventArgs e) + { + try + { + SetupTemplate(Templates[cbnets.Text]); + pnltemplates.Hide(); + } + catch + { + + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/NetGen.resx b/source/WindowsFormsApplication1/Apps/NetGen.resx new file mode 100644 index 0000000..c6bdcd8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetGen.resx @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="lbpcinfo.Text" xml:space="preserve"> + <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. + +Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. + +To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. + +If you would like to buy a new module, click 'Buy new module'.</value> + </data> + <data name="lbmoduleinfo.Text" xml:space="preserve"> + <value>When you press 'Done', simply click where you'd like to place the new module. You can right-click the playing field to cancel the deployment. + +Some modules have a range of effect. For example, an Antivirus will only heal modules within it's area of effect and only if their HP is below 10. This can be upgraded. + +To upgrade a module, simply right-click it on the playing field and choose 'Upgrade this module'. + +If you would like to buy a new module, click 'Buy new module'.</value> + </data> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NetworkBrowser.Designer.cs b/source/WindowsFormsApplication1/Apps/NetworkBrowser.Designer.cs new file mode 100644 index 0000000..cf9468d --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetworkBrowser.Designer.cs @@ -0,0 +1,290 @@ +namespace ShiftOS +{ + partial class NetworkBrowser + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label3 = new System.Windows.Forms.Label(); + this.btnscreen = new System.Windows.Forms.Button(); + this.pnlmynet = new System.Windows.Forms.Panel(); + this.flmodules = new System.Windows.Forms.FlowLayoutPanel(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.btntier = new System.Windows.Forms.Button(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.btnstartbattle = new System.Windows.Forms.Button(); + this.lbnets = new System.Windows.Forms.ListBox(); + this.panel2 = new System.Windows.Forms.Panel(); + this.lbnetdesc = new System.Windows.Forms.Label(); + this.lbtitle = new System.Windows.Forms.Label(); + this.pgtotalhealth = new ShiftOS.ProgressBarEX(); + this.tmrcalctotal = new System.Windows.Forms.Timer(this.components); + this.panel1.SuspendLayout(); + this.pnlmynet.SuspendLayout(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.btnscreen); + this.panel1.Controls.Add(this.pnlmynet); + this.panel1.Controls.Add(this.btntier); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.btnstartbattle); + this.panel1.Controls.Add(this.lbnets); + 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(725, 495); + this.panel1.TabIndex = 0; + // + // 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(282, 470); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(44, 13); + this.label3.TabIndex = 8; + this.label3.Text = "Screen:"; + // + // btnscreen + // + this.btnscreen.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnscreen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnscreen.Location = new System.Drawing.Point(332, 465); + this.btnscreen.Name = "btnscreen"; + this.btnscreen.Size = new System.Drawing.Size(84, 23); + this.btnscreen.TabIndex = 7; + this.btnscreen.Text = "Network List"; + this.btnscreen.UseVisualStyleBackColor = true; + this.btnscreen.Click += new System.EventHandler(this.btnscreen_Click); + // + // pnlmynet + // + this.pnlmynet.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.pnlmynet.Controls.Add(this.pgtotalhealth); + this.pnlmynet.Controls.Add(this.flmodules); + this.pnlmynet.Controls.Add(this.label5); + this.pnlmynet.Controls.Add(this.label4); + this.pnlmynet.Location = new System.Drawing.Point(12, 12); + this.pnlmynet.Name = "pnlmynet"; + this.pnlmynet.Size = new System.Drawing.Size(404, 447); + this.pnlmynet.TabIndex = 6; + // + // flmodules + // + this.flmodules.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.flmodules.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; + this.flmodules.Location = new System.Drawing.Point(7, 140); + this.flmodules.Name = "flmodules"; + this.flmodules.Size = new System.Drawing.Size(394, 298); + this.flmodules.TabIndex = 3; + this.flmodules.WrapContents = false; + // + // label5 + // + this.label5.Location = new System.Drawing.Point(4, 37); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(397, 58); + this.label5.TabIndex = 2; + this.label5.Text = "Below you can see your network\'s total health, as well as a list of any damaged m" + + "odules\' health. If \'localhost\' is on the list and it\'s health is 0, you cannot p" + + "articipate in any battles."; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.label4.Location = new System.Drawing.Point(3, 5); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(91, 20); + this.label4.TabIndex = 1; + this.label4.Text = "My Network"; + // + // btntier + // + this.btntier.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btntier.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btntier.Location = new System.Drawing.Point(47, 465); + this.btntier.Name = "btntier"; + this.btntier.Size = new System.Drawing.Size(75, 23); + this.btntier.TabIndex = 5; + this.btntier.Text = "1"; + this.btntier.UseVisualStyleBackColor = true; + this.btntier.Click += new System.EventHandler(this.btntier_Click); + // + // label2 + // + 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(13, 470); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(28, 13); + this.label2.TabIndex = 4; + this.label2.Text = "Tier:"; + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Location = new System.Drawing.Point(419, 354); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(294, 71); + this.label1.TabIndex = 3; + this.label1.Text = "When you\'re ready, click \'Start Battle\' to begin the hacker battle."; + // + // btnstartbattle + // + this.btnstartbattle.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnstartbattle.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstartbattle.Location = new System.Drawing.Point(638, 465); + this.btnstartbattle.Name = "btnstartbattle"; + this.btnstartbattle.Size = new System.Drawing.Size(75, 23); + this.btnstartbattle.TabIndex = 2; + this.btnstartbattle.Text = "Start Battle"; + this.btnstartbattle.UseVisualStyleBackColor = true; + this.btnstartbattle.Click += new System.EventHandler(this.btnstartbattle_Click); + // + // lbnets + // + this.lbnets.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.lbnets.BackColor = System.Drawing.Color.Black; + this.lbnets.ForeColor = System.Drawing.Color.White; + this.lbnets.FormattingEnabled = true; + this.lbnets.Location = new System.Drawing.Point(13, 17); + this.lbnets.Name = "lbnets"; + this.lbnets.Size = new System.Drawing.Size(403, 433); + this.lbnets.TabIndex = 1; + this.lbnets.SelectedIndexChanged += new System.EventHandler(this.lbnets_SelectedIndexChanged); + // + // panel2 + // + this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.panel2.Controls.Add(this.lbnetdesc); + this.panel2.Controls.Add(this.lbtitle); + this.panel2.Location = new System.Drawing.Point(422, 13); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(291, 326); + this.panel2.TabIndex = 0; + // + // lbnetdesc + // + this.lbnetdesc.Location = new System.Drawing.Point(5, 36); + this.lbnetdesc.Name = "lbnetdesc"; + this.lbnetdesc.Size = new System.Drawing.Size(283, 290); + this.lbnetdesc.TabIndex = 1; + this.lbnetdesc.Text = "No network selected."; + // + // lbtitle + // + this.lbtitle.AutoSize = true; + this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.lbtitle.Location = new System.Drawing.Point(4, 4); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Size = new System.Drawing.Size(129, 20); + this.lbtitle.TabIndex = 0; + this.lbtitle.Text = "Network Browser"; + // + // pgtotalhealth + // + this.pgtotalhealth.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pgtotalhealth.BackColor = System.Drawing.Color.Black; + this.pgtotalhealth.BlockSeparation = 3; + this.pgtotalhealth.BlockWidth = 5; + this.pgtotalhealth.Color = System.Drawing.Color.Gray; + this.pgtotalhealth.Location = new System.Drawing.Point(7, 98); + this.pgtotalhealth.MaxValue = 100; + this.pgtotalhealth.MinValue = 0; + this.pgtotalhealth.Name = "pgtotalhealth"; + this.pgtotalhealth.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal; + this.pgtotalhealth.ShowValue = true; + this.pgtotalhealth.Size = new System.Drawing.Size(394, 32); + this.pgtotalhealth.Step = 10; + this.pgtotalhealth.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Continuous; + this.pgtotalhealth.TabIndex = 4; + this.pgtotalhealth.Value = 0; + // + // tmrcalctotal + // + this.tmrcalctotal.Enabled = true; + this.tmrcalctotal.Tick += new System.EventHandler(this.tmrcalctotal_Tick); + // + // NetworkBrowser + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(725, 495); + this.Controls.Add(this.panel1); + this.ForeColor = System.Drawing.Color.Black; + this.Name = "NetworkBrowser"; + this.Text = "NetworkBrowser"; + this.Load += new System.EventHandler(this.NetworkBrowser_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.pnlmynet.ResumeLayout(false); + this.pnlmynet.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Button btnstartbattle; + private System.Windows.Forms.ListBox lbnets; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Label lbnetdesc; + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.Button btntier; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Button btnscreen; + private System.Windows.Forms.Panel pnlmynet; + private System.Windows.Forms.FlowLayoutPanel flmodules; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private ProgressBarEX pgtotalhealth; + private System.Windows.Forms.Timer tmrcalctotal; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs b/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs new file mode 100644 index 0000000..127140f --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetworkBrowser.cs @@ -0,0 +1,301 @@ +using Newtonsoft.Json; +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; + +namespace ShiftOS +{ + public partial class NetworkBrowser : Form + { + public NetworkBrowser() + { + InitializeComponent(); + } + + public Dictionary<string, EnemyHacker> Networks = null; + + private void NetworkBrowser_Load(object sender, EventArgs e) + { + LoadNetworks(); + SetupSidePane(); + pnlmynet.Hide(); + } + + public string CurrentTier = "easy"; + public EnemyHacker SelectedNet = null; + + public void LoadNetworks() + { + switch(CurrentTier) + { + case "easy": + btntier.Text = "1"; + break; + case "medium": + btntier.Text = "2"; + break; + case "hard": + btntier.Text = "3"; + break; + } + Networks = JsonConvert.DeserializeObject<Dictionary<string, EnemyHacker>>(Properties.Resources.NetBrowser_Enemies); + lbnets.Items.Clear(); + var Tier1 = new List<string>(); + var Tier2 = new List<string>(); + var Tier3 = new List<string>(); + + foreach (var net in Networks) + { + if (!API.CurrentSave.CompletedNets.Contains(net.Key)) + { + switch (net.Value.Difficulty) + { + case "easy": + Tier1.Add(net.Key); + break; + case "medium": + Tier2.Add(net.Key); + break; + case "hard": + Tier3.Add(net.Key); + break; + } + } + } + + switch (CurrentTier) + { + case "easy": + SetupUI(Tier1); + break; + case "medium": + SetupUI(Tier2); + break; + case "hard": + SetupUI(Tier3); + break; + } + } + + public void SetupSidePane() + { + if(SelectedNet != null) + { + lbtitle.Text = SelectedNet.Name; + lbnetdesc.Text = SelectedNet.Description + @" + +Leader hack speed: " + SelectedNet.FriendSpeed.ToString() + @" +Leader hack skill: " + SelectedNet.FriendSkill.ToString() + @" + +Those above values only matter if the leader decides to become a friend. If they do, you can hire them for free to hack into certain ShiftOS applications."; + btnstartbattle.Enabled = true; + } + else + { + lbtitle.Text = "Network Browser"; + lbnetdesc.Text = "No network selected."; + btnstartbattle.Enabled = false; + } + } + + public void SetupUI(List<string> tier) + { + if (tier.Count > 0) + { + foreach (var t in tier) + { + lbnets.Items.Add(t); + } + } + else + { + AddLeader(CurrentTier); + } + } + + public void AddLeader(string tier) + { + if (API.Upgrades["nb_tier_" + tier] == false) + { + var enemy = JsonConvert.DeserializeObject<EnemyHacker>(Get_Leader_JSON(tier)); + Networks.Add(enemy.Name, enemy); + lbnets.Items.Add(enemy.Name); + } + } + + public string Get_Leader_JSON(string tier) + { + switch(tier) + { + case "easy": + return Properties.Resources.Hacker_DanaRoss; + case "medium": + return Properties.Resources.Hacker_AustinWalker; + case "hard": + return Properties.Resources.Hacker_JonathanRivard; + default: + return null; + + } + } + + private void btntier_Click(object sender, EventArgs e) + { + switch(btntier.Text) + { + case "1": + if(API.Upgrades["nb_tier_easy"] == true) + { + CurrentTier = "medium"; + } + break; + case "2": + if (API.Upgrades["nb_tier_medium"] == true) + { + CurrentTier = "hard"; + } + else + { + CurrentTier = "easy"; + } + break; + case "3": + CurrentTier = "easy"; + break; + } + LoadNetworks(); + } + + private void lbnets_SelectedIndexChanged(object sender, EventArgs e) + { + var t = lbnets.SelectedItem as string; + foreach(var net in Networks) + { + if(net.Key == t) + { + SelectedNet = net.Value; + } + } + SetupSidePane(); + } + + private void btnstartbattle_Click(object sender, EventArgs e) + { + if (Hacking.MyCore.HP == 0) + { + SetupMyNet(); + pnlmynet.Show(); + btnscreen.Text = "My Network"; + API.CreateInfoboxSession("Your Core isn't ready.", "Your Core (hostname \"localhost\") has 0 HP, and cannot fight. Please wait until your Core regenerates.", infobox.InfoboxMode.Info); + } + else + { + string tier_upgrade = null; + if (SelectedNet.IsLeader == true) + { + tier_upgrade = "nb_tier_" + CurrentTier; + } + var hui = new HackUI(SelectedNet); + hui.OnWin += (object s, EventArgs a) => + { + if (tier_upgrade != null) + { + API.Upgrades[tier_upgrade] = true; + if(CurrentTier == "easy") + { + if(API.Upgrades["midgamebridge"] == false) + { + var term = new Terminal(); + API.CreateForm(term, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); + term.StartDanaRossStory(); + } + } + else if(CurrentTier == "medium") + { + var h = new HoloChat(); + var fakeroom = new FakeChatClient(); + fakeroom.Name = "The Hacker Alliance"; + fakeroom.Topic = "The Hacker Alliance - We are the masters. DevX cannot control us."; + fakeroom.OtherCharacters = new List<string>(new [] {"Richard Ladouceur"}); + fakeroom.Messages = JsonConvert.DeserializeObject<Dictionary<string, string>>(Properties.Resources.AustinWalkerCompletionStory); + API.CreateForm(h, "QuickChat", API.GetIcon("QuickChat")); + var t = new Thread(new ThreadStart(new Action(() => + { + Thread.Sleep(200); + h.Invoke(new Action(() => + { + h.SetupFakeClient(fakeroom); + })); + }))); + + } + foreach(var mod in SelectedNet.Network) + { + if (mod.Type != SystemType.Core) + { + mod.HP = 0; + Hacking.MyNetwork.Add(mod); + } + } + SetupMyNet(); + } + API.CurrentSave.CompletedNets.Add(SelectedNet.Name); + SelectedNet = null; + LoadNetworks(); + SetupSidePane(); + }; + hui.Show(); + } + } + + public void SetupMyNet() + { + flmodules.Controls.Clear(); + foreach(var m in Hacking.MyNetwork) + { + var mStatus = new NetModuleStatus(m); + flmodules.Controls.Add(mStatus); + mStatus.Show(); + } + } + + private void btnscreen_Click(object sender, EventArgs e) + { + switch (btnscreen.Text) + { + case "My Network": + LoadNetworks(); + SetupSidePane(); + pnlmynet.Hide(); + btnscreen.Text = "Network List"; + break; + case "Network List": + SetupMyNet(); + pnlmynet.Show(); + btnscreen.Text = "My Network"; + break; + } + + } + + private void tmrcalctotal_Tick(object sender, EventArgs e) + { + int total = 0; + int hp = 0; + foreach(var mod in Hacking.MyNetwork) + { + total += mod.GetTotalHP(); + hp += mod.HP; + } + pgtotalhealth.MaxValue = total; + pgtotalhealth.Value = hp; + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/NetworkBrowser.resx b/source/WindowsFormsApplication1/Apps/NetworkBrowser.resx new file mode 100644 index 0000000..fa83c0a --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/NetworkBrowser.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="tmrcalctotal.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/PanelManager.Designer.cs b/source/WindowsFormsApplication1/Apps/PanelManager.Designer.cs new file mode 100644 index 0000000..2ae44a8 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/PanelManager.Designer.cs @@ -0,0 +1,132 @@ +namespace ShiftOS +{ + partial class PanelManager + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.pnlmain = new System.Windows.Forms.Panel(); + this.btndone = new System.Windows.Forms.Button(); + this.pnlbgcolor = new System.Windows.Forms.Panel(); + this.Label40 = new System.Windows.Forms.Label(); + this.Label36 = new System.Windows.Forms.Label(); + this.txtheight = new System.Windows.Forms.TextBox(); + this.pnlmain.SuspendLayout(); + this.SuspendLayout(); + // + // pnlmain + // + this.pnlmain.BackColor = System.Drawing.Color.White; + this.pnlmain.Controls.Add(this.txtheight); + this.pnlmain.Controls.Add(this.Label36); + this.pnlmain.Controls.Add(this.pnlbgcolor); + this.pnlmain.Controls.Add(this.Label40); + this.pnlmain.Controls.Add(this.btndone); + this.pnlmain.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlmain.ForeColor = System.Drawing.Color.Black; + this.pnlmain.Location = new System.Drawing.Point(0, 0); + this.pnlmain.Name = "pnlmain"; + this.pnlmain.Size = new System.Drawing.Size(360, 378); + this.pnlmain.TabIndex = 0; + // + // btndone + // + this.btndone.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndone.Location = new System.Drawing.Point(273, 343); + this.btndone.Name = "btndone"; + this.btndone.Size = new System.Drawing.Size(75, 23); + this.btndone.TabIndex = 0; + this.btndone.Text = "Done"; + this.btndone.UseVisualStyleBackColor = true; + this.btndone.Click += new System.EventHandler(this.btndone_Click); + // + // pnlbgcolor + // + this.pnlbgcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbgcolor.Location = new System.Drawing.Point(307, 101); + this.pnlbgcolor.Name = "pnlbgcolor"; + this.pnlbgcolor.Size = new System.Drawing.Size(41, 20); + this.pnlbgcolor.TabIndex = 22; + this.pnlbgcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.setbgcolor); + // + // 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(12, 101); + this.Label40.Name = "Label40"; + this.Label40.Size = new System.Drawing.Size(259, 16); + this.Label40.TabIndex = 23; + this.Label40.Text = "Background Color (right-click to set image)"; + // + // Label36 + // + this.Label36.AutoSize = true; + this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label36.Location = new System.Drawing.Point(12, 136); + this.Label36.Name = "Label36"; + this.Label36.Size = new System.Drawing.Size(50, 16); + this.Label36.TabIndex = 24; + this.Label36.Text = "Height:"; + // + // txtheight + // + this.txtheight.BackColor = System.Drawing.Color.White; + this.txtheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtheight.ForeColor = System.Drawing.Color.Black; + this.txtheight.Location = new System.Drawing.Point(325, 134); + this.txtheight.Name = "txtheight"; + this.txtheight.Size = new System.Drawing.Size(23, 22); + this.txtheight.TabIndex = 25; + this.txtheight.TextChanged += new System.EventHandler(this.txtheight_TextChanged); + // + // PanelManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(360, 378); + this.Controls.Add(this.pnlmain); + this.Name = "PanelManager"; + this.Text = "PanelManager"; + this.Load += new System.EventHandler(this.PanelManager_Load); + this.pnlmain.ResumeLayout(false); + this.pnlmain.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnlmain; + private System.Windows.Forms.Button btndone; + private System.Windows.Forms.Panel pnlbgcolor; + private System.Windows.Forms.Label Label40; + private System.Windows.Forms.Label Label36; + private System.Windows.Forms.TextBox txtheight; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/PanelManager.cs b/source/WindowsFormsApplication1/Apps/PanelManager.cs new file mode 100644 index 0000000..d347fb5 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/PanelManager.cs @@ -0,0 +1,74 @@ +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 +{ + public partial class PanelManager : Form + { + public PanelManager(Skinning.DesktopPanel newPanel) + { + pnl = newPanel; + InitializeComponent(); + } + + private Skinning.DesktopPanel pnl = null; + + private void setbgcolor(object sender, MouseEventArgs e) + { + if(e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Background", pnl.BackgroundColor); + API.ColorPickerSession.FormClosing += (s, a) => + { + var c = API.GetLastColorFromSession(); + pnl.BackgroundColor = c; + pnl.BackgroundImage = null; + pnl.ImagePath = null; + }; + } + else if(e.Button == MouseButtons.Right) + { + API.CreateGraphicPickerSession("Panel Background", false); + API.GraphicPickerSession.FormClosing += (s, a) => + { + var img = API.GraphicPickerSession.IdleImage; + pnl.BackgroundImage = img; + }; + } + } + + private void txtheight_TextChanged(object sender, EventArgs e) + { + try + { + int height = Convert.ToInt32(txtheight.Text); + pnl.Height = height; + } + catch + { + txtheight.Text = pnl.Height.ToString(); + } + } + + private void btndone_Click(object sender, EventArgs e) + { + API.CurrentSession.SetupDesktopPanel(); + Skinning.Utilities.saveskin(); + this.Close(); + } + + private void PanelManager_Load(object sender, EventArgs e) + { + pnlbgcolor.BackColor = pnl.BackgroundColor; + pnlbgcolor.BackgroundImage = pnl.BackgroundImage; + txtheight.Text = pnl.Height.ToString(); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/PanelManager.resx b/source/WindowsFormsApplication1/Apps/PanelManager.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/PanelManager.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Pong.Designer.cs b/source/WindowsFormsApplication1/Apps/Pong.Designer.cs new file mode 100644 index 0000000..d7d7bdb --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Pong.Designer.cs @@ -0,0 +1,588 @@ +using System; +using System.Windows.Forms; + +namespace ShiftOS +{ + partial class Pong + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Pong)); + this.pgcontents = new System.Windows.Forms.Panel(); + this.pnlgamestats = new System.Windows.Forms.Panel(); + 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.pnllose = new System.Windows.Forms.Panel(); + this.lblmissedout = 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.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.lblbeatai = new System.Windows.Forms.Label(); + this.lblcountdown = new System.Windows.Forms.Label(); + this.ball = new System.Windows.Forms.Panel(); + 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.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.SuspendLayout(); + this.pnlgamestats.SuspendLayout(); + this.pnllose.SuspendLayout(); + this.pnlintro.SuspendLayout(); + this.pnlfinalstats.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.pnlgamestats); + this.pgcontents.Controls.Add(this.pnllose); + this.pgcontents.Controls.Add(this.pnlintro); + this.pgcontents.Controls.Add(this.pnlfinalstats); + 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.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove); + // + // pnlgamestats + // + 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, 206); + this.pnlgamestats.TabIndex = 6; + this.pnlgamestats.Visible = false; + // + // 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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, 162); + 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, 126); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(245, 33); + this.Label3.TabIndex = 3; + this.Label3.Text = "Or do you want to try your luck on the next level to increase your reward?"; + this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btncashout + // + this.btncashout.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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 = "Would you like the end the game now and cash out with your reward?"; + 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!"; + // + // pnllose + // + this.pnllose.Controls.Add(this.lblmissedout); + 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; + // + // btnlosetryagain + // + this.btnlosetryagain.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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 = resources.GetString("Label6.Text"); + this.Label6.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // btnstartgame + // + this.btnstartgame.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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 = "Click this button to play pong!"; + 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(179, 5); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(250, 31); + this.Label8.TabIndex = 14; + this.Label8.Text = "Welcome to Pong!"; + // + // 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.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + 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 = "Click this button to play again!"; + 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; + // + // 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; + // + // 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.Bottom) + | 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; + // + // 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); + // + // Pong + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(700, 400); + this.Controls.Add(this.pgcontents); + this.DoubleBuffered = true; + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Pong"; + this.Text = "Pong"; + this.TopMost = true; + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.me_closing); + 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.pnllose.ResumeLayout(false); + this.pnlintro.ResumeLayout(false); + this.pnlintro.PerformLayout(); + this.pnlfinalstats.ResumeLayout(false); + this.pnlfinalstats.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Panel ball; + 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.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; + + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Pong.cs b/source/WindowsFormsApplication1/Apps/Pong.cs new file mode 100644 index 0000000..c685100 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Pong.cs @@ -0,0 +1,481 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Pong : Form + { + 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; + + public Pong() + { + InitializeComponent(); + } + + private void Pong_Load(object sender, EventArgs e) + { + setuplevelrewards(); + + if(API.Upgrades["customgrayshades"] == true && API.Upgrades["multitasking"] == true) + { + if(API.Upgrades["shiftnet"] == false) + { + tmrstoryline.Start(); + } + } + } + + // Move the paddle according to the mouse position. + private void pongMain_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) + { + paddleHuman.Location = new Point(paddleHuman.Location.X, (MousePosition.Y - this.Location.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) + { + if (this.Height != API.CurrentSkin.titlebarheight) + { + //Set the computer player to move according to the ball's position. + 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; + API.PlaySound(Properties.Resources.typesound); + } + + // 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; + API.PlaySound(Properties.Resources.typesound); + } + + // 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 = "You Missed Out On:" + Environment.NewLine + lblstatscodepoints.Text.Replace("Codepoints earned: ", "") + " Codepoints"; + } + + // 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 = "You got " + beataireward + " codepoints for beating the Computer!"; + 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 = "Xspeed: " + xveldec; + lblstatsY.Text = "Yspeed: " + yveldec; + lblstatscodepoints.Text = "Codepoints earned: " + (levelrewards[level - 1] + beatairewardtotal).ToString(); + + lbllevelandtime.Text = "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) + { + if (this.Height != API.CurrentSkin.titlebarheight) + { + 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(); + } + lblstatscodepoints.Text = "Codepoints earned: " + (levelrewards[level - 1] + beatairewardtotal).ToString(); + } + } + } + + // 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 = "Get " + beataireward + " codepoints for beating the Computer!"; + 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 = "Level: " + level + " - " + secondsleft + " Seconds Left"; + } + + //Increase the ball speed stats for the next level + private void generatenextlevel() + { + lbllevelreached.Text = "You Reached Level " + level + "!"; + + lblpreviousstats.Text = "Initial Ball X Speed: " + levelxspeed + Environment.NewLine + "Initial Ball Y Speed: " + levelyspeed + Environment.NewLine + "Increment X Speed: " + incrementx + Environment.NewLine + "Increment Y Speed: " + 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 = "Initial Ball X Speed: " + levelxspeed + Environment.NewLine + "Initial Ball Y Speed: " + levelyspeed + Environment.NewLine + "Increment X Speed: " + incrementx + Environment.NewLine + "Increment Y Speed: " + incrementy; + + if (level < 15) + { + beataireward = level * 2; + } + else { + double br = levelrewards[level - 1] / 10; + beataireward = (int)Math.Round(br); + } + + totalreward = levelrewards[level - 1] + beatairewardtotal; + + btncashout.Text = "Cash out with " + totalreward.ToString() + " codepoints!"; + btnplayon.Text = "Play on for " + (levelrewards[level] + beatairewardtotal).ToString() + " codepoints!"; + } + + private void setuplevelrewards() + { + levelrewards[0] = 0; + levelrewards[1] = 1; + levelrewards[2] = 3; + levelrewards[3] = 7; + levelrewards[4] = 13; + levelrewards[5] = 20; + levelrewards[6] = 30; + levelrewards[7] = 45; + levelrewards[8] = 60; + levelrewards[9] = 80; + levelrewards[10] = 100; + levelrewards[11] = 125; + levelrewards[12] = 150; + levelrewards[13] = 200; + levelrewards[14] = 250; + levelrewards[15] = 300; + levelrewards[16] = 400; + levelrewards[17] = 500; + levelrewards[18] = 650; + levelrewards[19] = 800; + levelrewards[20] = 1000; + levelrewards[21] = 1250; + levelrewards[22] = 1600; + levelrewards[23] = 2000; + levelrewards[24] = 2500; + levelrewards[25] = 3000; + levelrewards[26] = 3750; + levelrewards[27] = 4500; + levelrewards[28] = 5500; + levelrewards[29] = 7000; + levelrewards[30] = 9000; + levelrewards[31] = 11000; + levelrewards[32] = 13500; + levelrewards[33] = 16000; + levelrewards[34] = 20000; + levelrewards[35] = 25000; + levelrewards[36] = 32000; + levelrewards[37] = 40000; + levelrewards[38] = 50000; + levelrewards[39] = 75000; + levelrewards[40] = 100000; + } + + // ERROR: Handles clauses are not supported in C# + private void countdown_Tick(object sender, EventArgs e) + { + if (this.Left < Screen.PrimaryScreen.Bounds.Width) + { + if (this.Height != API.CurrentSkin.titlebarheight) + { + switch (countdown) + { + case 0: + countdown = 3; + lblcountdown.Hide(); + lblbeatai.Hide(); + API.PlaySound(Properties.Resources.writesound); + gameTimer.Start(); + counter.Start(); + tmrcountdown.Stop(); + break; + case 1: + lblcountdown.Text = "1"; + countdown = countdown - 1; + API.PlaySound(Properties.Resources.writesound); + break; + case 2: + lblcountdown.Text = "2"; + countdown = countdown - 1; + API.PlaySound(Properties.Resources.writesound); + break; + case 3: + lblcountdown.Text = "3"; + countdown = countdown - 1; + API.PlaySound(Properties.Resources.writesound); + 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 = "You cashed out with " + totalreward + " codepoints!"; + lblfinallevelreached.Text = "Codepoints rewarded for reaching level " + (level - 1).ToString(); + lblfinallevelreward.Text = levelrewards[level - 1].ToString(); + lblfinalcomputerreward.Text = beatairewardtotal.ToString(); + lblfinalcodepoints.Text = totalreward + " CP"; + API.AddCodepoints(totalreward); + } + + private void newgame() + { + pnlfinalstats.Hide(); + pnllose.Hide(); + pnlintro.Hide(); + + level = 1; + totalreward = 0; + beataireward = 2; + beatairewardtotal = 0; + secondsleft = 60; + lblstatscodepoints.Text = "Codepoints: "; + //reset stats text + lblstatsX.Text = "Xspeed: "; + lblstatsY.Text = "Yspeed: "; + + levelxspeed = 3; + levelyspeed = 3; + + incrementx = 0.4; + incrementy = 0.2; + + xveldec = levelxspeed; + yveldec = levelyspeed; + + tmrcountdown.Start(); + lblbeatai.Text = "Get " + beataireward + " codepoints for beating the Computer!"; + 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 = "Level: " + level + " - " + secondsleft + " Seconds Left"; + } + + // 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) + { + Terminal term = new Terminal(); + API.CreateForm(term, "Terminal", Properties.Resources.iconTerminal); + term.StartShiftnetStory(); + tmrstoryline.Stop(); + } + + } + + // ERROR: Handles clauses are not supported in C# + private void me_closing(object sender, FormClosingEventArgs e) + { + tmrstoryline.Stop(); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Pong.resx b/source/WindowsFormsApplication1/Apps/Pong.resx new file mode 100644 index 0000000..cedb787 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Pong.resx @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="Label6.Text" xml:space="preserve"> + <value>Pong is a classic arcade game from the late 20th century, ported over to ShiftOS. + +In Pong, two players move a paddle up and down to keep the ball from hitting their edge of the screen. If the ball hits a player's side of the screen, the other player gains a point. + +In ShiftOS, the second player is controlled by the computer. You can earn Codepoints by making him miss the ball. If you miss the ball, it's game over, and you don't gain any Codepoints. + +Each level is 60 seconds long, and the game gets progressively harder. At the end of each level, you can either decide to cash out your Codepoints and start over at Level 1, or you can proceed up a level and gain even more CP. + +Be careful, because missing the ball will reset you back to Level 1 and you will not be able to cash out your Codepoints!</value> + </data> + <metadata name="gameTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="counter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>130, 17</value> + </metadata> + <metadata name="tmrcountdown.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>223, 17</value> + </metadata> + <metadata name="tmrstoryline.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>355, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shifter.Designer.cs b/source/WindowsFormsApplication1/Apps/Shifter.Designer.cs new file mode 100644 index 0000000..d49294e --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shifter.Designer.cs @@ -0,0 +1,5620 @@ +using System; +using System.Windows.Forms; + +namespace ShiftOS +{ + partial class Shifter + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Shifter)); + this.ColorDialog1 = new System.Windows.Forms.ColorDialog(); + this.clocktick = new System.Windows.Forms.Timer(this.components); + this.customizationtime = new System.Windows.Forms.Timer(this.components); + this.timerearned = new System.Windows.Forms.Timer(this.components); + this.Label1 = new System.Windows.Forms.Label(); + this.btnapply = new System.Windows.Forms.Button(); + this.catholder = new System.Windows.Forms.Panel(); + this.btnmore = new System.Windows.Forms.Button(); + this.btnreset = new System.Windows.Forms.Button(); + this.btnwindowcomposition = new System.Windows.Forms.Button(); + this.btndesktopicons = new System.Windows.Forms.Button(); + this.btnmenus = new System.Windows.Forms.Button(); + this.btnwindows = new System.Windows.Forms.Button(); + this.btndesktop = new System.Windows.Forms.Button(); + this.pnlshifterintro = new System.Windows.Forms.Panel(); + this.Label66 = new System.Windows.Forms.Label(); + this.Label65 = new System.Windows.Forms.Label(); + this.Label64 = new System.Windows.Forms.Label(); + this.Label63 = new System.Windows.Forms.Label(); + this.pnldesktopoptions = new System.Windows.Forms.Panel(); + this.pnldesktoppaneloptions = new System.Windows.Forms.Panel(); + this.btnpanelbuttons = new System.Windows.Forms.Button(); + this.lbwarning = new System.Windows.Forms.Label(); + this.combodesktoppanelposition = new System.Windows.Forms.ComboBox(); + this.lbposition = new System.Windows.Forms.Label(); + this.Label47 = new System.Windows.Forms.Label(); + this.txtdesktoppanelheight = new System.Windows.Forms.NumericUpDown(); + this.lbheight = new System.Windows.Forms.Label(); + this.pnldesktoppanelcolour = new System.Windows.Forms.Panel(); + this.lbpanelcolor = new System.Windows.Forms.Label(); + this.pnlapplauncheroptions = new System.Windows.Forms.Panel(); + this.pnlalhover = new System.Windows.Forms.Panel(); + this.label119 = new System.Windows.Forms.Label(); + this.Label71 = new System.Windows.Forms.Label(); + this.txtapplauncherwidth = new System.Windows.Forms.TextBox(); + this.Label72 = new System.Windows.Forms.Label(); + this.txtappbuttonlabel = new System.Windows.Forms.TextBox(); + this.Label51 = new System.Windows.Forms.Label(); + this.Label50 = new System.Windows.Forms.Label(); + this.pnlmaintextcolour = new System.Windows.Forms.Panel(); + this.comboappbuttontextstyle = new System.Windows.Forms.ComboBox(); + this.comboappbuttontextfont = new System.Windows.Forms.ComboBox(); + this.Label37 = new System.Windows.Forms.Label(); + this.Label38 = new System.Windows.Forms.Label(); + this.txtappbuttontextsize = new System.Windows.Forms.TextBox(); + this.Label39 = new System.Windows.Forms.Label(); + this.Label40 = new System.Windows.Forms.Label(); + this.pnlmainbuttonactivated = new System.Windows.Forms.Panel(); + this.Label28 = new System.Windows.Forms.Label(); + this.Label35 = new System.Windows.Forms.Label(); + this.txtapplicationsbuttonheight = new System.Windows.Forms.TextBox(); + this.Label36 = new System.Windows.Forms.Label(); + this.pnlmainbuttoncolour = new System.Windows.Forms.Panel(); + this.Label43 = new System.Windows.Forms.Label(); + this.pnldesktopintro = new System.Windows.Forms.Panel(); + this.Label69 = new System.Windows.Forms.Label(); + this.Label70 = new System.Windows.Forms.Label(); + this.pnlpanelbuttonsoptions = new System.Windows.Forms.Panel(); + this.pnlpanelbuttontextcolour = new System.Windows.Forms.Panel(); + this.Label101 = new System.Windows.Forms.Label(); + this.txtpanelbuttontexttop = new System.Windows.Forms.TextBox(); + this.Label104 = new System.Windows.Forms.Label(); + this.txtpanelbuttontextside = new System.Windows.Forms.TextBox(); + this.Label106 = new System.Windows.Forms.Label(); + this.Label93 = new System.Windows.Forms.Label(); + this.txtpanelbuttontop = new System.Windows.Forms.TextBox(); + this.Label94 = new System.Windows.Forms.Label(); + this.txtpanelbuttoninitalgap = new System.Windows.Forms.TextBox(); + this.Label108 = new System.Windows.Forms.Label(); + this.txtpanelbuttonicontop = new System.Windows.Forms.TextBox(); + this.Label110 = new System.Windows.Forms.Label(); + this.txtpanelbuttoniconside = new System.Windows.Forms.TextBox(); + this.Label112 = new System.Windows.Forms.Label(); + this.txtpanelbuttoniconsize = new System.Windows.Forms.TextBox(); + this.Label105 = new System.Windows.Forms.Label(); + this.cbpanelbuttontextstyle = new System.Windows.Forms.ComboBox(); + this.cbpanelbuttonfont = new System.Windows.Forms.ComboBox(); + this.Label100 = new System.Windows.Forms.Label(); + this.txtpaneltextbuttonsize = new System.Windows.Forms.TextBox(); + this.Label102 = new System.Windows.Forms.Label(); + this.Label103 = new System.Windows.Forms.Label(); + this.Label98 = new System.Windows.Forms.Label(); + this.txtpanelbuttongap = new System.Windows.Forms.TextBox(); + this.Label99 = new System.Windows.Forms.Label(); + this.Label96 = new System.Windows.Forms.Label(); + this.txtpanelbuttonheight = new System.Windows.Forms.TextBox(); + this.Label97 = new System.Windows.Forms.Label(); + this.Label92 = new System.Windows.Forms.Label(); + this.txtpanelbuttonwidth = new System.Windows.Forms.TextBox(); + this.Label91 = new System.Windows.Forms.Label(); + this.pnlpanelbuttoncolour = new System.Windows.Forms.Panel(); + this.Label95 = new System.Windows.Forms.Label(); + this.pnldesktopbackgroundoptions = new System.Windows.Forms.Panel(); + this.pnldesktopcolour = new System.Windows.Forms.Panel(); + this.Label45 = new System.Windows.Forms.Label(); + this.pnlpanelclockoptions = new System.Windows.Forms.Panel(); + this.pnlclockbackgroundcolour = new System.Windows.Forms.Panel(); + this.Label44 = new System.Windows.Forms.Label(); + this.comboclocktextstyle = new System.Windows.Forms.ComboBox(); + this.comboclocktextfont = new System.Windows.Forms.ComboBox(); + this.Label26 = new System.Windows.Forms.Label(); + this.Label29 = new System.Windows.Forms.Label(); + this.txtclocktextfromtop = new System.Windows.Forms.TextBox(); + this.Label30 = new System.Windows.Forms.Label(); + this.Label31 = new System.Windows.Forms.Label(); + this.txtclocktextsize = new System.Windows.Forms.TextBox(); + this.Label32 = new System.Windows.Forms.Label(); + this.Label33 = new System.Windows.Forms.Label(); + this.pnlpanelclocktextcolour = new System.Windows.Forms.Panel(); + this.Label34 = new System.Windows.Forms.Label(); + this.pnldesktoppreview = new System.Windows.Forms.Panel(); + this.predesktoppanel = new System.Windows.Forms.Panel(); + this.prepnlpanelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); + this.prepnlpanelbutton = new System.Windows.Forms.Panel(); + this.pretbicon = new System.Windows.Forms.PictureBox(); + this.pretbctext = new System.Windows.Forms.Label(); + this.pretimepanel = new System.Windows.Forms.Panel(); + this.prepaneltimetext = new System.Windows.Forms.Label(); + this.preapplaunchermenuholder = new System.Windows.Forms.Panel(); + this.predesktopappmenu = new System.Windows.Forms.MenuStrip(); + this.ApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.KnowledgeInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShiftoriumToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ClockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TerminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.ShutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.Panel10 = new System.Windows.Forms.Panel(); + this.btndesktopitself = new System.Windows.Forms.Button(); + this.btnpanelclock = new System.Windows.Forms.Button(); + this.btnapplauncher = new System.Windows.Forms.Button(); + this.btndesktoppanel = new System.Windows.Forms.Button(); + this.txtpanelbuttoniconheight = new System.Windows.Forms.TextBox(); + this.pnlwindowsoptions = new System.Windows.Forms.Panel(); + this.pnlwindowsintro = new System.Windows.Forms.Panel(); + this.Label68 = new System.Windows.Forms.Label(); + this.Label67 = new System.Windows.Forms.Label(); + this.pnlbuttonoptions = new System.Windows.Forms.Panel(); + this.pnlclosebuttonoptions = new System.Windows.Forms.Panel(); + this.Label8 = new System.Windows.Forms.Label(); + this.Label11 = new System.Windows.Forms.Label(); + this.pnlclosebuttoncolour = new System.Windows.Forms.Panel(); + this.txtclosebuttonfromside = new System.Windows.Forms.TextBox(); + this.Label7 = new System.Windows.Forms.Label(); + this.Label12 = new System.Windows.Forms.Label(); + this.txtclosebuttonheight = new System.Windows.Forms.TextBox(); + this.Label13 = new System.Windows.Forms.Label(); + this.Label6 = new System.Windows.Forms.Label(); + this.txtclosebuttonfromtop = new System.Windows.Forms.TextBox(); + this.Label10 = new System.Windows.Forms.Label(); + this.Label14 = new System.Windows.Forms.Label(); + this.txtclosebuttonwidth = new System.Windows.Forms.TextBox(); + this.Label9 = new System.Windows.Forms.Label(); + this.pnlrollupbuttonoptions = new System.Windows.Forms.Panel(); + this.Label54 = new System.Windows.Forms.Label(); + this.Label55 = new System.Windows.Forms.Label(); + this.pnlrollupbuttoncolour = new System.Windows.Forms.Panel(); + this.txtrollupbuttonside = new System.Windows.Forms.TextBox(); + this.Label56 = new System.Windows.Forms.Label(); + this.Label57 = new System.Windows.Forms.Label(); + this.txtrollupbuttonheight = new System.Windows.Forms.TextBox(); + this.Label58 = new System.Windows.Forms.Label(); + this.Label59 = new System.Windows.Forms.Label(); + this.txtrollupbuttontop = new System.Windows.Forms.TextBox(); + this.Label60 = new System.Windows.Forms.Label(); + this.Label61 = new System.Windows.Forms.Label(); + this.txtrollupbuttonwidth = new System.Windows.Forms.TextBox(); + this.Label62 = new System.Windows.Forms.Label(); + this.pnlminimizebuttonoptions = new System.Windows.Forms.Panel(); + this.Label82 = new System.Windows.Forms.Label(); + this.Label83 = new System.Windows.Forms.Label(); + this.pnlminimizebuttoncolour = new System.Windows.Forms.Panel(); + this.txtminimizebuttonside = new System.Windows.Forms.TextBox(); + this.Label84 = new System.Windows.Forms.Label(); + this.Label85 = new System.Windows.Forms.Label(); + this.txtminimizebuttonheight = new System.Windows.Forms.TextBox(); + this.Label86 = new System.Windows.Forms.Label(); + this.Label87 = new System.Windows.Forms.Label(); + this.txtminimizebuttontop = new System.Windows.Forms.TextBox(); + this.Label88 = new System.Windows.Forms.Label(); + this.Label89 = new System.Windows.Forms.Label(); + this.txtminimizebuttonwidth = new System.Windows.Forms.TextBox(); + this.Label90 = new System.Windows.Forms.Label(); + this.combobuttonoption = new System.Windows.Forms.ComboBox(); + this.Label52 = new System.Windows.Forms.Label(); + this.pnltitlebaroptions = new System.Windows.Forms.Panel(); + this.Label80 = new System.Windows.Forms.Label(); + this.txticonfromtop = new System.Windows.Forms.TextBox(); + this.Label81 = new System.Windows.Forms.Label(); + this.Label78 = new System.Windows.Forms.Label(); + this.txticonfromside = new System.Windows.Forms.TextBox(); + this.Label79 = new System.Windows.Forms.Label(); + this.lbcornerwidthpx = new System.Windows.Forms.Label(); + this.txttitlebarcornerwidth = new System.Windows.Forms.TextBox(); + this.lbcornerwidth = new System.Windows.Forms.Label(); + this.pnltitlebarrightcornercolour = new System.Windows.Forms.Panel(); + this.pnltitlebarleftcornercolour = new System.Windows.Forms.Panel(); + this.lbrightcornercolor = new System.Windows.Forms.Label(); + this.lbleftcornercolor = new System.Windows.Forms.Label(); + this.cboxtitlebarcorners = new System.Windows.Forms.CheckBox(); + this.Label5 = new System.Windows.Forms.Label(); + this.txttitlebarheight = new System.Windows.Forms.TextBox(); + this.Label4 = new System.Windows.Forms.Label(); + this.pnltitlebarcolour = new System.Windows.Forms.Panel(); + this.Label2 = new System.Windows.Forms.Label(); + this.pnlborderoptions = new System.Windows.Forms.Panel(); + this.cbindividualbordercolours = new System.Windows.Forms.CheckBox(); + this.pnlborderbottomrightcolour = new System.Windows.Forms.Panel(); + this.lbbright = new System.Windows.Forms.Label(); + this.pnlborderbottomcolour = new System.Windows.Forms.Panel(); + this.lbbottom = new System.Windows.Forms.Label(); + this.pnlborderbottomleftcolour = new System.Windows.Forms.Panel(); + this.lbbleft = new System.Windows.Forms.Label(); + this.pnlborderrightcolour = new System.Windows.Forms.Panel(); + this.lbright = new System.Windows.Forms.Label(); + this.pnlborderleftcolour = new System.Windows.Forms.Panel(); + this.lbleft = new System.Windows.Forms.Label(); + this.Label15 = new System.Windows.Forms.Label(); + this.pnlbordercolour = new System.Windows.Forms.Panel(); + this.txtbordersize = new System.Windows.Forms.TextBox(); + this.Label3 = new System.Windows.Forms.Label(); + this.Label16 = new System.Windows.Forms.Label(); + this.pnltitletextoptions = new System.Windows.Forms.Panel(); + this.combotitletextposition = new System.Windows.Forms.ComboBox(); + this.Label53 = new System.Windows.Forms.Label(); + this.combotitletextstyle = new System.Windows.Forms.ComboBox(); + this.combotitletextfont = new System.Windows.Forms.ComboBox(); + this.Label23 = new System.Windows.Forms.Label(); + this.Label17 = new System.Windows.Forms.Label(); + this.txttitletextside = new System.Windows.Forms.TextBox(); + this.Label18 = new System.Windows.Forms.Label(); + this.Label19 = new System.Windows.Forms.Label(); + this.txttitletexttop = new System.Windows.Forms.TextBox(); + this.Label20 = new System.Windows.Forms.Label(); + this.Label21 = new System.Windows.Forms.Label(); + this.txttitletextsize = new System.Windows.Forms.TextBox(); + this.Label22 = new System.Windows.Forms.Label(); + this.Label24 = new System.Windows.Forms.Label(); + this.pnltitletextcolour = new System.Windows.Forms.Panel(); + this.Label25 = new System.Windows.Forms.Label(); + this.pnlwindowsobjects = new System.Windows.Forms.Panel(); + this.btnborders = new System.Windows.Forms.Button(); + this.btnbuttons = new System.Windows.Forms.Button(); + this.btntitletext = new System.Windows.Forms.Button(); + this.btntitlebar = new System.Windows.Forms.Button(); + this.pnlwindowpreview = new System.Windows.Forms.Panel(); + this.prepgcontent = new System.Windows.Forms.Panel(); + this.prepgbottom = new System.Windows.Forms.Panel(); + this.prepgleft = new System.Windows.Forms.Panel(); + this.prepgbottomlcorner = new System.Windows.Forms.Panel(); + this.prepgright = new System.Windows.Forms.Panel(); + this.prepgbottomrcorner = new System.Windows.Forms.Panel(); + this.pretitlebar = new System.Windows.Forms.Panel(); + this.preminimizebutton = new System.Windows.Forms.Panel(); + this.prepnlicon = new System.Windows.Forms.PictureBox(); + this.prerollupbutton = new System.Windows.Forms.Panel(); + this.preclosebutton = new System.Windows.Forms.Panel(); + this.pretitletext = new System.Windows.Forms.Label(); + this.prepgtoplcorner = new System.Windows.Forms.Panel(); + this.prepgtoprcorner = new System.Windows.Forms.Panel(); + this.pnlreset = new System.Windows.Forms.Panel(); + this.Label113 = new System.Windows.Forms.Label(); + this.btnresetallsettings = new System.Windows.Forms.Button(); + this.Label109 = new System.Windows.Forms.Label(); + this.Label111 = new System.Windows.Forms.Label(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.pnldesktopcomposition = new System.Windows.Forms.Panel(); + this.pnlfancywindows = new System.Windows.Forms.Panel(); + this.txtwinfadedec = new System.Windows.Forms.TextBox(); + this.label150 = new System.Windows.Forms.Label(); + this.txtwinfadespeed = new System.Windows.Forms.TextBox(); + this.label151 = new System.Windows.Forms.Label(); + this.cbdrageffect = new System.Windows.Forms.ComboBox(); + this.label141 = new System.Windows.Forms.Label(); + this.cbcloseanim = new System.Windows.Forms.ComboBox(); + this.label128 = new System.Windows.Forms.Label(); + this.cbopenanim = new System.Windows.Forms.ComboBox(); + this.label127 = new System.Windows.Forms.Label(); + this.label149 = new System.Windows.Forms.Label(); + this.pnlfancydragging = new System.Windows.Forms.Panel(); + this.txtshakeminoffset = new System.Windows.Forms.TextBox(); + this.label148 = new System.Windows.Forms.Label(); + this.txtshakemax = new System.Windows.Forms.TextBox(); + this.label146 = new System.Windows.Forms.Label(); + this.txtdragopacitydec = new System.Windows.Forms.TextBox(); + this.label144 = new System.Windows.Forms.Label(); + this.txtdragfadedec = new System.Windows.Forms.TextBox(); + this.label143 = new System.Windows.Forms.Label(); + this.txtfadespeed = new System.Windows.Forms.TextBox(); + this.label155 = new System.Windows.Forms.Label(); + this.label156 = new System.Windows.Forms.Label(); + this.pnlfancyintro = new System.Windows.Forms.Panel(); + this.label174 = new System.Windows.Forms.Label(); + this.label175 = new System.Windows.Forms.Label(); + this.panel18 = new System.Windows.Forms.Panel(); + this.panel19 = new System.Windows.Forms.Panel(); + this.label157 = new System.Windows.Forms.Label(); + this.panel20 = new System.Windows.Forms.Panel(); + this.label158 = new System.Windows.Forms.Label(); + this.panel21 = new System.Windows.Forms.Panel(); + this.label159 = new System.Windows.Forms.Label(); + this.panel22 = new System.Windows.Forms.Panel(); + this.label160 = new System.Windows.Forms.Label(); + this.panel23 = new System.Windows.Forms.Panel(); + this.label161 = new System.Windows.Forms.Label(); + this.panel24 = new System.Windows.Forms.Panel(); + this.label162 = new System.Windows.Forms.Label(); + this.label163 = new System.Windows.Forms.Label(); + this.panel25 = new System.Windows.Forms.Panel(); + this.panel26 = new System.Windows.Forms.Panel(); + this.label164 = new System.Windows.Forms.Label(); + this.panel27 = new System.Windows.Forms.Panel(); + this.label165 = new System.Windows.Forms.Label(); + this.panel28 = new System.Windows.Forms.Panel(); + this.label166 = new System.Windows.Forms.Label(); + this.panel29 = new System.Windows.Forms.Panel(); + this.label167 = new System.Windows.Forms.Label(); + this.panel30 = new System.Windows.Forms.Panel(); + this.label168 = new System.Windows.Forms.Label(); + this.panel31 = new System.Windows.Forms.Panel(); + this.label169 = new System.Windows.Forms.Label(); + this.panel32 = new System.Windows.Forms.Panel(); + this.label170 = new System.Windows.Forms.Label(); + this.panel33 = new System.Windows.Forms.Panel(); + this.label171 = new System.Windows.Forms.Label(); + this.panel34 = new System.Windows.Forms.Panel(); + this.label172 = new System.Windows.Forms.Label(); + this.label173 = new System.Windows.Forms.Label(); + this.panel36 = new System.Windows.Forms.Panel(); + this.btnfancydragging = new System.Windows.Forms.Button(); + this.btnfancywindows = new System.Windows.Forms.Button(); + this.label176 = new System.Windows.Forms.Label(); + this.pnlmenus = new System.Windows.Forms.Panel(); + this.pnladvanced = new System.Windows.Forms.Panel(); + this.btnmorebuttons = new System.Windows.Forms.Button(); + this.pnlbuttonchecked = new System.Windows.Forms.Panel(); + this.label136 = new System.Windows.Forms.Label(); + this.pnlitemselectedend = new System.Windows.Forms.Panel(); + this.label129 = new System.Windows.Forms.Label(); + this.pnlbuttonpressed = new System.Windows.Forms.Panel(); + this.label130 = new System.Windows.Forms.Label(); + this.pnlitemselectedbegin = new System.Windows.Forms.Panel(); + this.label131 = new System.Windows.Forms.Label(); + this.pnlitemselected = new System.Windows.Forms.Panel(); + this.label132 = new System.Windows.Forms.Label(); + this.pnlbuttonselected = new System.Windows.Forms.Panel(); + this.label133 = new System.Windows.Forms.Label(); + this.pnlcheckbg = new System.Windows.Forms.Panel(); + this.label134 = new System.Windows.Forms.Label(); + this.label135 = new System.Windows.Forms.Label(); + this.pnlmore = new System.Windows.Forms.Panel(); + this.pnlpressedbegin = new System.Windows.Forms.Panel(); + this.btnback = new System.Windows.Forms.Button(); + this.label138 = new System.Windows.Forms.Label(); + this.pnlselectedbegin = new System.Windows.Forms.Panel(); + this.pnlpressedend = new System.Windows.Forms.Panel(); + this.label137 = new System.Windows.Forms.Label(); + this.label139 = new System.Windows.Forms.Label(); + this.pnlselectedend = new System.Windows.Forms.Panel(); + this.pnlpressedmiddle = new System.Windows.Forms.Panel(); + this.label140 = new System.Windows.Forms.Label(); + this.label142 = new System.Windows.Forms.Label(); + this.pnlselectedmiddle = new System.Windows.Forms.Panel(); + this.label145 = new System.Windows.Forms.Label(); + this.label147 = new System.Windows.Forms.Label(); + this.pnldropdown = new System.Windows.Forms.Panel(); + this.pnlddborder = new System.Windows.Forms.Panel(); + this.label117 = new System.Windows.Forms.Label(); + this.pnlmarginend = new System.Windows.Forms.Panel(); + this.label120 = new System.Windows.Forms.Label(); + this.pnlmarginmiddle = new System.Windows.Forms.Panel(); + this.label121 = new System.Windows.Forms.Label(); + this.pnlmarginbegin = new System.Windows.Forms.Panel(); + this.label122 = new System.Windows.Forms.Label(); + this.pnlhcolor = new System.Windows.Forms.Panel(); + this.label123 = new System.Windows.Forms.Label(); + this.pnlhborder = new System.Windows.Forms.Panel(); + this.label125 = new System.Windows.Forms.Label(); + this.label126 = new System.Windows.Forms.Label(); + this.pnlbasic = new System.Windows.Forms.Panel(); + this.pnlmenutextcolor = new System.Windows.Forms.Panel(); + this.label118 = new System.Windows.Forms.Label(); + this.pnldropdownbg = new System.Windows.Forms.Panel(); + this.label115 = new System.Windows.Forms.Label(); + this.pnlstatusend = new System.Windows.Forms.Panel(); + this.label114 = new System.Windows.Forms.Label(); + this.pnlstatusbegin = new System.Windows.Forms.Panel(); + this.label107 = new System.Windows.Forms.Label(); + this.pnltoolbarend = new System.Windows.Forms.Panel(); + this.label77 = new System.Windows.Forms.Label(); + this.pnltoolbarmiddle = new System.Windows.Forms.Panel(); + this.label76 = new System.Windows.Forms.Label(); + this.pnltoolbarbegin = new System.Windows.Forms.Panel(); + this.label75 = new System.Windows.Forms.Label(); + this.pnlmenubarend = new System.Windows.Forms.Panel(); + this.label73 = new System.Windows.Forms.Label(); + this.pnlmenubarbegin = new System.Windows.Forms.Panel(); + this.label42 = new System.Windows.Forms.Label(); + this.label41 = new System.Windows.Forms.Label(); + this.pnlmenusintro = new System.Windows.Forms.Panel(); + this.label116 = new System.Windows.Forms.Label(); + this.label124 = new System.Windows.Forms.Label(); + this.pnlmenucategories = new System.Windows.Forms.Panel(); + this.btnmisc = new System.Windows.Forms.Button(); + this.btnadvanced = new System.Windows.Forms.Button(); + this.btndropdown = new System.Windows.Forms.Button(); + this.btnbasic = new System.Windows.Forms.Button(); + this.label74 = new System.Windows.Forms.Label(); + this.tmrfix = new System.Windows.Forms.Timer(this.components); + this.tmrdelay = new System.Windows.Forms.Timer(this.components); + this.pnlluaoptions = new System.Windows.Forms.Panel(); + this.flmorebuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.pnlluafield = new System.Windows.Forms.Panel(); + this.catholder.SuspendLayout(); + this.pnlshifterintro.SuspendLayout(); + this.pnldesktopoptions.SuspendLayout(); + this.pnldesktoppaneloptions.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.txtdesktoppanelheight)).BeginInit(); + this.pnlapplauncheroptions.SuspendLayout(); + this.pnldesktopintro.SuspendLayout(); + this.pnlpanelbuttonsoptions.SuspendLayout(); + this.pnldesktopbackgroundoptions.SuspendLayout(); + this.pnlpanelclockoptions.SuspendLayout(); + this.pnldesktoppreview.SuspendLayout(); + this.predesktoppanel.SuspendLayout(); + this.prepnlpanelbuttonholder.SuspendLayout(); + this.prepnlpanelbutton.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).BeginInit(); + this.pretimepanel.SuspendLayout(); + this.preapplaunchermenuholder.SuspendLayout(); + this.predesktopappmenu.SuspendLayout(); + this.Panel10.SuspendLayout(); + this.pnlwindowsoptions.SuspendLayout(); + this.pnlwindowsintro.SuspendLayout(); + this.pnlbuttonoptions.SuspendLayout(); + this.pnlclosebuttonoptions.SuspendLayout(); + this.pnlrollupbuttonoptions.SuspendLayout(); + this.pnlminimizebuttonoptions.SuspendLayout(); + this.pnltitlebaroptions.SuspendLayout(); + this.pnlborderoptions.SuspendLayout(); + this.pnltitletextoptions.SuspendLayout(); + this.pnlwindowsobjects.SuspendLayout(); + this.pnlwindowpreview.SuspendLayout(); + this.prepgleft.SuspendLayout(); + this.prepgright.SuspendLayout(); + this.pretitlebar.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).BeginInit(); + this.pnlreset.SuspendLayout(); + this.pgcontents.SuspendLayout(); + this.pnldesktopcomposition.SuspendLayout(); + this.pnlfancywindows.SuspendLayout(); + this.pnlfancydragging.SuspendLayout(); + this.pnlfancyintro.SuspendLayout(); + this.panel18.SuspendLayout(); + this.panel25.SuspendLayout(); + this.panel36.SuspendLayout(); + this.pnlmenus.SuspendLayout(); + this.pnladvanced.SuspendLayout(); + this.pnlmore.SuspendLayout(); + this.pnldropdown.SuspendLayout(); + this.pnlbasic.SuspendLayout(); + this.pnlmenusintro.SuspendLayout(); + this.pnlmenucategories.SuspendLayout(); + this.pnlluaoptions.SuspendLayout(); + this.SuspendLayout(); + // + // clocktick + // + this.clocktick.Enabled = true; + this.clocktick.Interval = 1000; + // + // customizationtime + // + this.customizationtime.Enabled = true; + this.customizationtime.Interval = 10000; + // + // timerearned + // + this.timerearned.Interval = 3000; + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.ForeColor = System.Drawing.Color.White; + this.Label1.Location = new System.Drawing.Point(597, 3); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(39, 13); + this.Label1.TabIndex = 1; + this.Label1.Text = "Label1"; + // + // btnapply + // + this.btnapply.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnapply.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapply.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnapply.Location = new System.Drawing.Point(7, 286); + this.btnapply.Name = "btnapply"; + this.btnapply.Size = new System.Drawing.Size(119, 29); + this.btnapply.TabIndex = 3; + this.btnapply.TabStop = false; + this.btnapply.Text = "Apply Changes"; + this.btnapply.UseVisualStyleBackColor = true; + this.btnapply.Click += new System.EventHandler(this.btnapply_Click); + // + // catholder + // + this.catholder.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.catholder.BackColor = System.Drawing.Color.White; + this.catholder.Controls.Add(this.btnmore); + this.catholder.Controls.Add(this.btnreset); + this.catholder.Controls.Add(this.btnwindowcomposition); + this.catholder.Controls.Add(this.btndesktopicons); + this.catholder.Controls.Add(this.btnmenus); + this.catholder.Controls.Add(this.btnwindows); + this.catholder.Controls.Add(this.btndesktop); + this.catholder.Location = new System.Drawing.Point(7, 9); + this.catholder.Name = "catholder"; + this.catholder.Size = new System.Drawing.Size(119, 271); + this.catholder.TabIndex = 5; + // + // btnmore + // + this.btnmore.BackColor = System.Drawing.Color.White; + this.btnmore.Dock = System.Windows.Forms.DockStyle.Top; + this.btnmore.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmore.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnmore.Location = new System.Drawing.Point(0, 174); + this.btnmore.Name = "btnmore"; + this.btnmore.Size = new System.Drawing.Size(119, 29); + this.btnmore.TabIndex = 11; + this.btnmore.TabStop = false; + this.btnmore.Text = "More"; + this.btnmore.UseVisualStyleBackColor = false; + this.btnmore.Click += new System.EventHandler(this.btnmore_Click); + // + // btnreset + // + this.btnreset.BackColor = System.Drawing.Color.White; + this.btnreset.Dock = System.Windows.Forms.DockStyle.Top; + this.btnreset.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnreset.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnreset.Location = new System.Drawing.Point(0, 145); + this.btnreset.Name = "btnreset"; + this.btnreset.Size = new System.Drawing.Size(119, 29); + this.btnreset.TabIndex = 8; + this.btnreset.TabStop = false; + this.btnreset.Text = "Reset"; + this.btnreset.UseVisualStyleBackColor = false; + this.btnreset.Click += new System.EventHandler(this.btnreset_Click); + // + // btnwindowcomposition + // + this.btnwindowcomposition.BackColor = System.Drawing.Color.White; + this.btnwindowcomposition.Dock = System.Windows.Forms.DockStyle.Top; + this.btnwindowcomposition.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnwindowcomposition.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnwindowcomposition.Location = new System.Drawing.Point(0, 116); + this.btnwindowcomposition.Name = "btnwindowcomposition"; + this.btnwindowcomposition.Size = new System.Drawing.Size(119, 29); + this.btnwindowcomposition.TabIndex = 10; + this.btnwindowcomposition.TabStop = false; + this.btnwindowcomposition.Text = "Fancy Effects"; + this.btnwindowcomposition.UseVisualStyleBackColor = false; + this.btnwindowcomposition.Visible = false; + this.btnwindowcomposition.Click += new System.EventHandler(this.btnwindowcomposition_Click); + // + // btndesktopicons + // + this.btndesktopicons.BackColor = System.Drawing.Color.White; + this.btndesktopicons.Dock = System.Windows.Forms.DockStyle.Top; + this.btndesktopicons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndesktopicons.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndesktopicons.Location = new System.Drawing.Point(0, 87); + this.btndesktopicons.Name = "btndesktopicons"; + this.btndesktopicons.Size = new System.Drawing.Size(119, 29); + this.btndesktopicons.TabIndex = 9; + this.btndesktopicons.TabStop = false; + this.btndesktopicons.Text = "Desktop Icons"; + this.btndesktopicons.UseVisualStyleBackColor = false; + this.btndesktopicons.Visible = false; + // + // btnmenus + // + this.btnmenus.BackColor = System.Drawing.Color.White; + this.btnmenus.Dock = System.Windows.Forms.DockStyle.Top; + this.btnmenus.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmenus.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnmenus.Location = new System.Drawing.Point(0, 58); + this.btnmenus.Name = "btnmenus"; + this.btnmenus.Size = new System.Drawing.Size(119, 29); + this.btnmenus.TabIndex = 6; + this.btnmenus.TabStop = false; + this.btnmenus.Text = "Menus"; + this.btnmenus.UseVisualStyleBackColor = false; + this.btnmenus.Visible = false; + this.btnmenus.Click += new System.EventHandler(this.btnmenus_Click_1); + // + // btnwindows + // + this.btnwindows.BackColor = System.Drawing.Color.White; + this.btnwindows.Dock = System.Windows.Forms.DockStyle.Top; + this.btnwindows.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnwindows.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnwindows.Location = new System.Drawing.Point(0, 29); + this.btnwindows.Name = "btnwindows"; + this.btnwindows.Size = new System.Drawing.Size(119, 29); + this.btnwindows.TabIndex = 5; + this.btnwindows.TabStop = false; + this.btnwindows.Text = "Windows"; + this.btnwindows.UseVisualStyleBackColor = false; + this.btnwindows.Click += new System.EventHandler(this.btnwindows_Click); + // + // btndesktop + // + this.btndesktop.BackColor = System.Drawing.Color.White; + this.btndesktop.Dock = System.Windows.Forms.DockStyle.Top; + this.btndesktop.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndesktop.Font = new System.Drawing.Font("Cambria", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Italic))), System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndesktop.Location = new System.Drawing.Point(0, 0); + this.btndesktop.Name = "btndesktop"; + this.btndesktop.Size = new System.Drawing.Size(119, 29); + this.btndesktop.TabIndex = 4; + this.btndesktop.TabStop = false; + this.btndesktop.Text = "Desktop"; + this.btndesktop.UseVisualStyleBackColor = false; + this.btndesktop.Click += new System.EventHandler(this.btndesktop_Click); + // + // pnlshifterintro + // + this.pnlshifterintro.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.pnlshifterintro.BackColor = System.Drawing.Color.White; + this.pnlshifterintro.Controls.Add(this.Label66); + this.pnlshifterintro.Controls.Add(this.Label65); + this.pnlshifterintro.Controls.Add(this.Label64); + this.pnlshifterintro.Controls.Add(this.Label63); + this.pnlshifterintro.Location = new System.Drawing.Point(134, 9); + this.pnlshifterintro.Name = "pnlshifterintro"; + this.pnlshifterintro.Size = new System.Drawing.Size(457, 306); + this.pnlshifterintro.TabIndex = 17; + // + // Label66 + // + this.Label66.BackColor = System.Drawing.Color.Transparent; + this.Label66.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label66.Location = new System.Drawing.Point(3, 227); + this.Label66.Name = "Label66"; + this.Label66.Size = new System.Drawing.Size(451, 65); + this.Label66.TabIndex = 3; + this.Label66.Text = "That\'s right! As you make customizations to ShiftOS, you can earn Codepoints. The" + + " more you shift it, the more CP you earn. Just hit the \'Apply Changes\' button, a" + + "nd you\'ll recieve your codepoints."; + this.Label66.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label65 + // + this.Label65.AutoSize = true; + this.Label65.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label65.Location = new System.Drawing.Point(53, 204); + this.Label65.Name = "Label65"; + this.Label65.Size = new System.Drawing.Size(352, 20); + this.Label65.TabIndex = 2; + this.Label65.Text = "You can earn codepoints using the Shifter!"; + // + // Label64 + // + this.Label64.BackColor = System.Drawing.Color.Transparent; + this.Label64.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label64.Location = new System.Drawing.Point(4, 32); + this.Label64.Name = "Label64"; + this.Label64.Size = new System.Drawing.Size(451, 167); + this.Label64.TabIndex = 1; + this.Label64.Text = resources.GetString("Label64.Text"); + this.Label64.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label63 + // + this.Label63.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label63.Location = new System.Drawing.Point(72, 0); + this.Label63.Name = "Label63"; + this.Label63.Size = new System.Drawing.Size(332, 29); + this.Label63.TabIndex = 0; + this.Label63.Text = "Welcome to the Shifter!"; + // + // pnldesktopoptions + // + this.pnldesktopoptions.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.pnldesktopoptions.BackColor = System.Drawing.Color.White; + this.pnldesktopoptions.Controls.Add(this.pnlapplauncheroptions); + this.pnldesktopoptions.Controls.Add(this.pnldesktoppaneloptions); + this.pnldesktopoptions.Controls.Add(this.pnldesktopintro); + this.pnldesktopoptions.Controls.Add(this.pnlpanelbuttonsoptions); + this.pnldesktopoptions.Controls.Add(this.pnldesktopbackgroundoptions); + this.pnldesktopoptions.Controls.Add(this.pnlpanelclockoptions); + this.pnldesktopoptions.Controls.Add(this.pnldesktoppreview); + this.pnldesktopoptions.Controls.Add(this.Panel10); + this.pnldesktopoptions.Location = new System.Drawing.Point(134, 9); + this.pnldesktopoptions.Name = "pnldesktopoptions"; + this.pnldesktopoptions.Size = new System.Drawing.Size(457, 306); + this.pnldesktopoptions.TabIndex = 16; + this.pnldesktopoptions.Visible = false; + // + // pnldesktoppaneloptions + // + this.pnldesktoppaneloptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktoppaneloptions.Controls.Add(this.btnpanelbuttons); + this.pnldesktoppaneloptions.Controls.Add(this.lbwarning); + this.pnldesktoppaneloptions.Controls.Add(this.combodesktoppanelposition); + this.pnldesktoppaneloptions.Controls.Add(this.lbposition); + this.pnldesktoppaneloptions.Controls.Add(this.Label47); + this.pnldesktoppaneloptions.Controls.Add(this.txtdesktoppanelheight); + this.pnldesktoppaneloptions.Controls.Add(this.lbheight); + this.pnldesktoppaneloptions.Controls.Add(this.pnldesktoppanelcolour); + this.pnldesktoppaneloptions.Controls.Add(this.lbpanelcolor); + this.pnldesktoppaneloptions.Location = new System.Drawing.Point(135, 159); + this.pnldesktoppaneloptions.Name = "pnldesktoppaneloptions"; + this.pnldesktoppaneloptions.Size = new System.Drawing.Size(317, 140); + this.pnldesktoppaneloptions.TabIndex = 9; + this.pnldesktoppaneloptions.Visible = false; + // + // btnpanelbuttons + // + this.btnpanelbuttons.BackColor = System.Drawing.Color.White; + this.btnpanelbuttons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpanelbuttons.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpanelbuttons.Location = new System.Drawing.Point(193, 101); + this.btnpanelbuttons.Name = "btnpanelbuttons"; + this.btnpanelbuttons.Size = new System.Drawing.Size(119, 29); + this.btnpanelbuttons.TabIndex = 8; + this.btnpanelbuttons.Text = "Panel Buttons >"; + this.btnpanelbuttons.UseVisualStyleBackColor = false; + this.btnpanelbuttons.Click += new System.EventHandler(this.btnpanelbuttons_Click); + // + // lbwarning + // + this.lbwarning.Location = new System.Drawing.Point(3, 52); + this.lbwarning.Name = "lbwarning"; + this.lbwarning.Size = new System.Drawing.Size(290, 42); + this.lbwarning.TabIndex = 8; + this.lbwarning.Text = "Warning: If you set the panel position to the bottom you must hide your windows t" + + "askbar and restart ShiftOS on your host operating system to prevent a visual bug" + + "."; + // + // combodesktoppanelposition + // + this.combodesktoppanelposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combodesktoppanelposition.FormattingEnabled = true; + this.combodesktoppanelposition.Items.AddRange(new object[] { + "Top", + "Bottom"}); + this.combodesktoppanelposition.Location = new System.Drawing.Point(103, 28); + this.combodesktoppanelposition.Name = "combodesktoppanelposition"; + this.combodesktoppanelposition.Size = new System.Drawing.Size(59, 24); + this.combodesktoppanelposition.TabIndex = 7; + this.combodesktoppanelposition.SelectedIndexChanged += new System.EventHandler(this.combodesktoppanelposition_SelectedIndexChanged); + // + // lbposition + // + this.lbposition.AutoSize = true; + this.lbposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbposition.Location = new System.Drawing.Point(3, 31); + this.lbposition.Name = "lbposition"; + this.lbposition.Size = new System.Drawing.Size(97, 16); + this.lbposition.TabIndex = 6; + this.lbposition.Text = "Panel Position:"; + // + // Label47 + // + this.Label47.AutoSize = true; + this.Label47.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label47.Location = new System.Drawing.Point(226, 8); + this.Label47.Name = "Label47"; + this.Label47.Size = new System.Drawing.Size(22, 16); + this.Label47.TabIndex = 5; + this.Label47.Text = "px"; + // + // txtdesktoppanelheight + // + this.txtdesktoppanelheight.BackColor = System.Drawing.Color.White; + this.txtdesktoppanelheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdesktoppanelheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtdesktoppanelheight.ForeColor = System.Drawing.Color.Black; + this.txtdesktoppanelheight.Location = new System.Drawing.Point(189, 5); + this.txtdesktoppanelheight.Name = "txtdesktoppanelheight"; + this.txtdesktoppanelheight.Size = new System.Drawing.Size(37, 22); + this.txtdesktoppanelheight.TabIndex = 4; + this.txtdesktoppanelheight.ValueChanged += new System.EventHandler(this.txtdesktoppanelheight_ValueChanged); + // + // lbheight + // + this.lbheight.AutoSize = true; + this.lbheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbheight.Location = new System.Drawing.Point(138, 7); + this.lbheight.Name = "lbheight"; + this.lbheight.Size = new System.Drawing.Size(50, 16); + this.lbheight.TabIndex = 2; + this.lbheight.Text = "Height:"; + // + // pnldesktoppanelcolour + // + this.pnldesktoppanelcolour.Location = new System.Drawing.Point(92, 5); + this.pnldesktoppanelcolour.Name = "pnldesktoppanelcolour"; + this.pnldesktoppanelcolour.Size = new System.Drawing.Size(41, 20); + this.pnldesktoppanelcolour.TabIndex = 1; + this.pnldesktoppanelcolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ChangeDesktopPanelColor); + // + // lbpanelcolor + // + this.lbpanelcolor.AutoSize = true; + this.lbpanelcolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbpanelcolor.Location = new System.Drawing.Point(3, 7); + this.lbpanelcolor.Name = "lbpanelcolor"; + this.lbpanelcolor.Size = new System.Drawing.Size(88, 16); + this.lbpanelcolor.TabIndex = 0; + this.lbpanelcolor.Text = "Panel Colour:"; + // + // pnlapplauncheroptions + // + this.pnlapplauncheroptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlapplauncheroptions.Controls.Add(this.pnlalhover); + this.pnlapplauncheroptions.Controls.Add(this.label119); + this.pnlapplauncheroptions.Controls.Add(this.Label71); + this.pnlapplauncheroptions.Controls.Add(this.txtapplauncherwidth); + this.pnlapplauncheroptions.Controls.Add(this.Label72); + this.pnlapplauncheroptions.Controls.Add(this.txtappbuttonlabel); + this.pnlapplauncheroptions.Controls.Add(this.Label51); + this.pnlapplauncheroptions.Controls.Add(this.Label50); + this.pnlapplauncheroptions.Controls.Add(this.pnlmaintextcolour); + this.pnlapplauncheroptions.Controls.Add(this.comboappbuttontextstyle); + this.pnlapplauncheroptions.Controls.Add(this.comboappbuttontextfont); + this.pnlapplauncheroptions.Controls.Add(this.Label37); + this.pnlapplauncheroptions.Controls.Add(this.Label38); + this.pnlapplauncheroptions.Controls.Add(this.txtappbuttontextsize); + this.pnlapplauncheroptions.Controls.Add(this.Label39); + this.pnlapplauncheroptions.Controls.Add(this.Label40); + this.pnlapplauncheroptions.Controls.Add(this.pnlmainbuttonactivated); + this.pnlapplauncheroptions.Controls.Add(this.Label28); + this.pnlapplauncheroptions.Controls.Add(this.Label35); + this.pnlapplauncheroptions.Controls.Add(this.txtapplicationsbuttonheight); + this.pnlapplauncheroptions.Controls.Add(this.Label36); + this.pnlapplauncheroptions.Controls.Add(this.pnlmainbuttoncolour); + this.pnlapplauncheroptions.Controls.Add(this.Label43); + this.pnlapplauncheroptions.Location = new System.Drawing.Point(135, 159); + this.pnlapplauncheroptions.Name = "pnlapplauncheroptions"; + this.pnlapplauncheroptions.Size = new System.Drawing.Size(317, 140); + this.pnlapplauncheroptions.TabIndex = 10; + this.pnlapplauncheroptions.Visible = false; + // + // pnlalhover + // + this.pnlalhover.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlalhover.Location = new System.Drawing.Point(90, 29); + this.pnlalhover.Name = "pnlalhover"; + this.pnlalhover.Size = new System.Drawing.Size(41, 20); + this.pnlalhover.TabIndex = 3; + this.pnlalhover.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetALHoverColor); + // + // label119 + // + this.label119.AutoSize = true; + this.label119.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label119.Location = new System.Drawing.Point(3, 31); + this.label119.Name = "label119"; + this.label119.Size = new System.Drawing.Size(84, 16); + this.label119.TabIndex = 2; + this.label119.Text = "Mouse Over:"; + // + // Label71 + // + this.Label71.AutoSize = true; + this.Label71.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label71.Location = new System.Drawing.Point(203, 103); + this.Label71.Name = "Label71"; + this.Label71.Size = new System.Drawing.Size(22, 16); + this.Label71.TabIndex = 33; + this.Label71.Text = "px"; + // + // txtapplauncherwidth + // + this.txtapplauncherwidth.BackColor = System.Drawing.Color.White; + this.txtapplauncherwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtapplauncherwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtapplauncherwidth.ForeColor = System.Drawing.Color.Black; + this.txtapplauncherwidth.Location = new System.Drawing.Point(148, 101); + this.txtapplauncherwidth.Name = "txtapplauncherwidth"; + this.txtapplauncherwidth.Size = new System.Drawing.Size(54, 22); + this.txtapplauncherwidth.TabIndex = 32; + this.txtapplauncherwidth.TextChanged += new System.EventHandler(this.txtapplauncherwidth_TextChanged); + // + // Label72 + // + this.Label72.AutoSize = true; + this.Label72.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label72.Location = new System.Drawing.Point(103, 103); + this.Label72.Name = "Label72"; + this.Label72.Size = new System.Drawing.Size(45, 16); + this.Label72.TabIndex = 31; + this.Label72.Text = "Width:"; + // + // txtappbuttonlabel + // + this.txtappbuttonlabel.BackColor = System.Drawing.Color.White; + this.txtappbuttonlabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtappbuttonlabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtappbuttonlabel.ForeColor = System.Drawing.Color.Black; + this.txtappbuttonlabel.Location = new System.Drawing.Point(53, 76); + this.txtappbuttonlabel.Name = "txtappbuttonlabel"; + this.txtappbuttonlabel.Size = new System.Drawing.Size(81, 22); + this.txtappbuttonlabel.TabIndex = 30; + this.txtappbuttonlabel.TextChanged += new System.EventHandler(this.txtappbuttonlabel_KeyDown); + // + // Label51 + // + this.Label51.AutoSize = true; + this.Label51.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label51.Location = new System.Drawing.Point(2, 79); + this.Label51.Name = "Label51"; + this.Label51.Size = new System.Drawing.Size(45, 16); + this.Label51.TabIndex = 29; + this.Label51.Text = "Label:"; + // + // Label50 + // + this.Label50.AutoSize = true; + this.Label50.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label50.Location = new System.Drawing.Point(140, 79); + this.Label50.Name = "Label50"; + this.Label50.Size = new System.Drawing.Size(37, 16); + this.Label50.TabIndex = 28; + this.Label50.Text = "Font:"; + // + // pnlmaintextcolour + // + this.pnlmaintextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmaintextcolour.Location = new System.Drawing.Point(155, 51); + this.pnlmaintextcolour.Name = "pnlmaintextcolour"; + this.pnlmaintextcolour.Size = new System.Drawing.Size(41, 20); + this.pnlmaintextcolour.TabIndex = 19; + this.pnlmaintextcolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetAppLauncherTextColor); + // + // comboappbuttontextstyle + // + this.comboappbuttontextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboappbuttontextstyle.FormattingEnabled = true; + this.comboappbuttontextstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.comboappbuttontextstyle.Location = new System.Drawing.Point(243, 49); + this.comboappbuttontextstyle.Name = "comboappbuttontextstyle"; + this.comboappbuttontextstyle.Size = new System.Drawing.Size(64, 24); + this.comboappbuttontextstyle.TabIndex = 27; + this.comboappbuttontextstyle.SelectedIndexChanged += new System.EventHandler(this.comboappbuttontextstyle_SelectedIndexChanged); + // + // comboappbuttontextfont + // + this.comboappbuttontextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboappbuttontextfont.FormattingEnabled = true; + this.comboappbuttontextfont.Location = new System.Drawing.Point(181, 75); + this.comboappbuttontextfont.Name = "comboappbuttontextfont"; + this.comboappbuttontextfont.Size = new System.Drawing.Size(125, 24); + this.comboappbuttontextfont.TabIndex = 26; + this.comboappbuttontextfont.SelectedIndexChanged += new System.EventHandler(this.comboappbuttontextfont_SelectedIndexChanged); + // + // Label37 + // + this.Label37.AutoSize = true; + 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(200, 52); + this.Label37.Name = "Label37"; + this.Label37.Size = new System.Drawing.Size(41, 16); + this.Label37.TabIndex = 25; + this.Label37.Text = "Style:"; + // + // Label38 + // + this.Label38.AutoSize = true; + this.Label38.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label38.Location = new System.Drawing.Point(75, 52); + this.Label38.Name = "Label38"; + this.Label38.Size = new System.Drawing.Size(22, 16); + this.Label38.TabIndex = 24; + this.Label38.Text = "px"; + // + // txtappbuttontextsize + // + this.txtappbuttontextsize.BackColor = System.Drawing.Color.White; + this.txtappbuttontextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtappbuttontextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtappbuttontextsize.ForeColor = System.Drawing.Color.Black; + this.txtappbuttontextsize.Location = new System.Drawing.Point(51, 50); + this.txtappbuttontextsize.Name = "txtappbuttontextsize"; + this.txtappbuttontextsize.Size = new System.Drawing.Size(23, 22); + this.txtappbuttontextsize.TabIndex = 23; + this.txtappbuttontextsize.TextChanged += new System.EventHandler(this.txtappbuttontextsize_TextChanged); + // + // Label39 + // + this.Label39.AutoSize = true; + this.Label39.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label39.Location = new System.Drawing.Point(1, 52); + this.Label39.Name = "Label39"; + this.Label39.Size = new System.Drawing.Size(49, 16); + this.Label39.TabIndex = 22; + this.Label39.Text = "T Size:"; + // + // 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(101, 53); + this.Label40.Name = "Label40"; + this.Label40.Size = new System.Drawing.Size(50, 16); + this.Label40.TabIndex = 21; + this.Label40.Text = "Colour:"; + // + // pnlmainbuttonactivated + // + this.pnlmainbuttonactivated.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmainbuttonactivated.Location = new System.Drawing.Point(267, 6); + this.pnlmainbuttonactivated.Name = "pnlmainbuttonactivated"; + this.pnlmainbuttonactivated.Size = new System.Drawing.Size(41, 20); + this.pnlmainbuttonactivated.TabIndex = 16; + this.pnlmainbuttonactivated.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetALButtonClickedColor); + // + // Label28 + // + this.Label28.AutoSize = true; + this.Label28.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label28.Location = new System.Drawing.Point(177, 7); + this.Label28.Name = "Label28"; + this.Label28.Size = new System.Drawing.Size(67, 16); + this.Label28.TabIndex = 15; + this.Label28.Text = "Activated:"; + // + // Label35 + // + this.Label35.AutoSize = true; + this.Label35.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label35.Location = new System.Drawing.Point(77, 103); + this.Label35.Name = "Label35"; + this.Label35.Size = new System.Drawing.Size(22, 16); + this.Label35.TabIndex = 14; + this.Label35.Text = "px"; + // + // txtapplicationsbuttonheight + // + this.txtapplicationsbuttonheight.BackColor = System.Drawing.Color.White; + this.txtapplicationsbuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtapplicationsbuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtapplicationsbuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtapplicationsbuttonheight.Location = new System.Drawing.Point(53, 101); + this.txtapplicationsbuttonheight.Name = "txtapplicationsbuttonheight"; + this.txtapplicationsbuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtapplicationsbuttonheight.TabIndex = 13; + this.txtapplicationsbuttonheight.TextChanged += new System.EventHandler(this.txtapplicationsbuttonheight_TextChanged); + // + // Label36 + // + this.Label36.AutoSize = true; + this.Label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label36.Location = new System.Drawing.Point(2, 103); + this.Label36.Name = "Label36"; + this.Label36.Size = new System.Drawing.Size(50, 16); + this.Label36.TabIndex = 12; + this.Label36.Text = "Height:"; + // + // pnlmainbuttoncolour + // + this.pnlmainbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmainbuttoncolour.Location = new System.Drawing.Point(128, 4); + this.pnlmainbuttoncolour.Name = "pnlmainbuttoncolour"; + this.pnlmainbuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlmainbuttoncolour.TabIndex = 1; + this.pnlmainbuttoncolour.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetALButtonColor); + // + // 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(3, 7); + this.Label43.Name = "Label43"; + this.Label43.Size = new System.Drawing.Size(122, 16); + this.Label43.TabIndex = 0; + this.Label43.Text = "Main Button Colour:"; + // + // pnldesktopintro + // + this.pnldesktopintro.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktopintro.Controls.Add(this.Label69); + this.pnldesktopintro.Controls.Add(this.Label70); + this.pnldesktopintro.Location = new System.Drawing.Point(135, 159); + this.pnldesktopintro.Name = "pnldesktopintro"; + this.pnldesktopintro.Size = new System.Drawing.Size(317, 140); + this.pnldesktopintro.TabIndex = 17; + // + // Label69 + // + this.Label69.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label69.Location = new System.Drawing.Point(3, 20); + this.Label69.Name = "Label69"; + this.Label69.Size = new System.Drawing.Size(312, 113); + this.Label69.TabIndex = 1; + this.Label69.Text = "The Desktop Settings allow you to customize various desktop-related settings such" + + " as the desktop background. Go ahead and explore!"; + this.Label69.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label70 + // + this.Label70.AutoSize = true; + this.Label70.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label70.Location = new System.Drawing.Point(86, -2); + this.Label70.Name = "Label70"; + this.Label70.Size = new System.Drawing.Size(148, 20); + this.Label70.TabIndex = 0; + this.Label70.Text = "Desktop Settings"; + // + // pnlpanelbuttonsoptions + // + this.pnlpanelbuttonsoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlpanelbuttonsoptions.Controls.Add(this.pnlpanelbuttontextcolour); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label101); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttontexttop); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label104); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttontextside); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label106); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label93); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttontop); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label94); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttoninitalgap); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label108); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttonicontop); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label110); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttoniconside); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label112); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttoniconsize); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label105); + this.pnlpanelbuttonsoptions.Controls.Add(this.cbpanelbuttontextstyle); + this.pnlpanelbuttonsoptions.Controls.Add(this.cbpanelbuttonfont); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label100); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpaneltextbuttonsize); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label102); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label103); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label98); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttongap); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label99); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label96); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttonheight); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label97); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label92); + this.pnlpanelbuttonsoptions.Controls.Add(this.txtpanelbuttonwidth); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label91); + this.pnlpanelbuttonsoptions.Controls.Add(this.pnlpanelbuttoncolour); + this.pnlpanelbuttonsoptions.Controls.Add(this.Label95); + this.pnlpanelbuttonsoptions.Location = new System.Drawing.Point(135, 159); + this.pnlpanelbuttonsoptions.Name = "pnlpanelbuttonsoptions"; + this.pnlpanelbuttonsoptions.Size = new System.Drawing.Size(317, 140); + this.pnlpanelbuttonsoptions.TabIndex = 10; + this.pnlpanelbuttonsoptions.Visible = false; + // + // pnlpanelbuttontextcolour + // + this.pnlpanelbuttontextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpanelbuttontextcolour.Location = new System.Drawing.Point(270, 57); + this.pnlpanelbuttontextcolour.Name = "pnlpanelbuttontextcolour"; + this.pnlpanelbuttontextcolour.Size = new System.Drawing.Size(41, 20); + this.pnlpanelbuttontextcolour.TabIndex = 50; + this.pnlpanelbuttontextcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetPanelButtonTextColor); + // + // Label101 + // + this.Label101.AutoSize = true; + this.Label101.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label101.Location = new System.Drawing.Point(219, 59); + this.Label101.Name = "Label101"; + this.Label101.Size = new System.Drawing.Size(50, 16); + this.Label101.TabIndex = 49; + this.Label101.Text = "Colour:"; + // + // txtpanelbuttontexttop + // + this.txtpanelbuttontexttop.BackColor = System.Drawing.Color.White; + this.txtpanelbuttontexttop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttontexttop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttontexttop.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttontexttop.Location = new System.Drawing.Point(225, 82); + this.txtpanelbuttontexttop.Name = "txtpanelbuttontexttop"; + this.txtpanelbuttontexttop.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttontexttop.TabIndex = 48; + this.txtpanelbuttontexttop.TextChanged += new System.EventHandler(this.txtpanelbuttontexttop_TextChanged); + // + // Label104 + // + this.Label104.AutoSize = true; + this.Label104.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label104.Location = new System.Drawing.Point(191, 84); + this.Label104.Name = "Label104"; + this.Label104.Size = new System.Drawing.Size(36, 16); + this.Label104.TabIndex = 47; + this.Label104.Text = "Top:"; + // + // txtpanelbuttontextside + // + this.txtpanelbuttontextside.BackColor = System.Drawing.Color.White; + this.txtpanelbuttontextside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttontextside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttontextside.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttontextside.Location = new System.Drawing.Point(165, 82); + this.txtpanelbuttontextside.Name = "txtpanelbuttontextside"; + this.txtpanelbuttontextside.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttontextside.TabIndex = 46; + this.txtpanelbuttontextside.TextChanged += new System.EventHandler(this.txtpanelbuttontextside_TextChanged); + // + // Label106 + // + this.Label106.AutoSize = true; + this.Label106.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label106.Location = new System.Drawing.Point(128, 84); + this.Label106.Name = "Label106"; + this.Label106.Size = new System.Drawing.Size(39, 16); + this.Label106.TabIndex = 45; + this.Label106.Text = "Side:"; + // + // Label93 + // + this.Label93.AutoSize = true; + this.Label93.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label93.Location = new System.Drawing.Point(292, 7); + this.Label93.Name = "Label93"; + this.Label93.Size = new System.Drawing.Size(22, 16); + this.Label93.TabIndex = 43; + this.Label93.Text = "px"; + // + // txtpanelbuttontop + // + this.txtpanelbuttontop.BackColor = System.Drawing.Color.White; + this.txtpanelbuttontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttontop.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttontop.Location = new System.Drawing.Point(268, 5); + this.txtpanelbuttontop.Name = "txtpanelbuttontop"; + this.txtpanelbuttontop.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttontop.TabIndex = 42; + this.txtpanelbuttontop.TextChanged += new System.EventHandler(this.txtpanelbuttontop_TextChanged); + // + // Label94 + // + this.Label94.AutoSize = true; + this.Label94.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label94.Location = new System.Drawing.Point(233, 7); + this.Label94.Name = "Label94"; + this.Label94.Size = new System.Drawing.Size(36, 16); + this.Label94.TabIndex = 41; + this.Label94.Text = "Top:"; + // + // txtpanelbuttoninitalgap + // + this.txtpanelbuttoninitalgap.BackColor = System.Drawing.Color.White; + this.txtpanelbuttoninitalgap.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttoninitalgap.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttoninitalgap.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttoninitalgap.Location = new System.Drawing.Point(207, 5); + this.txtpanelbuttoninitalgap.Name = "txtpanelbuttoninitalgap"; + this.txtpanelbuttoninitalgap.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttoninitalgap.TabIndex = 40; + this.txtpanelbuttoninitalgap.TextChanged += new System.EventHandler(this.txtpanelbuttoninitalgap_TextChanged); + // + // Label108 + // + this.Label108.AutoSize = true; + this.Label108.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label108.Location = new System.Drawing.Point(137, 7); + this.Label108.Name = "Label108"; + this.Label108.Size = new System.Drawing.Size(70, 16); + this.Label108.TabIndex = 39; + this.Label108.Text = "Initial Gap:"; + // + // txtpanelbuttonicontop + // + this.txtpanelbuttonicontop.BackColor = System.Drawing.Color.White; + this.txtpanelbuttonicontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttonicontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttonicontop.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttonicontop.Location = new System.Drawing.Point(287, 108); + this.txtpanelbuttonicontop.Name = "txtpanelbuttonicontop"; + this.txtpanelbuttonicontop.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttonicontop.TabIndex = 37; + this.txtpanelbuttonicontop.TextChanged += new System.EventHandler(this.txtpanelbuttonicontop_TextChanged); + // + // Label110 + // + this.Label110.AutoSize = true; + this.Label110.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label110.Location = new System.Drawing.Point(221, 110); + this.Label110.Name = "Label110"; + this.Label110.Size = new System.Drawing.Size(64, 16); + this.Label110.TabIndex = 36; + this.Label110.Text = "Icon Top:"; + // + // txtpanelbuttoniconside + // + this.txtpanelbuttoniconside.BackColor = System.Drawing.Color.White; + this.txtpanelbuttoniconside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttoniconside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttoniconside.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttoniconside.Location = new System.Drawing.Point(180, 108); + this.txtpanelbuttoniconside.Name = "txtpanelbuttoniconside"; + this.txtpanelbuttoniconside.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttoniconside.TabIndex = 34; + this.txtpanelbuttoniconside.TextChanged += new System.EventHandler(this.txtpanelbuttoniconside_TextChanged); + // + // Label112 + // + this.Label112.AutoSize = true; + this.Label112.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label112.Location = new System.Drawing.Point(113, 110); + this.Label112.Name = "Label112"; + this.Label112.Size = new System.Drawing.Size(67, 16); + this.Label112.TabIndex = 33; + this.Label112.Text = "Icon Side:"; + // + // txtpanelbuttoniconsize + // + this.txtpanelbuttoniconsize.BackColor = System.Drawing.Color.White; + this.txtpanelbuttoniconsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttoniconsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttoniconsize.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttoniconsize.Location = new System.Drawing.Point(70, 108); + this.txtpanelbuttoniconsize.Name = "txtpanelbuttoniconsize"; + this.txtpanelbuttoniconsize.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttoniconsize.TabIndex = 27; + this.txtpanelbuttoniconsize.TextChanged += new System.EventHandler(this.txtpanelbuttoniconsize_TextChanged); + // + // Label105 + // + this.Label105.AutoSize = true; + this.Label105.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label105.Location = new System.Drawing.Point(3, 110); + this.Label105.Name = "Label105"; + this.Label105.Size = new System.Drawing.Size(65, 16); + this.Label105.TabIndex = 26; + this.Label105.Text = "Icon Size:"; + // + // cbpanelbuttontextstyle + // + this.cbpanelbuttontextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbpanelbuttontextstyle.FormattingEnabled = true; + this.cbpanelbuttontextstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.cbpanelbuttontextstyle.Location = new System.Drawing.Point(46, 83); + this.cbpanelbuttontextstyle.Name = "cbpanelbuttontextstyle"; + this.cbpanelbuttontextstyle.Size = new System.Drawing.Size(80, 24); + this.cbpanelbuttontextstyle.TabIndex = 25; + this.cbpanelbuttontextstyle.SelectedIndexChanged += new System.EventHandler(this.cbpanelbuttontextstyle_SelectedIndexChanged); + // + // cbpanelbuttonfont + // + this.cbpanelbuttonfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.cbpanelbuttonfont.FormattingEnabled = true; + this.cbpanelbuttonfont.Location = new System.Drawing.Point(70, 56); + this.cbpanelbuttonfont.Name = "cbpanelbuttonfont"; + this.cbpanelbuttonfont.Size = new System.Drawing.Size(147, 24); + this.cbpanelbuttonfont.TabIndex = 24; + this.cbpanelbuttonfont.SelectedIndexChanged += new System.EventHandler(this.cbpanelbuttonfont_SelectedIndexChanged); + // + // Label100 + // + this.Label100.AutoSize = true; + this.Label100.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label100.Location = new System.Drawing.Point(3, 86); + this.Label100.Name = "Label100"; + this.Label100.Size = new System.Drawing.Size(41, 16); + this.Label100.TabIndex = 23; + this.Label100.Text = "Style:"; + // + // txtpaneltextbuttonsize + // + this.txtpaneltextbuttonsize.BackColor = System.Drawing.Color.White; + this.txtpaneltextbuttonsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpaneltextbuttonsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpaneltextbuttonsize.ForeColor = System.Drawing.Color.Black; + this.txtpaneltextbuttonsize.Location = new System.Drawing.Point(287, 82); + this.txtpaneltextbuttonsize.Name = "txtpaneltextbuttonsize"; + this.txtpaneltextbuttonsize.Size = new System.Drawing.Size(23, 22); + this.txtpaneltextbuttonsize.TabIndex = 21; + this.txtpaneltextbuttonsize.TextChanged += new System.EventHandler(this.txtpaneltextbuttonsize_TextChanged); + // + // Label102 + // + this.Label102.AutoSize = true; + this.Label102.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label102.Location = new System.Drawing.Point(252, 84); + this.Label102.Name = "Label102"; + this.Label102.Size = new System.Drawing.Size(37, 16); + this.Label102.TabIndex = 20; + this.Label102.Text = "Size:"; + // + // Label103 + // + this.Label103.AutoSize = true; + this.Label103.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label103.Location = new System.Drawing.Point(3, 60); + this.Label103.Name = "Label103"; + this.Label103.Size = new System.Drawing.Size(66, 16); + this.Label103.TabIndex = 19; + this.Label103.Text = "Text Font:"; + // + // Label98 + // + this.Label98.AutoSize = true; + this.Label98.BackColor = System.Drawing.Color.Transparent; + this.Label98.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label98.Location = new System.Drawing.Point(292, 33); + this.Label98.Name = "Label98"; + this.Label98.Size = new System.Drawing.Size(22, 16); + this.Label98.TabIndex = 14; + this.Label98.Text = "px"; + // + // txtpanelbuttongap + // + this.txtpanelbuttongap.BackColor = System.Drawing.Color.White; + this.txtpanelbuttongap.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttongap.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttongap.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttongap.Location = new System.Drawing.Point(268, 31); + this.txtpanelbuttongap.Name = "txtpanelbuttongap"; + this.txtpanelbuttongap.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttongap.TabIndex = 13; + this.txtpanelbuttongap.TextChanged += new System.EventHandler(this.txtpanelbuttongap_TextChanged); + // + // Label99 + // + this.Label99.AutoSize = true; + this.Label99.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label99.Location = new System.Drawing.Point(232, 33); + this.Label99.Name = "Label99"; + this.Label99.Size = new System.Drawing.Size(37, 16); + this.Label99.TabIndex = 12; + this.Label99.Text = "Gap:"; + // + // Label96 + // + this.Label96.AutoSize = true; + this.Label96.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label96.Location = new System.Drawing.Point(209, 34); + this.Label96.Name = "Label96"; + this.Label96.Size = new System.Drawing.Size(22, 16); + this.Label96.TabIndex = 11; + this.Label96.Text = "px"; + // + // txtpanelbuttonheight + // + this.txtpanelbuttonheight.BackColor = System.Drawing.Color.White; + this.txtpanelbuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttonheight.Location = new System.Drawing.Point(185, 32); + this.txtpanelbuttonheight.Name = "txtpanelbuttonheight"; + this.txtpanelbuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtpanelbuttonheight.TabIndex = 10; + this.txtpanelbuttonheight.TextChanged += new System.EventHandler(this.txtpanelbuttonheight_TextChanged); + // + // Label97 + // + this.Label97.AutoSize = true; + this.Label97.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label97.Location = new System.Drawing.Point(135, 34); + this.Label97.Name = "Label97"; + this.Label97.Size = new System.Drawing.Size(50, 16); + this.Label97.TabIndex = 9; + this.Label97.Text = "Height:"; + // + // Label92 + // + this.Label92.AutoSize = true; + this.Label92.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label92.Location = new System.Drawing.Point(114, 33); + this.Label92.Name = "Label92"; + this.Label92.Size = new System.Drawing.Size(22, 16); + this.Label92.TabIndex = 8; + this.Label92.Text = "px"; + // + // txtpanelbuttonwidth + // + this.txtpanelbuttonwidth.BackColor = System.Drawing.Color.White; + this.txtpanelbuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpanelbuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtpanelbuttonwidth.ForeColor = System.Drawing.Color.Black; + this.txtpanelbuttonwidth.Location = new System.Drawing.Point(88, 31); + this.txtpanelbuttonwidth.Name = "txtpanelbuttonwidth"; + this.txtpanelbuttonwidth.Size = new System.Drawing.Size(26, 22); + this.txtpanelbuttonwidth.TabIndex = 7; + this.txtpanelbuttonwidth.TextChanged += new System.EventHandler(this.txtpanelbuttonwidth_TextChanged); + // + // Label91 + // + this.Label91.AutoSize = true; + this.Label91.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label91.Location = new System.Drawing.Point(3, 33); + this.Label91.Name = "Label91"; + this.Label91.Size = new System.Drawing.Size(85, 16); + this.Label91.TabIndex = 6; + this.Label91.Text = "Button Width:"; + // + // pnlpanelbuttoncolour + // + this.pnlpanelbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpanelbuttoncolour.Location = new System.Drawing.Point(94, 5); + this.pnlpanelbuttoncolour.Name = "pnlpanelbuttoncolour"; + this.pnlpanelbuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlpanelbuttoncolour.TabIndex = 1; + this.pnlpanelbuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetPanelButtonColor); + // + // Label95 + // + this.Label95.AutoSize = true; + this.Label95.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label95.Location = new System.Drawing.Point(3, 7); + this.Label95.Name = "Label95"; + this.Label95.Size = new System.Drawing.Size(90, 16); + this.Label95.TabIndex = 0; + this.Label95.Text = "Button Colour:"; + // + // pnldesktopbackgroundoptions + // + this.pnldesktopbackgroundoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnldesktopbackgroundoptions.Controls.Add(this.pnldesktopcolour); + this.pnldesktopbackgroundoptions.Controls.Add(this.Label45); + this.pnldesktopbackgroundoptions.Location = new System.Drawing.Point(135, 159); + this.pnldesktopbackgroundoptions.Name = "pnldesktopbackgroundoptions"; + this.pnldesktopbackgroundoptions.Size = new System.Drawing.Size(317, 140); + this.pnldesktopbackgroundoptions.TabIndex = 10; + this.pnldesktopbackgroundoptions.Visible = false; + // + // pnldesktopcolour + // + this.pnldesktopcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnldesktopcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnldesktopcolour.Location = new System.Drawing.Point(112, 5); + this.pnldesktopcolour.Name = "pnldesktopcolour"; + this.pnldesktopcolour.Size = new System.Drawing.Size(41, 20); + this.pnldesktopcolour.TabIndex = 3; + this.pnldesktopcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.ChangeDesktopBackground); + // + // Label45 + // + this.Label45.AutoSize = true; + this.Label45.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label45.Location = new System.Drawing.Point(3, 7); + this.Label45.Name = "Label45"; + this.Label45.Size = new System.Drawing.Size(104, 16); + this.Label45.TabIndex = 2; + this.Label45.Text = "Desktop Colour:"; + // + // pnlpanelclockoptions + // + this.pnlpanelclockoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlpanelclockoptions.Controls.Add(this.pnlclockbackgroundcolour); + this.pnlpanelclockoptions.Controls.Add(this.Label44); + this.pnlpanelclockoptions.Controls.Add(this.comboclocktextstyle); + this.pnlpanelclockoptions.Controls.Add(this.comboclocktextfont); + this.pnlpanelclockoptions.Controls.Add(this.Label26); + this.pnlpanelclockoptions.Controls.Add(this.Label29); + this.pnlpanelclockoptions.Controls.Add(this.txtclocktextfromtop); + this.pnlpanelclockoptions.Controls.Add(this.Label30); + this.pnlpanelclockoptions.Controls.Add(this.Label31); + this.pnlpanelclockoptions.Controls.Add(this.txtclocktextsize); + this.pnlpanelclockoptions.Controls.Add(this.Label32); + this.pnlpanelclockoptions.Controls.Add(this.Label33); + this.pnlpanelclockoptions.Controls.Add(this.pnlpanelclocktextcolour); + this.pnlpanelclockoptions.Controls.Add(this.Label34); + this.pnlpanelclockoptions.Location = new System.Drawing.Point(135, 159); + this.pnlpanelclockoptions.Name = "pnlpanelclockoptions"; + this.pnlpanelclockoptions.Size = new System.Drawing.Size(317, 140); + this.pnlpanelclockoptions.TabIndex = 15; + this.pnlpanelclockoptions.Visible = false; + // + // pnlclockbackgroundcolour + // + this.pnlclockbackgroundcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlclockbackgroundcolour.Location = new System.Drawing.Point(261, 5); + this.pnlclockbackgroundcolour.Name = "pnlclockbackgroundcolour"; + this.pnlclockbackgroundcolour.Size = new System.Drawing.Size(41, 20); + this.pnlclockbackgroundcolour.TabIndex = 20; + this.pnlclockbackgroundcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetClockBG); + // + // Label44 + // + this.Label44.AutoSize = true; + this.Label44.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label44.Location = new System.Drawing.Point(173, 7); + this.Label44.Name = "Label44"; + this.Label44.Size = new System.Drawing.Size(84, 16); + this.Label44.TabIndex = 19; + this.Label44.Text = "Background:"; + // + // comboclocktextstyle + // + this.comboclocktextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboclocktextstyle.FormattingEnabled = true; + this.comboclocktextstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.comboclocktextstyle.Location = new System.Drawing.Point(209, 54); + this.comboclocktextstyle.Name = "comboclocktextstyle"; + this.comboclocktextstyle.Size = new System.Drawing.Size(99, 24); + this.comboclocktextstyle.TabIndex = 18; + this.comboclocktextstyle.SelectedIndexChanged += new System.EventHandler(this.comboclocktextstyle_SelectedIndexChanged); + // + // comboclocktextfont + // + this.comboclocktextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.comboclocktextfont.FormattingEnabled = true; + this.comboclocktextfont.Location = new System.Drawing.Point(114, 28); + this.comboclocktextfont.Name = "comboclocktextfont"; + this.comboclocktextfont.Size = new System.Drawing.Size(192, 24); + this.comboclocktextfont.TabIndex = 17; + this.comboclocktextfont.SelectedIndexChanged += new System.EventHandler(this.comboclocktextfont_SelectedIndexChanged); + // + // Label26 + // + this.Label26.AutoSize = true; + this.Label26.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label26.Location = new System.Drawing.Point(166, 57); + this.Label26.Name = "Label26"; + this.Label26.Size = new System.Drawing.Size(41, 16); + this.Label26.TabIndex = 15; + this.Label26.Text = "Style:"; + // + // Label29 + // + this.Label29.AutoSize = true; + 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(163, 82); + this.Label29.Name = "Label29"; + this.Label29.Size = new System.Drawing.Size(22, 16); + this.Label29.TabIndex = 11; + this.Label29.Text = "px"; + // + // txtclocktextfromtop + // + this.txtclocktextfromtop.BackColor = System.Drawing.Color.White; + this.txtclocktextfromtop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclocktextfromtop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclocktextfromtop.ForeColor = System.Drawing.Color.Black; + this.txtclocktextfromtop.Location = new System.Drawing.Point(139, 80); + this.txtclocktextfromtop.Name = "txtclocktextfromtop"; + this.txtclocktextfromtop.Size = new System.Drawing.Size(23, 22); + this.txtclocktextfromtop.TabIndex = 10; + this.txtclocktextfromtop.TextChanged += new System.EventHandler(this.txtclocktextfromtop_TextChanged); + // + // Label30 + // + this.Label30.AutoSize = true; + this.Label30.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label30.Location = new System.Drawing.Point(3, 82); + this.Label30.Name = "Label30"; + this.Label30.Size = new System.Drawing.Size(136, 16); + this.Label30.TabIndex = 9; + this.Label30.Text = "Clock Text From Top:"; + // + // Label31 + // + this.Label31.AutoSize = true; + this.Label31.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label31.Location = new System.Drawing.Point(138, 57); + this.Label31.Name = "Label31"; + this.Label31.Size = new System.Drawing.Size(22, 16); + this.Label31.TabIndex = 8; + this.Label31.Text = "px"; + // + // txtclocktextsize + // + this.txtclocktextsize.BackColor = System.Drawing.Color.White; + this.txtclocktextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclocktextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclocktextsize.ForeColor = System.Drawing.Color.Black; + this.txtclocktextsize.Location = new System.Drawing.Point(114, 55); + this.txtclocktextsize.Name = "txtclocktextsize"; + this.txtclocktextsize.Size = new System.Drawing.Size(23, 22); + this.txtclocktextsize.TabIndex = 7; + this.txtclocktextsize.Validated += new System.EventHandler(this.txtclocktextsize_TextChanged); + // + // Label32 + // + this.Label32.AutoSize = true; + this.Label32.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label32.Location = new System.Drawing.Point(3, 57); + this.Label32.Name = "Label32"; + this.Label32.Size = new System.Drawing.Size(103, 16); + this.Label32.TabIndex = 6; + this.Label32.Text = "Clock Text Size:"; + // + // Label33 + // + this.Label33.AutoSize = true; + this.Label33.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label33.Location = new System.Drawing.Point(3, 32); + this.Label33.Name = "Label33"; + this.Label33.Size = new System.Drawing.Size(103, 16); + this.Label33.TabIndex = 2; + this.Label33.Text = "Clock Text Font:"; + // + // pnlpanelclocktextcolour + // + this.pnlpanelclocktextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpanelclocktextcolour.Location = new System.Drawing.Point(121, 5); + this.pnlpanelclocktextcolour.Name = "pnlpanelclocktextcolour"; + this.pnlpanelclocktextcolour.Size = new System.Drawing.Size(41, 20); + this.pnlpanelclocktextcolour.TabIndex = 1; + this.pnlpanelclocktextcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetClockTextColor); + // + // Label34 + // + this.Label34.AutoSize = true; + this.Label34.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label34.Location = new System.Drawing.Point(3, 7); + this.Label34.Name = "Label34"; + this.Label34.Size = new System.Drawing.Size(116, 16); + this.Label34.TabIndex = 0; + this.Label34.Text = "Clock Text Colour:"; + // + // pnldesktoppreview + // + this.pnldesktoppreview.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.pnldesktoppreview.Controls.Add(this.predesktoppanel); + this.pnldesktoppreview.Location = new System.Drawing.Point(5, 3); + this.pnldesktoppreview.Name = "pnldesktoppreview"; + this.pnldesktoppreview.Size = new System.Drawing.Size(448, 148); + this.pnldesktoppreview.TabIndex = 0; + // + // predesktoppanel + // + this.predesktoppanel.BackColor = System.Drawing.Color.Gray; + this.predesktoppanel.Controls.Add(this.prepnlpanelbuttonholder); + this.predesktoppanel.Controls.Add(this.pretimepanel); + this.predesktoppanel.Controls.Add(this.preapplaunchermenuholder); + this.predesktoppanel.Dock = System.Windows.Forms.DockStyle.Top; + this.predesktoppanel.Location = new System.Drawing.Point(0, 0); + this.predesktoppanel.Name = "predesktoppanel"; + this.predesktoppanel.Size = new System.Drawing.Size(448, 25); + this.predesktoppanel.TabIndex = 1; + // + // prepnlpanelbuttonholder + // + this.prepnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent; + this.prepnlpanelbuttonholder.Controls.Add(this.prepnlpanelbutton); + this.prepnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Fill; + this.prepnlpanelbuttonholder.Location = new System.Drawing.Point(116, 0); + this.prepnlpanelbuttonholder.Name = "prepnlpanelbuttonholder"; + this.prepnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); + this.prepnlpanelbuttonholder.Size = new System.Drawing.Size(235, 25); + this.prepnlpanelbuttonholder.TabIndex = 6; + // + // prepnlpanelbutton + // + this.prepnlpanelbutton.BackColor = System.Drawing.Color.Black; + this.prepnlpanelbutton.Controls.Add(this.pretbicon); + this.prepnlpanelbutton.Controls.Add(this.pretbctext); + this.prepnlpanelbutton.Location = new System.Drawing.Point(5, 3); + this.prepnlpanelbutton.Name = "prepnlpanelbutton"; + this.prepnlpanelbutton.Size = new System.Drawing.Size(126, 20); + this.prepnlpanelbutton.TabIndex = 18; + this.prepnlpanelbutton.Visible = false; + // + // pretbicon + // + this.pretbicon.BackColor = System.Drawing.Color.Transparent; + this.pretbicon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pretbicon.Location = new System.Drawing.Point(4, 2); + this.pretbicon.Name = "pretbicon"; + this.pretbicon.Size = new System.Drawing.Size(16, 16); + this.pretbicon.TabIndex = 1; + this.pretbicon.TabStop = false; + // + // pretbctext + // + this.pretbctext.AutoSize = true; + this.pretbctext.BackColor = System.Drawing.Color.Transparent; + this.pretbctext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.pretbctext.ForeColor = System.Drawing.Color.White; + this.pretbctext.Location = new System.Drawing.Point(24, 2); + this.pretbctext.Name = "pretbctext"; + this.pretbctext.Size = new System.Drawing.Size(45, 16); + this.pretbctext.TabIndex = 0; + this.pretbctext.Text = "Shifter"; + // + // pretimepanel + // + this.pretimepanel.Controls.Add(this.prepaneltimetext); + this.pretimepanel.Dock = System.Windows.Forms.DockStyle.Right; + this.pretimepanel.Location = new System.Drawing.Point(351, 0); + this.pretimepanel.Name = "pretimepanel"; + this.pretimepanel.Size = new System.Drawing.Size(97, 25); + this.pretimepanel.TabIndex = 5; + // + // prepaneltimetext + // + this.prepaneltimetext.AutoSize = true; + this.prepaneltimetext.BackColor = System.Drawing.Color.Transparent; + this.prepaneltimetext.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.prepaneltimetext.Location = new System.Drawing.Point(5, 0); + this.prepaneltimetext.Name = "prepaneltimetext"; + this.prepaneltimetext.Size = new System.Drawing.Size(80, 24); + this.prepaneltimetext.TabIndex = 1; + this.prepaneltimetext.Text = "5000023"; + this.prepaneltimetext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // preapplaunchermenuholder + // + this.preapplaunchermenuholder.Controls.Add(this.predesktopappmenu); + this.preapplaunchermenuholder.Dock = System.Windows.Forms.DockStyle.Left; + this.preapplaunchermenuholder.Location = new System.Drawing.Point(0, 0); + this.preapplaunchermenuholder.Name = "preapplaunchermenuholder"; + this.preapplaunchermenuholder.Size = new System.Drawing.Size(116, 25); + this.preapplaunchermenuholder.TabIndex = 4; + // + // predesktopappmenu + // + this.predesktopappmenu.AutoSize = false; + this.predesktopappmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ApplicationsToolStripMenuItem}); + this.predesktopappmenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; + this.predesktopappmenu.Location = new System.Drawing.Point(0, 0); + this.predesktopappmenu.Name = "predesktopappmenu"; + this.predesktopappmenu.Padding = new System.Windows.Forms.Padding(0); + this.predesktopappmenu.Size = new System.Drawing.Size(116, 24); + this.predesktopappmenu.TabIndex = 0; + this.predesktopappmenu.Text = "MenuStrip1"; + // + // ApplicationsToolStripMenuItem + // + this.ApplicationsToolStripMenuItem.AutoSize = false; + this.ApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.KnowledgeInputToolStripMenuItem, + this.ShiftoriumToolStripMenuItem, + this.ClockToolStripMenuItem, + this.TerminalToolStripMenuItem, + this.ShifterToolStripMenuItem, + this.ToolStripSeparator1, + this.ShutdownToolStripMenuItem}); + this.ApplicationsToolStripMenuItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem"; + this.ApplicationsToolStripMenuItem.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.ApplicationsToolStripMenuItem.ShowShortcutKeys = false; + this.ApplicationsToolStripMenuItem.Size = new System.Drawing.Size(102, 24); + this.ApplicationsToolStripMenuItem.Text = "Applications"; + this.ApplicationsToolStripMenuItem.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; + this.ApplicationsToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + // + // KnowledgeInputToolStripMenuItem + // + this.KnowledgeInputToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.KnowledgeInputToolStripMenuItem.Name = "KnowledgeInputToolStripMenuItem"; + this.KnowledgeInputToolStripMenuItem.ShowShortcutKeys = false; + this.KnowledgeInputToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.KnowledgeInputToolStripMenuItem.Text = "Knowledge Input"; + // + // ShiftoriumToolStripMenuItem + // + this.ShiftoriumToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShiftoriumToolStripMenuItem.Name = "ShiftoriumToolStripMenuItem"; + this.ShiftoriumToolStripMenuItem.ShowShortcutKeys = false; + this.ShiftoriumToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShiftoriumToolStripMenuItem.Text = "Shiftorium"; + // + // ClockToolStripMenuItem + // + this.ClockToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ClockToolStripMenuItem.Name = "ClockToolStripMenuItem"; + this.ClockToolStripMenuItem.ShowShortcutKeys = false; + this.ClockToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ClockToolStripMenuItem.Text = "Clock"; + // + // TerminalToolStripMenuItem + // + this.TerminalToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.TerminalToolStripMenuItem.Name = "TerminalToolStripMenuItem"; + this.TerminalToolStripMenuItem.ShowShortcutKeys = false; + this.TerminalToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.TerminalToolStripMenuItem.Text = "Terminal"; + // + // ShifterToolStripMenuItem + // + this.ShifterToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShifterToolStripMenuItem.Name = "ShifterToolStripMenuItem"; + this.ShifterToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShifterToolStripMenuItem.Text = "Shifter"; + // + // ToolStripSeparator1 + // + this.ToolStripSeparator1.BackColor = System.Drawing.Color.Transparent; + this.ToolStripSeparator1.ForeColor = System.Drawing.Color.White; + this.ToolStripSeparator1.Name = "ToolStripSeparator1"; + this.ToolStripSeparator1.Size = new System.Drawing.Size(178, 6); + // + // ShutdownToolStripMenuItem + // + this.ShutdownToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem"; + this.ShutdownToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShutdownToolStripMenuItem.Text = "Shut Down"; + // + // Panel10 + // + this.Panel10.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.Panel10.Controls.Add(this.btndesktopitself); + this.Panel10.Controls.Add(this.btnpanelclock); + this.Panel10.Controls.Add(this.btnapplauncher); + this.Panel10.Controls.Add(this.btndesktoppanel); + this.Panel10.Location = new System.Drawing.Point(1, 168); + this.Panel10.Name = "Panel10"; + this.Panel10.Size = new System.Drawing.Size(128, 135); + this.Panel10.TabIndex = 8; + // + // btndesktopitself + // + this.btndesktopitself.BackColor = System.Drawing.Color.White; + this.btndesktopitself.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndesktopitself.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndesktopitself.Location = new System.Drawing.Point(4, 105); + this.btndesktopitself.Name = "btndesktopitself"; + this.btndesktopitself.Size = new System.Drawing.Size(119, 29); + this.btndesktopitself.TabIndex = 7; + this.btndesktopitself.Text = "Desktop"; + this.btndesktopitself.UseVisualStyleBackColor = false; + this.btndesktopitself.Click += new System.EventHandler(this.btndesktopitself_Click); + // + // btnpanelclock + // + this.btnpanelclock.BackColor = System.Drawing.Color.White; + this.btnpanelclock.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnpanelclock.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnpanelclock.Location = new System.Drawing.Point(4, 70); + this.btnpanelclock.Name = "btnpanelclock"; + this.btnpanelclock.Size = new System.Drawing.Size(119, 29); + this.btnpanelclock.TabIndex = 6; + this.btnpanelclock.Text = "Panel Clock"; + this.btnpanelclock.UseVisualStyleBackColor = false; + this.btnpanelclock.Click += new System.EventHandler(this.btnpanelclock_Click); + // + // btnapplauncher + // + this.btnapplauncher.BackColor = System.Drawing.Color.White; + this.btnapplauncher.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapplauncher.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnapplauncher.Location = new System.Drawing.Point(4, 35); + this.btnapplauncher.Name = "btnapplauncher"; + this.btnapplauncher.Size = new System.Drawing.Size(119, 29); + this.btnapplauncher.TabIndex = 5; + this.btnapplauncher.Text = "App Launcher"; + this.btnapplauncher.UseVisualStyleBackColor = false; + this.btnapplauncher.Click += new System.EventHandler(this.btnapplauncher_Click); + // + // btndesktoppanel + // + this.btndesktoppanel.BackColor = System.Drawing.Color.White; + this.btndesktoppanel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndesktoppanel.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndesktoppanel.Location = new System.Drawing.Point(4, 0); + this.btndesktoppanel.Name = "btndesktoppanel"; + this.btndesktoppanel.Size = new System.Drawing.Size(119, 29); + this.btndesktoppanel.TabIndex = 4; + this.btndesktoppanel.Text = "Desktop Panel"; + this.btndesktoppanel.UseVisualStyleBackColor = false; + this.btndesktoppanel.Click += new System.EventHandler(this.btndesktoppanel_Click); + // + // txtpanelbuttoniconheight + // + this.txtpanelbuttoniconheight.Location = new System.Drawing.Point(0, 0); + this.txtpanelbuttoniconheight.Name = "txtpanelbuttoniconheight"; + this.txtpanelbuttoniconheight.Size = new System.Drawing.Size(100, 20); + this.txtpanelbuttoniconheight.TabIndex = 0; + // + // pnlwindowsoptions + // + this.pnlwindowsoptions.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.pnlwindowsoptions.BackColor = System.Drawing.Color.White; + this.pnlwindowsoptions.Controls.Add(this.pnlwindowsintro); + this.pnlwindowsoptions.Controls.Add(this.pnlbuttonoptions); + this.pnlwindowsoptions.Controls.Add(this.pnltitlebaroptions); + this.pnlwindowsoptions.Controls.Add(this.pnlborderoptions); + this.pnlwindowsoptions.Controls.Add(this.pnltitletextoptions); + this.pnlwindowsoptions.Controls.Add(this.pnlwindowsobjects); + this.pnlwindowsoptions.Controls.Add(this.pnlwindowpreview); + this.pnlwindowsoptions.Location = new System.Drawing.Point(134, 9); + this.pnlwindowsoptions.Name = "pnlwindowsoptions"; + this.pnlwindowsoptions.Size = new System.Drawing.Size(457, 306); + this.pnlwindowsoptions.TabIndex = 4; + // + // pnlwindowsintro + // + this.pnlwindowsintro.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlwindowsintro.Controls.Add(this.Label68); + this.pnlwindowsintro.Controls.Add(this.Label67); + this.pnlwindowsintro.Location = new System.Drawing.Point(135, 159); + this.pnlwindowsintro.Name = "pnlwindowsintro"; + this.pnlwindowsintro.Size = new System.Drawing.Size(325, 139); + this.pnlwindowsintro.TabIndex = 16; + // + // Label68 + // + this.Label68.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label68.Location = new System.Drawing.Point(3, 20); + this.Label68.Name = "Label68"; + this.Label68.Size = new System.Drawing.Size(312, 113); + this.Label68.TabIndex = 1; + this.Label68.Text = "Welcome to the Windows category. Here, you may skin various aspects of windows in" + + " ShiftOS."; + this.Label68.TextAlign = System.Drawing.ContentAlignment.TopCenter; + this.Label68.Click += new System.EventHandler(this.Label68_Click); + // + // Label67 + // + this.Label67.AutoSize = true; + this.Label67.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label67.Location = new System.Drawing.Point(89, -2); + this.Label67.Name = "Label67"; + this.Label67.Size = new System.Drawing.Size(143, 20); + this.Label67.TabIndex = 0; + this.Label67.Text = "Window Settings"; + // + // pnlbuttonoptions + // + this.pnlbuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlbuttonoptions.Controls.Add(this.pnlclosebuttonoptions); + this.pnlbuttonoptions.Controls.Add(this.pnlrollupbuttonoptions); + this.pnlbuttonoptions.Controls.Add(this.pnlminimizebuttonoptions); + this.pnlbuttonoptions.Controls.Add(this.combobuttonoption); + this.pnlbuttonoptions.Controls.Add(this.Label52); + this.pnlbuttonoptions.Location = new System.Drawing.Point(135, 159); + this.pnlbuttonoptions.Name = "pnlbuttonoptions"; + this.pnlbuttonoptions.Size = new System.Drawing.Size(325, 139); + this.pnlbuttonoptions.TabIndex = 10; + this.pnlbuttonoptions.Visible = false; + // + // pnlclosebuttonoptions + // + this.pnlclosebuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlclosebuttonoptions.Controls.Add(this.Label8); + this.pnlclosebuttonoptions.Controls.Add(this.Label11); + this.pnlclosebuttonoptions.Controls.Add(this.pnlclosebuttoncolour); + this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonfromside); + this.pnlclosebuttonoptions.Controls.Add(this.Label7); + this.pnlclosebuttonoptions.Controls.Add(this.Label12); + this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonheight); + this.pnlclosebuttonoptions.Controls.Add(this.Label13); + this.pnlclosebuttonoptions.Controls.Add(this.Label6); + this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonfromtop); + this.pnlclosebuttonoptions.Controls.Add(this.Label10); + this.pnlclosebuttonoptions.Controls.Add(this.Label14); + this.pnlclosebuttonoptions.Controls.Add(this.txtclosebuttonwidth); + this.pnlclosebuttonoptions.Controls.Add(this.Label9); + this.pnlclosebuttonoptions.Location = new System.Drawing.Point(4, 29); + this.pnlclosebuttonoptions.Name = "pnlclosebuttonoptions"; + this.pnlclosebuttonoptions.Size = new System.Drawing.Size(311, 105); + this.pnlclosebuttonoptions.TabIndex = 15; + this.pnlclosebuttonoptions.Visible = false; + // + // Label8 + // + this.Label8.AutoSize = true; + this.Label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label8.Location = new System.Drawing.Point(3, 6); + this.Label8.Name = "Label8"; + this.Label8.Size = new System.Drawing.Size(128, 16); + this.Label8.TabIndex = 0; + this.Label8.Text = "Close Button Colour:"; + // + // Label11 + // + this.Label11.AutoSize = true; + this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label11.Location = new System.Drawing.Point(177, 82); + this.Label11.Name = "Label11"; + this.Label11.Size = new System.Drawing.Size(22, 16); + this.Label11.TabIndex = 14; + this.Label11.Text = "px"; + // + // pnlclosebuttoncolour + // + this.pnlclosebuttoncolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlclosebuttoncolour.Location = new System.Drawing.Point(132, 4); + this.pnlclosebuttoncolour.Name = "pnlclosebuttoncolour"; + this.pnlclosebuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlclosebuttoncolour.TabIndex = 1; + this.pnlclosebuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetcloseColor); + // + // txtclosebuttonfromside + // + this.txtclosebuttonfromside.BackColor = System.Drawing.Color.White; + this.txtclosebuttonfromside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclosebuttonfromside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclosebuttonfromside.ForeColor = System.Drawing.Color.Black; + this.txtclosebuttonfromside.Location = new System.Drawing.Point(153, 80); + this.txtclosebuttonfromside.Name = "txtclosebuttonfromside"; + this.txtclosebuttonfromside.Size = new System.Drawing.Size(23, 22); + this.txtclosebuttonfromside.TabIndex = 13; + this.txtclosebuttonfromside.TextChanged += new System.EventHandler(this.txtclosebuttonfromside_TextChanged); + // + // Label7 + // + this.Label7.AutoSize = true; + this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(3, 32); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(128, 16); + this.Label7.TabIndex = 2; + this.Label7.Text = "Close Button Height:"; + // + // Label12 + // + this.Label12.AutoSize = true; + 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, 82); + this.Label12.Name = "Label12"; + this.Label12.Size = new System.Drawing.Size(151, 16); + this.Label12.TabIndex = 12; + this.Label12.Text = "Close Button From Side:"; + // + // txtclosebuttonheight + // + this.txtclosebuttonheight.BackColor = System.Drawing.Color.White; + this.txtclosebuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclosebuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclosebuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtclosebuttonheight.Location = new System.Drawing.Point(132, 30); + this.txtclosebuttonheight.Name = "txtclosebuttonheight"; + this.txtclosebuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtclosebuttonheight.TabIndex = 4; + this.txtclosebuttonheight.TextChanged += new System.EventHandler(this.txtclosebuttonheight_TextChanged); + // + // Label13 + // + this.Label13.AutoSize = true; + 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(177, 57); + this.Label13.Name = "Label13"; + this.Label13.Size = new System.Drawing.Size(22, 16); + this.Label13.TabIndex = 11; + this.Label13.Text = "px"; + // + // Label6 + // + this.Label6.AutoSize = true; + 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(156, 32); + this.Label6.Name = "Label6"; + this.Label6.Size = new System.Drawing.Size(22, 16); + this.Label6.TabIndex = 5; + this.Label6.Text = "px"; + // + // txtclosebuttonfromtop + // + this.txtclosebuttonfromtop.BackColor = System.Drawing.Color.White; + this.txtclosebuttonfromtop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclosebuttonfromtop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclosebuttonfromtop.ForeColor = System.Drawing.Color.Black; + this.txtclosebuttonfromtop.Location = new System.Drawing.Point(153, 55); + this.txtclosebuttonfromtop.Name = "txtclosebuttonfromtop"; + this.txtclosebuttonfromtop.Size = new System.Drawing.Size(23, 22); + this.txtclosebuttonfromtop.TabIndex = 10; + this.txtclosebuttonfromtop.TextChanged += new System.EventHandler(this.txtclosebuttonfromtop_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(184, 32); + this.Label10.Name = "Label10"; + this.Label10.Size = new System.Drawing.Size(45, 16); + this.Label10.TabIndex = 6; + this.Label10.Text = "Width:"; + // + // Label14 + // + this.Label14.AutoSize = true; + this.Label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label14.Location = new System.Drawing.Point(3, 57); + this.Label14.Name = "Label14"; + this.Label14.Size = new System.Drawing.Size(148, 16); + this.Label14.TabIndex = 9; + this.Label14.Text = "Close Button From Top:"; + // + // txtclosebuttonwidth + // + this.txtclosebuttonwidth.BackColor = System.Drawing.Color.White; + this.txtclosebuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtclosebuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtclosebuttonwidth.ForeColor = System.Drawing.Color.Black; + this.txtclosebuttonwidth.Location = new System.Drawing.Point(234, 30); + this.txtclosebuttonwidth.Name = "txtclosebuttonwidth"; + this.txtclosebuttonwidth.Size = new System.Drawing.Size(23, 22); + this.txtclosebuttonwidth.TabIndex = 7; + this.txtclosebuttonwidth.TextChanged += new System.EventHandler(this.txtclosebuttonwidth_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(258, 32); + this.Label9.Name = "Label9"; + this.Label9.Size = new System.Drawing.Size(22, 16); + this.Label9.TabIndex = 8; + this.Label9.Text = "px"; + // + // pnlrollupbuttonoptions + // + this.pnlrollupbuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlrollupbuttonoptions.Controls.Add(this.Label54); + this.pnlrollupbuttonoptions.Controls.Add(this.Label55); + this.pnlrollupbuttonoptions.Controls.Add(this.pnlrollupbuttoncolour); + this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttonside); + this.pnlrollupbuttonoptions.Controls.Add(this.Label56); + this.pnlrollupbuttonoptions.Controls.Add(this.Label57); + this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttonheight); + this.pnlrollupbuttonoptions.Controls.Add(this.Label58); + this.pnlrollupbuttonoptions.Controls.Add(this.Label59); + this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttontop); + this.pnlrollupbuttonoptions.Controls.Add(this.Label60); + this.pnlrollupbuttonoptions.Controls.Add(this.Label61); + this.pnlrollupbuttonoptions.Controls.Add(this.txtrollupbuttonwidth); + this.pnlrollupbuttonoptions.Controls.Add(this.Label62); + this.pnlrollupbuttonoptions.Location = new System.Drawing.Point(4, 29); + this.pnlrollupbuttonoptions.Name = "pnlrollupbuttonoptions"; + this.pnlrollupbuttonoptions.Size = new System.Drawing.Size(311, 105); + this.pnlrollupbuttonoptions.TabIndex = 16; + this.pnlrollupbuttonoptions.Visible = false; + // + // Label54 + // + this.Label54.AutoSize = true; + this.Label54.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label54.Location = new System.Drawing.Point(3, 6); + this.Label54.Name = "Label54"; + this.Label54.Size = new System.Drawing.Size(138, 16); + this.Label54.TabIndex = 0; + this.Label54.Text = "Roll Up Button Colour:"; + // + // Label55 + // + this.Label55.AutoSize = true; + this.Label55.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label55.Location = new System.Drawing.Point(188, 82); + this.Label55.Name = "Label55"; + this.Label55.Size = new System.Drawing.Size(22, 16); + this.Label55.TabIndex = 14; + this.Label55.Text = "px"; + // + // pnlrollupbuttoncolour + // + this.pnlrollupbuttoncolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlrollupbuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlrollupbuttoncolour.Location = new System.Drawing.Point(143, 4); + this.pnlrollupbuttoncolour.Name = "pnlrollupbuttoncolour"; + this.pnlrollupbuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlrollupbuttoncolour.TabIndex = 1; + this.pnlrollupbuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetrollupColor); + // + // txtrollupbuttonside + // + this.txtrollupbuttonside.BackColor = System.Drawing.Color.White; + this.txtrollupbuttonside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtrollupbuttonside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtrollupbuttonside.ForeColor = System.Drawing.Color.Black; + this.txtrollupbuttonside.Location = new System.Drawing.Point(164, 80); + this.txtrollupbuttonside.Name = "txtrollupbuttonside"; + this.txtrollupbuttonside.Size = new System.Drawing.Size(23, 22); + this.txtrollupbuttonside.TabIndex = 13; + this.txtrollupbuttonside.TextChanged += new System.EventHandler(this.txtrollupbuttonside_TextChanged); + // + // Label56 + // + this.Label56.AutoSize = true; + this.Label56.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label56.Location = new System.Drawing.Point(3, 32); + this.Label56.Name = "Label56"; + this.Label56.Size = new System.Drawing.Size(138, 16); + this.Label56.TabIndex = 2; + this.Label56.Text = "Roll Up Button Height:"; + // + // Label57 + // + this.Label57.AutoSize = true; + this.Label57.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label57.Location = new System.Drawing.Point(3, 82); + this.Label57.Name = "Label57"; + this.Label57.Size = new System.Drawing.Size(161, 16); + this.Label57.TabIndex = 12; + this.Label57.Text = "Roll Up Button From Side:"; + // + // txtrollupbuttonheight + // + this.txtrollupbuttonheight.BackColor = System.Drawing.Color.White; + this.txtrollupbuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtrollupbuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtrollupbuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtrollupbuttonheight.Location = new System.Drawing.Point(143, 30); + this.txtrollupbuttonheight.Name = "txtrollupbuttonheight"; + this.txtrollupbuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtrollupbuttonheight.TabIndex = 4; + this.txtrollupbuttonheight.TextChanged += new System.EventHandler(this.txtrollupbuttonheight_TextChanged); + // + // Label58 + // + this.Label58.AutoSize = true; + this.Label58.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label58.Location = new System.Drawing.Point(188, 57); + this.Label58.Name = "Label58"; + this.Label58.Size = new System.Drawing.Size(22, 16); + this.Label58.TabIndex = 11; + this.Label58.Text = "px"; + // + // Label59 + // + this.Label59.AutoSize = true; + this.Label59.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label59.Location = new System.Drawing.Point(167, 32); + this.Label59.Name = "Label59"; + this.Label59.Size = new System.Drawing.Size(22, 16); + this.Label59.TabIndex = 5; + this.Label59.Text = "px"; + // + // txtrollupbuttontop + // + this.txtrollupbuttontop.BackColor = System.Drawing.Color.White; + this.txtrollupbuttontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtrollupbuttontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtrollupbuttontop.ForeColor = System.Drawing.Color.Black; + this.txtrollupbuttontop.Location = new System.Drawing.Point(164, 55); + this.txtrollupbuttontop.Name = "txtrollupbuttontop"; + this.txtrollupbuttontop.Size = new System.Drawing.Size(23, 22); + this.txtrollupbuttontop.TabIndex = 10; + this.txtrollupbuttontop.TextChanged += new System.EventHandler(this.txtrollupbuttontop_TextChanged); + // + // Label60 + // + this.Label60.AutoSize = true; + this.Label60.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label60.Location = new System.Drawing.Point(195, 32); + this.Label60.Name = "Label60"; + this.Label60.Size = new System.Drawing.Size(45, 16); + this.Label60.TabIndex = 6; + this.Label60.Text = "Width:"; + // + // Label61 + // + this.Label61.AutoSize = true; + this.Label61.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label61.Location = new System.Drawing.Point(3, 57); + this.Label61.Name = "Label61"; + this.Label61.Size = new System.Drawing.Size(158, 16); + this.Label61.TabIndex = 9; + this.Label61.Text = "Roll Up Button From Top:"; + // + // txtrollupbuttonwidth + // + this.txtrollupbuttonwidth.BackColor = System.Drawing.Color.White; + this.txtrollupbuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtrollupbuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtrollupbuttonwidth.ForeColor = System.Drawing.Color.Black; + this.txtrollupbuttonwidth.Location = new System.Drawing.Point(245, 30); + this.txtrollupbuttonwidth.Name = "txtrollupbuttonwidth"; + this.txtrollupbuttonwidth.Size = new System.Drawing.Size(23, 22); + this.txtrollupbuttonwidth.TabIndex = 7; + this.txtrollupbuttonwidth.TextChanged += new System.EventHandler(this.txtrollupbuttonwidth_TextChanged); + // + // Label62 + // + this.Label62.AutoSize = true; + this.Label62.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label62.Location = new System.Drawing.Point(269, 32); + this.Label62.Name = "Label62"; + this.Label62.Size = new System.Drawing.Size(22, 16); + this.Label62.TabIndex = 8; + this.Label62.Text = "px"; + // + // pnlminimizebuttonoptions + // + this.pnlminimizebuttonoptions.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlminimizebuttonoptions.Controls.Add(this.Label82); + this.pnlminimizebuttonoptions.Controls.Add(this.Label83); + this.pnlminimizebuttonoptions.Controls.Add(this.pnlminimizebuttoncolour); + this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttonside); + this.pnlminimizebuttonoptions.Controls.Add(this.Label84); + this.pnlminimizebuttonoptions.Controls.Add(this.Label85); + this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttonheight); + this.pnlminimizebuttonoptions.Controls.Add(this.Label86); + this.pnlminimizebuttonoptions.Controls.Add(this.Label87); + this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttontop); + this.pnlminimizebuttonoptions.Controls.Add(this.Label88); + this.pnlminimizebuttonoptions.Controls.Add(this.Label89); + this.pnlminimizebuttonoptions.Controls.Add(this.txtminimizebuttonwidth); + this.pnlminimizebuttonoptions.Controls.Add(this.Label90); + this.pnlminimizebuttonoptions.Location = new System.Drawing.Point(4, 29); + this.pnlminimizebuttonoptions.Name = "pnlminimizebuttonoptions"; + this.pnlminimizebuttonoptions.Size = new System.Drawing.Size(311, 105); + this.pnlminimizebuttonoptions.TabIndex = 18; + this.pnlminimizebuttonoptions.Visible = false; + // + // Label82 + // + this.Label82.AutoSize = true; + this.Label82.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label82.Location = new System.Drawing.Point(3, 6); + this.Label82.Name = "Label82"; + this.Label82.Size = new System.Drawing.Size(145, 16); + this.Label82.TabIndex = 0; + this.Label82.Text = "Minimize Button Colour:"; + // + // Label83 + // + this.Label83.AutoSize = true; + this.Label83.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label83.Location = new System.Drawing.Point(196, 82); + this.Label83.Name = "Label83"; + this.Label83.Size = new System.Drawing.Size(22, 16); + this.Label83.TabIndex = 14; + this.Label83.Text = "px"; + // + // pnlminimizebuttoncolour + // + this.pnlminimizebuttoncolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlminimizebuttoncolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlminimizebuttoncolour.Location = new System.Drawing.Point(149, 4); + this.pnlminimizebuttoncolour.Name = "pnlminimizebuttoncolour"; + this.pnlminimizebuttoncolour.Size = new System.Drawing.Size(41, 20); + this.pnlminimizebuttoncolour.TabIndex = 1; + this.pnlminimizebuttoncolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetMinimizeColor); + // + // txtminimizebuttonside + // + this.txtminimizebuttonside.BackColor = System.Drawing.Color.White; + this.txtminimizebuttonside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtminimizebuttonside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtminimizebuttonside.ForeColor = System.Drawing.Color.Black; + this.txtminimizebuttonside.Location = new System.Drawing.Point(172, 80); + this.txtminimizebuttonside.Name = "txtminimizebuttonside"; + this.txtminimizebuttonside.Size = new System.Drawing.Size(23, 22); + this.txtminimizebuttonside.TabIndex = 13; + this.txtminimizebuttonside.TextChanged += new System.EventHandler(this.txtminimizebuttonside_TextChanged); + // + // Label84 + // + this.Label84.AutoSize = true; + this.Label84.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label84.Location = new System.Drawing.Point(3, 32); + this.Label84.Name = "Label84"; + this.Label84.Size = new System.Drawing.Size(145, 16); + this.Label84.TabIndex = 2; + this.Label84.Text = "Minimize Button Height:"; + // + // Label85 + // + this.Label85.AutoSize = true; + this.Label85.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label85.Location = new System.Drawing.Point(3, 82); + this.Label85.Name = "Label85"; + this.Label85.Size = new System.Drawing.Size(168, 16); + this.Label85.TabIndex = 12; + this.Label85.Text = "Minimize Button From Side:"; + // + // txtminimizebuttonheight + // + this.txtminimizebuttonheight.BackColor = System.Drawing.Color.White; + this.txtminimizebuttonheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtminimizebuttonheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtminimizebuttonheight.ForeColor = System.Drawing.Color.Black; + this.txtminimizebuttonheight.Location = new System.Drawing.Point(150, 30); + this.txtminimizebuttonheight.Name = "txtminimizebuttonheight"; + this.txtminimizebuttonheight.Size = new System.Drawing.Size(23, 22); + this.txtminimizebuttonheight.TabIndex = 4; + this.txtminimizebuttonheight.TextChanged += new System.EventHandler(this.txtminimizebuttonheight_TextChanged); + // + // Label86 + // + this.Label86.AutoSize = true; + this.Label86.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label86.Location = new System.Drawing.Point(196, 57); + this.Label86.Name = "Label86"; + this.Label86.Size = new System.Drawing.Size(22, 16); + this.Label86.TabIndex = 11; + this.Label86.Text = "px"; + // + // Label87 + // + this.Label87.AutoSize = true; + this.Label87.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label87.Location = new System.Drawing.Point(174, 32); + this.Label87.Name = "Label87"; + this.Label87.Size = new System.Drawing.Size(22, 16); + this.Label87.TabIndex = 5; + this.Label87.Text = "px"; + // + // txtminimizebuttontop + // + this.txtminimizebuttontop.BackColor = System.Drawing.Color.White; + this.txtminimizebuttontop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtminimizebuttontop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtminimizebuttontop.ForeColor = System.Drawing.Color.Black; + this.txtminimizebuttontop.Location = new System.Drawing.Point(172, 55); + this.txtminimizebuttontop.Name = "txtminimizebuttontop"; + this.txtminimizebuttontop.Size = new System.Drawing.Size(23, 22); + this.txtminimizebuttontop.TabIndex = 10; + this.txtminimizebuttontop.TextChanged += new System.EventHandler(this.txtminimizebuttontop_TextChanged); + // + // Label88 + // + this.Label88.AutoSize = true; + this.Label88.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label88.Location = new System.Drawing.Point(198, 32); + this.Label88.Name = "Label88"; + this.Label88.Size = new System.Drawing.Size(45, 16); + this.Label88.TabIndex = 6; + this.Label88.Text = "Width:"; + // + // Label89 + // + this.Label89.AutoSize = true; + this.Label89.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label89.Location = new System.Drawing.Point(3, 57); + this.Label89.Name = "Label89"; + this.Label89.Size = new System.Drawing.Size(165, 16); + this.Label89.TabIndex = 9; + this.Label89.Text = "Minimize Button From Top:"; + // + // txtminimizebuttonwidth + // + this.txtminimizebuttonwidth.BackColor = System.Drawing.Color.White; + this.txtminimizebuttonwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtminimizebuttonwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtminimizebuttonwidth.ForeColor = System.Drawing.Color.Black; + this.txtminimizebuttonwidth.Location = new System.Drawing.Point(247, 30); + this.txtminimizebuttonwidth.Name = "txtminimizebuttonwidth"; + this.txtminimizebuttonwidth.Size = new System.Drawing.Size(23, 22); + this.txtminimizebuttonwidth.TabIndex = 7; + this.txtminimizebuttonwidth.TextChanged += new System.EventHandler(this.txtminimizebuttonwidth_TextChanged); + // + // Label90 + // + this.Label90.AutoSize = true; + this.Label90.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label90.Location = new System.Drawing.Point(269, 32); + this.Label90.Name = "Label90"; + this.Label90.Size = new System.Drawing.Size(22, 16); + this.Label90.TabIndex = 8; + this.Label90.Text = "px"; + // + // combobuttonoption + // + this.combobuttonoption.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combobuttonoption.FormattingEnabled = true; + this.combobuttonoption.Items.AddRange(new object[] { + "Close Button", + "Roll Up Button"}); + this.combobuttonoption.Location = new System.Drawing.Point(157, 4); + this.combobuttonoption.Name = "combobuttonoption"; + this.combobuttonoption.Size = new System.Drawing.Size(121, 24); + this.combobuttonoption.TabIndex = 17; + this.combobuttonoption.SelectedIndexChanged += new System.EventHandler(this.combobuttonoption_SelectedIndexChanged); + // + // Label52 + // + this.Label52.AutoSize = true; + this.Label52.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label52.Location = new System.Drawing.Point(40, 6); + this.Label52.Name = "Label52"; + this.Label52.Size = new System.Drawing.Size(111, 16); + this.Label52.TabIndex = 15; + this.Label52.Text = "Button To Modify:"; + // + // pnltitlebaroptions + // + this.pnltitlebaroptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnltitlebaroptions.Controls.Add(this.Label80); + this.pnltitlebaroptions.Controls.Add(this.txticonfromtop); + this.pnltitlebaroptions.Controls.Add(this.Label81); + this.pnltitlebaroptions.Controls.Add(this.Label78); + this.pnltitlebaroptions.Controls.Add(this.txticonfromside); + this.pnltitlebaroptions.Controls.Add(this.Label79); + this.pnltitlebaroptions.Controls.Add(this.lbcornerwidthpx); + this.pnltitlebaroptions.Controls.Add(this.txttitlebarcornerwidth); + this.pnltitlebaroptions.Controls.Add(this.lbcornerwidth); + this.pnltitlebaroptions.Controls.Add(this.pnltitlebarrightcornercolour); + this.pnltitlebaroptions.Controls.Add(this.pnltitlebarleftcornercolour); + this.pnltitlebaroptions.Controls.Add(this.lbrightcornercolor); + this.pnltitlebaroptions.Controls.Add(this.lbleftcornercolor); + this.pnltitlebaroptions.Controls.Add(this.cboxtitlebarcorners); + this.pnltitlebaroptions.Controls.Add(this.Label5); + this.pnltitlebaroptions.Controls.Add(this.txttitlebarheight); + this.pnltitlebaroptions.Controls.Add(this.Label4); + this.pnltitlebaroptions.Controls.Add(this.pnltitlebarcolour); + this.pnltitlebaroptions.Controls.Add(this.Label2); + this.pnltitlebaroptions.Location = new System.Drawing.Point(135, 159); + this.pnltitlebaroptions.Name = "pnltitlebaroptions"; + this.pnltitlebaroptions.Size = new System.Drawing.Size(325, 139); + this.pnltitlebaroptions.TabIndex = 9; + this.pnltitlebaroptions.Visible = false; + // + // Label80 + // + this.Label80.AutoSize = true; + this.Label80.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label80.Location = new System.Drawing.Point(277, 105); + this.Label80.Name = "Label80"; + this.Label80.Size = new System.Drawing.Size(22, 16); + this.Label80.TabIndex = 19; + this.Label80.Text = "px"; + // + // txticonfromtop + // + this.txticonfromtop.BackColor = System.Drawing.Color.White; + this.txticonfromtop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txticonfromtop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txticonfromtop.ForeColor = System.Drawing.Color.Black; + this.txticonfromtop.Location = new System.Drawing.Point(253, 103); + this.txticonfromtop.Name = "txticonfromtop"; + this.txticonfromtop.Size = new System.Drawing.Size(23, 22); + this.txticonfromtop.TabIndex = 18; + this.txticonfromtop.TextChanged += new System.EventHandler(this.txticonfromtop_TextChanged); + // + // Label81 + // + this.Label81.AutoSize = true; + this.Label81.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label81.Location = new System.Drawing.Point(157, 105); + this.Label81.Name = "Label81"; + this.Label81.Size = new System.Drawing.Size(98, 16); + this.Label81.TabIndex = 17; + this.Label81.Text = "Icon From Top:"; + // + // Label78 + // + this.Label78.AutoSize = true; + this.Label78.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label78.Location = new System.Drawing.Point(128, 105); + this.Label78.Name = "Label78"; + this.Label78.Size = new System.Drawing.Size(22, 16); + this.Label78.TabIndex = 16; + this.Label78.Text = "px"; + // + // txticonfromside + // + this.txticonfromside.BackColor = System.Drawing.Color.White; + this.txticonfromside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txticonfromside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txticonfromside.ForeColor = System.Drawing.Color.Black; + this.txticonfromside.Location = new System.Drawing.Point(104, 103); + this.txticonfromside.Name = "txticonfromside"; + this.txticonfromside.Size = new System.Drawing.Size(23, 22); + this.txticonfromside.TabIndex = 15; + this.txticonfromside.TextChanged += new System.EventHandler(this.txticonfromside_TextChanged); + // + // Label79 + // + this.Label79.AutoSize = true; + this.Label79.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label79.Location = new System.Drawing.Point(3, 105); + this.Label79.Name = "Label79"; + this.Label79.Size = new System.Drawing.Size(101, 16); + this.Label79.TabIndex = 14; + this.Label79.Text = "Icon From Side:"; + // + // lbcornerwidthpx + // + this.lbcornerwidthpx.AutoSize = true; + this.lbcornerwidthpx.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcornerwidthpx.Location = new System.Drawing.Point(277, 32); + this.lbcornerwidthpx.Name = "lbcornerwidthpx"; + this.lbcornerwidthpx.Size = new System.Drawing.Size(22, 16); + this.lbcornerwidthpx.TabIndex = 13; + this.lbcornerwidthpx.Text = "px"; + // + // txttitlebarcornerwidth + // + this.txttitlebarcornerwidth.BackColor = System.Drawing.Color.White; + this.txttitlebarcornerwidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitlebarcornerwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitlebarcornerwidth.ForeColor = System.Drawing.Color.Black; + this.txttitlebarcornerwidth.Location = new System.Drawing.Point(253, 30); + this.txttitlebarcornerwidth.Name = "txttitlebarcornerwidth"; + this.txttitlebarcornerwidth.Size = new System.Drawing.Size(23, 22); + this.txttitlebarcornerwidth.TabIndex = 12; + this.txttitlebarcornerwidth.TextChanged += new System.EventHandler(this.txttitlebarcornerwidth_TextChanged); + // + // lbcornerwidth + // + this.lbcornerwidth.AutoSize = true; + this.lbcornerwidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcornerwidth.Location = new System.Drawing.Point(163, 32); + this.lbcornerwidth.Name = "lbcornerwidth"; + this.lbcornerwidth.Size = new System.Drawing.Size(88, 16); + this.lbcornerwidth.TabIndex = 11; + this.lbcornerwidth.Text = "Corner Width:"; + // + // pnltitlebarrightcornercolour + // + this.pnltitlebarrightcornercolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnltitlebarrightcornercolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltitlebarrightcornercolour.Location = new System.Drawing.Point(136, 80); + this.pnltitlebarrightcornercolour.Name = "pnltitlebarrightcornercolour"; + this.pnltitlebarrightcornercolour.Size = new System.Drawing.Size(41, 20); + this.pnltitlebarrightcornercolour.TabIndex = 10; + this.pnltitlebarrightcornercolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetRightCornerColor); + // + // pnltitlebarleftcornercolour + // + this.pnltitlebarleftcornercolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnltitlebarleftcornercolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltitlebarleftcornercolour.Location = new System.Drawing.Point(126, 56); + this.pnltitlebarleftcornercolour.Name = "pnltitlebarleftcornercolour"; + this.pnltitlebarleftcornercolour.Size = new System.Drawing.Size(41, 20); + this.pnltitlebarleftcornercolour.TabIndex = 8; + this.pnltitlebarleftcornercolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetLeftCornerColor); + // + // lbrightcornercolor + // + this.lbrightcornercolor.AutoSize = true; + this.lbrightcornercolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbrightcornercolor.Location = new System.Drawing.Point(3, 81); + this.lbrightcornercolor.Name = "lbrightcornercolor"; + this.lbrightcornercolor.Size = new System.Drawing.Size(127, 16); + this.lbrightcornercolor.TabIndex = 9; + this.lbrightcornercolor.Text = "Right Corner Colour:"; + // + // lbleftcornercolor + // + this.lbleftcornercolor.AutoSize = true; + this.lbleftcornercolor.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbleftcornercolor.Location = new System.Drawing.Point(3, 57); + this.lbleftcornercolor.Name = "lbleftcornercolor"; + this.lbleftcornercolor.Size = new System.Drawing.Size(117, 16); + this.lbleftcornercolor.TabIndex = 7; + this.lbleftcornercolor.Text = "Left Corner Colour:"; + // + // cboxtitlebarcorners + // + this.cboxtitlebarcorners.AutoSize = true; + this.cboxtitlebarcorners.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.cboxtitlebarcorners.FlatAppearance.CheckedBackColor = System.Drawing.Color.Black; + this.cboxtitlebarcorners.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cboxtitlebarcorners.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F); + this.cboxtitlebarcorners.Location = new System.Drawing.Point(166, 4); + this.cboxtitlebarcorners.Name = "cboxtitlebarcorners"; + this.cboxtitlebarcorners.Size = new System.Drawing.Size(131, 21); + this.cboxtitlebarcorners.TabIndex = 6; + this.cboxtitlebarcorners.Text = "Title Bar Corners"; + this.cboxtitlebarcorners.UseVisualStyleBackColor = true; + this.cboxtitlebarcorners.CheckedChanged += new System.EventHandler(this.cboxtitlebarcorners_CheckedChanged); + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.Location = new System.Drawing.Point(136, 32); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(22, 16); + this.Label5.TabIndex = 5; + this.Label5.Text = "px"; + // + // txttitlebarheight + // + this.txttitlebarheight.BackColor = System.Drawing.Color.White; + this.txttitlebarheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitlebarheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitlebarheight.ForeColor = System.Drawing.Color.Black; + this.txttitlebarheight.Location = new System.Drawing.Point(112, 30); + this.txttitlebarheight.Name = "txttitlebarheight"; + this.txttitlebarheight.Size = new System.Drawing.Size(23, 22); + this.txttitlebarheight.TabIndex = 4; + this.txttitlebarheight.TextChanged += new System.EventHandler(this.txttitlebarheight_TextChanged); + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(3, 32); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(103, 16); + this.Label4.TabIndex = 2; + this.Label4.Text = "Title Bar Height:"; + // + // pnltitlebarcolour + // + this.pnltitlebarcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnltitlebarcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltitlebarcolour.Location = new System.Drawing.Point(112, 5); + this.pnltitlebarcolour.Name = "pnltitlebarcolour"; + this.pnltitlebarcolour.Size = new System.Drawing.Size(41, 20); + this.pnltitlebarcolour.TabIndex = 1; + this.pnltitlebarcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetTitlebarColor); + // + // Label2 + // + this.Label2.AutoSize = true; + 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(3, 7); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(103, 16); + this.Label2.TabIndex = 0; + this.Label2.Text = "Title Bar Colour:"; + // + // pnlborderoptions + // + this.pnlborderoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnlborderoptions.Controls.Add(this.cbindividualbordercolours); + this.pnlborderoptions.Controls.Add(this.pnlborderbottomrightcolour); + this.pnlborderoptions.Controls.Add(this.lbbright); + this.pnlborderoptions.Controls.Add(this.pnlborderbottomcolour); + this.pnlborderoptions.Controls.Add(this.lbbottom); + this.pnlborderoptions.Controls.Add(this.pnlborderbottomleftcolour); + this.pnlborderoptions.Controls.Add(this.lbbleft); + this.pnlborderoptions.Controls.Add(this.pnlborderrightcolour); + this.pnlborderoptions.Controls.Add(this.lbright); + this.pnlborderoptions.Controls.Add(this.pnlborderleftcolour); + this.pnlborderoptions.Controls.Add(this.lbleft); + this.pnlborderoptions.Controls.Add(this.Label15); + this.pnlborderoptions.Controls.Add(this.pnlbordercolour); + this.pnlborderoptions.Controls.Add(this.txtbordersize); + this.pnlborderoptions.Controls.Add(this.Label3); + this.pnlborderoptions.Controls.Add(this.Label16); + this.pnlborderoptions.Location = new System.Drawing.Point(135, 159); + this.pnlborderoptions.Name = "pnlborderoptions"; + this.pnlborderoptions.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.pnlborderoptions.Size = new System.Drawing.Size(325, 139); + this.pnlborderoptions.TabIndex = 10; + this.pnlborderoptions.Visible = false; + // + // cbindividualbordercolours + // + this.cbindividualbordercolours.AutoSize = true; + this.cbindividualbordercolours.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.cbindividualbordercolours.FlatAppearance.CheckedBackColor = System.Drawing.Color.Black; + this.cbindividualbordercolours.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbindividualbordercolours.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F); + this.cbindividualbordercolours.Location = new System.Drawing.Point(161, 4); + this.cbindividualbordercolours.Name = "cbindividualbordercolours"; + this.cbindividualbordercolours.Size = new System.Drawing.Size(135, 21); + this.cbindividualbordercolours.TabIndex = 28; + this.cbindividualbordercolours.Text = "Individual Colours"; + this.cbindividualbordercolours.UseVisualStyleBackColor = true; + this.cbindividualbordercolours.CheckedChanged += new System.EventHandler(this.cbindividualbordercolours_CheckedChanged); + // + // pnlborderbottomrightcolour + // + this.pnlborderbottomrightcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderbottomrightcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderbottomrightcolour.Location = new System.Drawing.Point(132, 101); + this.pnlborderbottomrightcolour.Name = "pnlborderbottomrightcolour"; + this.pnlborderbottomrightcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderbottomrightcolour.TabIndex = 27; + this.pnlborderbottomrightcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetBottomRBorderColor); + // + // lbbright + // + this.lbbright.AutoSize = true; + this.lbbright.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbbright.Location = new System.Drawing.Point(3, 103); + this.lbbright.Name = "lbbright"; + this.lbbright.Size = new System.Drawing.Size(129, 16); + this.lbbright.TabIndex = 26; + this.lbbright.Text = "Bottom Right Colour:"; + // + // pnlborderbottomcolour + // + this.pnlborderbottomcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderbottomcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderbottomcolour.Location = new System.Drawing.Point(263, 31); + this.pnlborderbottomcolour.Name = "pnlborderbottomcolour"; + this.pnlborderbottomcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderbottomcolour.TabIndex = 25; + this.pnlborderbottomcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetBottomBorderColor); + // + // lbbottom + // + this.lbbottom.AutoSize = true; + this.lbbottom.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbbottom.Location = new System.Drawing.Point(158, 32); + this.lbbottom.Name = "lbbottom"; + this.lbbottom.Size = new System.Drawing.Size(95, 16); + this.lbbottom.TabIndex = 24; + this.lbbottom.Text = "Bottom Colour:"; + // + // pnlborderbottomleftcolour + // + this.pnlborderbottomleftcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderbottomleftcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderbottomleftcolour.Location = new System.Drawing.Point(124, 78); + this.pnlborderbottomleftcolour.Name = "pnlborderbottomleftcolour"; + this.pnlborderbottomleftcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderbottomleftcolour.TabIndex = 23; + this.pnlborderbottomleftcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetBottomLColor); + // + // lbbleft + // + this.lbbleft.AutoSize = true; + this.lbbleft.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbbleft.Location = new System.Drawing.Point(3, 80); + this.lbbleft.Name = "lbbleft"; + this.lbbleft.Size = new System.Drawing.Size(119, 16); + this.lbbleft.TabIndex = 22; + this.lbbleft.Text = "Bottom Left Colour:"; + // + // pnlborderrightcolour + // + this.pnlborderrightcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderrightcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderrightcolour.Location = new System.Drawing.Point(263, 54); + this.pnlborderrightcolour.Name = "pnlborderrightcolour"; + this.pnlborderrightcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderrightcolour.TabIndex = 21; + this.pnlborderrightcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetRightBorderColor); + // + // lbright + // + this.lbright.AutoSize = true; + this.lbright.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbright.Location = new System.Drawing.Point(157, 56); + this.lbright.Name = "lbright"; + this.lbright.Size = new System.Drawing.Size(84, 16); + this.lbright.TabIndex = 20; + this.lbright.Text = "Right Colour:"; + // + // pnlborderleftcolour + // + this.pnlborderleftcolour.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pnlborderleftcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlborderleftcolour.Location = new System.Drawing.Point(102, 54); + this.pnlborderleftcolour.Name = "pnlborderleftcolour"; + this.pnlborderleftcolour.Size = new System.Drawing.Size(41, 20); + this.pnlborderleftcolour.TabIndex = 19; + this.pnlborderleftcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetLeftBorderColor); + // + // lbleft + // + this.lbleft.AutoSize = true; + this.lbleft.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbleft.Location = new System.Drawing.Point(3, 56); + this.lbleft.Name = "lbleft"; + this.lbleft.Size = new System.Drawing.Size(74, 16); + this.lbleft.TabIndex = 18; + this.lbleft.Text = "Left Colour:"; + // + // Label15 + // + this.Label15.AutoSize = true; + this.Label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label15.Location = new System.Drawing.Point(126, 31); + this.Label15.Name = "Label15"; + this.Label15.Size = new System.Drawing.Size(22, 16); + this.Label15.TabIndex = 17; + this.Label15.Text = "px"; + // + // pnlbordercolour + // + this.pnlbordercolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbordercolour.Location = new System.Drawing.Point(102, 5); + this.pnlbordercolour.Name = "pnlbordercolour"; + this.pnlbordercolour.Size = new System.Drawing.Size(41, 20); + this.pnlbordercolour.TabIndex = 3; + this.pnlbordercolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetMainBorderColor); + // + // txtbordersize + // + this.txtbordersize.BackColor = System.Drawing.Color.White; + this.txtbordersize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtbordersize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtbordersize.ForeColor = System.Drawing.Color.Black; + this.txtbordersize.Location = new System.Drawing.Point(102, 29); + this.txtbordersize.Name = "txtbordersize"; + this.txtbordersize.Size = new System.Drawing.Size(23, 22); + this.txtbordersize.TabIndex = 16; + this.txtbordersize.TextChanged += new System.EventHandler(this.txtbordersize_TextChanged); + // + // Label3 + // + this.Label3.AutoSize = true; + 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(3, 7); + this.Label3.Name = "Label3"; + this.Label3.Size = new System.Drawing.Size(94, 16); + this.Label3.TabIndex = 2; + this.Label3.Text = "Border Colour:"; + // + // Label16 + // + this.Label16.AutoSize = true; + this.Label16.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label16.Location = new System.Drawing.Point(3, 31); + this.Label16.Name = "Label16"; + this.Label16.Size = new System.Drawing.Size(81, 16); + this.Label16.TabIndex = 15; + this.Label16.Text = "Border Size:"; + // + // pnltitletextoptions + // + this.pnltitletextoptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.pnltitletextoptions.Controls.Add(this.combotitletextposition); + this.pnltitletextoptions.Controls.Add(this.Label53); + this.pnltitletextoptions.Controls.Add(this.combotitletextstyle); + this.pnltitletextoptions.Controls.Add(this.combotitletextfont); + this.pnltitletextoptions.Controls.Add(this.Label23); + this.pnltitletextoptions.Controls.Add(this.Label17); + this.pnltitletextoptions.Controls.Add(this.txttitletextside); + this.pnltitletextoptions.Controls.Add(this.Label18); + this.pnltitletextoptions.Controls.Add(this.Label19); + this.pnltitletextoptions.Controls.Add(this.txttitletexttop); + this.pnltitletextoptions.Controls.Add(this.Label20); + this.pnltitletextoptions.Controls.Add(this.Label21); + this.pnltitletextoptions.Controls.Add(this.txttitletextsize); + this.pnltitletextoptions.Controls.Add(this.Label22); + this.pnltitletextoptions.Controls.Add(this.Label24); + this.pnltitletextoptions.Controls.Add(this.pnltitletextcolour); + this.pnltitletextoptions.Controls.Add(this.Label25); + this.pnltitletextoptions.Location = new System.Drawing.Point(135, 159); + this.pnltitletextoptions.Name = "pnltitletextoptions"; + this.pnltitletextoptions.Size = new System.Drawing.Size(325, 139); + this.pnltitletextoptions.TabIndex = 15; + this.pnltitletextoptions.Visible = false; + // + // combotitletextposition + // + this.combotitletextposition.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combotitletextposition.FormattingEnabled = true; + this.combotitletextposition.Items.AddRange(new object[] { + "Left", + "Centre"}); + this.combotitletextposition.Location = new System.Drawing.Point(211, 54); + this.combotitletextposition.Name = "combotitletextposition"; + this.combotitletextposition.Size = new System.Drawing.Size(95, 24); + this.combotitletextposition.TabIndex = 21; + this.combotitletextposition.SelectedIndexChanged += new System.EventHandler(this.combotitletextposition_SelectedIndexChanged); + // + // Label53 + // + this.Label53.AutoSize = true; + this.Label53.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label53.Location = new System.Drawing.Point(149, 57); + this.Label53.Name = "Label53"; + this.Label53.Size = new System.Drawing.Size(59, 16); + this.Label53.TabIndex = 20; + this.Label53.Text = "Position:"; + // + // combotitletextstyle + // + this.combotitletextstyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combotitletextstyle.FormattingEnabled = true; + this.combotitletextstyle.Items.AddRange(new object[] { + "Bold", + "Italic", + "Regular", + "Strikeout", + "Underline"}); + this.combotitletextstyle.Location = new System.Drawing.Point(207, 3); + this.combotitletextstyle.Name = "combotitletextstyle"; + this.combotitletextstyle.Size = new System.Drawing.Size(99, 24); + this.combotitletextstyle.TabIndex = 18; + this.combotitletextstyle.SelectedIndexChanged += new System.EventHandler(this.combotitletextstyle_SelectedIndexChanged); + // + // combotitletextfont + // + this.combotitletextfont.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.combotitletextfont.FormattingEnabled = true; + this.combotitletextfont.Location = new System.Drawing.Point(100, 30); + this.combotitletextfont.Name = "combotitletextfont"; + this.combotitletextfont.Size = new System.Drawing.Size(202, 24); + this.combotitletextfont.TabIndex = 17; + this.combotitletextfont.SelectedIndexChanged += new System.EventHandler(this.combotitletextfont_SelectedIndexChanged); + // + // Label23 + // + this.Label23.AutoSize = true; + this.Label23.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label23.Location = new System.Drawing.Point(164, 7); + this.Label23.Name = "Label23"; + this.Label23.Size = new System.Drawing.Size(41, 16); + this.Label23.TabIndex = 15; + this.Label23.Text = "Style:"; + // + // Label17 + // + this.Label17.AutoSize = true; + this.Label17.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label17.Location = new System.Drawing.Point(159, 107); + this.Label17.Name = "Label17"; + this.Label17.Size = new System.Drawing.Size(22, 16); + this.Label17.TabIndex = 14; + this.Label17.Text = "px"; + // + // txttitletextside + // + this.txttitletextside.BackColor = System.Drawing.Color.White; + this.txttitletextside.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitletextside.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitletextside.ForeColor = System.Drawing.Color.Black; + this.txttitletextside.Location = new System.Drawing.Point(135, 105); + this.txttitletextside.Name = "txttitletextside"; + this.txttitletextside.Size = new System.Drawing.Size(23, 22); + this.txttitletextside.TabIndex = 13; + this.txttitletextside.TextChanged += new System.EventHandler(this.txttitletextside_TextChanged); + // + // Label18 + // + this.Label18.AutoSize = true; + this.Label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label18.Location = new System.Drawing.Point(3, 107); + this.Label18.Name = "Label18"; + this.Label18.Size = new System.Drawing.Size(131, 16); + this.Label18.TabIndex = 12; + this.Label18.Text = "Title Text From Side:"; + // + // Label19 + // + this.Label19.AutoSize = true; + 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(159, 82); + this.Label19.Name = "Label19"; + this.Label19.Size = new System.Drawing.Size(22, 16); + this.Label19.TabIndex = 11; + this.Label19.Text = "px"; + // + // txttitletexttop + // + this.txttitletexttop.BackColor = System.Drawing.Color.White; + this.txttitletexttop.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitletexttop.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitletexttop.ForeColor = System.Drawing.Color.Black; + this.txttitletexttop.Location = new System.Drawing.Point(135, 80); + this.txttitletexttop.Name = "txttitletexttop"; + this.txttitletexttop.Size = new System.Drawing.Size(23, 22); + this.txttitletexttop.TabIndex = 10; + this.txttitletexttop.TextChanged += new System.EventHandler(this.txttitletexttop_TextChanged); + // + // Label20 + // + this.Label20.AutoSize = true; + 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(3, 82); + this.Label20.Name = "Label20"; + this.Label20.Size = new System.Drawing.Size(128, 16); + this.Label20.TabIndex = 9; + this.Label20.Text = "Title Text From Top:"; + // + // Label21 + // + this.Label21.AutoSize = true; + this.Label21.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label21.Location = new System.Drawing.Point(124, 57); + this.Label21.Name = "Label21"; + this.Label21.Size = new System.Drawing.Size(22, 16); + this.Label21.TabIndex = 8; + this.Label21.Text = "px"; + // + // txttitletextsize + // + this.txttitletextsize.BackColor = System.Drawing.Color.White; + this.txttitletextsize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txttitletextsize.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txttitletextsize.ForeColor = System.Drawing.Color.Black; + this.txttitletextsize.Location = new System.Drawing.Point(100, 55); + this.txttitletextsize.Name = "txttitletextsize"; + this.txttitletextsize.Size = new System.Drawing.Size(23, 22); + this.txttitletextsize.TabIndex = 7; + this.txttitletextsize.TextChanged += new System.EventHandler(this.txttitletextsize_TextChanged); + // + // Label22 + // + this.Label22.AutoSize = true; + this.Label22.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label22.Location = new System.Drawing.Point(3, 57); + this.Label22.Name = "Label22"; + this.Label22.Size = new System.Drawing.Size(95, 16); + this.Label22.TabIndex = 6; + this.Label22.Text = "Title Text Size:"; + // + // Label24 + // + this.Label24.AutoSize = true; + 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(3, 33); + this.Label24.Name = "Label24"; + this.Label24.Size = new System.Drawing.Size(95, 16); + this.Label24.TabIndex = 2; + this.Label24.Text = "Title Text Font:"; + // + // pnltitletextcolour + // + this.pnltitletextcolour.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltitletextcolour.Location = new System.Drawing.Point(114, 5); + this.pnltitletextcolour.Name = "pnltitletextcolour"; + this.pnltitletextcolour.Size = new System.Drawing.Size(41, 20); + this.pnltitletextcolour.TabIndex = 1; + this.pnltitletextcolour.MouseClick += new System.Windows.Forms.MouseEventHandler(this.SetTitleTextColor); + // + // Label25 + // + this.Label25.AutoSize = true; + 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(3, 7); + this.Label25.Name = "Label25"; + this.Label25.Size = new System.Drawing.Size(108, 16); + this.Label25.TabIndex = 0; + this.Label25.Text = "Title Text Colour:"; + // + // pnlwindowsobjects + // + this.pnlwindowsobjects.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.pnlwindowsobjects.Controls.Add(this.btnborders); + this.pnlwindowsobjects.Controls.Add(this.btnbuttons); + this.pnlwindowsobjects.Controls.Add(this.btntitletext); + this.pnlwindowsobjects.Controls.Add(this.btntitlebar); + this.pnlwindowsobjects.Location = new System.Drawing.Point(1, 159); + this.pnlwindowsobjects.Name = "pnlwindowsobjects"; + this.pnlwindowsobjects.Size = new System.Drawing.Size(128, 135); + this.pnlwindowsobjects.TabIndex = 8; + // + // btnborders + // + this.btnborders.BackColor = System.Drawing.Color.White; + this.btnborders.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnborders.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnborders.Location = new System.Drawing.Point(4, 105); + this.btnborders.Name = "btnborders"; + this.btnborders.Size = new System.Drawing.Size(119, 29); + this.btnborders.TabIndex = 7; + this.btnborders.TabStop = false; + this.btnborders.Text = "Borders"; + this.btnborders.UseVisualStyleBackColor = false; + this.btnborders.Click += new System.EventHandler(this.btnborders_Click); + // + // btnbuttons + // + this.btnbuttons.BackColor = System.Drawing.Color.White; + this.btnbuttons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbuttons.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnbuttons.Location = new System.Drawing.Point(4, 70); + this.btnbuttons.Name = "btnbuttons"; + this.btnbuttons.Size = new System.Drawing.Size(119, 29); + this.btnbuttons.TabIndex = 6; + this.btnbuttons.TabStop = false; + this.btnbuttons.Text = "Buttons"; + this.btnbuttons.UseVisualStyleBackColor = false; + this.btnbuttons.Click += new System.EventHandler(this.btnbuttons_Click); + // + // btntitletext + // + this.btntitletext.BackColor = System.Drawing.Color.White; + this.btntitletext.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btntitletext.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btntitletext.Location = new System.Drawing.Point(4, 35); + this.btntitletext.Name = "btntitletext"; + this.btntitletext.Size = new System.Drawing.Size(119, 29); + this.btntitletext.TabIndex = 5; + this.btntitletext.TabStop = false; + this.btntitletext.Text = "Title Text"; + this.btntitletext.UseVisualStyleBackColor = false; + this.btntitletext.Click += new System.EventHandler(this.btntitletext_Click_1); + // + // btntitlebar + // + this.btntitlebar.BackColor = System.Drawing.Color.White; + this.btntitlebar.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btntitlebar.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btntitlebar.Location = new System.Drawing.Point(4, 0); + this.btntitlebar.Name = "btntitlebar"; + this.btntitlebar.Size = new System.Drawing.Size(119, 29); + this.btntitlebar.TabIndex = 4; + this.btntitlebar.TabStop = false; + this.btntitlebar.Text = "Title Bar"; + this.btntitlebar.UseVisualStyleBackColor = false; + this.btntitlebar.Click += new System.EventHandler(this.btntitlebar_Click); + // + // pnlwindowpreview + // + this.pnlwindowpreview.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.pnlwindowpreview.Controls.Add(this.prepgcontent); + this.pnlwindowpreview.Controls.Add(this.prepgbottom); + this.pnlwindowpreview.Controls.Add(this.prepgleft); + this.pnlwindowpreview.Controls.Add(this.prepgright); + this.pnlwindowpreview.Controls.Add(this.pretitlebar); + this.pnlwindowpreview.Location = new System.Drawing.Point(5, 3); + this.pnlwindowpreview.Name = "pnlwindowpreview"; + this.pnlwindowpreview.Size = new System.Drawing.Size(448, 148); + this.pnlwindowpreview.TabIndex = 0; + // + // prepgcontent + // + this.prepgcontent.Dock = System.Windows.Forms.DockStyle.Fill; + this.prepgcontent.Location = new System.Drawing.Point(2, 30); + this.prepgcontent.Name = "prepgcontent"; + this.prepgcontent.Size = new System.Drawing.Size(444, 116); + this.prepgcontent.TabIndex = 20; + // + // prepgbottom + // + this.prepgbottom.BackColor = System.Drawing.Color.Gray; + this.prepgbottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottom.Location = new System.Drawing.Point(2, 146); + this.prepgbottom.Name = "prepgbottom"; + this.prepgbottom.Size = new System.Drawing.Size(444, 2); + this.prepgbottom.TabIndex = 23; + // + // prepgleft + // + this.prepgleft.BackColor = System.Drawing.Color.Gray; + this.prepgleft.Controls.Add(this.prepgbottomlcorner); + this.prepgleft.Dock = System.Windows.Forms.DockStyle.Left; + this.prepgleft.Location = new System.Drawing.Point(0, 30); + this.prepgleft.Name = "prepgleft"; + this.prepgleft.Size = new System.Drawing.Size(2, 118); + this.prepgleft.TabIndex = 21; + // + // prepgbottomlcorner + // + this.prepgbottomlcorner.BackColor = System.Drawing.Color.Red; + this.prepgbottomlcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottomlcorner.Location = new System.Drawing.Point(0, 116); + this.prepgbottomlcorner.Name = "prepgbottomlcorner"; + this.prepgbottomlcorner.Size = new System.Drawing.Size(2, 2); + this.prepgbottomlcorner.TabIndex = 14; + // + // prepgright + // + this.prepgright.BackColor = System.Drawing.Color.Gray; + this.prepgright.Controls.Add(this.prepgbottomrcorner); + this.prepgright.Dock = System.Windows.Forms.DockStyle.Right; + this.prepgright.Location = new System.Drawing.Point(446, 30); + this.prepgright.Name = "prepgright"; + this.prepgright.Size = new System.Drawing.Size(2, 118); + this.prepgright.TabIndex = 22; + // + // prepgbottomrcorner + // + this.prepgbottomrcorner.BackColor = System.Drawing.Color.Red; + this.prepgbottomrcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottomrcorner.Location = new System.Drawing.Point(0, 116); + this.prepgbottomrcorner.Name = "prepgbottomrcorner"; + this.prepgbottomrcorner.Size = new System.Drawing.Size(2, 2); + this.prepgbottomrcorner.TabIndex = 15; + // + // pretitlebar + // + this.pretitlebar.BackColor = System.Drawing.Color.Gray; + this.pretitlebar.Controls.Add(this.preminimizebutton); + this.pretitlebar.Controls.Add(this.prepnlicon); + this.pretitlebar.Controls.Add(this.prerollupbutton); + this.pretitlebar.Controls.Add(this.preclosebutton); + this.pretitlebar.Controls.Add(this.pretitletext); + this.pretitlebar.Controls.Add(this.prepgtoplcorner); + this.pretitlebar.Controls.Add(this.prepgtoprcorner); + this.pretitlebar.Dock = System.Windows.Forms.DockStyle.Top; + this.pretitlebar.ForeColor = System.Drawing.Color.White; + this.pretitlebar.Location = new System.Drawing.Point(0, 0); + this.pretitlebar.Name = "pretitlebar"; + this.pretitlebar.Size = new System.Drawing.Size(448, 30); + this.pretitlebar.TabIndex = 19; + // + // preminimizebutton + // + this.preminimizebutton.BackColor = System.Drawing.Color.Black; + this.preminimizebutton.Location = new System.Drawing.Point(185, 5); + this.preminimizebutton.Name = "preminimizebutton"; + this.preminimizebutton.Size = new System.Drawing.Size(22, 22); + this.preminimizebutton.TabIndex = 31; + // + // prepnlicon + // + this.prepnlicon.BackColor = System.Drawing.Color.Transparent; + this.prepnlicon.Location = new System.Drawing.Point(8, 8); + this.prepnlicon.Name = "prepnlicon"; + this.prepnlicon.Size = new System.Drawing.Size(16, 16); + this.prepnlicon.TabIndex = 32; + this.prepnlicon.TabStop = false; + this.prepnlicon.Visible = false; + // + // prerollupbutton + // + this.prerollupbutton.BackColor = System.Drawing.Color.Black; + this.prerollupbutton.Location = new System.Drawing.Point(213, 5); + this.prerollupbutton.Name = "prerollupbutton"; + this.prerollupbutton.Size = new System.Drawing.Size(22, 22); + this.prerollupbutton.TabIndex = 31; + // + // preclosebutton + // + this.preclosebutton.BackColor = System.Drawing.Color.Black; + this.preclosebutton.Location = new System.Drawing.Point(251, 5); + this.preclosebutton.Name = "preclosebutton"; + this.preclosebutton.Size = new System.Drawing.Size(22, 22); + this.preclosebutton.TabIndex = 20; + // + // pretitletext + // + this.pretitletext.AutoSize = true; + this.pretitletext.BackColor = System.Drawing.Color.Transparent; + this.pretitletext.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.pretitletext.Location = new System.Drawing.Point(29, 7); + this.pretitletext.Name = "pretitletext"; + this.pretitletext.Size = new System.Drawing.Size(77, 18); + this.pretitletext.TabIndex = 19; + this.pretitletext.Text = "Template"; + // + // prepgtoplcorner + // + this.prepgtoplcorner.BackColor = System.Drawing.Color.Red; + this.prepgtoplcorner.Dock = System.Windows.Forms.DockStyle.Left; + this.prepgtoplcorner.Location = new System.Drawing.Point(0, 0); + this.prepgtoplcorner.Name = "prepgtoplcorner"; + this.prepgtoplcorner.Size = new System.Drawing.Size(2, 30); + this.prepgtoplcorner.TabIndex = 17; + // + // prepgtoprcorner + // + this.prepgtoprcorner.BackColor = System.Drawing.Color.Red; + this.prepgtoprcorner.Dock = System.Windows.Forms.DockStyle.Right; + this.prepgtoprcorner.Location = new System.Drawing.Point(446, 0); + this.prepgtoprcorner.Name = "prepgtoprcorner"; + this.prepgtoprcorner.Size = new System.Drawing.Size(2, 30); + this.prepgtoprcorner.TabIndex = 16; + // + // pnlreset + // + this.pnlreset.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.pnlreset.Controls.Add(this.Label113); + this.pnlreset.Controls.Add(this.btnresetallsettings); + this.pnlreset.Controls.Add(this.Label109); + this.pnlreset.Controls.Add(this.Label111); + this.pnlreset.Location = new System.Drawing.Point(134, 9); + this.pnlreset.Name = "pnlreset"; + this.pnlreset.Size = new System.Drawing.Size(457, 306); + this.pnlreset.TabIndex = 18; + // + // Label113 + // + this.Label113.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label113.Location = new System.Drawing.Point(57, 231); + this.Label113.Name = "Label113"; + this.Label113.Size = new System.Drawing.Size(332, 33); + this.Label113.TabIndex = 5; + this.Label113.Text = "Warning! A Global Reset Is Irreversible!"; + this.Label113.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnresetallsettings + // + this.btnresetallsettings.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnresetallsettings.Font = new System.Drawing.Font("Cambria", 20.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnresetallsettings.Location = new System.Drawing.Point(101, 145); + this.btnresetallsettings.Name = "btnresetallsettings"; + this.btnresetallsettings.Size = new System.Drawing.Size(255, 83); + this.btnresetallsettings.TabIndex = 4; + this.btnresetallsettings.TabStop = false; + this.btnresetallsettings.Text = "Reset All Settings"; + this.btnresetallsettings.UseVisualStyleBackColor = true; + this.btnresetallsettings.Click += new System.EventHandler(this.btnresetallsettings_Click); + // + // Label109 + // + this.Label109.BackColor = System.Drawing.Color.Transparent; + this.Label109.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label109.Location = new System.Drawing.Point(4, 40); + this.Label109.Name = "Label109"; + this.Label109.Size = new System.Drawing.Size(451, 66); + this.Label109.TabIndex = 3; + this.Label109.Text = resources.GetString("Label109.Text"); + this.Label109.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label111 + // + this.Label111.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label111.Location = new System.Drawing.Point(68, 4); + this.Label111.Name = "Label111"; + this.Label111.Size = new System.Drawing.Size(332, 33); + this.Label111.TabIndex = 2; + this.Label111.Text = "Global Settings Reset!"; + this.Label111.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.pnldesktopoptions); + this.pgcontents.Controls.Add(this.pnlluaoptions); + this.pgcontents.Controls.Add(this.pnldesktopcomposition); + this.pgcontents.Controls.Add(this.pnlreset); + this.pgcontents.Controls.Add(this.pnlwindowsoptions); + this.pgcontents.Controls.Add(this.pnlmenus); + this.pgcontents.Controls.Add(this.pnlshifterintro); + this.pgcontents.Controls.Add(this.catholder); + this.pgcontents.Controls.Add(this.btnapply); + this.pgcontents.Controls.Add(this.Label1); + 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(600, 323); + this.pgcontents.TabIndex = 0; + // + // pnldesktopcomposition + // + this.pnldesktopcomposition.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.pnldesktopcomposition.BackColor = System.Drawing.Color.White; + this.pnldesktopcomposition.Controls.Add(this.pnlfancywindows); + this.pnldesktopcomposition.Controls.Add(this.pnlfancydragging); + this.pnldesktopcomposition.Controls.Add(this.pnlfancyintro); + this.pnldesktopcomposition.Controls.Add(this.panel18); + this.pnldesktopcomposition.Controls.Add(this.panel25); + this.pnldesktopcomposition.Controls.Add(this.panel36); + this.pnldesktopcomposition.Controls.Add(this.label176); + this.pnldesktopcomposition.Location = new System.Drawing.Point(134, 9); + this.pnldesktopcomposition.Name = "pnldesktopcomposition"; + this.pnldesktopcomposition.Size = new System.Drawing.Size(457, 306); + this.pnldesktopcomposition.TabIndex = 20; + // + // pnlfancywindows + // + this.pnlfancywindows.Controls.Add(this.txtwinfadedec); + this.pnlfancywindows.Controls.Add(this.label150); + this.pnlfancywindows.Controls.Add(this.txtwinfadespeed); + this.pnlfancywindows.Controls.Add(this.label151); + this.pnlfancywindows.Controls.Add(this.cbdrageffect); + this.pnlfancywindows.Controls.Add(this.label141); + this.pnlfancywindows.Controls.Add(this.cbcloseanim); + this.pnlfancywindows.Controls.Add(this.label128); + this.pnlfancywindows.Controls.Add(this.cbopenanim); + this.pnlfancywindows.Controls.Add(this.label127); + this.pnlfancywindows.Controls.Add(this.label149); + this.pnlfancywindows.Location = new System.Drawing.Point(139, 43); + this.pnlfancywindows.Name = "pnlfancywindows"; + this.pnlfancywindows.Size = new System.Drawing.Size(311, 256); + this.pnlfancywindows.TabIndex = 13; + // + // txtwinfadedec + // + this.txtwinfadedec.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtwinfadedec.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtwinfadedec.Location = new System.Drawing.Point(225, 189); + this.txtwinfadedec.Name = "txtwinfadedec"; + this.txtwinfadedec.Size = new System.Drawing.Size(35, 23); + this.txtwinfadedec.TabIndex = 26; + this.txtwinfadedec.TextChanged += new System.EventHandler(this.txtwinfadedec_TextChanged); + // + // label150 + // + this.label150.AutoSize = true; + this.label150.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label150.Location = new System.Drawing.Point(153, 191); + this.label150.Name = "label150"; + this.label150.Size = new System.Drawing.Size(71, 16); + this.label150.TabIndex = 25; + this.label150.Text = "Fade Dec."; + // + // txtwinfadespeed + // + this.txtwinfadespeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtwinfadespeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtwinfadespeed.Location = new System.Drawing.Point(109, 185); + this.txtwinfadespeed.Name = "txtwinfadespeed"; + this.txtwinfadespeed.Size = new System.Drawing.Size(35, 23); + this.txtwinfadespeed.TabIndex = 24; + this.txtwinfadespeed.TextChanged += new System.EventHandler(this.txtwinfadespeed_TextChanged); + // + // label151 + // + this.label151.AutoSize = true; + this.label151.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label151.Location = new System.Drawing.Point(13, 189); + this.label151.Name = "label151"; + this.label151.Size = new System.Drawing.Size(84, 16); + this.label151.TabIndex = 23; + this.label151.Text = "Fade Speed"; + // + // cbdrageffect + // + this.cbdrageffect.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cbdrageffect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbdrageffect.FormattingEnabled = true; + this.cbdrageffect.Location = new System.Drawing.Point(6, 153); + this.cbdrageffect.Name = "cbdrageffect"; + this.cbdrageffect.Size = new System.Drawing.Size(294, 21); + this.cbdrageffect.TabIndex = 22; + this.cbdrageffect.SelectedIndexChanged += new System.EventHandler(this.cbdrageffect_SelectedIndexChanged); + // + // label141 + // + this.label141.AutoSize = true; + this.label141.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label141.Location = new System.Drawing.Point(7, 132); + this.label141.Name = "label141"; + this.label141.Size = new System.Drawing.Size(125, 16); + this.label141.TabIndex = 21; + this.label141.Text = "Window Drag Effect"; + // + // cbcloseanim + // + this.cbcloseanim.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cbcloseanim.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbcloseanim.FormattingEnabled = true; + this.cbcloseanim.Location = new System.Drawing.Point(8, 102); + this.cbcloseanim.Name = "cbcloseanim"; + this.cbcloseanim.Size = new System.Drawing.Size(294, 21); + this.cbcloseanim.TabIndex = 20; + this.cbcloseanim.SelectedIndexChanged += new System.EventHandler(this.cbcloseanim_SelectedIndexChanged); + // + // label128 + // + this.label128.AutoSize = true; + this.label128.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label128.Location = new System.Drawing.Point(9, 81); + this.label128.Name = "label128"; + this.label128.Size = new System.Drawing.Size(156, 16); + this.label128.TabIndex = 19; + this.label128.Text = "Window Close Animation"; + // + // cbopenanim + // + this.cbopenanim.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.cbopenanim.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbopenanim.FormattingEnabled = true; + this.cbopenanim.Location = new System.Drawing.Point(9, 50); + this.cbopenanim.Name = "cbopenanim"; + this.cbopenanim.Size = new System.Drawing.Size(294, 21); + this.cbopenanim.TabIndex = 18; + this.cbopenanim.SelectedIndexChanged += new System.EventHandler(this.cbopenanim_SelectedIndexChanged); + // + // label127 + // + this.label127.AutoSize = true; + this.label127.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label127.Location = new System.Drawing.Point(10, 29); + this.label127.Name = "label127"; + this.label127.Size = new System.Drawing.Size(154, 16); + this.label127.TabIndex = 17; + this.label127.Text = "Window Open Animation"; + // + // label149 + // + this.label149.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label149.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label149.Location = new System.Drawing.Point(6, 0); + this.label149.Name = "label149"; + this.label149.Size = new System.Drawing.Size(301, 29); + this.label149.TabIndex = 1; + this.label149.Text = "Animations"; + this.label149.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlfancydragging + // + this.pnlfancydragging.Controls.Add(this.txtshakeminoffset); + this.pnlfancydragging.Controls.Add(this.label148); + this.pnlfancydragging.Controls.Add(this.txtshakemax); + this.pnlfancydragging.Controls.Add(this.label146); + this.pnlfancydragging.Controls.Add(this.txtdragopacitydec); + this.pnlfancydragging.Controls.Add(this.label144); + this.pnlfancydragging.Controls.Add(this.txtdragfadedec); + this.pnlfancydragging.Controls.Add(this.label143); + this.pnlfancydragging.Controls.Add(this.txtfadespeed); + this.pnlfancydragging.Controls.Add(this.label155); + this.pnlfancydragging.Controls.Add(this.label156); + this.pnlfancydragging.Location = new System.Drawing.Point(139, 43); + this.pnlfancydragging.Name = "pnlfancydragging"; + this.pnlfancydragging.Size = new System.Drawing.Size(311, 256); + this.pnlfancydragging.TabIndex = 14; + // + // txtshakeminoffset + // + this.txtshakeminoffset.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtshakeminoffset.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtshakeminoffset.Location = new System.Drawing.Point(167, 189); + this.txtshakeminoffset.Name = "txtshakeminoffset"; + this.txtshakeminoffset.Size = new System.Drawing.Size(35, 23); + this.txtshakeminoffset.TabIndex = 13; + this.txtshakeminoffset.TextChanged += new System.EventHandler(this.txtshakeminoffset_TextChanged); + // + // label148 + // + this.label148.AutoSize = true; + this.label148.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label148.Location = new System.Drawing.Point(17, 192); + this.label148.Name = "label148"; + this.label148.Size = new System.Drawing.Size(140, 16); + this.label148.TabIndex = 12; + this.label148.Text = "Shake Minimum Offset"; + // + // txtshakemax + // + this.txtshakemax.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtshakemax.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtshakemax.Location = new System.Drawing.Point(167, 159); + this.txtshakemax.Name = "txtshakemax"; + this.txtshakemax.Size = new System.Drawing.Size(35, 23); + this.txtshakemax.TabIndex = 11; + this.txtshakemax.TextChanged += new System.EventHandler(this.txtshakemax_TextChanged); + // + // label146 + // + this.label146.AutoSize = true; + this.label146.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label146.Location = new System.Drawing.Point(17, 162); + this.label146.Name = "label146"; + this.label146.Size = new System.Drawing.Size(144, 16); + this.label146.TabIndex = 10; + this.label146.Text = "Shake Maximum Offset"; + // + // txtdragopacitydec + // + this.txtdragopacitydec.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdragopacitydec.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtdragopacitydec.Location = new System.Drawing.Point(104, 116); + this.txtdragopacitydec.Name = "txtdragopacitydec"; + this.txtdragopacitydec.Size = new System.Drawing.Size(35, 23); + this.txtdragopacitydec.TabIndex = 9; + this.txtdragopacitydec.TextChanged += new System.EventHandler(this.txtdragopacitydec_TextChanged); + // + // label144 + // + this.label144.AutoSize = true; + this.label144.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label144.Location = new System.Drawing.Point(18, 119); + this.label144.Name = "label144"; + this.label144.Size = new System.Drawing.Size(85, 16); + this.label144.TabIndex = 8; + this.label144.Text = "Opacity Dec."; + // + // txtdragfadedec + // + this.txtdragfadedec.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtdragfadedec.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtdragfadedec.Location = new System.Drawing.Point(89, 88); + this.txtdragfadedec.Name = "txtdragfadedec"; + this.txtdragfadedec.Size = new System.Drawing.Size(35, 23); + this.txtdragfadedec.TabIndex = 7; + this.txtdragfadedec.TextChanged += new System.EventHandler(this.txtdragfadedec_TextChanged); + // + // label143 + // + this.label143.AutoSize = true; + this.label143.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label143.Location = new System.Drawing.Point(17, 90); + this.label143.Name = "label143"; + this.label143.Size = new System.Drawing.Size(71, 16); + this.label143.TabIndex = 6; + this.label143.Text = "Fade Dec."; + // + // txtfadespeed + // + this.txtfadespeed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtfadespeed.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtfadespeed.Location = new System.Drawing.Point(114, 54); + this.txtfadespeed.Name = "txtfadespeed"; + this.txtfadespeed.Size = new System.Drawing.Size(35, 23); + this.txtfadespeed.TabIndex = 5; + this.txtfadespeed.TextChanged += new System.EventHandler(this.txtfadespeed_TextChanged); + // + // label155 + // + this.label155.AutoSize = true; + this.label155.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label155.Location = new System.Drawing.Point(18, 58); + this.label155.Name = "label155"; + this.label155.Size = new System.Drawing.Size(84, 16); + this.label155.TabIndex = 4; + this.label155.Text = "Fade Speed"; + // + // label156 + // + this.label156.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label156.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label156.Location = new System.Drawing.Point(6, 0); + this.label156.Name = "label156"; + this.label156.Size = new System.Drawing.Size(301, 29); + this.label156.TabIndex = 1; + this.label156.Text = "Fancy Dragging"; + this.label156.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlfancyintro + // + this.pnlfancyintro.Controls.Add(this.label174); + this.pnlfancyintro.Controls.Add(this.label175); + this.pnlfancyintro.Location = new System.Drawing.Point(139, 43); + this.pnlfancyintro.Name = "pnlfancyintro"; + this.pnlfancyintro.Size = new System.Drawing.Size(311, 256); + this.pnlfancyintro.TabIndex = 11; + // + // label174 + // + this.label174.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label174.BackColor = System.Drawing.Color.Transparent; + this.label174.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label174.Location = new System.Drawing.Point(6, 29); + this.label174.Name = "label174"; + this.label174.Size = new System.Drawing.Size(300, 221); + this.label174.TabIndex = 4; + this.label174.Text = "This section allows you to customize various Fancy Effects throughout ShiftOS suc" + + "h as animations, speeds, etc.\r\n\r\nGo ahead and explore!"; + this.label174.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label175 + // + this.label175.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label175.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label175.Location = new System.Drawing.Point(6, 0); + this.label175.Name = "label175"; + this.label175.Size = new System.Drawing.Size(301, 29); + this.label175.TabIndex = 1; + this.label175.Text = "Fancy Effects - Intro"; + this.label175.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel18 + // + this.panel18.Controls.Add(this.panel19); + this.panel18.Controls.Add(this.label157); + this.panel18.Controls.Add(this.panel20); + this.panel18.Controls.Add(this.label158); + this.panel18.Controls.Add(this.panel21); + this.panel18.Controls.Add(this.label159); + this.panel18.Controls.Add(this.panel22); + this.panel18.Controls.Add(this.label160); + this.panel18.Controls.Add(this.panel23); + this.panel18.Controls.Add(this.label161); + this.panel18.Controls.Add(this.panel24); + this.panel18.Controls.Add(this.label162); + this.panel18.Controls.Add(this.label163); + this.panel18.Location = new System.Drawing.Point(139, 43); + this.panel18.Name = "panel18"; + this.panel18.Size = new System.Drawing.Size(311, 256); + this.panel18.TabIndex = 12; + // + // panel19 + // + this.panel19.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel19.Location = new System.Drawing.Point(216, 80); + this.panel19.Name = "panel19"; + this.panel19.Size = new System.Drawing.Size(41, 20); + this.panel19.TabIndex = 11; + // + // label157 + // + this.label157.AutoSize = true; + this.label157.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label157.Location = new System.Drawing.Point(167, 81); + this.label157.Name = "label157"; + this.label157.Size = new System.Drawing.Size(49, 16); + this.label157.TabIndex = 10; + this.label157.Text = "Border"; + // + // panel20 + // + this.panel20.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel20.Location = new System.Drawing.Point(224, 55); + this.panel20.Name = "panel20"; + this.panel20.Size = new System.Drawing.Size(41, 20); + this.panel20.TabIndex = 9; + // + // label158 + // + this.label158.AutoSize = true; + this.label158.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label158.Location = new System.Drawing.Point(148, 56); + this.label158.Name = "label158"; + this.label158.Size = new System.Drawing.Size(76, 16); + this.label158.TabIndex = 8; + this.label158.Text = "Margin End"; + // + // panel21 + // + this.panel21.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel21.Location = new System.Drawing.Point(117, 80); + this.panel21.Name = "panel21"; + this.panel21.Size = new System.Drawing.Size(41, 20); + this.panel21.TabIndex = 7; + // + // label159 + // + this.label159.AutoSize = true; + this.label159.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label159.Location = new System.Drawing.Point(12, 80); + this.label159.Name = "label159"; + this.label159.Size = new System.Drawing.Size(93, 16); + this.label159.TabIndex = 6; + this.label159.Text = "Margin Middle"; + // + // panel22 + // + this.panel22.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel22.Location = new System.Drawing.Point(101, 55); + this.panel22.Name = "panel22"; + this.panel22.Size = new System.Drawing.Size(41, 20); + this.panel22.TabIndex = 5; + // + // label160 + // + this.label160.AutoSize = true; + this.label160.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label160.Location = new System.Drawing.Point(12, 55); + this.label160.Name = "label160"; + this.label160.Size = new System.Drawing.Size(87, 16); + this.label160.TabIndex = 4; + this.label160.Text = "Margin Begin"; + // + // panel23 + // + this.panel23.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel23.Location = new System.Drawing.Point(249, 29); + this.panel23.Name = "panel23"; + this.panel23.Size = new System.Drawing.Size(41, 20); + this.panel23.TabIndex = 5; + // + // label161 + // + this.label161.AutoSize = true; + this.label161.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label161.Location = new System.Drawing.Point(156, 29); + this.label161.Name = "label161"; + this.label161.Size = new System.Drawing.Size(95, 16); + this.label161.TabIndex = 4; + this.label161.Text = "Highlight Color"; + // + // panel24 + // + this.panel24.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel24.Location = new System.Drawing.Point(115, 29); + this.panel24.Name = "panel24"; + this.panel24.Size = new System.Drawing.Size(41, 20); + this.panel24.TabIndex = 3; + // + // label162 + // + this.label162.AutoSize = true; + this.label162.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label162.Location = new System.Drawing.Point(10, 29); + this.label162.Name = "label162"; + this.label162.Size = new System.Drawing.Size(104, 16); + this.label162.TabIndex = 2; + this.label162.Text = "Highlight Border"; + // + // label163 + // + this.label163.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label163.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label163.Location = new System.Drawing.Point(6, 0); + this.label163.Name = "label163"; + this.label163.Size = new System.Drawing.Size(301, 29); + this.label163.TabIndex = 1; + this.label163.Text = "Drop-Down Menus"; + this.label163.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel25 + // + this.panel25.Controls.Add(this.panel26); + this.panel25.Controls.Add(this.label164); + this.panel25.Controls.Add(this.panel27); + this.panel25.Controls.Add(this.label165); + this.panel25.Controls.Add(this.panel28); + this.panel25.Controls.Add(this.label166); + this.panel25.Controls.Add(this.panel29); + this.panel25.Controls.Add(this.label167); + this.panel25.Controls.Add(this.panel30); + this.panel25.Controls.Add(this.label168); + this.panel25.Controls.Add(this.panel31); + this.panel25.Controls.Add(this.label169); + this.panel25.Controls.Add(this.panel32); + this.panel25.Controls.Add(this.label170); + this.panel25.Controls.Add(this.panel33); + this.panel25.Controls.Add(this.label171); + this.panel25.Controls.Add(this.panel34); + this.panel25.Controls.Add(this.label172); + this.panel25.Controls.Add(this.label173); + this.panel25.Location = new System.Drawing.Point(139, 43); + this.panel25.Name = "panel25"; + this.panel25.Size = new System.Drawing.Size(311, 256); + this.panel25.TabIndex = 10; + // + // panel26 + // + this.panel26.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel26.Location = new System.Drawing.Point(85, 129); + this.panel26.Name = "panel26"; + this.panel26.Size = new System.Drawing.Size(41, 20); + this.panel26.TabIndex = 17; + // + // label164 + // + this.label164.AutoSize = true; + this.label164.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label164.Location = new System.Drawing.Point(11, 131); + this.label164.Name = "label164"; + this.label164.Size = new System.Drawing.Size(69, 16); + this.label164.TabIndex = 16; + this.label164.Text = "Text Color"; + // + // panel27 + // + this.panel27.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel27.Location = new System.Drawing.Point(228, 104); + this.panel27.Name = "panel27"; + this.panel27.Size = new System.Drawing.Size(41, 20); + this.panel27.TabIndex = 15; + // + // label165 + // + this.label165.AutoSize = true; + this.label165.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label165.Location = new System.Drawing.Point(132, 106); + this.label165.Name = "label165"; + this.label165.Size = new System.Drawing.Size(92, 16); + this.label165.TabIndex = 14; + this.label165.Text = "Dropdown BG"; + // + // panel28 + // + this.panel28.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel28.Location = new System.Drawing.Point(84, 104); + this.panel28.Name = "panel28"; + this.panel28.Size = new System.Drawing.Size(41, 20); + this.panel28.TabIndex = 13; + // + // label166 + // + this.label166.AutoSize = true; + this.label166.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label166.Location = new System.Drawing.Point(10, 106); + this.label166.Name = "label166"; + this.label166.Size = new System.Drawing.Size(72, 16); + this.label166.TabIndex = 12; + this.label166.Text = "Status End"; + // + // panel29 + // + this.panel29.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel29.Location = new System.Drawing.Point(254, 81); + this.panel29.Name = "panel29"; + this.panel29.Size = new System.Drawing.Size(41, 20); + this.panel29.TabIndex = 11; + // + // label167 + // + this.label167.AutoSize = true; + this.label167.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label167.Location = new System.Drawing.Point(169, 81); + this.label167.Name = "label167"; + this.label167.Size = new System.Drawing.Size(83, 16); + this.label167.TabIndex = 10; + this.label167.Text = "Status Begin"; + // + // panel30 + // + this.panel30.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel30.Location = new System.Drawing.Point(254, 55); + this.panel30.Name = "panel30"; + this.panel30.Size = new System.Drawing.Size(41, 20); + this.panel30.TabIndex = 9; + // + // label168 + // + this.label168.AutoSize = true; + this.label168.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label168.Location = new System.Drawing.Point(161, 55); + this.label168.Name = "label168"; + this.label168.Size = new System.Drawing.Size(87, 16); + this.label168.TabIndex = 8; + this.label168.Text = "Tool Bar End"; + // + // panel31 + // + this.panel31.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel31.Location = new System.Drawing.Point(117, 80); + this.panel31.Name = "panel31"; + this.panel31.Size = new System.Drawing.Size(41, 20); + this.panel31.TabIndex = 7; + // + // label169 + // + this.label169.AutoSize = true; + this.label169.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label169.Location = new System.Drawing.Point(12, 80); + this.label169.Name = "label169"; + this.label169.Size = new System.Drawing.Size(104, 16); + this.label169.TabIndex = 6; + this.label169.Text = "Tool Bar Middle"; + // + // panel32 + // + this.panel32.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel32.Location = new System.Drawing.Point(117, 55); + this.panel32.Name = "panel32"; + this.panel32.Size = new System.Drawing.Size(41, 20); + this.panel32.TabIndex = 5; + // + // label170 + // + this.label170.AutoSize = true; + this.label170.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label170.Location = new System.Drawing.Point(12, 55); + this.label170.Name = "label170"; + this.label170.Size = new System.Drawing.Size(98, 16); + this.label170.TabIndex = 4; + this.label170.Text = "Tool Bar Begin"; + // + // panel33 + // + this.panel33.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel33.Location = new System.Drawing.Point(249, 29); + this.panel33.Name = "panel33"; + this.panel33.Size = new System.Drawing.Size(41, 20); + this.panel33.TabIndex = 5; + // + // label171 + // + this.label171.AutoSize = true; + this.label171.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label171.Location = new System.Drawing.Point(156, 29); + this.label171.Name = "label171"; + this.label171.Size = new System.Drawing.Size(92, 16); + this.label171.TabIndex = 4; + this.label171.Text = "Menu Bar End"; + // + // panel34 + // + this.panel34.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel34.Location = new System.Drawing.Point(115, 29); + this.panel34.Name = "panel34"; + this.panel34.Size = new System.Drawing.Size(41, 20); + this.panel34.TabIndex = 3; + // + // label172 + // + this.label172.AutoSize = true; + this.label172.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label172.Location = new System.Drawing.Point(10, 29); + this.label172.Name = "label172"; + this.label172.Size = new System.Drawing.Size(103, 16); + this.label172.TabIndex = 2; + this.label172.Text = "Menu Bar Begin"; + // + // label173 + // + this.label173.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label173.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label173.Location = new System.Drawing.Point(6, 0); + this.label173.Name = "label173"; + this.label173.Size = new System.Drawing.Size(301, 29); + this.label173.TabIndex = 1; + this.label173.Text = "The Basics"; + this.label173.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel36 + // + this.panel36.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.panel36.Controls.Add(this.btnfancydragging); + this.panel36.Controls.Add(this.btnfancywindows); + this.panel36.Location = new System.Drawing.Point(6, 42); + this.panel36.Name = "panel36"; + this.panel36.Size = new System.Drawing.Size(128, 257); + this.panel36.TabIndex = 9; + // + // btnfancydragging + // + this.btnfancydragging.BackColor = System.Drawing.Color.White; + this.btnfancydragging.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnfancydragging.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnfancydragging.Location = new System.Drawing.Point(4, 35); + this.btnfancydragging.Name = "btnfancydragging"; + this.btnfancydragging.Size = new System.Drawing.Size(119, 29); + this.btnfancydragging.TabIndex = 5; + this.btnfancydragging.Text = "Fancy Dragging"; + this.btnfancydragging.UseVisualStyleBackColor = false; + this.btnfancydragging.Click += new System.EventHandler(this.btnfancydragging_Click); + // + // btnfancywindows + // + this.btnfancywindows.BackColor = System.Drawing.Color.White; + this.btnfancywindows.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnfancywindows.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnfancywindows.Location = new System.Drawing.Point(4, 0); + this.btnfancywindows.Name = "btnfancywindows"; + this.btnfancywindows.Size = new System.Drawing.Size(119, 29); + this.btnfancywindows.TabIndex = 4; + this.btnfancywindows.Text = "Animations"; + this.btnfancywindows.UseVisualStyleBackColor = false; + this.btnfancywindows.Click += new System.EventHandler(this.btnfancywindows_Click); + // + // label176 + // + this.label176.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label176.Location = new System.Drawing.Point(72, 0); + this.label176.Name = "label176"; + this.label176.Size = new System.Drawing.Size(332, 29); + this.label176.TabIndex = 0; + this.label176.Text = "Fancy Effects"; + // + // pnlmenus + // + this.pnlmenus.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.pnlmenus.BackColor = System.Drawing.Color.White; + this.pnlmenus.Controls.Add(this.pnladvanced); + this.pnlmenus.Controls.Add(this.pnlmore); + this.pnlmenus.Controls.Add(this.pnldropdown); + this.pnlmenus.Controls.Add(this.pnlbasic); + this.pnlmenus.Controls.Add(this.pnlmenusintro); + this.pnlmenus.Controls.Add(this.pnlmenucategories); + this.pnlmenus.Controls.Add(this.label74); + this.pnlmenus.Location = new System.Drawing.Point(134, 9); + this.pnlmenus.Name = "pnlmenus"; + this.pnlmenus.Size = new System.Drawing.Size(457, 306); + this.pnlmenus.TabIndex = 19; + // + // pnladvanced + // + this.pnladvanced.Controls.Add(this.btnmorebuttons); + this.pnladvanced.Controls.Add(this.pnlbuttonchecked); + this.pnladvanced.Controls.Add(this.label136); + this.pnladvanced.Controls.Add(this.pnlitemselectedend); + this.pnladvanced.Controls.Add(this.label129); + this.pnladvanced.Controls.Add(this.pnlbuttonpressed); + this.pnladvanced.Controls.Add(this.label130); + this.pnladvanced.Controls.Add(this.pnlitemselectedbegin); + this.pnladvanced.Controls.Add(this.label131); + this.pnladvanced.Controls.Add(this.pnlitemselected); + this.pnladvanced.Controls.Add(this.label132); + this.pnladvanced.Controls.Add(this.pnlbuttonselected); + this.pnladvanced.Controls.Add(this.label133); + this.pnladvanced.Controls.Add(this.pnlcheckbg); + this.pnladvanced.Controls.Add(this.label134); + this.pnladvanced.Controls.Add(this.label135); + this.pnladvanced.Location = new System.Drawing.Point(139, 43); + this.pnladvanced.Name = "pnladvanced"; + this.pnladvanced.Size = new System.Drawing.Size(311, 256); + this.pnladvanced.TabIndex = 13; + // + // btnmorebuttons + // + this.btnmorebuttons.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmorebuttons.Font = new System.Drawing.Font("Cambria", 11.25F); + this.btnmorebuttons.Location = new System.Drawing.Point(216, 195); + this.btnmorebuttons.Name = "btnmorebuttons"; + this.btnmorebuttons.Size = new System.Drawing.Size(90, 32); + this.btnmorebuttons.TabIndex = 18; + this.btnmorebuttons.Text = "More >>"; + this.btnmorebuttons.UseVisualStyleBackColor = true; + this.btnmorebuttons.Click += new System.EventHandler(this.btnmorebuttons_Click); + // + // pnlbuttonchecked + // + this.pnlbuttonchecked.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbuttonchecked.Location = new System.Drawing.Point(115, 153); + this.pnlbuttonchecked.Name = "pnlbuttonchecked"; + this.pnlbuttonchecked.Size = new System.Drawing.Size(41, 20); + this.pnlbuttonchecked.TabIndex = 11; + this.pnlbuttonchecked.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetButtonCheckBG); + // + // label136 + // + this.label136.AutoSize = true; + this.label136.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label136.Location = new System.Drawing.Point(10, 153); + this.label136.Name = "label136"; + this.label136.Size = new System.Drawing.Size(102, 16); + this.label136.TabIndex = 10; + this.label136.Text = "Button Checked"; + // + // pnlitemselectedend + // + this.pnlitemselectedend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlitemselectedend.Location = new System.Drawing.Point(134, 83); + this.pnlitemselectedend.Name = "pnlitemselectedend"; + this.pnlitemselectedend.Size = new System.Drawing.Size(41, 20); + this.pnlitemselectedend.TabIndex = 11; + this.pnlitemselectedend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetItemSelectedEnd); + // + // label129 + // + this.label129.AutoSize = true; + this.label129.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label129.Location = new System.Drawing.Point(12, 85); + this.label129.Name = "label129"; + this.label129.Size = new System.Drawing.Size(117, 16); + this.label129.TabIndex = 10; + this.label129.Text = "Item Selected End"; + // + // pnlbuttonpressed + // + this.pnlbuttonpressed.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbuttonpressed.Location = new System.Drawing.Point(117, 207); + this.pnlbuttonpressed.Name = "pnlbuttonpressed"; + this.pnlbuttonpressed.Size = new System.Drawing.Size(41, 20); + this.pnlbuttonpressed.TabIndex = 9; + this.pnlbuttonpressed.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetButtonPressedBG); + // + // label130 + // + this.label130.AutoSize = true; + this.label130.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label130.Location = new System.Drawing.Point(12, 207); + this.label130.Name = "label130"; + this.label130.Size = new System.Drawing.Size(99, 16); + this.label130.TabIndex = 8; + this.label130.Text = "Button Pressed"; + // + // pnlitemselectedbegin + // + this.pnlitemselectedbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlitemselectedbegin.Location = new System.Drawing.Point(143, 56); + this.pnlitemselectedbegin.Name = "pnlitemselectedbegin"; + this.pnlitemselectedbegin.Size = new System.Drawing.Size(41, 20); + this.pnlitemselectedbegin.TabIndex = 7; + this.pnlitemselectedbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetItemSelectedBegin); + // + // label131 + // + this.label131.AutoSize = true; + this.label131.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label131.Location = new System.Drawing.Point(10, 58); + this.label131.Name = "label131"; + this.label131.Size = new System.Drawing.Size(128, 16); + this.label131.TabIndex = 6; + this.label131.Text = "Item Selected Begin"; + // + // pnlitemselected + // + this.pnlitemselected.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlitemselected.Location = new System.Drawing.Point(240, 29); + this.pnlitemselected.Name = "pnlitemselected"; + this.pnlitemselected.Size = new System.Drawing.Size(41, 20); + this.pnlitemselected.TabIndex = 5; + this.pnlitemselected.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetItemSelected); + // + // label132 + // + this.label132.AutoSize = true; + this.label132.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label132.Location = new System.Drawing.Point(147, 32); + this.label132.Name = "label132"; + this.label132.Size = new System.Drawing.Size(90, 16); + this.label132.TabIndex = 4; + this.label132.Text = "Item Selected"; + // + // pnlbuttonselected + // + this.pnlbuttonselected.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlbuttonselected.Location = new System.Drawing.Point(110, 181); + this.pnlbuttonselected.Name = "pnlbuttonselected"; + this.pnlbuttonselected.Size = new System.Drawing.Size(41, 20); + this.pnlbuttonselected.TabIndex = 5; + this.pnlbuttonselected.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetButtonSelectedBG); + // + // label133 + // + this.label133.AutoSize = true; + this.label133.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label133.Location = new System.Drawing.Point(7, 181); + this.label133.Name = "label133"; + this.label133.Size = new System.Drawing.Size(102, 16); + this.label133.TabIndex = 4; + this.label133.Text = "Button Selected"; + // + // pnlcheckbg + // + this.pnlcheckbg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlcheckbg.Location = new System.Drawing.Point(79, 29); + this.pnlcheckbg.Name = "pnlcheckbg"; + this.pnlcheckbg.Size = new System.Drawing.Size(41, 20); + this.pnlcheckbg.TabIndex = 3; + this.pnlcheckbg.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetCheckBG); + // + // label134 + // + this.label134.AutoSize = true; + this.label134.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label134.Location = new System.Drawing.Point(10, 29); + this.label134.Name = "label134"; + this.label134.Size = new System.Drawing.Size(68, 16); + this.label134.TabIndex = 2; + this.label134.Text = "Check BG"; + // + // label135 + // + this.label135.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label135.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label135.Location = new System.Drawing.Point(6, 0); + this.label135.Name = "label135"; + this.label135.Size = new System.Drawing.Size(301, 29); + this.label135.TabIndex = 1; + this.label135.Text = "Advanced"; + this.label135.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlmore + // + this.pnlmore.Controls.Add(this.pnlpressedbegin); + this.pnlmore.Controls.Add(this.btnback); + this.pnlmore.Controls.Add(this.label138); + this.pnlmore.Controls.Add(this.pnlselectedbegin); + this.pnlmore.Controls.Add(this.pnlpressedend); + this.pnlmore.Controls.Add(this.label137); + this.pnlmore.Controls.Add(this.label139); + this.pnlmore.Controls.Add(this.pnlselectedend); + this.pnlmore.Controls.Add(this.pnlpressedmiddle); + this.pnlmore.Controls.Add(this.label140); + this.pnlmore.Controls.Add(this.label142); + this.pnlmore.Controls.Add(this.pnlselectedmiddle); + this.pnlmore.Controls.Add(this.label145); + this.pnlmore.Controls.Add(this.label147); + this.pnlmore.Location = new System.Drawing.Point(139, 43); + this.pnlmore.Name = "pnlmore"; + this.pnlmore.Size = new System.Drawing.Size(311, 256); + this.pnlmore.TabIndex = 14; + // + // pnlpressedbegin + // + this.pnlpressedbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpressedbegin.Location = new System.Drawing.Point(170, 107); + this.pnlpressedbegin.Name = "pnlpressedbegin"; + this.pnlpressedbegin.Size = new System.Drawing.Size(41, 20); + this.pnlpressedbegin.TabIndex = 17; + this.pnlpressedbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetPressedBegin); + // + // btnback + // + this.btnback.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnback.Font = new System.Drawing.Font("Cambria", 11.25F); + this.btnback.Location = new System.Drawing.Point(6, 184); + this.btnback.Name = "btnback"; + this.btnback.Size = new System.Drawing.Size(90, 32); + this.btnback.TabIndex = 18; + this.btnback.Text = "<< Back"; + this.btnback.UseVisualStyleBackColor = true; + this.btnback.Click += new System.EventHandler(this.btnadvanced_Click); + // + // label138 + // + this.label138.AutoSize = true; + this.label138.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label138.Location = new System.Drawing.Point(13, 108); + this.label138.Name = "label138"; + this.label138.Size = new System.Drawing.Size(151, 16); + this.label138.TabIndex = 16; + this.label138.Text = "Pressed Gradient Begin"; + // + // pnlselectedbegin + // + this.pnlselectedbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlselectedbegin.Location = new System.Drawing.Point(169, 29); + this.pnlselectedbegin.Name = "pnlselectedbegin"; + this.pnlselectedbegin.Size = new System.Drawing.Size(41, 20); + this.pnlselectedbegin.TabIndex = 11; + this.pnlselectedbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetSelectedBegin); + // + // pnlpressedend + // + this.pnlpressedend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpressedend.Location = new System.Drawing.Point(162, 159); + this.pnlpressedend.Name = "pnlpressedend"; + this.pnlpressedend.Size = new System.Drawing.Size(41, 20); + this.pnlpressedend.TabIndex = 15; + this.pnlpressedend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetPressedEnd); + // + // label137 + // + this.label137.AutoSize = true; + this.label137.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label137.Location = new System.Drawing.Point(12, 30); + this.label137.Name = "label137"; + this.label137.Size = new System.Drawing.Size(154, 16); + this.label137.TabIndex = 10; + this.label137.Text = "Selected Gradient Begin"; + // + // label139 + // + this.label139.AutoSize = true; + this.label139.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label139.Location = new System.Drawing.Point(15, 162); + this.label139.Name = "label139"; + this.label139.Size = new System.Drawing.Size(140, 16); + this.label139.TabIndex = 14; + this.label139.Text = "Pressed Gradient End"; + // + // pnlselectedend + // + this.pnlselectedend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlselectedend.Location = new System.Drawing.Point(161, 81); + this.pnlselectedend.Name = "pnlselectedend"; + this.pnlselectedend.Size = new System.Drawing.Size(41, 20); + this.pnlselectedend.TabIndex = 9; + this.pnlselectedend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetSelectedEnd); + // + // pnlpressedmiddle + // + this.pnlpressedmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlpressedmiddle.Location = new System.Drawing.Point(179, 134); + this.pnlpressedmiddle.Name = "pnlpressedmiddle"; + this.pnlpressedmiddle.Size = new System.Drawing.Size(41, 20); + this.pnlpressedmiddle.TabIndex = 13; + this.pnlpressedmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetPressedMiddle); + // + // label140 + // + this.label140.AutoSize = true; + this.label140.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label140.Location = new System.Drawing.Point(16, 138); + this.label140.Name = "label140"; + this.label140.Size = new System.Drawing.Size(157, 16); + this.label140.TabIndex = 12; + this.label140.Text = "Pressed Gradient Middle"; + // + // label142 + // + this.label142.AutoSize = true; + this.label142.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label142.Location = new System.Drawing.Point(14, 84); + this.label142.Name = "label142"; + this.label142.Size = new System.Drawing.Size(143, 16); + this.label142.TabIndex = 8; + this.label142.Text = "Selected Gradient End"; + // + // pnlselectedmiddle + // + this.pnlselectedmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlselectedmiddle.Location = new System.Drawing.Point(182, 56); + this.pnlselectedmiddle.Name = "pnlselectedmiddle"; + this.pnlselectedmiddle.Size = new System.Drawing.Size(41, 20); + this.pnlselectedmiddle.TabIndex = 5; + this.pnlselectedmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetSelectedMiddle); + // + // label145 + // + this.label145.AutoSize = true; + this.label145.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label145.Location = new System.Drawing.Point(18, 58); + this.label145.Name = "label145"; + this.label145.Size = new System.Drawing.Size(160, 16); + this.label145.TabIndex = 4; + this.label145.Text = "Selected Gradient Middle"; + // + // label147 + // + this.label147.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label147.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label147.Location = new System.Drawing.Point(6, 0); + this.label147.Name = "label147"; + this.label147.Size = new System.Drawing.Size(301, 29); + this.label147.TabIndex = 1; + this.label147.Text = "Advanced"; + this.label147.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnldropdown + // + this.pnldropdown.Controls.Add(this.pnlddborder); + this.pnldropdown.Controls.Add(this.label117); + this.pnldropdown.Controls.Add(this.pnlmarginend); + this.pnldropdown.Controls.Add(this.label120); + this.pnldropdown.Controls.Add(this.pnlmarginmiddle); + this.pnldropdown.Controls.Add(this.label121); + this.pnldropdown.Controls.Add(this.pnlmarginbegin); + this.pnldropdown.Controls.Add(this.label122); + this.pnldropdown.Controls.Add(this.pnlhcolor); + this.pnldropdown.Controls.Add(this.label123); + this.pnldropdown.Controls.Add(this.pnlhborder); + this.pnldropdown.Controls.Add(this.label125); + this.pnldropdown.Controls.Add(this.label126); + this.pnldropdown.Location = new System.Drawing.Point(139, 43); + this.pnldropdown.Name = "pnldropdown"; + this.pnldropdown.Size = new System.Drawing.Size(311, 256); + this.pnldropdown.TabIndex = 12; + // + // pnlddborder + // + this.pnlddborder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlddborder.Location = new System.Drawing.Point(216, 80); + this.pnlddborder.Name = "pnlddborder"; + this.pnlddborder.Size = new System.Drawing.Size(41, 20); + this.pnlddborder.TabIndex = 11; + this.pnlddborder.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MenuBorder); + // + // label117 + // + this.label117.AutoSize = true; + this.label117.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label117.Location = new System.Drawing.Point(167, 81); + this.label117.Name = "label117"; + this.label117.Size = new System.Drawing.Size(49, 16); + this.label117.TabIndex = 10; + this.label117.Text = "Border"; + // + // pnlmarginend + // + this.pnlmarginend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmarginend.Location = new System.Drawing.Point(224, 55); + this.pnlmarginend.Name = "pnlmarginend"; + this.pnlmarginend.Size = new System.Drawing.Size(41, 20); + this.pnlmarginend.TabIndex = 9; + this.pnlmarginend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MarginEnd); + // + // label120 + // + this.label120.AutoSize = true; + this.label120.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label120.Location = new System.Drawing.Point(148, 56); + this.label120.Name = "label120"; + this.label120.Size = new System.Drawing.Size(76, 16); + this.label120.TabIndex = 8; + this.label120.Text = "Margin End"; + // + // pnlmarginmiddle + // + this.pnlmarginmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmarginmiddle.Location = new System.Drawing.Point(117, 80); + this.pnlmarginmiddle.Name = "pnlmarginmiddle"; + this.pnlmarginmiddle.Size = new System.Drawing.Size(41, 20); + this.pnlmarginmiddle.TabIndex = 7; + this.pnlmarginmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MarginMiddle); + // + // label121 + // + this.label121.AutoSize = true; + this.label121.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label121.Location = new System.Drawing.Point(12, 80); + this.label121.Name = "label121"; + this.label121.Size = new System.Drawing.Size(93, 16); + this.label121.TabIndex = 6; + this.label121.Text = "Margin Middle"; + // + // pnlmarginbegin + // + this.pnlmarginbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmarginbegin.Location = new System.Drawing.Point(101, 55); + this.pnlmarginbegin.Name = "pnlmarginbegin"; + this.pnlmarginbegin.Size = new System.Drawing.Size(41, 20); + this.pnlmarginbegin.TabIndex = 5; + this.pnlmarginbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MarginBegin); + // + // label122 + // + this.label122.AutoSize = true; + this.label122.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label122.Location = new System.Drawing.Point(12, 55); + this.label122.Name = "label122"; + this.label122.Size = new System.Drawing.Size(87, 16); + this.label122.TabIndex = 4; + this.label122.Text = "Margin Begin"; + // + // pnlhcolor + // + this.pnlhcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlhcolor.Location = new System.Drawing.Point(249, 29); + this.pnlhcolor.Name = "pnlhcolor"; + this.pnlhcolor.Size = new System.Drawing.Size(41, 20); + this.pnlhcolor.TabIndex = 5; + this.pnlhcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.HighlightColor); + // + // label123 + // + this.label123.AutoSize = true; + this.label123.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label123.Location = new System.Drawing.Point(156, 29); + this.label123.Name = "label123"; + this.label123.Size = new System.Drawing.Size(95, 16); + this.label123.TabIndex = 4; + this.label123.Text = "Highlight Color"; + // + // pnlhborder + // + this.pnlhborder.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlhborder.Location = new System.Drawing.Point(115, 29); + this.pnlhborder.Name = "pnlhborder"; + this.pnlhborder.Size = new System.Drawing.Size(41, 20); + this.pnlhborder.TabIndex = 3; + this.pnlhborder.MouseDown += new System.Windows.Forms.MouseEventHandler(this.HighlightBorder); + // + // label125 + // + this.label125.AutoSize = true; + this.label125.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label125.Location = new System.Drawing.Point(10, 29); + this.label125.Name = "label125"; + this.label125.Size = new System.Drawing.Size(104, 16); + this.label125.TabIndex = 2; + this.label125.Text = "Highlight Border"; + // + // label126 + // + this.label126.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label126.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label126.Location = new System.Drawing.Point(6, 0); + this.label126.Name = "label126"; + this.label126.Size = new System.Drawing.Size(301, 29); + this.label126.TabIndex = 1; + this.label126.Text = "Drop-Down Menus"; + this.label126.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlbasic + // + this.pnlbasic.Controls.Add(this.pnlmenutextcolor); + this.pnlbasic.Controls.Add(this.label118); + this.pnlbasic.Controls.Add(this.pnldropdownbg); + this.pnlbasic.Controls.Add(this.label115); + this.pnlbasic.Controls.Add(this.pnlstatusend); + this.pnlbasic.Controls.Add(this.label114); + this.pnlbasic.Controls.Add(this.pnlstatusbegin); + this.pnlbasic.Controls.Add(this.label107); + this.pnlbasic.Controls.Add(this.pnltoolbarend); + this.pnlbasic.Controls.Add(this.label77); + this.pnlbasic.Controls.Add(this.pnltoolbarmiddle); + this.pnlbasic.Controls.Add(this.label76); + this.pnlbasic.Controls.Add(this.pnltoolbarbegin); + this.pnlbasic.Controls.Add(this.label75); + this.pnlbasic.Controls.Add(this.pnlmenubarend); + this.pnlbasic.Controls.Add(this.label73); + this.pnlbasic.Controls.Add(this.pnlmenubarbegin); + this.pnlbasic.Controls.Add(this.label42); + this.pnlbasic.Controls.Add(this.label41); + this.pnlbasic.Location = new System.Drawing.Point(139, 43); + this.pnlbasic.Name = "pnlbasic"; + this.pnlbasic.Size = new System.Drawing.Size(311, 256); + this.pnlbasic.TabIndex = 10; + // + // pnlmenutextcolor + // + this.pnlmenutextcolor.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmenutextcolor.Location = new System.Drawing.Point(85, 129); + this.pnlmenutextcolor.Name = "pnlmenutextcolor"; + this.pnlmenutextcolor.Size = new System.Drawing.Size(41, 20); + this.pnlmenutextcolor.TabIndex = 17; + this.pnlmenutextcolor.MouseDown += new System.Windows.Forms.MouseEventHandler(this.SetMenuTextColor); + // + // label118 + // + this.label118.AutoSize = true; + this.label118.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label118.Location = new System.Drawing.Point(11, 131); + this.label118.Name = "label118"; + this.label118.Size = new System.Drawing.Size(69, 16); + this.label118.TabIndex = 16; + this.label118.Text = "Text Color"; + // + // pnldropdownbg + // + this.pnldropdownbg.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnldropdownbg.Location = new System.Drawing.Point(228, 104); + this.pnldropdownbg.Name = "pnldropdownbg"; + this.pnldropdownbg.Size = new System.Drawing.Size(41, 20); + this.pnldropdownbg.TabIndex = 15; + this.pnldropdownbg.MouseDown += new System.Windows.Forms.MouseEventHandler(this.DropDownBG); + // + // label115 + // + this.label115.AutoSize = true; + this.label115.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label115.Location = new System.Drawing.Point(132, 106); + this.label115.Name = "label115"; + this.label115.Size = new System.Drawing.Size(92, 16); + this.label115.TabIndex = 14; + this.label115.Text = "Dropdown BG"; + // + // pnlstatusend + // + this.pnlstatusend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlstatusend.Location = new System.Drawing.Point(84, 104); + this.pnlstatusend.Name = "pnlstatusend"; + this.pnlstatusend.Size = new System.Drawing.Size(41, 20); + this.pnlstatusend.TabIndex = 13; + this.pnlstatusend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.StatusEnd); + // + // label114 + // + this.label114.AutoSize = true; + this.label114.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label114.Location = new System.Drawing.Point(10, 106); + this.label114.Name = "label114"; + this.label114.Size = new System.Drawing.Size(72, 16); + this.label114.TabIndex = 12; + this.label114.Text = "Status End"; + // + // pnlstatusbegin + // + this.pnlstatusbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlstatusbegin.Location = new System.Drawing.Point(254, 81); + this.pnlstatusbegin.Name = "pnlstatusbegin"; + this.pnlstatusbegin.Size = new System.Drawing.Size(41, 20); + this.pnlstatusbegin.TabIndex = 11; + this.pnlstatusbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.StatusBegin); + // + // label107 + // + this.label107.AutoSize = true; + this.label107.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label107.Location = new System.Drawing.Point(169, 81); + this.label107.Name = "label107"; + this.label107.Size = new System.Drawing.Size(83, 16); + this.label107.TabIndex = 10; + this.label107.Text = "Status Begin"; + // + // pnltoolbarend + // + this.pnltoolbarend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltoolbarend.Location = new System.Drawing.Point(254, 55); + this.pnltoolbarend.Name = "pnltoolbarend"; + this.pnltoolbarend.Size = new System.Drawing.Size(41, 20); + this.pnltoolbarend.TabIndex = 9; + this.pnltoolbarend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolBarEnd); + // + // label77 + // + this.label77.AutoSize = true; + this.label77.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label77.Location = new System.Drawing.Point(161, 55); + this.label77.Name = "label77"; + this.label77.Size = new System.Drawing.Size(87, 16); + this.label77.TabIndex = 8; + this.label77.Text = "Tool Bar End"; + // + // pnltoolbarmiddle + // + this.pnltoolbarmiddle.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltoolbarmiddle.Location = new System.Drawing.Point(117, 80); + this.pnltoolbarmiddle.Name = "pnltoolbarmiddle"; + this.pnltoolbarmiddle.Size = new System.Drawing.Size(41, 20); + this.pnltoolbarmiddle.TabIndex = 7; + this.pnltoolbarmiddle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolBarMiddle); + // + // label76 + // + this.label76.AutoSize = true; + this.label76.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label76.Location = new System.Drawing.Point(12, 80); + this.label76.Name = "label76"; + this.label76.Size = new System.Drawing.Size(104, 16); + this.label76.TabIndex = 6; + this.label76.Text = "Tool Bar Middle"; + // + // pnltoolbarbegin + // + this.pnltoolbarbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnltoolbarbegin.Location = new System.Drawing.Point(117, 55); + this.pnltoolbarbegin.Name = "pnltoolbarbegin"; + this.pnltoolbarbegin.Size = new System.Drawing.Size(41, 20); + this.pnltoolbarbegin.TabIndex = 5; + this.pnltoolbarbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.ToolBarBegin); + // + // label75 + // + this.label75.AutoSize = true; + this.label75.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label75.Location = new System.Drawing.Point(12, 55); + this.label75.Name = "label75"; + this.label75.Size = new System.Drawing.Size(98, 16); + this.label75.TabIndex = 4; + this.label75.Text = "Tool Bar Begin"; + // + // pnlmenubarend + // + this.pnlmenubarend.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmenubarend.Location = new System.Drawing.Point(249, 29); + this.pnlmenubarend.Name = "pnlmenubarend"; + this.pnlmenubarend.Size = new System.Drawing.Size(41, 20); + this.pnlmenubarend.TabIndex = 5; + this.pnlmenubarend.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MenuEnd); + // + // label73 + // + this.label73.AutoSize = true; + this.label73.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label73.Location = new System.Drawing.Point(156, 29); + this.label73.Name = "label73"; + this.label73.Size = new System.Drawing.Size(92, 16); + this.label73.TabIndex = 4; + this.label73.Text = "Menu Bar End"; + // + // pnlmenubarbegin + // + this.pnlmenubarbegin.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pnlmenubarbegin.Location = new System.Drawing.Point(115, 29); + this.pnlmenubarbegin.Name = "pnlmenubarbegin"; + this.pnlmenubarbegin.Size = new System.Drawing.Size(41, 20); + this.pnlmenubarbegin.TabIndex = 3; + this.pnlmenubarbegin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.MenuBegin); + // + // 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(10, 29); + this.label42.Name = "label42"; + this.label42.Size = new System.Drawing.Size(103, 16); + this.label42.TabIndex = 2; + this.label42.Text = "Menu Bar Begin"; + // + // label41 + // + this.label41.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label41.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label41.Location = new System.Drawing.Point(6, 0); + this.label41.Name = "label41"; + this.label41.Size = new System.Drawing.Size(301, 29); + this.label41.TabIndex = 1; + this.label41.Text = "The Basics"; + this.label41.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlmenusintro + // + this.pnlmenusintro.Controls.Add(this.label116); + this.pnlmenusintro.Controls.Add(this.label124); + this.pnlmenusintro.Location = new System.Drawing.Point(139, 43); + this.pnlmenusintro.Name = "pnlmenusintro"; + this.pnlmenusintro.Size = new System.Drawing.Size(311, 256); + this.pnlmenusintro.TabIndex = 11; + // + // label116 + // + this.label116.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label116.BackColor = System.Drawing.Color.Transparent; + this.label116.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label116.Location = new System.Drawing.Point(6, 29); + this.label116.Name = "label116"; + this.label116.Size = new System.Drawing.Size(300, 221); + this.label116.TabIndex = 4; + this.label116.Text = resources.GetString("label116.Text"); + this.label116.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // label124 + // + this.label124.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label124.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.label124.Location = new System.Drawing.Point(6, 0); + this.label124.Name = "label124"; + this.label124.Size = new System.Drawing.Size(301, 29); + this.label124.TabIndex = 1; + this.label124.Text = "Menus - Intro"; + this.label124.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // pnlmenucategories + // + this.pnlmenucategories.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left))); + this.pnlmenucategories.Controls.Add(this.btnmisc); + this.pnlmenucategories.Controls.Add(this.btnadvanced); + this.pnlmenucategories.Controls.Add(this.btndropdown); + this.pnlmenucategories.Controls.Add(this.btnbasic); + this.pnlmenucategories.Location = new System.Drawing.Point(6, 42); + this.pnlmenucategories.Name = "pnlmenucategories"; + this.pnlmenucategories.Size = new System.Drawing.Size(128, 257); + this.pnlmenucategories.TabIndex = 9; + // + // btnmisc + // + this.btnmisc.BackColor = System.Drawing.Color.White; + this.btnmisc.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnmisc.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnmisc.Location = new System.Drawing.Point(4, 105); + this.btnmisc.Name = "btnmisc"; + this.btnmisc.Size = new System.Drawing.Size(119, 29); + this.btnmisc.TabIndex = 7; + this.btnmisc.Text = "Misc."; + this.btnmisc.UseVisualStyleBackColor = false; + // + // btnadvanced + // + this.btnadvanced.BackColor = System.Drawing.Color.White; + this.btnadvanced.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnadvanced.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnadvanced.Location = new System.Drawing.Point(4, 70); + this.btnadvanced.Name = "btnadvanced"; + this.btnadvanced.Size = new System.Drawing.Size(119, 29); + this.btnadvanced.TabIndex = 6; + this.btnadvanced.Text = "Advanced"; + this.btnadvanced.UseVisualStyleBackColor = false; + this.btnadvanced.Click += new System.EventHandler(this.btnadvanced_Click); + // + // btndropdown + // + this.btndropdown.BackColor = System.Drawing.Color.White; + this.btndropdown.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndropdown.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btndropdown.Location = new System.Drawing.Point(4, 35); + this.btndropdown.Name = "btndropdown"; + this.btndropdown.Size = new System.Drawing.Size(119, 29); + this.btndropdown.TabIndex = 5; + this.btndropdown.Text = "Drop-Downs"; + this.btndropdown.UseVisualStyleBackColor = false; + this.btndropdown.Click += new System.EventHandler(this.btndropdown_Click); + // + // btnbasic + // + this.btnbasic.BackColor = System.Drawing.Color.White; + this.btnbasic.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbasic.Font = new System.Drawing.Font("Cambria", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnbasic.Location = new System.Drawing.Point(4, 0); + this.btnbasic.Name = "btnbasic"; + this.btnbasic.Size = new System.Drawing.Size(119, 29); + this.btnbasic.TabIndex = 4; + this.btnbasic.Text = "Basic Customization"; + this.btnbasic.UseVisualStyleBackColor = false; + this.btnbasic.Click += new System.EventHandler(this.btnbasic_Click); + // + // label74 + // + this.label74.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label74.Location = new System.Drawing.Point(72, 0); + this.label74.Name = "label74"; + this.label74.Size = new System.Drawing.Size(332, 29); + this.label74.TabIndex = 0; + this.label74.Text = "Menu Customization"; + // + // tmrfix + // + this.tmrfix.Interval = 5000; + // + // pnlluaoptions + // + this.pnlluaoptions.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.pnlluaoptions.BackColor = System.Drawing.Color.White; + this.pnlluaoptions.Controls.Add(this.pnlluafield); + this.pnlluaoptions.Controls.Add(this.flmorebuttons); + this.pnlluaoptions.Location = new System.Drawing.Point(139, 9); + this.pnlluaoptions.Name = "pnlluaoptions"; + this.pnlluaoptions.Size = new System.Drawing.Size(457, 306); + this.pnlluaoptions.TabIndex = 21; + this.pnlluaoptions.Visible = false; + // + // flmorebuttons + // + this.flmorebuttons.AutoSize = true; + this.flmorebuttons.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.flmorebuttons.Dock = System.Windows.Forms.DockStyle.Top; + this.flmorebuttons.Location = new System.Drawing.Point(0, 0); + this.flmorebuttons.Name = "flmorebuttons"; + this.flmorebuttons.Size = new System.Drawing.Size(457, 0); + this.flmorebuttons.TabIndex = 0; + // + // pnlluafield + // + this.pnlluafield.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlluafield.Location = new System.Drawing.Point(0, 0); + this.pnlluafield.Name = "pnlluafield"; + this.pnlluafield.Size = new System.Drawing.Size(457, 306); + this.pnlluafield.TabIndex = 1; + // + // Shifter + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(600, 323); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "Shifter"; + this.Text = "Shifter"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Shifter_Load); + this.catholder.ResumeLayout(false); + this.pnlshifterintro.ResumeLayout(false); + this.pnlshifterintro.PerformLayout(); + this.pnldesktopoptions.ResumeLayout(false); + this.pnldesktoppaneloptions.ResumeLayout(false); + this.pnldesktoppaneloptions.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.txtdesktoppanelheight)).EndInit(); + this.pnlapplauncheroptions.ResumeLayout(false); + this.pnlapplauncheroptions.PerformLayout(); + this.pnldesktopintro.ResumeLayout(false); + this.pnldesktopintro.PerformLayout(); + this.pnlpanelbuttonsoptions.ResumeLayout(false); + this.pnlpanelbuttonsoptions.PerformLayout(); + this.pnldesktopbackgroundoptions.ResumeLayout(false); + this.pnldesktopbackgroundoptions.PerformLayout(); + this.pnlpanelclockoptions.ResumeLayout(false); + this.pnlpanelclockoptions.PerformLayout(); + this.pnldesktoppreview.ResumeLayout(false); + this.predesktoppanel.ResumeLayout(false); + this.prepnlpanelbuttonholder.ResumeLayout(false); + this.prepnlpanelbutton.ResumeLayout(false); + this.prepnlpanelbutton.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).EndInit(); + this.pretimepanel.ResumeLayout(false); + this.pretimepanel.PerformLayout(); + this.preapplaunchermenuholder.ResumeLayout(false); + this.predesktopappmenu.ResumeLayout(false); + this.predesktopappmenu.PerformLayout(); + this.Panel10.ResumeLayout(false); + this.pnlwindowsoptions.ResumeLayout(false); + this.pnlwindowsintro.ResumeLayout(false); + this.pnlwindowsintro.PerformLayout(); + this.pnlbuttonoptions.ResumeLayout(false); + this.pnlbuttonoptions.PerformLayout(); + this.pnlclosebuttonoptions.ResumeLayout(false); + this.pnlclosebuttonoptions.PerformLayout(); + this.pnlrollupbuttonoptions.ResumeLayout(false); + this.pnlrollupbuttonoptions.PerformLayout(); + this.pnlminimizebuttonoptions.ResumeLayout(false); + this.pnlminimizebuttonoptions.PerformLayout(); + this.pnltitlebaroptions.ResumeLayout(false); + this.pnltitlebaroptions.PerformLayout(); + this.pnlborderoptions.ResumeLayout(false); + this.pnlborderoptions.PerformLayout(); + this.pnltitletextoptions.ResumeLayout(false); + this.pnltitletextoptions.PerformLayout(); + this.pnlwindowsobjects.ResumeLayout(false); + this.pnlwindowpreview.ResumeLayout(false); + this.prepgleft.ResumeLayout(false); + this.prepgright.ResumeLayout(false); + this.pretitlebar.ResumeLayout(false); + this.pretitlebar.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).EndInit(); + this.pnlreset.ResumeLayout(false); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.pnldesktopcomposition.ResumeLayout(false); + this.pnlfancywindows.ResumeLayout(false); + this.pnlfancywindows.PerformLayout(); + this.pnlfancydragging.ResumeLayout(false); + this.pnlfancydragging.PerformLayout(); + this.pnlfancyintro.ResumeLayout(false); + this.panel18.ResumeLayout(false); + this.panel18.PerformLayout(); + this.panel25.ResumeLayout(false); + this.panel25.PerformLayout(); + this.panel36.ResumeLayout(false); + this.pnlmenus.ResumeLayout(false); + this.pnladvanced.ResumeLayout(false); + this.pnladvanced.PerformLayout(); + this.pnlmore.ResumeLayout(false); + this.pnlmore.PerformLayout(); + this.pnldropdown.ResumeLayout(false); + this.pnldropdown.PerformLayout(); + this.pnlbasic.ResumeLayout(false); + this.pnlbasic.PerformLayout(); + this.pnlmenusintro.ResumeLayout(false); + this.pnlmenucategories.ResumeLayout(false); + this.pnlluaoptions.ResumeLayout(false); + this.pnlluaoptions.PerformLayout(); + this.ResumeLayout(false); + + } + private System.Windows.Forms.ColorDialog ColorDialog1; + private System.Windows.Forms.Timer clocktick; + private System.Windows.Forms.Timer customizationtime; + private System.Windows.Forms.Timer timerearned; + private System.Windows.Forms.Label Label1; + private System.Windows.Forms.Button btnapply; + private System.Windows.Forms.Panel catholder; + private System.Windows.Forms.Button btnreset; + private System.Windows.Forms.Button btnmenus; + private System.Windows.Forms.Button btnwindows; + private System.Windows.Forms.Button btndesktop; + private System.Windows.Forms.Panel pnlshifterintro; + private System.Windows.Forms.Label Label66; + private System.Windows.Forms.Label Label65; + private System.Windows.Forms.Label Label64; + private System.Windows.Forms.Label Label63; + private System.Windows.Forms.Panel pnldesktopoptions; + private System.Windows.Forms.Panel pnlpanelbuttonsoptions; + private System.Windows.Forms.Panel pnlpanelbuttontextcolour; + private System.Windows.Forms.Label Label101; + private System.Windows.Forms.TextBox txtpanelbuttontexttop; + private System.Windows.Forms.Label Label104; + private System.Windows.Forms.TextBox txtpanelbuttontextside; + private System.Windows.Forms.Label Label106; + private System.Windows.Forms.Label Label93; + private System.Windows.Forms.TextBox txtpanelbuttontop; + private System.Windows.Forms.Label Label94; + private System.Windows.Forms.TextBox txtpanelbuttoninitalgap; + private System.Windows.Forms.Label Label108; + private System.Windows.Forms.TextBox txtpanelbuttonicontop; + private System.Windows.Forms.Label Label110; + private System.Windows.Forms.TextBox txtpanelbuttoniconside; + private System.Windows.Forms.Label Label112; + private System.Windows.Forms.TextBox txtpanelbuttoniconsize; + private System.Windows.Forms.TextBox txtpanelbuttoniconheight; + private System.Windows.Forms.Label Label105; + private System.Windows.Forms.ComboBox cbpanelbuttontextstyle; + private System.Windows.Forms.ComboBox cbpanelbuttonfont; + private System.Windows.Forms.Label Label100; + private System.Windows.Forms.TextBox txtpaneltextbuttonsize; + private System.Windows.Forms.Label Label102; + private System.Windows.Forms.Label Label103; + private System.Windows.Forms.Label Label98; + private System.Windows.Forms.TextBox txtpanelbuttongap; + private System.Windows.Forms.Label Label99; + private System.Windows.Forms.Label Label96; + private System.Windows.Forms.TextBox txtpanelbuttonheight; + private System.Windows.Forms.Label Label97; + private System.Windows.Forms.Label Label92; + private System.Windows.Forms.TextBox txtpanelbuttonwidth; + private System.Windows.Forms.Label Label91; + private System.Windows.Forms.Panel pnlpanelbuttoncolour; + private System.Windows.Forms.Label Label95; + private System.Windows.Forms.Panel pnldesktoppaneloptions; + private System.Windows.Forms.Button btnpanelbuttons; + private System.Windows.Forms.Label lbwarning; + private System.Windows.Forms.ComboBox combodesktoppanelposition; + private System.Windows.Forms.Label lbposition; + private System.Windows.Forms.Label Label47; + private System.Windows.Forms.NumericUpDown txtdesktoppanelheight; + private System.Windows.Forms.Label lbheight; + private System.Windows.Forms.Panel pnldesktoppanelcolour; + private System.Windows.Forms.Label lbpanelcolor; + private System.Windows.Forms.Panel pnlapplauncheroptions; + private System.Windows.Forms.Label Label71; + private System.Windows.Forms.TextBox txtapplauncherwidth; + private System.Windows.Forms.Label Label72; + private System.Windows.Forms.TextBox txtappbuttonlabel; + private System.Windows.Forms.Label Label51; + private System.Windows.Forms.Label Label50; + private System.Windows.Forms.Panel pnlmaintextcolour; + private System.Windows.Forms.ComboBox comboappbuttontextstyle; + private System.Windows.Forms.ComboBox comboappbuttontextfont; + private System.Windows.Forms.Label Label37; + private System.Windows.Forms.Label Label38; + private System.Windows.Forms.TextBox txtappbuttontextsize; + private System.Windows.Forms.Label Label39; + private System.Windows.Forms.Label Label40; + private System.Windows.Forms.Panel pnlmainbuttonactivated; + private System.Windows.Forms.Label Label28; + private System.Windows.Forms.Label Label35; + private System.Windows.Forms.TextBox txtapplicationsbuttonheight; + private System.Windows.Forms.Label Label36; + private System.Windows.Forms.Panel pnlmainbuttoncolour; + private System.Windows.Forms.Label Label43; + private System.Windows.Forms.Panel pnldesktopintro; + private System.Windows.Forms.Label Label69; + private System.Windows.Forms.Label Label70; + private System.Windows.Forms.Panel pnlpanelclockoptions; + private System.Windows.Forms.Panel pnlclockbackgroundcolour; + private System.Windows.Forms.Label Label44; + private System.Windows.Forms.ComboBox comboclocktextstyle; + private System.Windows.Forms.ComboBox comboclocktextfont; + private System.Windows.Forms.Label Label26; + private System.Windows.Forms.Label Label29; + private System.Windows.Forms.TextBox txtclocktextfromtop; + private System.Windows.Forms.Label Label30; + private System.Windows.Forms.Label Label31; + private System.Windows.Forms.TextBox txtclocktextsize; + private System.Windows.Forms.Label Label32; + private System.Windows.Forms.Label Label33; + private System.Windows.Forms.Panel pnlpanelclocktextcolour; + private System.Windows.Forms.Label Label34; + private System.Windows.Forms.Panel pnldesktopbackgroundoptions; + private System.Windows.Forms.Panel pnldesktopcolour; + private System.Windows.Forms.Label Label45; + private System.Windows.Forms.Panel Panel10; + private System.Windows.Forms.Button btndesktopitself; + private System.Windows.Forms.Button btnpanelclock; + private System.Windows.Forms.Button btnapplauncher; + private System.Windows.Forms.Button btndesktoppanel; + private System.Windows.Forms.Panel pnldesktoppreview; + private System.Windows.Forms.Panel predesktoppanel; + private System.Windows.Forms.FlowLayoutPanel prepnlpanelbuttonholder; + private System.Windows.Forms.Panel prepnlpanelbutton; + private System.Windows.Forms.PictureBox pretbicon; + private System.Windows.Forms.Label pretbctext; + private System.Windows.Forms.Panel pretimepanel; + private System.Windows.Forms.Label prepaneltimetext; + private System.Windows.Forms.Panel preapplaunchermenuholder; + private System.Windows.Forms.MenuStrip predesktopappmenu; + private System.Windows.Forms.ToolStripMenuItem ApplicationsToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem KnowledgeInputToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ShiftoriumToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ClockToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem TerminalToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem ShifterToolStripMenuItem; + private System.Windows.Forms.ToolStripSeparator ToolStripSeparator1; + private System.Windows.Forms.ToolStripMenuItem ShutdownToolStripMenuItem; + private System.Windows.Forms.Panel pnlwindowsoptions; + private System.Windows.Forms.Panel pnlbuttonoptions; + private System.Windows.Forms.Panel pnlminimizebuttonoptions; + private System.Windows.Forms.Label Label82; + private System.Windows.Forms.Label Label83; + private System.Windows.Forms.Panel pnlminimizebuttoncolour; + private System.Windows.Forms.TextBox txtminimizebuttonside; + private System.Windows.Forms.Label Label84; + private System.Windows.Forms.Label Label85; + private System.Windows.Forms.TextBox txtminimizebuttonheight; + private System.Windows.Forms.Label Label86; + private System.Windows.Forms.Label Label87; + private System.Windows.Forms.TextBox txtminimizebuttontop; + private System.Windows.Forms.Label Label88; + private System.Windows.Forms.Label Label89; + private System.Windows.Forms.TextBox txtminimizebuttonwidth; + private System.Windows.Forms.Label Label90; + private System.Windows.Forms.Panel pnlrollupbuttonoptions; + private System.Windows.Forms.Label Label54; + private System.Windows.Forms.Label Label55; + private System.Windows.Forms.Panel pnlrollupbuttoncolour; + private System.Windows.Forms.TextBox txtrollupbuttonside; + private System.Windows.Forms.Label Label56; + private System.Windows.Forms.Label Label57; + private System.Windows.Forms.TextBox txtrollupbuttonheight; + private System.Windows.Forms.Label Label58; + private System.Windows.Forms.Label Label59; + private System.Windows.Forms.TextBox txtrollupbuttontop; + private System.Windows.Forms.Label Label60; + private System.Windows.Forms.Label Label61; + private System.Windows.Forms.TextBox txtrollupbuttonwidth; + private System.Windows.Forms.Label Label62; + private System.Windows.Forms.ComboBox combobuttonoption; + private System.Windows.Forms.Label Label52; + private System.Windows.Forms.Panel pnlclosebuttonoptions; + private System.Windows.Forms.Label Label8; + private System.Windows.Forms.Label Label11; + private System.Windows.Forms.Panel pnlclosebuttoncolour; + private System.Windows.Forms.TextBox txtclosebuttonfromside; + private System.Windows.Forms.Label Label7; + private System.Windows.Forms.Label Label12; + private System.Windows.Forms.TextBox txtclosebuttonheight; + private System.Windows.Forms.Label Label13; + private System.Windows.Forms.Label Label6; + private System.Windows.Forms.TextBox txtclosebuttonfromtop; + private System.Windows.Forms.Label Label10; + private System.Windows.Forms.Label Label14; + private System.Windows.Forms.TextBox txtclosebuttonwidth; + private System.Windows.Forms.Label Label9; + private System.Windows.Forms.Panel pnltitlebaroptions; + private System.Windows.Forms.Label Label80; + private System.Windows.Forms.TextBox txticonfromtop; + private System.Windows.Forms.Label Label81; + private System.Windows.Forms.Label Label78; + private System.Windows.Forms.TextBox txticonfromside; + private System.Windows.Forms.Label Label79; + private System.Windows.Forms.Label lbcornerwidthpx; + private System.Windows.Forms.TextBox txttitlebarcornerwidth; + private System.Windows.Forms.Label lbcornerwidth; + private System.Windows.Forms.Panel pnltitlebarrightcornercolour; + private System.Windows.Forms.Panel pnltitlebarleftcornercolour; + private System.Windows.Forms.Label lbrightcornercolor; + private System.Windows.Forms.Label lbleftcornercolor; + private System.Windows.Forms.CheckBox cboxtitlebarcorners; + private System.Windows.Forms.Label Label5; + private System.Windows.Forms.TextBox txttitlebarheight; + private System.Windows.Forms.Label Label4; + private System.Windows.Forms.Panel pnltitlebarcolour; + private System.Windows.Forms.Label Label2; + private System.Windows.Forms.Panel pnlborderoptions; + private System.Windows.Forms.CheckBox cbindividualbordercolours; + private System.Windows.Forms.Panel pnlborderbottomrightcolour; + private System.Windows.Forms.Label lbbright; + private System.Windows.Forms.Panel pnlborderbottomcolour; + private System.Windows.Forms.Label lbbottom; + private System.Windows.Forms.Panel pnlborderbottomleftcolour; + private System.Windows.Forms.Label lbbleft; + private System.Windows.Forms.Panel pnlborderrightcolour; + private System.Windows.Forms.Label lbright; + private System.Windows.Forms.Panel pnlborderleftcolour; + private System.Windows.Forms.Label lbleft; + private System.Windows.Forms.Label Label15; + private System.Windows.Forms.Panel pnlbordercolour; + private System.Windows.Forms.TextBox txtbordersize; + private System.Windows.Forms.Label Label3; + private System.Windows.Forms.Label Label16; + private System.Windows.Forms.Panel pnltitletextoptions; + private System.Windows.Forms.ComboBox combotitletextposition; + private System.Windows.Forms.Label Label53; + private System.Windows.Forms.ComboBox combotitletextstyle; + private System.Windows.Forms.ComboBox combotitletextfont; + private System.Windows.Forms.Label Label23; + private System.Windows.Forms.Label Label17; + private System.Windows.Forms.TextBox txttitletextside; + private System.Windows.Forms.Label Label18; + private System.Windows.Forms.Label Label19; + private System.Windows.Forms.TextBox txttitletexttop; + private System.Windows.Forms.Label Label20; + private System.Windows.Forms.Label Label21; + private System.Windows.Forms.TextBox txttitletextsize; + private System.Windows.Forms.Label Label22; + private System.Windows.Forms.Label Label24; + private System.Windows.Forms.Panel pnltitletextcolour; + private System.Windows.Forms.Label Label25; + private System.Windows.Forms.Panel pnlwindowsintro; + private System.Windows.Forms.Label Label68; + private System.Windows.Forms.Label Label67; + private System.Windows.Forms.Panel pnlwindowsobjects; + private System.Windows.Forms.Button btnborders; + private System.Windows.Forms.Button btnbuttons; + private System.Windows.Forms.Button btntitletext; + private System.Windows.Forms.Button btntitlebar; + private System.Windows.Forms.Panel pnlwindowpreview; + private System.Windows.Forms.Panel prepgcontent; + private System.Windows.Forms.Panel prepgbottom; + private System.Windows.Forms.Panel prepgleft; + private System.Windows.Forms.Panel prepgbottomlcorner; + private System.Windows.Forms.Panel prepgright; + private System.Windows.Forms.Panel prepgbottomrcorner; + private System.Windows.Forms.Panel pretitlebar; + private System.Windows.Forms.Panel preminimizebutton; + private System.Windows.Forms.PictureBox prepnlicon; + private System.Windows.Forms.Panel prerollupbutton; + private System.Windows.Forms.Panel preclosebutton; + private System.Windows.Forms.Label pretitletext; + private System.Windows.Forms.Panel prepgtoplcorner; + private System.Windows.Forms.Panel prepgtoprcorner; + private System.Windows.Forms.Panel pnlreset; + private System.Windows.Forms.Label Label113; + private System.Windows.Forms.Button btnresetallsettings; + private System.Windows.Forms.Label Label109; + private System.Windows.Forms.Label Label111; + private System.Windows.Forms.Panel pgcontents; + private System.Windows.Forms.Timer tmrfix; + private System.Windows.Forms.Timer tmrdelay; + private Panel pnlmenus; + private Label label74; + private Panel pnlmenucategories; + private Button btnmisc; + private Button btnadvanced; + private Button btndropdown; + private Button btnbasic; + private Panel pnlbasic; + private Panel pnlmenubarend; + private Label label73; + private Panel pnlmenubarbegin; + private Label label42; + private Label label41; + private Panel pnltoolbarend; + private Label label77; + private Panel pnltoolbarmiddle; + private Label label76; + private Panel pnltoolbarbegin; + private Label label75; + private Panel pnlstatusend; + private Label label114; + private Panel pnlstatusbegin; + private Label label107; + private Panel pnldropdownbg; + private Label label115; + private Panel pnlmenusintro; + private Label label116; + private Label label124; + private Panel pnldropdown; + private Panel pnlmarginend; + private Label label120; + private Panel pnlmarginmiddle; + private Label label121; + private Panel pnlmarginbegin; + private Label label122; + private Panel pnlhcolor; + private Label label123; + private Panel pnlhborder; + private Label label125; + private Label label126; + private Panel pnlddborder; + private Label label117; + private Panel pnlmenutextcolor; + private Label label118; + private Panel pnladvanced; + private Panel pnlitemselectedend; + private Label label129; + private Panel pnlbuttonpressed; + private Label label130; + private Panel pnlitemselectedbegin; + private Label label131; + private Panel pnlitemselected; + private Label label132; + private Panel pnlbuttonselected; + private Label label133; + private Panel pnlcheckbg; + private Label label134; + private Label label135; + private Panel pnlbuttonchecked; + private Label label136; + private Button btnmorebuttons; + private Panel pnlmore; + private Panel pnlpressedbegin; + private Button btnback; + private Label label138; + private Panel pnlselectedbegin; + private Panel pnlpressedend; + private Label label137; + private Label label139; + private Panel pnlselectedend; + private Panel pnlpressedmiddle; + private Label label140; + private Label label142; + private Panel pnlselectedmiddle; + private Label label145; + private Label label147; + private Panel pnlalhover; + private Label label119; + private Button btndesktopicons; + private Button btnwindowcomposition; + private Panel pnldesktopcomposition; + private Panel pnlfancywindows; + private Label label149; + private Panel pnlfancydragging; + private Label label156; + private Panel panel18; + private Panel panel19; + private Label label157; + private Panel panel20; + private Label label158; + private Panel panel21; + private Label label159; + private Panel panel22; + private Label label160; + private Panel panel23; + private Label label161; + private Panel panel24; + private Label label162; + private Label label163; + private Panel panel25; + private Panel panel26; + private Label label164; + private Panel panel27; + private Label label165; + private Panel panel28; + private Label label166; + private Panel panel29; + private Label label167; + private Panel panel30; + private Label label168; + private Panel panel31; + private Label label169; + private Panel panel32; + private Label label170; + private Panel panel33; + private Label label171; + private Panel panel34; + private Label label172; + private Label label173; + private Panel pnlfancyintro; + private Label label174; + private Label label175; + private Panel panel36; + private Button btnfancydragging; + private Button btnfancywindows; + private Label label176; + private ComboBox cbcloseanim; + private Label label128; + private ComboBox cbopenanim; + private Label label127; + private ComboBox cbdrageffect; + private Label label141; + private TextBox txtfadespeed; + private Label label155; + private TextBox txtdragfadedec; + private Label label143; + private TextBox txtdragopacitydec; + private Label label144; + private TextBox txtshakeminoffset; + private Label label148; + private TextBox txtshakemax; + private Label label146; + private TextBox txtwinfadedec; + private Label label150; + private TextBox txtwinfadespeed; + private Label label151; + private Button btnmore; + private Panel pnlluaoptions; + private FlowLayoutPanel flmorebuttons; + private Panel pnlluafield; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shifter.cs b/source/WindowsFormsApplication1/Apps/Shifter.cs new file mode 100644 index 0000000..3aad889 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shifter.cs @@ -0,0 +1,3093 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Shifter : Form + { + public Shifter() + { + InitializeComponent(); + } + + public Skinning.Skin CustomizingSkin = null; + public Skinning.Images CustomizingImages = null; + private bool EarnCP = false; + + public void AddCP(int amount) + { + if (EarnCP == true) + { + codepointstogive += amount; + } + } + + private void btndesktop_Click(object sender, EventArgs e) + { + HideAll(); + pnldesktopoptions.Show(); + pnldesktopoptions.BringToFront(); + SetPreviewSkin(true); + } + + private void SetPreviewSkin(bool updateValues) + { + EarnCP = false; + predesktopappmenu.Renderer = new Skinning.MyToolStripRenderer(new AppLauncherColorTable()); + //fix apply button + btnapply.BackColor = Color.White; + btnapply.ForeColor = Color.Black; + btnapply.Text = "Apply Changes"; + + //Set Available Title Buttons + combobuttonoption.Items.Clear(); + if(API.Upgrades["closebutton"]) + { + combobuttonoption.Items.Add("Close"); + } + if (API.Upgrades["rollupbutton"]) + { + combobuttonoption.Items.Add("Roll Up"); + } + if (API.Upgrades["minimizebutton"]) + { + combobuttonoption.Items.Add("Minimize"); + } + //set available options + SetAvailableOptions(); + + //windows + setuptitlebar(); + setskin(); + + //desktop + SetupDesktop(); + + //Setting Values + if (updateValues == true) + { + EarnCP = false; + SetupDesktopPanelValues(); + SetupAppLauncherValues(); + SetupPanelButtonValues(); + SetClockValues(); + SetupTitleTextValues(); + SetupBorderValues(); + SetupTitleBarValues(); + SetupButtonValues(); + SetupBasicMenuValues(); + SetupDropdownValues(); + SetupAdvancedMenuValues(); + SetupAnimationStyleValues(); + } + EarnCP = true; + } + + #region Preview Skinning + + public void SetupDesktop() + { + + if (API.Upgrades["desktoppanel"] == true) + { + if (CustomizingImages.desktoppanel == null) + { + predesktoppanel.BackColor = CustomizingSkin.desktoppanelcolour; + predesktoppanel.BackgroundImage = null; + } + else { + predesktoppanel.BackgroundImage = CustomizingImages.desktoppanel; + predesktoppanel.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktoppanellayout; + predesktoppanel.BackColor = Color.Transparent; + } + + predesktoppanel.Size = new Size(predesktoppanel.Size.Width, CustomizingSkin.desktoppanelheight); + switch (CustomizingSkin.desktoppanelposition) + { + case "Top": + predesktoppanel.Dock = DockStyle.Top; + predesktopappmenu.Dock = DockStyle.Top; + break; + case "Bottom": + predesktoppanel.Dock = DockStyle.Bottom; + predesktopappmenu.Dock = DockStyle.Bottom; + break; + } + predesktoppanel.Show(); + } + else { + predesktoppanel.Hide(); + } + + + if (API.Upgrades["applaunchermenu"] == true) + { + ApplicationsToolStripMenuItem.Font = new Font(CustomizingSkin.applicationbuttontextfont, CustomizingSkin.applicationbuttontextsize, CustomizingSkin.applicationbuttontextstyle); + ApplicationsToolStripMenuItem.Text = CustomizingSkin.applicationlaunchername; + + + + ApplicationsToolStripMenuItem.Height = CustomizingSkin.applicationbuttonheight; + if (CustomizingImages.applauncher != null) + { + ApplicationsToolStripMenuItem.Text = ""; + ApplicationsToolStripMenuItem.BackColor = Color.Transparent; + } + else { + ApplicationsToolStripMenuItem.Text = CustomizingSkin.applicationlaunchername; + ApplicationsToolStripMenuItem.BackColor = CustomizingSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImage = null; + } + + preapplaunchermenuholder.Width = CustomizingSkin.applaunchermenuholderwidth; + predesktopappmenu.Width = CustomizingSkin.applaunchermenuholderwidth; + ApplicationsToolStripMenuItem.Width = CustomizingSkin.applaunchermenuholderwidth; + preapplaunchermenuholder.Height = CustomizingSkin.applicationbuttonheight; + predesktopappmenu.Height = CustomizingSkin.applicationbuttonheight; + ApplicationsToolStripMenuItem.Height = CustomizingSkin.applicationbuttonheight; + + if (CustomizingImages.applauncher != null) + { + ApplicationsToolStripMenuItem.BackgroundImage = CustomizingImages.applauncher; + } + else { + ApplicationsToolStripMenuItem.BackColor = CustomizingSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImageLayout = (ImageLayout)CustomizingSkin.applauncherlayout; + } + } + else { + ApplicationsToolStripMenuItem.Visible = false; + } + + if (API.Upgrades["desktoppanelclock"] == true) + { + + prepaneltimetext.ForeColor = CustomizingSkin.clocktextcolour; + + if (CustomizingImages.panelclock == null) + { + pretimepanel.BackColor = CustomizingSkin.clockbackgroundcolor; + pretimepanel.BackgroundImage = null; + } + else { + pretimepanel.BackColor = Color.Transparent; + pretimepanel.BackgroundImage = CustomizingImages.panelclock; + pretimepanel.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelclocklayout; + } + prepaneltimetext.Font = new Font(CustomizingSkin.panelclocktextfont, CustomizingSkin.panelclocktextsize, CustomizingSkin.panelclocktextstyle); + pretimepanel.Size = new Size(prepaneltimetext.Width + 3, pretimepanel.Height); + prepaneltimetext.Location = new Point(0, CustomizingSkin.panelclocktexttop); + pretimepanel.Show(); + } + else { + pretimepanel.Hide(); + } + + + ApplicationsToolStripMenuItem.BackColor = CustomizingSkin.applauncherbuttoncolour; + + pnldesktoppreview.BackColor = CustomizingSkin.desktopbackgroundcolour; + pnldesktoppreview.BackgroundImage = CustomizingImages.desktopbackground; + pnldesktoppreview.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktopbackgroundlayout; + + if (API.Upgrades["panelbuttons"] == true) + { + prepnlpanelbutton.Visible = API.Upgrades["panelbuttons"]; + + pretbicon.Image = Properties.Resources.iconTerminal; + pretbctext.Text = "Terminal"; + + prepnlpanelbutton.Margin = new Padding(0, CustomizingSkin.panelbuttonfromtop, CustomizingSkin.panelbuttongap, 0); + + if (API.Upgrades["appicons"] == true) + { + pretbicon.Show(); + } + else + { + pretbicon.Hide(); + } + pretbicon.Location = new Point(CustomizingSkin.panelbuttoniconside, CustomizingSkin.panelbuttonicontop); + pretbicon.Size = new Size(CustomizingSkin.panelbuttoniconsize, CustomizingSkin.panelbuttoniconsize); + prepnlpanelbutton.Size = new Size(CustomizingSkin.panelbuttonwidth, CustomizingSkin.panelbuttonheight); + prepnlpanelbutton.BackColor = CustomizingSkin.panelbuttoncolour; + prepnlpanelbutton.BackgroundImage = CustomizingImages.panelbutton; + prepnlpanelbutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelbuttonlayout; + pretbctext.ForeColor = CustomizingSkin.panelbuttontextcolour; + pretbctext.Font = new Font(CustomizingSkin.panelbuttontextfont, CustomizingSkin.panelbuttontextsize, CustomizingSkin.panelbuttontextstyle); + pretbctext.Location = new Point(CustomizingSkin.panelbuttontextside, CustomizingSkin.panelbuttontexttop); + + + pretbicon.Size = new Size(CustomizingSkin.panelbuttoniconsize, CustomizingSkin.panelbuttoniconsize); + + } + prepnlpanelbuttonholder.Padding = new Padding(CustomizingSkin.panelbuttoninitialgap, 0, 0, 0); + + + } + + + + public void setskin() + { + + //disposals + preclosebutton.BackgroundImage = null; + pretitlebar.BackgroundImage = null; + prerollupbutton.BackgroundImage = null; + prepgtoplcorner.BackgroundImage = null; + prepgtoprcorner.BackgroundImage = null; + preminimizebutton.BackgroundImage = null; + //apply new skin + if (CustomizingImages.closebtn == null) + preclosebutton.BackColor = CustomizingSkin.closebtncolour; + else + preclosebutton.BackgroundImage = CustomizingImages.closebtn; + preclosebutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.closebtnlayout; + if (CustomizingImages.titlebar == null) + pretitlebar.BackColor = CustomizingSkin.titlebarcolour; + else + pretitlebar.BackgroundImage = CustomizingImages.titlebar; + pretitlebar.BackgroundImageLayout = (ImageLayout)CustomizingSkin.titlebarlayout; + if (CustomizingImages.rollbtn == null) + prerollupbutton.BackColor = CustomizingSkin.rollbtncolour; + else + prerollupbutton.BackgroundImage = CustomizingImages.rollbtn; + prerollupbutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rollbtnlayout; + if (CustomizingImages.leftcorner == null) + prepgtoplcorner.BackColor = CustomizingSkin.leftcornercolour; + else + prepgtoplcorner.BackgroundImage = CustomizingImages.leftcorner; + prepgtoplcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.leftcornerlayout; + if (CustomizingImages.rightcorner == null) + prepgtoprcorner.BackColor = CustomizingSkin.rightcornercolour; + else + prepgtoprcorner.BackgroundImage = CustomizingImages.rightcorner; + prepgtoprcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rightcornerlayout; + if (CustomizingImages.minbtn == null) + preminimizebutton.BackColor = CustomizingSkin.minbtncolour; + else + preminimizebutton.BackgroundImage = CustomizingImages.minbtn; + preminimizebutton.BackgroundImageLayout = (ImageLayout)CustomizingSkin.minbtnlayout; + if (CustomizingImages.borderleft == null) + prepgleft.BackColor = CustomizingSkin.borderleftcolour; + else + prepgleft.BackgroundImage = CustomizingImages.borderleft; + prepgleft.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderleftlayout; + if (CustomizingImages.borderright == null) + prepgright.BackColor = CustomizingSkin.borderrightcolour; + else + prepgright.BackgroundImage = CustomizingImages.borderright; + prepgleft.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderrightlayout; + if (CustomizingImages.borderbottom == null) + prepgbottom.BackColor = CustomizingSkin.borderbottomcolour; + else + prepgbottom.BackgroundImage = CustomizingImages.borderbottom; + prepgbottom.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderbottomlayout; + if (CustomizingSkin.enablebordercorners == true) + { + if (CustomizingImages.bottomleftcorner == null) + prepgbottomlcorner.BackColor = CustomizingSkin.bottomleftcornercolour; + else + prepgbottomlcorner.BackgroundImage = CustomizingImages.bottomleftcorner; + prepgbottomlcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomleftcornerlayout; + if (CustomizingImages.bottomrightcorner == null) + prepgbottomrcorner.BackColor = CustomizingSkin.bottomrightcornercolour; + else + prepgbottomrcorner.BackgroundImage = CustomizingImages.bottomrightcorner; + prepgbottomrcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomrightcornerlayout; + } + else { + prepgbottomlcorner.BackColor = CustomizingSkin.borderrightcolour; + prepgbottomrcorner.BackColor = CustomizingSkin.borderrightcolour; + prepgbottomlcorner.BackgroundImage = null; + prepgbottomrcorner.BackgroundImage = null; + } + + //set bottom border corner size + prepgbottomlcorner.Size = new Size(CustomizingSkin.borderwidth, CustomizingSkin.borderwidth); + prepgbottomrcorner.Size = new Size(CustomizingSkin.borderwidth, CustomizingSkin.borderwidth); + prepgbottomlcorner.Location = new Point(0, pnlwindowpreview.Height - CustomizingSkin.borderwidth); + prepgbottomrcorner.Location = new Point(pnlwindowpreview.Width, pnlwindowpreview.Height - CustomizingSkin.borderwidth); + + prepgright.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderrightlayout; + prepgbottomrcorner.BackgroundImage = CustomizingImages.bottomrightcorner; + prepgbottomlcorner.BackgroundImage = CustomizingImages.bottomleftcorner; + prepgbottomrcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomrightcornerlayout; + prepgbottomlcorner.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomleftcornerlayout; + + } + + private void setupborders() + { + if (API.Upgrades["windowborders"] == false) + { + prepgleft.Hide(); + prepgbottom.Hide(); + prepgright.Hide(); + } + } + + private void setuptitlebar() + { + setupborders(); + + prepgleft.Width = CustomizingSkin.borderwidth; + prepgright.Width = CustomizingSkin.borderwidth; + prepgbottom.Height = CustomizingSkin.borderwidth; + pretitlebar.Height = CustomizingSkin.titlebarheight; + + if (CustomizingSkin.enablecorners == true) + { + prepgtoplcorner.Show(); + prepgtoprcorner.Show(); + prepgtoprcorner.Width = CustomizingSkin.titlebarcornerwidth; + prepgtoplcorner.Width = CustomizingSkin.titlebarcornerwidth; + } + else { + prepgtoplcorner.Hide(); + prepgtoprcorner.Hide(); + } + + if (API.Upgrades["titlebar"] == false) + { + pretitlebar.Hide(); + } + + if (API.Upgrades["titletext"] == false) + { + pretitletext.Hide(); + } + else { + pretitletext.Font = new Font(CustomizingSkin.titletextfontfamily, CustomizingSkin.titletextfontsize, CustomizingSkin.titletextfontstyle, GraphicsUnit.Point); + pretitletext.Text = "Preview"; + pretitletext.Show(); + } + + if (API.Upgrades["closebutton"] == false) + { + preclosebutton.Hide(); + } + else { + preclosebutton.BackColor = CustomizingSkin.closebtncolour; + preclosebutton.Size = CustomizingSkin.closebtnsize; + preclosebutton.Show(); + } + + if (API.Upgrades["rollupbutton"] == false) + { + prerollupbutton.Hide(); + } + else { + prerollupbutton.BackColor = CustomizingSkin.rollbtncolour; + prerollupbutton.Size = CustomizingSkin.rollbtnsize; + prerollupbutton.Show(); + } + + if (API.Upgrades["minimizebutton"] == false) + { + preminimizebutton.Hide(); + } + else { + preminimizebutton.BackColor = CustomizingSkin.minbtncolour; + preminimizebutton.Size = CustomizingSkin.minbtnsize; + preminimizebutton.Show(); + } + + if (API.Upgrades["windowborders"] == true) + { + preclosebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.closebtnfromside - preclosebutton.Size.Width, CustomizingSkin.closebtnfromtop); + prerollupbutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.rollbtnfromside - prerollupbutton.Size.Width, CustomizingSkin.rollbtnfromtop); + preminimizebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.minbtnfromside - preminimizebutton.Size.Width, CustomizingSkin.minbtnfromtop); + switch (CustomizingSkin.titletextpos) + { + case "Left": + pretitletext.Location = new Point(CustomizingSkin.titletextfromside, CustomizingSkin.titletextfromtop); + break; + case "Centre": + pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, CustomizingSkin.titletextfromtop); + break; + } + pretitletext.ForeColor = CustomizingSkin.titletextcolour; + } + else { + preclosebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.closebtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preclosebutton.Size.Width, CustomizingSkin.closebtnfromtop); + prerollupbutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.rollbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - prerollupbutton.Size.Width, CustomizingSkin.rollbtnfromtop); + preminimizebutton.Location = new Point(pretitlebar.Size.Width - CustomizingSkin.minbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preminimizebutton.Size.Width, CustomizingSkin.minbtnfromtop); + switch (CustomizingSkin.titletextpos) + { + case "Left": + pretitletext.Location = new Point(CustomizingSkin.titletextfromside + prepgtoplcorner.Width, CustomizingSkin.titletextfromtop); + break; + case "Centre": + pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, CustomizingSkin.titletextfromtop); + break; + } + pretitletext.ForeColor = CustomizingSkin.titletextcolour; + } + + //Change when Icon skinning complete + // Change to program's icon + if (API.Upgrades["appicons"] == true) + { + prepnlicon.Visible = true; + prepnlicon.Location = new Point(CustomizingSkin.titleiconfromside, CustomizingSkin.titleiconfromtop); + prepnlicon.Size = new Size(CustomizingSkin.titlebariconsize, CustomizingSkin.titlebariconsize); + prepnlicon.Image = Properties.Resources.iconShifter; + + } + + } + + #endregion + + #region Other things... + + private void HideAll() + { + pnlshifterintro.Hide(); + pnldesktopoptions.Hide(); + pnlwindowsoptions.Hide(); + pnlreset.Hide(); + //pnlmenuoptions.Hide(); + } + + private void btnreset_Click(object sender, EventArgs e) + { + HideAll(); + pnlreset.Show(); + pnlreset.BringToFront(); + SetPreviewSkin(true); + } + + private void btnwindows_Click(object sender, EventArgs e) + { + HideAll(); + pnlwindowsoptions.Show(); + pnlwindowsoptions.BringToFront(); + SetPreviewSkin(true); + pnlwindowpreview.Show(); + pnlwindowpreview.BringToFront(); + pnlwindowsintro.Show(); + pnlwindowsintro.BringToFront(); + } + + public void GrabSkinData() + { + Skinning.Utilities.SavePanels(); + string json = JsonConvert.SerializeObject(API.CurrentSkin); + CustomizingSkin = JsonConvert.DeserializeObject<Skinning.Skin>(json); + GetAllImages(); + } + + public void GetAllImages() + { + CustomizingImages = new Skinning.Images(); + CustomizingImages.applauncherclick = Skinning.Utilities.GetImage(CustomizingSkin.applauncherclickpath); + CustomizingImages.panelbutton = Skinning.Utilities.GetImage(CustomizingSkin.panelbuttonpath); + CustomizingImages.applaunchermouseover = Skinning.Utilities.GetImage(CustomizingSkin.applaunchermouseoverpath); + CustomizingImages.applauncher = Skinning.Utilities.GetImage(CustomizingSkin.applauncherpath); + CustomizingImages.panelclock = Skinning.Utilities.GetImage(CustomizingSkin.panelclockpath); + CustomizingImages.desktopbackground = Skinning.Utilities.GetImage(CustomizingSkin.desktopbackgroundpath); + CustomizingImages.desktoppanel = Skinning.Utilities.GetImage(CustomizingSkin.desktoppanelpath); + CustomizingImages.minbtnhover = Skinning.Utilities.GetImage(CustomizingSkin.minbtnhoverpath); + CustomizingImages.minbtnclick = Skinning.Utilities.GetImage(CustomizingSkin.minbtnclickpath); + CustomizingImages.rightcorner = Skinning.Utilities.GetImage(CustomizingSkin.rightcornerpath); + CustomizingImages.titlebar = Skinning.Utilities.GetImage(CustomizingSkin.titlebarpath); + CustomizingImages.borderright = Skinning.Utilities.GetImage(CustomizingSkin.borderrightpath); + CustomizingImages.borderleft = Skinning.Utilities.GetImage(CustomizingSkin.borderleftpath); + CustomizingImages.borderbottom = Skinning.Utilities.GetImage(CustomizingSkin.borderbottompath); + CustomizingImages.closebtn = Skinning.Utilities.GetImage(CustomizingSkin.closebtnpath); + CustomizingImages.closebtnhover = Skinning.Utilities.GetImage(CustomizingSkin.closebtnhoverpath); + CustomizingImages.closebtnclick = Skinning.Utilities.GetImage(CustomizingSkin.closebtnclickpath); + CustomizingImages.rollbtn = Skinning.Utilities.GetImage(CustomizingSkin.rollbtnpath); + CustomizingImages.rollbtnhover = Skinning.Utilities.GetImage(CustomizingSkin.rollbtnhoverpath); + CustomizingImages.rollbtnclick = Skinning.Utilities.GetImage(CustomizingSkin.rollbtnclickpath); + CustomizingImages.minbtn = Skinning.Utilities.GetImage(CustomizingSkin.minbtnpath); + CustomizingImages.leftcorner = Skinning.Utilities.GetImage(CustomizingSkin.leftcornerpath); + CustomizingImages.bottomleftcorner = Skinning.Utilities.GetImage(CustomizingSkin.bottomleftcornerpath); + CustomizingImages.bottomrightcorner = Skinning.Utilities.GetImage(CustomizingSkin.bottomrightcornerpath); + + } + + private void Shifter_Load(object sender, EventArgs e) + { + GrabSkinData(); + HideAll(); + pnlshifterintro.Show(); + pnlshifterintro.BringToFront(); + SetPreviewSkin(true); + codepointstogive = 0; + } + + #endregion + + + private void SetAvailableOptions () + { + btntitlebar.Visible = API.Upgrades["shifttitlebar"]; + btntitletext.Visible = API.Upgrades["shifttitletext"]; + btnbuttons.Visible = API.Upgrades["shifttitlebuttons"]; + btnpanelbuttons.Visible = API.Upgrades["shiftpanelbuttons"]; + btnpanelclock.Visible = API.Upgrades["shiftpanelclock"]; + btndesktoppanel.Visible = API.Upgrades["shiftdesktoppanel"]; + btnapplauncher.Visible = API.Upgrades["shiftapplauncher"]; + btndesktopitself.Visible = API.Upgrades["shiftdesktop"]; + btnmenus.Visible = API.Upgrades["shiftsystemmenus"]; + btndesktopicons.Visible = API.Upgrades["shiftdesktopicons"]; + btnwindowcomposition.Visible = API.Upgrades["shiftfancyeffects"]; + } + #region Desktop, Reset, Intro, Apply + private Random rand = new Random(); + + private int codepointstogive = 0; + + private void btnresetallsettings_Click(object sender, EventArgs e) + { + API.CreateInfoboxSession("Reset all settings - Are you SURE?", "Are you absolutely sure you want to reset your ShiftOS to the default settings? You will lose the currently loaded settings and the action is NOT reversable.", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetInfoboxResult(); + if(result == "Yes") + { + Skinning.Utilities.loadedSkin = new Skinning.Skin(); + Skinning.Utilities.loadedskin_images = new Skinning.Images(); + Skinning.Utilities.saveskin(); + Skinning.Utilities.GenDefaultIconPack(); + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + API.CreateInfoboxSession("Settings reset.", "ShiftOS has tried to reset all settings and as far is it's aware, it succeeded. You may have to re-open some apps before the reset takes effect on them", infobox.InfoboxMode.Info); + codepointstogive = 0; + } + }; + } + + + + private void txtdesktoppanelheight_ValueChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.desktoppanelheight = Convert.ToInt16(txtdesktoppanelheight.Text); + SetPreviewSkin(false); + AddCP(1); + } + catch + { + txtdesktoppanelheight.Text = CustomizingSkin.desktoppanelheight.ToString(); + } + } + + private void SetupDesktopPanelValues() + { + txtdesktoppanelheight.Text = CustomizingSkin.desktoppanelheight.ToString(); + combodesktoppanelposition.Items.Clear(); + combodesktoppanelposition.Items.Add("Top"); + combodesktoppanelposition.Items.Add("Bottom"); + combodesktoppanelposition.Text = CustomizingSkin.desktoppanelposition; + pnldesktoppanelcolour.BackColor = CustomizingSkin.desktoppanelcolour; + pnldesktoppanelcolour.BackgroundImage = CustomizingImages.desktoppanel; + pnldesktoppanelcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktoppanellayout; + pnldesktopcolour.BackColor = CustomizingSkin.desktopbackgroundcolour; + pnldesktopcolour.BackgroundImage = CustomizingImages.desktopbackground; + pnldesktopcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.desktopbackgroundlayout; + } + + private void btndesktoppanel_Click(object sender, EventArgs e) + { + pnldesktoppaneloptions.Show(); + pnldesktoppaneloptions.BringToFront(); + SetupDesktopPanelValues(); + if(API.Upgrades["advanceddesktop"]) + { + lbpanelcolor.Hide(); + pnldesktoppanelcolour.Hide(); + lbheight.Hide(); + txtdesktoppanelheight.Hide(); + lbposition.Hide(); + combodesktoppanelposition.Hide(); + lbwarning.Text = "Desktop Panel customization has been moved from the Shifter! You can right-click panels to change their settings and add/remove widgets."; + } + } + + private void btnapply_Click(object sender, EventArgs e) + { + btnapply.BackColor = Color.Black; + btnapply.ForeColor = Color.White; + btnapply.Text = "Codepoints: " + codepointstogive.ToString(); + + Skinning.Utilities.loadedSkin = CustomizingSkin; + Skinning.Utilities.loadedskin_images = CustomizingImages; + API.CurrentSkin.DesktopPanels = JsonConvert.DeserializeObject<List<Skinning.DesktopPanel>>(File.ReadAllText(Paths.LoadedSkin + "panels.json")); + Skinning.Utilities.LoadPanels(); + Skinning.Utilities.saveimages(); + Skinning.Utilities.saveskin(); + API.AddCodepoints(codepointstogive); + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + codepointstogive = 0; + } + + private void combodesktoppanelposition_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.desktoppanelposition = combodesktoppanelposition.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private Color ColorToChange + { + get + { + return ctc; + } + } + + private Color ctc = Color.Black; + + private void ChangeDesktopPanelColor(object sender, MouseEventArgs e) + { + if(e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Desktop Panel Color", CustomizingSkin.desktoppanelcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.desktoppanelcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if(API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Desktop Panel", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if(result == "OK") + { + CustomizingImages.desktoppanel = API.GraphicPickerSession.IdleImage; + CustomizingSkin.desktoppanellayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetupAppLauncherValues() + { + txtappbuttonlabel.Text = CustomizingSkin.applicationlaunchername; + txtappbuttontextsize.Text = CustomizingSkin.applicationbuttontextsize.ToString(); + AddFonts(ref comboappbuttontextfont); + comboappbuttontextfont.Text = CustomizingSkin.applicationbuttontextfont; + ListFontStyles(ref comboappbuttontextstyle, CustomizingSkin.applicationbuttontextstyle); + txtapplauncherwidth.Text = CustomizingSkin.applaunchermenuholderwidth.ToString(); + txtapplicationsbuttonheight.Text = CustomizingSkin.applicationbuttonheight.ToString(); + pnlmaintextcolour.BackColor = CustomizingSkin.applicationsbuttontextcolour; + pnlmainbuttoncolour.BackColor = CustomizingSkin.applauncherbuttoncolour; + pnlmainbuttoncolour.BackgroundImage = CustomizingImages.applauncher; + pnlmainbuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.applauncherlayout; + pnlmainbuttonactivated.BackColor = CustomizingSkin.Menu_MenuItemPressedGradientBegin; + pnlalhover.BackColor = CustomizingSkin.applaunchermouseovercolour; + } + + private void SetAppLauncherTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("App Launcher Button Text Color", CustomizingSkin.applicationsbuttontextcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.applicationsbuttontextcolour = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetFontStyle(string newStyle, ref FontStyle oldStyle) + { + switch (newStyle) + { + case "Regular": + oldStyle = FontStyle.Regular; + break; + case "Bold": + oldStyle = FontStyle.Bold; + break; + case "Italic": + oldStyle = FontStyle.Italic; + break; + case "Underline": + oldStyle = FontStyle.Underline; + break; + } + } + + private void ListFontStyles(ref ComboBox list, FontStyle currentFontStyle) + { + list.Items.Clear(); + list.Items.Add("Regular"); + list.Items.Add("Bold"); + list.Items.Add("Italic"); + list.Items.Add("Underline"); + switch(currentFontStyle) + { + case FontStyle.Regular: + list.Text = "Regular"; + break; + case FontStyle.Bold: + list.Text = "Bold"; + break; + case FontStyle.Italic: + list.Text = "Italic"; + break; + case FontStyle.Underline: + list.Text = "Underline"; + break; + + } + } + + + private void txtappbuttonlabel_KeyDown(object sender, EventArgs e) + { + CustomizingSkin.applicationlaunchername = txtappbuttonlabel.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private void AddFonts(ref ComboBox fontList) + { + // Get the installed fonts collection. + System.Drawing.Text.InstalledFontCollection allFonts = new System.Drawing.Text.InstalledFontCollection(); + + // Get an array of the system's font families. + FontFamily[] fontFamilies = allFonts.Families; + + // Display the font families. + foreach (FontFamily myFont in fontFamilies) + { + fontList.Items.Add(myFont.Name); + } + //font_family + } + + private void btnapplauncher_Click(object sender, EventArgs e) + { + pnlapplauncheroptions.Show(); + pnlapplauncheroptions.BringToFront(); + SetPreviewSkin(true); + } + + private void txtappbuttontextsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.applicationbuttontextsize = Convert.ToInt16(txtappbuttontextsize.Text); + SetPreviewSkin(false); + AddCP(1); + } + catch + { + txtappbuttontextsize.Text = CustomizingSkin.applicationbuttontextsize.ToString(); + } + } + + private void comboappbuttontextfont_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.applicationbuttontextfont = comboappbuttontextfont.Text; + SetPreviewSkin(false); + AddCP(1); + } + + private void comboappbuttontextstyle_SelectedIndexChanged(object sender, EventArgs e) + { + SetFontStyle(comboappbuttontextstyle.Text, ref CustomizingSkin.applicationbuttontextstyle); + AddCP(1); + SetPreviewSkin(false); + } + + private void txtapplicationsbuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.applicationbuttonheight = Convert.ToInt16(txtapplicationsbuttonheight.Text); + SetPreviewSkin(false); + AddCP(1); + } + catch + { + txtapplicationsbuttonheight.Text = CustomizingSkin.applicationbuttonheight.ToString(); + } + } + + private void txtapplauncherwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.applaunchermenuholderwidth = Convert.ToInt16(txtapplauncherwidth.Text); + SetPreviewSkin(false); + AddCP(1); + } + catch + { + txtapplauncherwidth.Text = CustomizingSkin.applaunchermenuholderwidth.ToString(); + } + } + + private void ChangeMenuItemColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Color", CustomizingSkin.Menu_ToolStripDropDownBackground); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripDropDownBackground = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void ChangeMenuHighlight(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Mouse Over Color", CustomizingSkin.Menu_MenuItemSelected); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelected = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetALButtonColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Desktop Panel Color", CustomizingSkin.applauncherbuttoncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.applauncherbuttoncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("App Launcher Button", true); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.applauncher = API.GraphicPickerSession.IdleImage; + CustomizingSkin.applauncherlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.applauncherclick = API.GraphicPickerSession.MouseDownImage; + CustomizingImages.applaunchermouseover = API.GraphicPickerSession.MouseOverImage; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetALButtonClickedColor(object sender, MouseEventArgs e) + { + if(CustomizingImages.applauncherclick != null) + { + API.CreateInfoboxSession("Shifter - Error", "It appears you've set an image as the 'Activated' property of the App Launcher button, thus this setting is overidden by it. Please un-set the image to change this setting.", infobox.InfoboxMode.Info); + + } + else + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Button Activated", CustomizingSkin.Menu_MenuItemPressedGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemPressedGradientBegin = API.GetLastColorFromSession(); + CustomizingSkin.Menu_MenuItemPressedGradientMiddle = CustomizingSkin.Menu_MenuItemPressedGradientBegin; + CustomizingSkin.Menu_MenuItemPressedGradientEnd = CustomizingSkin.Menu_MenuItemPressedGradientBegin; + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + } + + private void ChangeDesktopBackground(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Desktop Background", CustomizingSkin.desktopbackgroundcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.desktopbackgroundcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Desktop Background", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.desktopbackground = API.GraphicPickerSession.IdleImage; + CustomizingSkin.desktopbackgroundlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void btndesktopitself_Click(object sender, EventArgs e) + { + pnldesktopbackgroundoptions.Show(); + pnldesktopbackgroundoptions.BringToFront(); + SetPreviewSkin(true); + } + + private void btnpanelbuttons_Click(object sender, EventArgs e) + { + pnlpanelbuttonsoptions.Show(); + pnlpanelbuttonsoptions.BringToFront(); + } + + public void SetupPanelButtonValues() + { + txtpanelbuttonwidth.Text = CustomizingSkin.panelbuttonwidth.ToString(); + pnlpanelbuttoncolour.BackColor = CustomizingSkin.panelbuttoncolour; + pnlpanelbuttoncolour.BackgroundImage = CustomizingImages.panelbutton; + pnlpanelbuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelbuttonlayout; + txtpanelbuttoninitalgap.Text = CustomizingSkin.panelbuttoninitialgap.ToString(); + txtpanelbuttonheight.Text = CustomizingSkin.panelbuttonheight.ToString(); + txtpanelbuttongap.Text = CustomizingSkin.panelbuttongap.ToString(); + AddFonts(ref cbpanelbuttonfont); + cbpanelbuttonfont.Text = CustomizingSkin.panelbuttontextfont; + ListFontStyles(ref cbpanelbuttontextstyle, CustomizingSkin.panelbuttontextstyle); + pnlpanelbuttontextcolour.BackColor = CustomizingSkin.panelbuttontextcolour; + txtpanelbuttoniconsize.Text = CustomizingSkin.panelbuttoniconsize.ToString(); + txtpanelbuttoniconside.Text = CustomizingSkin.panelbuttoniconside.ToString(); + txtpanelbuttonicontop.Text = CustomizingSkin.panelbuttonicontop.ToString(); + txtpaneltextbuttonsize.Text = CustomizingSkin.panelbuttontextsize.ToString(); + txtpanelbuttontextside.Text = CustomizingSkin.panelbuttontextside.ToString(); + txtpanelbuttontexttop.Text = CustomizingSkin.panelbuttontexttop.ToString(); + txtpanelbuttontop.Text = CustomizingSkin.panelbuttonfromtop.ToString(); + } + + private void txtpanelbuttonwidth_TextChanged(object sender, EventArgs e) + { + try { + CustomizingSkin.panelbuttonwidth = Convert.ToInt16(txtpanelbuttonwidth.Text); + AddCP(1); + } + catch{ + txtpanelbuttonwidth.Text = CustomizingSkin.panelbuttonwidth.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttoninitalgap_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttoninitialgap = Convert.ToInt16(txtpanelbuttoninitalgap.Text); + AddCP(1); + } + catch + { + txtpanelbuttoninitalgap.Text = CustomizingSkin.panelbuttoninitialgap.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttonheight = Convert.ToInt16(txtpanelbuttonheight.Text); + AddCP(1); + } + catch + { + txtpanelbuttonheight.Text = CustomizingSkin.panelbuttonheight.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttongap_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttongap = Convert.ToInt16(txtpanelbuttongap.Text); + AddCP(1); + } + catch + { + txtpanelbuttongap.Text = CustomizingSkin.panelbuttongap.ToString(); + } + SetPreviewSkin(false); + } + + private void cbpanelbuttonfont_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.panelbuttontextfont = (string)cbpanelbuttonfont.SelectedItem; + AddCP(1); + SetPreviewSkin(false); + } + + private void cbpanelbuttontextstyle_SelectedIndexChanged(object sender, EventArgs e) + { + SetFontStyle(cbpanelbuttontextstyle.SelectedItem.ToString(), ref CustomizingSkin.panelbuttontextstyle); + SetPreviewSkin(false); + + } + + private void SetPanelButtonTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Button Text", CustomizingSkin.panelbuttontextcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.panelbuttontextcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + + } + + private void SetPanelButtonColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Button", CustomizingSkin.panelbuttoncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.panelbuttoncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Panel Button", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.panelbutton = API.GraphicPickerSession.IdleImage; + CustomizingSkin.panelbuttonlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtpanelbuttoniconsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttoniconsize = Convert.ToInt16(txtpanelbuttoniconsize.Text); + AddCP(1); + } + catch + { + txtpanelbuttoniconsize.Text = CustomizingSkin.panelbuttoniconsize.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttoniconside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttoniconside = Convert.ToInt16(txtpanelbuttoniconside.Text); + AddCP(1); + } + catch + { + txtpanelbuttoniconside.Text = CustomizingSkin.panelbuttoniconside.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttonicontop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttonicontop = Convert.ToInt16(txtpanelbuttonicontop.Text); + AddCP(1); + } + catch + { + txtpanelbuttonicontop.Text = CustomizingSkin.panelbuttonicontop.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttontextside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttontextside = Convert.ToInt16(txtpanelbuttontextside.Text); + AddCP(1); + } + catch + { + txtpanelbuttontextside.Text = CustomizingSkin.panelbuttontextside.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttontexttop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttontexttop = Convert.ToInt16(txtpanelbuttontexttop.Text); + AddCP(1); + } + catch + { + txtpanelbuttontexttop.Text = CustomizingSkin.panelbuttontexttop.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpaneltextbuttonsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttontextsize = Convert.ToInt16(txtpaneltextbuttonsize.Text); + AddCP(1); + } + catch + { + txtpaneltextbuttonsize.Text = CustomizingSkin.panelbuttontextsize.ToString(); + } + SetPreviewSkin(false); + } + + private void txtpanelbuttontop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelbuttonfromtop = Convert.ToInt16(txtpanelbuttontop.Text); + AddCP(1); + } + catch + { + txtpanelbuttontop.Text = CustomizingSkin.panelbuttonfromtop.ToString(); + } + SetPreviewSkin(false); + } + + public void SetClockValues() + { + pnlpanelclocktextcolour.BackColor = CustomizingSkin.clocktextcolour; + pnlclockbackgroundcolour.BackColor = CustomizingSkin.clockbackgroundcolor; + pnlclockbackgroundcolour.BackgroundImage = CustomizingImages.panelclock; + pnlclockbackgroundcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.panelclocklayout; + AddFonts(ref comboclocktextfont); + comboclocktextfont.Text = CustomizingSkin.panelclocktextfont; + ListFontStyles(ref comboclocktextstyle, CustomizingSkin.panelclocktextstyle); + txtclocktextfromtop.Text = CustomizingSkin.panelclocktexttop.ToString(); + txtclocktextsize.Text = CustomizingSkin.panelclocktextsize.ToString(); + } + + private void SetClockTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Clock Text", CustomizingSkin.clocktextcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.clocktextcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetClockBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Panel Clock", CustomizingSkin.clockbackgroundcolor); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.clockbackgroundcolor = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Panel Clock", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.panelclock = API.GraphicPickerSession.IdleImage; + CustomizingSkin.panelclocklayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void btnpanelclock_Click(object sender, EventArgs e) + { + pnlpanelclockoptions.Show(); + pnlpanelclockoptions.BringToFront(); + } + + private void comboclocktextfont_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.panelclocktextfont = comboclocktextfont.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private void comboclocktextstyle_SelectedIndexChanged(object sender, EventArgs e) + { + SetFontStyle(comboclocktextstyle.Text, ref CustomizingSkin.panelclocktextstyle); + AddCP(1); + SetPreviewSkin(false); + } + + private void txtclocktextsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelclocktextsize = Convert.ToInt16(txtclocktextsize.Text); + AddCP(1); + } + catch + { + txtclocktextsize.Text = CustomizingSkin.panelclocktextsize.ToString(); + } + SetPreviewSkin(false); + } + + private void txtclocktextfromtop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.panelclocktexttop = Convert.ToInt16(txtclocktextfromtop.Text); + AddCP(1); + } + catch + { + txtclocktextfromtop.Text = CustomizingSkin.panelclocktexttop.ToString(); //Funny story: I accidentally assigned 'panelcocktexttop' to that property. xD - Michael VanOverbeek + } + SetPreviewSkin(false); + } + + private void SetALHoverColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("App Launcher Mouse Over", CustomizingSkin.applaunchermouseovercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.applaunchermouseovercolour = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + #endregion + + #region Title Text + public void SetupTitleTextValues() + { + txttitletexttop.Text = CustomizingSkin.titletextfromtop.ToString(); + txttitletextside.Text = CustomizingSkin.titletextfromside.ToString(); + combotitletextposition.Items.Clear(); + combotitletextposition.Items.Add("Left"); + combotitletextposition.Items.Add("Centre"); + combotitletextposition.Text = CustomizingSkin.titletextpos; + AddFonts(ref combotitletextfont); + combotitletextfont.Text = CustomizingSkin.titletextfontfamily; + ListFontStyles(ref combotitletextstyle, CustomizingSkin.titletextfontstyle); + pnltitletextcolour.BackColor = CustomizingSkin.titletextcolour; + txttitletextsize.Text = CustomizingSkin.titletextfontsize.ToString(); + } + + private void txttitletexttop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titletextfromtop = Convert.ToInt16(txttitletexttop.Text); + AddCP(1); + } + catch + { + txttitletexttop.Text = CustomizingSkin.titletextfromtop.ToString(); + } + SetPreviewSkin(false); + } + + private void txttitletextside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titletextfromside = Convert.ToInt16(txttitletextside.Text); + AddCP(1); + } + catch + { + txttitletextside.Text = CustomizingSkin.titletextfromside.ToString(); + } + SetPreviewSkin(false); + } + + private void combotitletextposition_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.titletextpos = combotitletextposition.Text; + CustomizingSkin.titletextposition = combotitletextposition.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private void combotitletextfont_SelectedIndexChanged(object sender, EventArgs e) + { + CustomizingSkin.titletextfontfamily = combotitletextfont.Text; + AddCP(1); + SetPreviewSkin(false); + } + + private void combotitletextstyle_SelectedIndexChanged(object sender, EventArgs e) + { + SetFontStyle(combotitletextstyle.Text, ref CustomizingSkin.titletextfontstyle); + SetPreviewSkin(false); + } + + private void txttitletextsize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titletextfontsize = Convert.ToInt16(txttitletextsize.Text); + AddCP(1); + } + catch + { + txttitletextsize.Text = CustomizingSkin.titletextfontsize.ToString(); + } + SetPreviewSkin(false); + } + + private void SetTitleTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Title Text", CustomizingSkin.titletextcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.titletextcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void btntitletext_Click(object sender, EventArgs e) + { + pnltitletextoptions.Show(); + pnltitletextoptions.BringToFront(); + } + #endregion + + #region Main Buttons + + private void btnmenus_Click(object sender, EventArgs e) + { + /*API.CreateInfoboxSession("Test", "Test", infobox.InfoboxMode.Info); + HideAll(); + pnlmenuoptions.Show(); + pnlmenuoptions.BringToFront(); + SetPreviewSkin(true);*/ + } + + private void Button2_Click(object sender, EventArgs e) + { + } + + private void Label68_Click(object sender, EventArgs e) + { + + } + + private void btntitlebar_Click(object sender, EventArgs e) + { + pnltitlebaroptions.Show(); + pnltitlebaroptions.BringToFront(); + SetPreviewSkin(true); + } + + private void btntitletext_Click_1(object sender, EventArgs e) + { + pnltitletextoptions.Show(); + pnltitletextoptions.BringToFront(); + SetPreviewSkin(true); + } + + private void btnbuttons_Click(object sender, EventArgs e) + { + pnlbuttonoptions.Show(); + pnlbuttonoptions.BringToFront(); + SetPreviewSkin(true); + } + + private void btnborders_Click(object sender, EventArgs e) + { + pnlborderoptions.Show(); + pnlborderoptions.BringToFront(); + SetPreviewSkin(true); + } + + #endregion + + #region Window Borders + + public void SetupBorderValues() + { + cbindividualbordercolours.Checked = IndividualBorders; + //hide/show labels + lbleft.Visible = IndividualBorders; + lbright.Visible = IndividualBorders; + lbbottom.Visible = IndividualBorders; + lbbright.Visible = IndividualBorders; + lbbleft.Visible = IndividualBorders; + //hide/show individual colors + pnlborderleftcolour.Visible = IndividualBorders; + pnlborderrightcolour.Visible = IndividualBorders; + pnlborderbottomcolour.Visible = IndividualBorders; + pnlborderbottomleftcolour.Visible = IndividualBorders; + pnlborderbottomrightcolour.Visible = IndividualBorders; + //main color + pnlbordercolour.BackColor = CustomizingSkin.borderleftcolour; + pnlbordercolour.BackgroundImage = CustomizingImages.borderleft; + pnlbordercolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderleftlayout; + //individual color + //left + pnlborderleftcolour.BackColor = CustomizingSkin.borderleftcolour; + pnlborderleftcolour.BackgroundImage = CustomizingImages.borderleft; + pnlborderleftcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderleftlayout; + //right + pnlborderrightcolour.BackColor = CustomizingSkin.borderrightcolour; + pnlborderrightcolour.BackgroundImage = CustomizingImages.borderright; + pnlborderrightcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderrightlayout; + //bottom + pnlborderbottomcolour.BackColor = CustomizingSkin.borderbottomcolour; + pnlborderbottomcolour.BackgroundImage = CustomizingImages.borderbottom; + pnlborderbottomcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.borderbottomlayout; + //bottom corners + pnlborderbottomleftcolour.BackColor = CustomizingSkin.bottomleftcornercolour; + pnlborderbottomleftcolour.BackgroundImage = CustomizingImages.bottomleftcorner; + pnlborderbottomleftcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomleftcornerlayout; + + pnlborderbottomrightcolour.BackColor = CustomizingSkin.bottomrightcornercolour; + pnlborderbottomrightcolour.BackgroundImage = CustomizingImages.bottomrightcorner; + pnlborderbottomrightcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.bottomrightcornerlayout; + + + //border width + txtbordersize.Text = CustomizingSkin.borderwidth.ToString(); + } + + private bool IndividualBorders = false; + + private void cbindividualbordercolours_CheckedChanged(object sender, EventArgs e) + { + IndividualBorders = cbindividualbordercolours.Checked; + SetPreviewSkin(true); + } + + private void SetMainBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.borderleftcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.borderleftcolour = API.GetLastColorFromSession(); + CustomizingSkin.borderrightcolour = API.GetLastColorFromSession(); + CustomizingSkin.borderbottomcolour = API.GetLastColorFromSession(); + CustomizingSkin.bottomleftcornercolour = API.GetLastColorFromSession(); + CustomizingSkin.bottomrightcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.borderleft = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderleftlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.borderright = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderrightlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.borderbottom = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderbottomlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.bottomleftcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.bottomleftcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + CustomizingImages.bottomrightcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.bottomrightcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetLeftBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.borderleftcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.borderleftcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.borderleft = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderleftlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetBottomBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.borderbottomcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.borderbottomcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.borderbottom = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderbottomlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetRightBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.borderrightcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.borderrightcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.borderright = API.GraphicPickerSession.IdleImage; + CustomizingSkin.borderrightlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetBottomLColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.bottomleftcornercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.bottomleftcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.bottomleftcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.bottomleftcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetBottomRBorderColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Border Color", CustomizingSkin.bottomrightcornercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.bottomrightcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Window Borders", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.bottomrightcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.bottomrightcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtbordersize_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.borderwidth = Convert.ToInt16(txtbordersize.Text); + AddCP(1); + } + catch + { + txtbordersize.Text = CustomizingSkin.borderwidth.ToString(); + } + SetPreviewSkin(false); + } + #endregion + + #region Title Bar + + public void SetupTitleBarValues() + { + //Main color + pnltitlebarcolour.BackColor = CustomizingSkin.titlebarcolour; + pnltitlebarcolour.BackgroundImage = CustomizingImages.titlebar; + pnltitlebarcolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.titlebarlayout; + //Corners + cboxtitlebarcorners.Checked = CustomizingSkin.enablecorners; + //Hide some options if corners are disabled. + lbcornerwidth.Visible = CustomizingSkin.enablecorners; + lbcornerwidthpx.Visible = CustomizingSkin.enablecorners; + lbleftcornercolor.Visible = CustomizingSkin.enablecorners; + lbrightcornercolor.Visible = CustomizingSkin.enablecorners; + pnltitlebarleftcornercolour.Visible = CustomizingSkin.enablecorners; + pnltitlebarrightcornercolour.Visible = CustomizingSkin.enablecorners; + txttitlebarcornerwidth.Visible = CustomizingSkin.enablecorners; + //Corner Width + txttitlebarcornerwidth.Text = CustomizingSkin.titlebarcornerwidth.ToString(); + //Left/Right colors + pnltitlebarleftcornercolour.BackColor = CustomizingSkin.leftcornercolour; + pnltitlebarleftcornercolour.BackgroundImage = CustomizingImages.leftcorner; + pnltitlebarleftcornercolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.leftcornerlayout; + + pnltitlebarrightcornercolour.BackColor = CustomizingSkin.rightcornercolour; + pnltitlebarrightcornercolour.BackgroundImage = CustomizingImages.rightcorner; + pnltitlebarrightcornercolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rightcornerlayout; + + //Height + txttitlebarheight.Text = CustomizingSkin.titlebarheight.ToString(); + + //Icon + txticonfromside.Text = CustomizingSkin.titleiconfromside.ToString(); + txticonfromtop.Text = CustomizingSkin.titleiconfromtop.ToString(); + + } + + private void SetTitlebarColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Titlebar Color", CustomizingSkin.titlebarcolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.titlebarcolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Titlebar", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.titlebar = API.GraphicPickerSession.IdleImage; + CustomizingSkin.titlebarlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void cboxtitlebarcorners_CheckedChanged(object sender, EventArgs e) + { + CustomizingSkin.enablecorners = cboxtitlebarcorners.Checked; + SetPreviewSkin(true); + } + + private void txttitlebarheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titlebarheight = Convert.ToInt16(txttitlebarheight.Text); + AddCP(1); + } + catch + { + txttitlebarheight.Text = CustomizingSkin.titlebarheight.ToString(); + } + SetPreviewSkin(false); + } + + private void txttitlebarcornerwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titlebarcornerwidth = Convert.ToInt16(txttitlebarcornerwidth.Text); + AddCP(1); + } + catch + { + txttitlebarcornerwidth.Text = CustomizingSkin.titlebarcornerwidth.ToString(); + } + SetPreviewSkin(false); + } + + private void SetLeftCornerColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Left Corner", CustomizingSkin.leftcornercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.leftcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Left Corner", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.leftcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.leftcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void SetRightCornerColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Right Corner", CustomizingSkin.rightcornercolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.rightcornercolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Right Corner", false); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.rightcorner = API.GraphicPickerSession.IdleImage; + CustomizingSkin.rightcornerlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txticonfromside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titleiconfromside = Convert.ToInt16(txticonfromside.Text); + AddCP(1); + } + catch + { + txticonfromside.Text = CustomizingSkin.titleiconfromside.ToString(); + } + SetPreviewSkin(false); + } + + private void txticonfromtop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.titleiconfromtop = Convert.ToInt16(txticonfromtop.Text); + AddCP(1); + } + catch + { + txticonfromtop.Text = CustomizingSkin.titleiconfromtop.ToString(); + } + SetPreviewSkin(false); + } + + #endregion + + #region Title Button Prep + private void combobuttonoption_SelectedIndexChanged(object sender, EventArgs e) + { + SetupButtonUI(combobuttonoption.Text); + } + + public void SetupButtonUI(string button) + { + pnlminimizebuttonoptions.Hide(); + pnlclosebuttonoptions.Hide(); + pnlrollupbuttonoptions.Hide(); + switch(button) + { + case "Close": + pnlclosebuttonoptions.Show(); + pnlclosebuttonoptions.BringToFront(); + break; + case "Roll Up": + pnlrollupbuttonoptions.Show(); + pnlrollupbuttonoptions.BringToFront(); + break; + case "Minimize": + pnlminimizebuttonoptions.Show(); + pnlminimizebuttonoptions.BringToFront(); + break; + } + SetPreviewSkin(true); + } + + public void SetupButtonValues() + { + ///Minimize + //Color + pnlminimizebuttoncolour.BackColor = CustomizingSkin.minbtncolour; + pnlminimizebuttoncolour.BackgroundImage = CustomizingImages.minbtn; + pnlminimizebuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.minbtnlayout; + //Width, Height + txtminimizebuttonheight.Text = CustomizingSkin.minbtnsize.Height.ToString(); + txtminimizebuttonwidth.Text = CustomizingSkin.minbtnsize.Width.ToString(); + //Side, Top + txtminimizebuttonside.Text = CustomizingSkin.minbtnfromside.ToString(); + txtminimizebuttontop.Text = CustomizingSkin.minbtnfromtop.ToString(); + + ///Rollup + //Color + pnlrollupbuttoncolour.BackColor = CustomizingSkin.rollbtncolour; + pnlrollupbuttoncolour.BackgroundImage = CustomizingImages.rollbtn; + pnlrollupbuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.rollbtnlayout; + //Width, Height + txtrollupbuttonheight.Text = CustomizingSkin.rollbtnsize.Height.ToString(); + txtrollupbuttonwidth.Text = CustomizingSkin.rollbtnsize.Width.ToString(); + //Side, Top + txtrollupbuttonside.Text = CustomizingSkin.rollbtnfromside.ToString(); + txtrollupbuttontop.Text = CustomizingSkin.rollbtnfromtop.ToString(); + + + ///Close + //Color + pnlclosebuttoncolour.BackColor = CustomizingSkin.closebtncolour; + pnlclosebuttoncolour.BackgroundImage = CustomizingImages.closebtn; + pnlclosebuttoncolour.BackgroundImageLayout = (ImageLayout)CustomizingSkin.closebtnlayout; + //Width, Height + txtclosebuttonheight.Text = CustomizingSkin.closebtnsize.Height.ToString(); + txtclosebuttonwidth.Text = CustomizingSkin.closebtnsize.Width.ToString(); + //Side, Top + txtclosebuttonfromside.Text = CustomizingSkin.closebtnfromside.ToString(); + txtclosebuttonfromtop.Text = CustomizingSkin.closebtnfromtop.ToString(); + + } + + + #endregion + + + #region Minimize + private void SetMinimizeColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Minimize Color", CustomizingSkin.minbtncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.minbtncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("Minimize Button", true); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.minbtn = API.GraphicPickerSession.IdleImage; + CustomizingImages.minbtnclick = API.GraphicPickerSession.MouseDownImage; + CustomizingImages.minbtnhover = API.GraphicPickerSession.MouseOverImage; + CustomizingSkin.minbtnlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtminimizebuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.minbtnsize.Height = Convert.ToInt16(txtminimizebuttonheight.Text); + AddCP(1); + } + catch + { + txtminimizebuttonheight.Text = CustomizingSkin.minbtnsize.Height.ToString(); + } + SetPreviewSkin(true); + } + + private void txtminimizebuttonwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.minbtnsize.Width = Convert.ToInt16(txtminimizebuttonwidth.Text); + AddCP(1); + } + catch + { + txtminimizebuttonwidth.Text = CustomizingSkin.minbtnsize.Width.ToString(); + } + SetPreviewSkin(true); + } + + private void txtminimizebuttontop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.minbtnfromtop = Convert.ToInt16(txtminimizebuttontop.Text); + AddCP(1); + } + catch + { + txtminimizebuttontop.Text = CustomizingSkin.minbtnfromtop.ToString(); + } + SetPreviewSkin(true); + } + + private void txtminimizebuttonside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.minbtnfromside = Convert.ToInt16(txtminimizebuttonside.Text); + AddCP(1); + } + catch + { + txtminimizebuttonside.Text = CustomizingSkin.minbtnfromside.ToString(); + } + SetPreviewSkin(true); + } + #endregion + + #region Rollup + private void SetrollupColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("rollup Color", CustomizingSkin.rollbtncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.rollbtncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("rollup Button", true); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.rollbtn = API.GraphicPickerSession.IdleImage; + CustomizingImages.rollbtnclick = API.GraphicPickerSession.MouseDownImage; + CustomizingImages.rollbtnhover = API.GraphicPickerSession.MouseOverImage; + CustomizingSkin.rollbtnlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtrollupbuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.rollbtnsize.Height = Convert.ToInt16(txtrollupbuttonheight.Text); + AddCP(1); + } + catch + { + txtrollupbuttonheight.Text = CustomizingSkin.rollbtnsize.Height.ToString(); + } + SetPreviewSkin(true); + } + + private void txtrollupbuttonwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.rollbtnsize.Width = Convert.ToInt16(txtrollupbuttonwidth.Text); + AddCP(1); + } + catch + { + txtrollupbuttonwidth.Text = CustomizingSkin.rollbtnsize.Width.ToString(); + } + SetPreviewSkin(true); + } + + private void txtrollupbuttontop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.rollbtnfromtop = Convert.ToInt16(txtrollupbuttontop.Text); + AddCP(1); + } + catch + { + txtrollupbuttontop.Text = CustomizingSkin.rollbtnfromtop.ToString(); + } + SetPreviewSkin(true); + } + + private void txtrollupbuttonside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.rollbtnfromside = Convert.ToInt16(txtrollupbuttonside.Text); + AddCP(1); + } + catch + { + txtrollupbuttonside.Text = CustomizingSkin.rollbtnfromside.ToString(); + } + SetPreviewSkin(true); + } + #endregion + + #region Close + private void SetcloseColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("close Color", CustomizingSkin.closebtncolour); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.closebtncolour = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + else + { + if (API.Upgrades["skinning"] == true) + { + API.CreateGraphicPickerSession("close Button", true); + API.GraphicPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetGraphicPickerResult(); + if (result == "OK") + { + CustomizingImages.closebtn = API.GraphicPickerSession.IdleImage; + CustomizingImages.closebtnclick = API.GraphicPickerSession.MouseDownImage; + CustomizingImages.closebtnhover = API.GraphicPickerSession.MouseOverImage; + CustomizingSkin.closebtnlayout = (int)API.GraphicPickerSession.ImageLayout; + SetPreviewSkin(true); + } + }; + } + } + } + + private void txtclosebuttonheight_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.closebtnsize.Height = Convert.ToInt16(txtclosebuttonheight.Text); + AddCP(1); + } + catch + { + txtclosebuttonheight.Text = CustomizingSkin.closebtnsize.Height.ToString(); + } + SetPreviewSkin(true); + } + + private void txtclosebuttonwidth_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.closebtnsize.Width = Convert.ToInt16(txtclosebuttonwidth.Text); + AddCP(1); + } + catch + { + txtclosebuttonwidth.Text = CustomizingSkin.closebtnsize.Width.ToString(); + } + SetPreviewSkin(true); + } + + private void txtclosebuttonfromtop_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.closebtnfromtop = Convert.ToInt16(txtclosebuttonfromtop.Text); + AddCP(1); + } + catch + { + txtclosebuttonfromtop.Text = CustomizingSkin.closebtnfromtop.ToString(); + } + SetPreviewSkin(true); + } + + private void txtclosebuttonfromside_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.closebtnfromside = Convert.ToInt16(txtclosebuttonfromside.Text); + AddCP(1); + } + catch + { + txtclosebuttonfromside.Text = CustomizingSkin.closebtnfromside.ToString(); + } + SetPreviewSkin(true); + } + #endregion + + #region Menus - Basic Tier + private void btnmenus_Click_1(object sender, EventArgs e) + { + HideAll(); + pnlmenus.Show(); + pnlmenus.BringToFront(); + SetPreviewSkin(true); + pnlmenusintro.BringToFront(); + } + + public void SetupBasicMenuValues() + { + //Menu strip + pnlmenubarbegin.BackColor = CustomizingSkin.Menu_MenuStripGradientBegin; + pnlmenubarend.BackColor = CustomizingSkin.Menu_MenuStripGradientEnd; + + //Toolstrip + pnltoolbarbegin.BackColor = CustomizingSkin.Menu_ToolStripGradientBegin; + pnltoolbarmiddle.BackColor = CustomizingSkin.Menu_ToolStripGradientMiddle; + pnltoolbarend.BackColor = CustomizingSkin.Menu_ToolStripGradientEnd; + + //Status + pnlstatusbegin.BackColor = CustomizingSkin.Menu_StatusStripGradientBegin; + pnlstatusend.BackColor = CustomizingSkin.Menu_StatusStripGradientEnd; + + //Dropdown BG + pnldropdownbg.BackColor = CustomizingSkin.Menu_ToolStripDropDownBackground; + + //Text Color + pnlmenutextcolor.BackColor = CustomizingSkin.Menu_TextColor; + } + + private void MenuBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Bar Begin", CustomizingSkin.Menu_MenuStripGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuStripGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MenuEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Bar End", CustomizingSkin.Menu_MenuStripGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuStripGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void ToolBarBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Tool Bar Begin", CustomizingSkin.Menu_ToolStripGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void ToolBarEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Tool Bar End", CustomizingSkin.Menu_ToolStripGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void ToolBarMiddle(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Tool Bar Middle", CustomizingSkin.Menu_ToolStripGradientMiddle); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripGradientMiddle = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void StatusBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Status Bar Begin", CustomizingSkin.Menu_StatusStripGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_StatusStripGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void StatusEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Status Bar End", CustomizingSkin.Menu_StatusStripGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_StatusStripGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void DropDownBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Dropdown BG", CustomizingSkin.Menu_ToolStripDropDownBackground); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ToolStripDropDownBackground = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void btnbasic_Click(object sender, EventArgs e) + { + pnlbasic.Show(); + pnlbasic.BringToFront(); + } + + private void SetMenuTextColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Text Color", CustomizingSkin.Menu_TextColor); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_TextColor = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + #endregion + + #region Menus - Dropdowns + private void btndropdown_Click(object sender, EventArgs e) + { + pnldropdown.Show(); + pnldropdown.BringToFront(); + SetPreviewSkin(true); + } + + public void SetupDropdownValues() + { + //Highlight Color - Basic + pnlhborder.BackColor = CustomizingSkin.Menu_MenuItemBorder; + pnlhcolor.BackColor = CustomizingSkin.Menu_MenuItemSelected; + + //Image Margin + pnlmarginbegin.BackColor = CustomizingSkin.Menu_ImageMarginGradientBegin; + pnlmarginmiddle.BackColor = CustomizingSkin.Menu_ImageMarginGradientMiddle; + pnlmarginend.BackColor = CustomizingSkin.Menu_ImageMarginGradientEnd; + + //Drop-Down Border + pnlddborder.BackColor = CustomizingSkin.Menu_MenuBorder; + } + + private void HighlightBorder(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Highlight Border", CustomizingSkin.Menu_MenuItemBorder); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemBorder = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void HighlightColor(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Highlight Color", CustomizingSkin.Menu_MenuItemSelected); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelected = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MarginBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Margin Begin", CustomizingSkin.Menu_ImageMarginGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ImageMarginGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MarginEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Margin End", CustomizingSkin.Menu_ImageMarginGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ImageMarginGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MarginMiddle(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Margin Middle", CustomizingSkin.Menu_ImageMarginGradientMiddle); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ImageMarginGradientMiddle = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void MenuBorder(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Border", CustomizingSkin.Menu_MenuBorder); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuBorder = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + #endregion + + public void SetupAdvancedMenuValues() + { + //Checkboxes + pnlcheckbg.BackColor = CustomizingSkin.Menu_CheckBackground; + + //Buttons - Highlight + pnlbuttonselected.BackColor = CustomizingSkin.Menu_ButtonSelectedHighlight; + pnlbuttonpressed.BackColor = CustomizingSkin.Menu_ButtonPressedHighlight; + pnlbuttonchecked.BackColor = CustomizingSkin.Menu_ButtonCheckedHighlight; + + //Advanced Buttons + pnlselectedbegin.BackColor = CustomizingSkin.Menu_ButtonSelectedGradientBegin; + pnlselectedmiddle.BackColor = CustomizingSkin.Menu_ButtonSelectedGradientMiddle; + pnlselectedend.BackColor = CustomizingSkin.Menu_ButtonSelectedGradientEnd; + + pnlpressedbegin.BackColor = CustomizingSkin.Menu_ButtonPressedGradientBegin; + pnlpressedmiddle.BackColor = CustomizingSkin.Menu_ButtonPressedGradientMiddle; + pnlpressedend.BackColor = CustomizingSkin.Menu_ButtonPressedGradientEnd; + + //Menu Items + pnlitemselected.BackColor = CustomizingSkin.Menu_MenuItemSelected; + pnlitemselectedbegin.BackColor = CustomizingSkin.Menu_MenuItemSelectedGradientBegin; + pnlitemselectedend.BackColor = CustomizingSkin.Menu_MenuItemSelectedGradientEnd; + + } + + private void btnadvanced_Click(object sender, EventArgs e) + { + pnladvanced.Show(); + pnladvanced.BringToFront(); + SetPreviewSkin(true); + } + + private void SetSelectedBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Selected Begin", CustomizingSkin.Menu_ButtonSelectedGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonSelectedGradientBegin = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetSelectedMiddle(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Selected Middle", CustomizingSkin.Menu_ButtonSelectedGradientMiddle); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonSelectedGradientMiddle = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetSelectedEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Selected End", CustomizingSkin.Menu_ButtonSelectedGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonSelectedGradientEnd = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetPressedBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Pressed Begin", CustomizingSkin.Menu_ButtonPressedGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonPressedGradientBegin = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonCheckedGradientBegin = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetPressedMiddle(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Pressed Middle", CustomizingSkin.Menu_ButtonPressedGradientMiddle); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonPressedGradientMiddle = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonCheckedGradientMiddle = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetPressedEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Pressed End", CustomizingSkin.Menu_ButtonPressedGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonPressedGradientEnd = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonCheckedGradientEnd = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void btnmorebuttons_Click(object sender, EventArgs e) + { + pnlmore.Show(); + pnlmore.BringToFront(); + SetPreviewSkin(true); + } + + private void SetCheckBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Checkbox Background", CustomizingSkin.Menu_CheckBackground); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_CheckBackground = API.GetLastColorFromSession(); + CustomizingSkin.Menu_CheckPressedBackground = API.GetLastColorFromSession(); + CustomizingSkin.Menu_CheckSelectedBackground = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetButtonCheckBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Checked Background", CustomizingSkin.Menu_ButtonCheckedHighlight); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonCheckedHighlight = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonCheckedHighlightBorder = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetButtonSelectedBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Selected Background", CustomizingSkin.Menu_ButtonSelectedHighlight); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonSelectedHighlight = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonSelectedHighlightBorder = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonSelectedBorder = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetButtonPressedBG(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Button Pressed Background", CustomizingSkin.Menu_ButtonPressedHighlight); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_ButtonPressedHighlight = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonPressedHighlightBorder = API.GetLastColorFromSession(); + CustomizingSkin.Menu_ButtonPressedBorder = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetItemSelected(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Selected", CustomizingSkin.Menu_MenuItemSelected); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelected = API.GetLastColorFromSession(); + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetItemSelectedBegin(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Selected Begin", CustomizingSkin.Menu_MenuItemSelectedGradientBegin); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelectedGradientBegin = API.GetLastColorFromSession(); + CustomizingSkin.Menu_MenuItemPressedGradientMiddle = API.GetLastColorFromSession(); + CustomizingSkin.Menu_MenuItemPressedGradientBegin = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void SetItemSelectedEnd(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + API.CreateColorPickerSession("Menu Item Selected End", CustomizingSkin.Menu_MenuItemSelectedGradientEnd); + API.ColorPickerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + CustomizingSkin.Menu_MenuItemSelectedGradientEnd = API.GetLastColorFromSession(); + CustomizingSkin.Menu_MenuItemPressedGradientEnd = API.GetLastColorFromSession(); + + SetPreviewSkin(true); + AddCP(rand.Next(0, 5)); + }; + } + } + + private void btnwindowcomposition_Click(object sender, EventArgs e) + { + HideAll(); + pnldesktopcomposition.Show(); + pnldesktopcomposition.BringToFront(); + pnlfancyintro.BringToFront(); + SetPreviewSkin(true); + } + + public void SetupWindowEffect<T>(ComboBox cb, T style) + { + cb.Items.Clear(); + var vals = Enum.GetValues(typeof(T)).Cast<T>(); + foreach(var item in vals) + { + cb.Items.Add(item.ToString()); + } + cb.SelectedItem = style.ToString(); + } + + public void SetAnimation<T>(ComboBox cb, ref T objToSet) + { + string text = cb.SelectedItem.ToString(); + var vals = Enum.GetValues(typeof(T)).Cast<T>(); + foreach (var item in vals) + { + if(item.ToString() == text) + { + objToSet = item; + codepointstogive += 1; + } + } + + } + + public void SetupAnimationStyleValues() + { + SetupWindowEffect<WindowAnimationStyle>(cbopenanim, CustomizingSkin.WindowOpenAnimation); + SetupWindowEffect<WindowAnimationStyle>(cbcloseanim, CustomizingSkin.WindowCloseAnimation); + SetupWindowEffect<WindowDragEffect>(cbdrageffect, CustomizingSkin.DragAnimation); + + //Drag fade. + txtfadespeed.Text = CustomizingSkin.DragFadeInterval.ToString(); + txtdragfadedec.Text = ((decimal)CustomizingSkin.DragFadeSpeed).ToString(); + txtdragopacitydec.Text = ((decimal)CustomizingSkin.DragFadeLevel).ToString(); + + //Drag Shake + txtshakeminoffset.Text = CustomizingSkin.ShakeMinOffset.ToString(); + txtshakemax.Text = CustomizingSkin.ShakeMaxOffset.ToString(); + + //Window Fade + txtwinfadespeed.Text = CustomizingSkin.WindowFadeTime.ToString(); + txtwinfadedec.Text = CustomizingSkin.WindowFadeSpeed.ToString(); + + } + + + private void btnfancywindows_Click(object sender, EventArgs e) + { + pnlfancywindows.BringToFront(); + SetPreviewSkin(true); + } + + private void cbopenanim_SelectedIndexChanged(object sender, EventArgs e) + { + SetAnimation<WindowAnimationStyle>(cbopenanim, ref CustomizingSkin.WindowOpenAnimation); + } + + private void cbcloseanim_SelectedIndexChanged(object sender, EventArgs e) + { + SetAnimation<WindowAnimationStyle>(cbcloseanim, ref CustomizingSkin.WindowCloseAnimation); + } + + private void cbdrageffect_SelectedIndexChanged(object sender, EventArgs e) + { + SetAnimation<WindowDragEffect>(cbdrageffect, ref CustomizingSkin.DragAnimation); + } + + private void txtfadespeed_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.DragFadeInterval = Convert.ToInt32(txtfadespeed.Text); + AddCP(1); + } + catch + { + txtfadespeed.Text = CustomizingSkin.DragFadeInterval.ToString(); + } + } + + private void txtdragfadedec_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.DragFadeSpeed = Convert.ToDouble(txtdragfadedec.Text); + AddCP(1); + } + catch + { + txtdragfadedec.Text = CustomizingSkin.DragFadeSpeed.ToString(); + } + } + + private void btnfancydragging_Click(object sender, EventArgs e) + { + pnlfancydragging.Show(); + pnlfancydragging.BringToFront(); + SetPreviewSkin(true); + } + + private void txtdragopacitydec_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.DragFadeLevel = Convert.ToDouble(txtdragopacitydec.Text); + AddCP(1); + } + catch + { + txtdragopacitydec.Text = CustomizingSkin.DragFadeLevel.ToString(); + } + } + + private void txtshakemax_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.ShakeMaxOffset = Convert.ToInt32(txtshakemax.Text); + AddCP(1); + } + catch + { + txtshakemax.Text = CustomizingSkin.ShakeMaxOffset.ToString(); + } + } + + private void txtshakeminoffset_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.ShakeMinOffset = Convert.ToInt32(txtshakeminoffset.Text); + AddCP(1); + } + catch + { + txtshakeminoffset.Text = CustomizingSkin.ShakeMinOffset.ToString(); + } + } + + private void txtwinfadespeed_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.WindowFadeTime = Convert.ToInt32(txtwinfadespeed.Text); + AddCP(1); + } + catch + { + txtwinfadespeed.Text = CustomizingSkin.WindowFadeTime.ToString(); + } + } + + private void txtwinfadedec_TextChanged(object sender, EventArgs e) + { + try + { + CustomizingSkin.WindowFadeSpeed = Convert.ToDecimal(txtwinfadedec.Text); + AddCP(1); + } + catch + { + txtwinfadedec.Text = CustomizingSkin.WindowFadeSpeed.ToString(); + } + } + + private void btnmore_Click(object sender, EventArgs e) + { + pnlluaoptions.Show(); + pnlluaoptions.BringToFront(); + SetupLuaUI(); + + } + + public void SetupLuaUI() + { + pnlluafield.Controls.Clear(); + flmorebuttons.Controls.Clear(); + if (API.LuaShifterRegistry == null) + { + var l = new Label(); + l.Dock = DockStyle.Fill; + l.TextAlign = ContentAlignment.MiddleCenter; + l.Font = new Font("Microsoft Sans Serif", 12); + l.Text = @"Nothing to show here. + +There are no options to show here yet. + +You can add options in the Lua interpreter using the shifter_add_category(string name), shifter_add_value(string category, string name, value), and shifter_remove_category(string name) methods. Applications may also add their own values."; + pnlluafield.Controls.Add(l); + l.Show(); + } + else + { + foreach (var kv in API.LuaShifterRegistry) + { + var b = new Button(); + b.Text = kv.Key; + b.FlatStyle = FlatStyle.Flat; + b.AutoSize = true; + b.AutoSizeMode = AutoSizeMode.GrowAndShrink; + flmorebuttons.Controls.Add(b); + b.Show(); + b.Click += (object s, EventArgs a) => + { + SetupLuaForm(kv.Value); + }; + } + } + } + + public void SetupLuaForm(Dictionary<string, object> d) + { + pnlluafield.Controls.Clear(); + foreach(var kv in d) + { + IShifterSetting l = new ShifterTextInput(); + if (kv.Value is string) + l = new ShifterTextInput(); + if (kv.Value is Image) + l = new ShifterGraphicInput(); + if (kv.Value is Color) + l = new ShifterColorInput(); + if (kv.Value is int || kv.Value is float || kv.Value is double || kv.Value is decimal) + l = new ShifterIntInput(); + if(l is ShifterIntInput) + { + var i = l as ShifterIntInput; + if (kv.Value is int) + i.NoDecimal = true; + else + i.NoDecimal = false; + } + if (pnlluafield.Controls.Count > 0) + { + var ctrl = pnlluafield.Controls[pnlluafield.Controls.Count - 1]; + l.Location = new Point(ctrl.Left + ctrl.Width + 5, ctrl.Top); + if(l.Left + l.Width > pnlluafield.Width) + { + l.Left = 2; + l.Top = ctrl.Top + ctrl.Height + 2; + } + } + else + { + l.Location = new Point(2, 2); + } + + pnlluafield.Controls.Add(l); + l.Show(); + l.Font = new Font("Microsoft Sans Serif", 9); + l.Text = kv.Key; + l.Value = kv.Value; + l.OnValueChange += (hello, its_me) => + { + foreach(var dict in API.LuaShifterRegistry) + { + if(API.LuaShifterRegistry[dict.Key] == d) + { + API.LuaShifterRegistry[dict.Key][kv.Key] = l.Value; + } + } + }; + + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Shifter.resx b/source/WindowsFormsApplication1/Apps/Shifter.resx new file mode 100644 index 0000000..2b9e8c1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shifter.resx @@ -0,0 +1,161 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="ColorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="clocktick.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>140, 17</value> + </metadata> + <metadata name="customizationtime.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>238, 17</value> + </metadata> + <metadata name="timerearned.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>390, 17</value> + </metadata> + <data name="Label64.Text" xml:space="preserve"> + <value>The Shifter is your one-stop shop for customizing every aspect of ShiftOS. From colors to fonts, from images to sizes and locations, we have it all! + +Simply click the buttons on the right to choose a category, and then from there, choose a sub-category, and have fun customizing! In ShiftOS, the sky and your hard drive space is the limit!</value> + </data> + <metadata name="predesktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>508, 17</value> + </metadata> + <metadata name="predesktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>508, 17</value> + </metadata> + <data name="Label109.Text" xml:space="preserve"> + <value>Have you made a nice skin and want a clean slate to make another? Do you want to reverse back to regular ShiftOS? Well, fear not, the 'Reset' button is here. Just click it, and ShiftOS will wok it's magic.</value> + </data> + <data name="label116.Text" xml:space="preserve"> + <value>The Advanced Shifter allows you to customize even more of ShiftOS by letting you customize virtually every aspect of the various menus in ShiftOS. + +These menus include the App Launcher menu, any context menus, and any toolbars within applications. + +There's a lot to customize, so we've grouped everything into categories on the left. + +Customize to your heart's content!</value> + </data> + <metadata name="tmrfix.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>673, 17</value> + </metadata> + <metadata name="tmrdelay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>756, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs b/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs new file mode 100644 index 0000000..5d20f14 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftnet.Designer.cs @@ -0,0 +1,144 @@ +namespace ShiftOS +{ + partial class Shiftnet + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.pnlcontrols = new System.Windows.Forms.Panel(); + this.btngo = new System.Windows.Forms.Button(); + this.btnhome = new System.Windows.Forms.Button(); + this.txtaddress = new System.Windows.Forms.TextBox(); + this.wbshiftnet = new System.Windows.Forms.WebBrowser(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlcontrols.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // pnlcontrols + // + this.pnlcontrols.BackColor = System.Drawing.Color.Gray; + this.pnlcontrols.Controls.Add(this.btngo); + this.pnlcontrols.Controls.Add(this.btnhome); + this.pnlcontrols.Controls.Add(this.txtaddress); + this.pnlcontrols.Dock = System.Windows.Forms.DockStyle.Top; + this.pnlcontrols.Location = new System.Drawing.Point(0, 0); + this.pnlcontrols.Name = "pnlcontrols"; + this.pnlcontrols.Size = new System.Drawing.Size(792, 42); + this.pnlcontrols.TabIndex = 0; + // + // btngo + // + this.btngo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btngo.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btngo.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btngo.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btngo.ForeColor = System.Drawing.Color.White; + this.btngo.Location = new System.Drawing.Point(731, 9); + this.btngo.Name = "btngo"; + this.btngo.Size = new System.Drawing.Size(45, 23); + this.btngo.TabIndex = 2; + this.btngo.Text = "Go"; + this.btngo.UseVisualStyleBackColor = true; + this.btngo.Click += new System.EventHandler(this.btngo_Click); + // + // btnhome + // + this.btnhome.DialogResult = System.Windows.Forms.DialogResult.Cancel; + this.btnhome.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnhome.Font = new System.Drawing.Font("Times New Roman", 8.25F); + this.btnhome.ForeColor = System.Drawing.Color.White; + this.btnhome.Location = new System.Drawing.Point(4, 12); + this.btnhome.Name = "btnhome"; + this.btnhome.Size = new System.Drawing.Size(75, 23); + this.btnhome.TabIndex = 1; + this.btnhome.Text = "Home"; + this.btnhome.UseVisualStyleBackColor = true; + this.btnhome.Click += new System.EventHandler(this.btnhome_Click); + // + // txtaddress + // + this.txtaddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtaddress.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtaddress.Font = new System.Drawing.Font("Times New Roman", 13F); + this.txtaddress.Location = new System.Drawing.Point(85, 12); + this.txtaddress.Name = "txtaddress"; + this.txtaddress.Size = new System.Drawing.Size(640, 20); + this.txtaddress.TabIndex = 0; + this.txtaddress.Text = "shiftnet://main"; + // + // wbshiftnet + // + this.wbshiftnet.AllowWebBrowserDrop = false; + this.wbshiftnet.Dock = System.Windows.Forms.DockStyle.Fill; + this.wbshiftnet.IsWebBrowserContextMenuEnabled = false; + this.wbshiftnet.Location = new System.Drawing.Point(0, 42); + this.wbshiftnet.MinimumSize = new System.Drawing.Size(20, 20); + this.wbshiftnet.Name = "wbshiftnet"; + this.wbshiftnet.Size = new System.Drawing.Size(792, 463); + this.wbshiftnet.TabIndex = 1; + this.wbshiftnet.Navigating += new System.Windows.Forms.WebBrowserNavigatingEventHandler(this.LinkInterceptor); + // + // panel1 + // + this.panel1.Controls.Add(this.wbshiftnet); + this.panel1.Controls.Add(this.pnlcontrols); + 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(792, 505); + this.panel1.TabIndex = 2; + // + // Shiftnet + // + this.AcceptButton = this.btngo; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.btnhome; + this.ClientSize = new System.Drawing.Size(792, 505); + this.Controls.Add(this.panel1); + this.Name = "Shiftnet"; + this.Text = "MainForm"; + this.Load += new System.EventHandler(this.MainForm_Load); + this.pnlcontrols.ResumeLayout(false); + this.pnlcontrols.PerformLayout(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel pnlcontrols; + private System.Windows.Forms.WebBrowser wbshiftnet; + private System.Windows.Forms.Button btngo; + private System.Windows.Forms.Button btnhome; + private System.Windows.Forms.TextBox txtaddress; + private System.Windows.Forms.Panel panel1; + + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shiftnet.cs b/source/WindowsFormsApplication1/Apps/Shiftnet.cs new file mode 100644 index 0000000..cbcab1b --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftnet.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 System.Net; + +namespace ShiftOS +{ + public partial class Shiftnet : Form + { + public Shiftnet() + { + InitializeComponent(); + } + + private void MainForm_Load(object sender, EventArgs e) + { + InitialSetup(); + } + + public void InitialSetup() + { + pnlcontrols.BackColor = API.CurrentSkin.titlebarcolour; + wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main"); + txtaddress.Text = WebLayer.LastUrl; + } + + private void LinkInterceptor(object sender, WebBrowserNavigatingEventArgs e) + { + var url = e.Url.OriginalString; + if (url != "about:blank") + { + var surl = url.Replace("http://", "shiftnet://"); + wbshiftnet.DocumentText = WebLayer.VisitSite(surl); + txtaddress.Text = WebLayer.LastUrl; + } + } + + private void btngo_Click(object sender, EventArgs e) + { + if (txtaddress.Text.ToLower().StartsWith("shiftnet://")) + { + wbshiftnet.DocumentText = WebLayer.VisitSite(txtaddress.Text); + txtaddress.Text = WebLayer.LastUrl; + } + else + { + wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://not_found"); + txtaddress.Text = WebLayer.LastUrl; + } + } + + private void btnhome_Click(object sender, EventArgs e) + { + wbshiftnet.DocumentText = WebLayer.VisitSite("shiftnet://main"); + txtaddress.Text = WebLayer.LastUrl; + } + } + + public class WebLayer + { + private static string HtmlTemplate = "<html><head><title>Shiftnet Page</title><link rel=\"stylesheet\" href=\"http://playshiftos.ml/shiftnet.css\"/></head><body>#BODY#</body></html>"; + public static string LastUrl = null; + + public static string VisitSite(string url) + { + var wc = new WebClient(); + if (url.ToLower().EndsWith(".stml") || url.ToLower().EndsWith(".rnp")) + { + try + { + string content = wc.DownloadString(url.Replace("shiftnet://", "http://www.playshiftos.ml/shiftnet/www/")); + if (content.StartsWith("<!STML>")) + { + LastUrl = url; + return HtmlTemplate.Replace("#BODY#", content.Replace("<!STML>", "")); + } + else + { + LastUrl = "shiftnet:not_found"; + + return HtmlTemplate.Replace("#BODY#", "That page was not found."); + } + } + catch + { + LastUrl = "shiftnet://not_found"; + return HtmlTemplate.Replace("#BODY#", "That page was not found."); + } + } + else + { + if (url.EndsWith("/")) + { + return VisitSite(url + "home.rnp"); + } + else + { + return VisitSite(url + "/home.rnp"); + } + + } + } + } + +} diff --git a/source/WindowsFormsApplication1/Apps/Shiftnet.resx b/source/WindowsFormsApplication1/Apps/Shiftnet.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftnet.resx @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.Designer.cs b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.Designer.cs new file mode 100644 index 0000000..3f7d4a7 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.Designer.cs @@ -0,0 +1,170 @@ +namespace ShiftOS +{ + partial class ShiftnetDecryptor + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.label1 = new System.Windows.Forms.Label(); + this.txtstatus = new System.Windows.Forms.RichTextBox(); + this.txtaddress = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.btnstart = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.tmrdecrypt = new System.Windows.Forms.Timer(this.components); + this.pgstatus = new ShiftOS.ProgressBarEX(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // label1 + // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(744, 43); + this.label1.TabIndex = 1; + this.label1.Text = " == Decryption Status =="; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // txtstatus + // + this.txtstatus.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.txtstatus.BackColor = System.Drawing.Color.Black; + this.txtstatus.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtstatus.ForeColor = System.Drawing.Color.White; + this.txtstatus.Location = new System.Drawing.Point(17, 151); + this.txtstatus.Name = "txtstatus"; + this.txtstatus.ReadOnly = true; + this.txtstatus.Size = new System.Drawing.Size(740, 280); + this.txtstatus.TabIndex = 2; + this.txtstatus.Text = ""; + // + // txtaddress + // + this.txtaddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtaddress.BackColor = System.Drawing.Color.Gray; + this.txtaddress.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtaddress.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.txtaddress.Location = new System.Drawing.Point(100, 121); + this.txtaddress.Name = "txtaddress"; + this.txtaddress.Size = new System.Drawing.Size(590, 16); + this.txtaddress.TabIndex = 3; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(18, 124); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(48, 13); + this.label2.TabIndex = 4; + this.label2.Text = "Address:"; + // + // btnstart + // + this.btnstart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnstart.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnstart.Location = new System.Drawing.Point(697, 119); + this.btnstart.Name = "btnstart"; + this.btnstart.Size = new System.Drawing.Size(60, 23); + this.btnstart.TabIndex = 5; + this.btnstart.Text = "Start"; + this.btnstart.UseVisualStyleBackColor = true; + this.btnstart.Click += new System.EventHandler(this.btnstart_Click); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.btnstart); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.txtaddress); + this.panel1.Controls.Add(this.txtstatus); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.pgstatus); + 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(769, 443); + this.panel1.TabIndex = 6; + // + // tmrdecrypt + // + this.tmrdecrypt.Tick += new System.EventHandler(this.tmrdecrypt_Tick); + // + // pgstatus + // + this.pgstatus.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pgstatus.BackColor = System.Drawing.Color.Black; + this.pgstatus.BlockSeparation = 3; + this.pgstatus.BlockWidth = 5; + this.pgstatus.Color = System.Drawing.Color.Gray; + this.pgstatus.ForeColor = System.Drawing.Color.White; + this.pgstatus.Location = new System.Drawing.Point(13, 59); + this.pgstatus.MaxValue = 100; + this.pgstatus.MinValue = 0; + this.pgstatus.Name = "pgstatus"; + this.pgstatus.Orientation = ShiftOS.ProgressBarEX.ProgressBarOrientation.Horizontal; + this.pgstatus.ShowValue = true; + this.pgstatus.Size = new System.Drawing.Size(744, 32); + this.pgstatus.Step = 10; + this.pgstatus.Style = ShiftOS.ProgressBarEX.ProgressBarExStyle.Blocks; + this.pgstatus.TabIndex = 0; + this.pgstatus.Value = 0; + // + // ShiftnetDecryptor + // + this.AcceptButton = this.btnstart; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(769, 443); + this.Controls.Add(this.panel1); + this.Name = "ShiftnetDecryptor"; + this.Text = "ShiftnetDecryptor"; + this.Load += new System.EventHandler(this.ShiftnetDecryptor_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private ProgressBarEX pgstatus; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.RichTextBox txtstatus; + private System.Windows.Forms.TextBox txtaddress; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Button btnstart; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Timer tmrdecrypt; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.cs b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.cs new file mode 100644 index 0000000..dbf086e --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class ShiftnetDecryptor : Form + { + public ShiftnetDecryptor() + { + InitializeComponent(); + } + + int i = 0; + string currentaddress = null; + string encrypted_contents = null; + + public void WriteLine(string line) + { + if(txtstatus.Text == "") + { + txtstatus.Text = line; + } + else + { + txtstatus.Text += Environment.NewLine + line; + } + } + + private void RecursiveControlSetup(Control ctrl) + { + ctrl.Font = new Font(OSInfo.GetMonospaceFont(), ctrl.Font.Size); + try + { + var pnl = (Panel)ctrl; + foreach (Control c in pnl.Controls) + { + RecursiveControlSetup(c); + } + } + catch + { + + } + } + + private void tmrdecrypt_Tick(object sender, EventArgs e) + { + switch (i) + { + case 0: + currentaddress = txtaddress.Text; + WriteLine("Checking URL..."); + if(!currentaddress.StartsWith("shiftnet://")) + { + WriteLine(" *** ERROR: Invalid URL."); + tmrdecrypt.Stop(); + btnstart.Enabled = true; + txtaddress.Enabled = true; + } + break; + case 5: + WriteLine("Making connection to Shiftnet..."); + currentaddress = currentaddress.Replace("shiftnet://", "http://playshiftos.ml/shiftnet/www/"); + break; + case 25: + WriteLine("Checking file..."); + if(!currentaddress.EndsWith(".enc")) + { + WriteLine(" *** ERROR: File not valid, must be of type .enc (encrypted file)"); + tmrdecrypt.Stop(); + btnstart.Enabled = true; + txtaddress.Enabled = true; + } + break; + case 27: + WriteLine("Downloading file contents..."); + try + { + encrypted_contents = new WebClient().DownloadString(currentaddress); + } + catch + { + WriteLine(" *** ERROR: Remote file could not be accessed."); + tmrdecrypt.Stop(); + btnstart.Enabled = true; + txtaddress.Enabled = true; + } + break; + case 30: + WriteLine("Download successful. Determining encryption algorithm. This may take a bit..."); + break; + case 75: + int r = new Random().Next(0, 100); + if(r >= 25 && r <= 75) + { + WriteLine("Encryption algorithm determined, beginning decryption."); + } + else + { + WriteLine("Decryption failed."); + tmrdecrypt.Stop(); + btnstart.Enabled = true; + txtaddress.Enabled = true; + } + break; + case 95: + string decrypted = API.Encryption.Decrypt(encrypted_contents); + int lastslash = currentaddress.LastIndexOf("/"); + int len = currentaddress.Length - lastslash; + string fname = currentaddress.Substring(lastslash, len).Replace(".enc", ".lua"); + WriteLine("Decryption successful. Saving to /Home/Decryptions/" + fname + "..."); + if(!Directory.Exists(Paths.Home + "Decryptions")) + { + Directory.CreateDirectory(Paths.Home + "Decryptions"); + } + File.WriteAllText(Paths.Home + $"Decryptions{OSInfo.DirectorySeparator}{fname}", decrypted); + break; + case 100: + WriteLine("Decryption successful."); + tmrdecrypt.Stop(); + currentaddress = null; + i = 0; + encrypted_contents = null; + btnstart.Enabled = true; + txtaddress.Enabled = true; + + break; + } + + i += 1; + pgstatus.Value = i; + } + + private void btnstart_Click(object sender, EventArgs e) + { + i = 0; + tmrdecrypt.Start(); + btnstart.Enabled = false; + txtaddress.Enabled = false; + } + + private void ShiftnetDecryptor_Load(object sender, EventArgs e) + { + RecursiveControlSetup(panel1); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.resx b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.resx new file mode 100644 index 0000000..34bb249 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/ShiftnetDecryptor.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="tmrdecrypt.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shiftorium.Designer.cs b/source/WindowsFormsApplication1/Apps/Shiftorium.Designer.cs new file mode 100644 index 0000000..e5b4498 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftorium.Designer.cs @@ -0,0 +1,322 @@ +using System; + +namespace Shiftorium +{ + partial class Frontend + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Frontend)); + this.pgcontents = new System.Windows.Forms.Panel(); + this.lbcodepoints = new System.Windows.Forms.Label(); + this.lbupgrades = new System.Windows.Forms.ListView(); + this.Label1 = new System.Windows.Forms.Label(); + this.pnlinfo = new System.Windows.Forms.Panel(); + this.pnlintro = new System.Windows.Forms.Panel(); + this.Label4 = new System.Windows.Forms.Label(); + this.Label2 = new System.Windows.Forms.Label(); + this.Label5 = new System.Windows.Forms.Label(); + this.btnbuy = new System.Windows.Forms.Button(); + this.lbprice = new System.Windows.Forms.Label(); + this.picpreview = new System.Windows.Forms.PictureBox(); + this.lbudescription = new System.Windows.Forms.Label(); + this.lbupgradename = new System.Windows.Forms.Label(); + this.tmrcodepointsupdate = new System.Windows.Forms.Timer(this.components); + this.btnback = new System.Windows.Forms.Button(); + this.btnforward = new System.Windows.Forms.Button(); + this.lbcategory = new System.Windows.Forms.Label(); + this.btnhack = new System.Windows.Forms.Button(); + this.pgcontents.SuspendLayout(); + this.pnlinfo.SuspendLayout(); + this.pnlintro.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picpreview)).BeginInit(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.btnhack); + this.pgcontents.Controls.Add(this.lbcategory); + this.pgcontents.Controls.Add(this.btnforward); + this.pgcontents.Controls.Add(this.btnback); + this.pgcontents.Controls.Add(this.lbcodepoints); + this.pgcontents.Controls.Add(this.lbupgrades); + this.pgcontents.Controls.Add(this.Label1); + this.pgcontents.Controls.Add(this.pnlinfo); + 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(701, 462); + this.pgcontents.TabIndex = 0; + this.pgcontents.TabStop = true; + // + // lbcodepoints + // + this.lbcodepoints.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbcodepoints.ForeColor = System.Drawing.Color.Black; + this.lbcodepoints.Location = new System.Drawing.Point(16, 372); + this.lbcodepoints.Name = "lbcodepoints"; + this.lbcodepoints.Size = new System.Drawing.Size(309, 43); + this.lbcodepoints.TabIndex = 8; + this.lbcodepoints.Text = "Codepoints: 25"; + this.lbcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbupgrades + // + this.lbupgrades.BackColor = System.Drawing.Color.White; + this.lbupgrades.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.lbupgrades.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbupgrades.ForeColor = System.Drawing.Color.Black; + this.lbupgrades.Location = new System.Drawing.Point(21, 101); + this.lbupgrades.MultiSelect = false; + this.lbupgrades.Name = "lbupgrades"; + this.lbupgrades.Size = new System.Drawing.Size(304, 254); + this.lbupgrades.TabIndex = 0; + this.lbupgrades.UseCompatibleStateImageBehavior = false; + this.lbupgrades.View = System.Windows.Forms.View.Details; + this.lbupgrades.SelectedIndexChanged += new System.EventHandler(this.lbupgrades_SelectedIndexChanged); + // + // Label1 + // + this.Label1.AutoSize = true; + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 26.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.ForeColor = System.Drawing.Color.Black; + this.Label1.Location = new System.Drawing.Point(85, 17); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(175, 39); + this.Label1.TabIndex = 1; + this.Label1.Text = "Upgrades"; + // + // pnlinfo + // + this.pnlinfo.Controls.Add(this.pnlintro); + this.pnlinfo.Controls.Add(this.btnbuy); + this.pnlinfo.Controls.Add(this.lbprice); + this.pnlinfo.Controls.Add(this.picpreview); + this.pnlinfo.Controls.Add(this.lbudescription); + this.pnlinfo.Controls.Add(this.lbupgradename); + this.pnlinfo.Dock = System.Windows.Forms.DockStyle.Right; + this.pnlinfo.Location = new System.Drawing.Point(332, 0); + this.pnlinfo.Name = "pnlinfo"; + this.pnlinfo.Size = new System.Drawing.Size(369, 462); + this.pnlinfo.TabIndex = 0; + // + // pnlintro + // + this.pnlintro.Controls.Add(this.Label4); + this.pnlintro.Controls.Add(this.Label2); + this.pnlintro.Controls.Add(this.Label5); + this.pnlintro.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlintro.Location = new System.Drawing.Point(0, 0); + this.pnlintro.Name = "pnlintro"; + this.pnlintro.Size = new System.Drawing.Size(369, 462); + this.pnlintro.TabIndex = 8; + this.pnlintro.TabStop = true; + // + // Label4 + // + this.Label4.AutoSize = true; + this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label4.Location = new System.Drawing.Point(-3, 397); + this.Label4.Name = "Label4"; + this.Label4.Size = new System.Drawing.Size(358, 18); + this.Label4.TabIndex = 7; + this.Label4.Text = "Select an upgrade on the left to view its details"; + // + // 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(3, 53); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(340, 341); + this.Label2.TabIndex = 5; + this.Label2.Text = resources.GetString("Label2.Text"); + this.Label2.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // Label5 + // + this.Label5.AutoSize = true; + this.Label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label5.ForeColor = System.Drawing.Color.Black; + this.Label5.Location = new System.Drawing.Point(-4, 14); + this.Label5.Name = "Label5"; + this.Label5.Size = new System.Drawing.Size(355, 31); + this.Label5.TabIndex = 4; + this.Label5.Text = "Welcome to the Shiftorium"; + // + // btnbuy + // + this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnbuy.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbuy.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnbuy.ForeColor = System.Drawing.Color.Black; + this.btnbuy.Location = new System.Drawing.Point(160, 362); + this.btnbuy.Name = "btnbuy"; + this.btnbuy.Size = new System.Drawing.Size(185, 56); + this.btnbuy.TabIndex = 7; + this.btnbuy.Text = "Buy"; + this.btnbuy.UseVisualStyleBackColor = true; + this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click); + // + // lbprice + // + this.lbprice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.lbprice.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F, System.Drawing.FontStyle.Bold); + this.lbprice.ForeColor = System.Drawing.Color.Black; + this.lbprice.Location = new System.Drawing.Point(15, 362); + this.lbprice.Name = "lbprice"; + this.lbprice.Size = new System.Drawing.Size(127, 59); + this.lbprice.TabIndex = 6; + this.lbprice.Text = "50 CP"; + this.lbprice.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // picpreview + // + this.picpreview.Image = global::ShiftOS.Properties.Resources.upgradegray; + this.picpreview.Location = new System.Drawing.Point(25, 218); + this.picpreview.Name = "picpreview"; + this.picpreview.Size = new System.Drawing.Size(320, 130); + this.picpreview.TabIndex = 5; + this.picpreview.TabStop = false; + // + // lbudescription + // + this.lbudescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbudescription.ForeColor = System.Drawing.Color.Black; + this.lbudescription.Location = new System.Drawing.Point(24, 63); + this.lbudescription.Name = "lbudescription"; + this.lbudescription.Size = new System.Drawing.Size(321, 144); + this.lbudescription.TabIndex = 4; + this.lbudescription.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbupgradename + // + this.lbupgradename.Font = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbupgradename.ForeColor = System.Drawing.Color.Black; + this.lbupgradename.Location = new System.Drawing.Point(5, 17); + this.lbupgradename.Name = "lbupgradename"; + this.lbupgradename.Size = new System.Drawing.Size(361, 43); + this.lbupgradename.TabIndex = 3; + this.lbupgradename.Text = "Upgradename"; + this.lbupgradename.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // tmrcodepointsupdate + // + this.tmrcodepointsupdate.Enabled = true; + this.tmrcodepointsupdate.Interval = 1000; + this.tmrcodepointsupdate.Tick += new System.EventHandler(this.tmrcodepointsupdate_Tick); + // + // btnback + // + this.btnback.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnback.Location = new System.Drawing.Point(22, 72); + this.btnback.Name = "btnback"; + this.btnback.Size = new System.Drawing.Size(36, 23); + this.btnback.TabIndex = 9; + this.btnback.Text = "<<"; + this.btnback.UseVisualStyleBackColor = true; + this.btnback.Click += new System.EventHandler(this.btnback_Click); + // + // btnforward + // + this.btnforward.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnforward.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnforward.Location = new System.Drawing.Point(289, 72); + this.btnforward.Name = "btnforward"; + this.btnforward.Size = new System.Drawing.Size(36, 23); + this.btnforward.TabIndex = 10; + this.btnforward.Text = ">>"; + this.btnforward.UseVisualStyleBackColor = true; + this.btnforward.Click += new System.EventHandler(this.btnforward_Click); + // + // lbcategory + // + this.lbcategory.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbcategory.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Bold); + this.lbcategory.ForeColor = System.Drawing.Color.Black; + this.lbcategory.Location = new System.Drawing.Point(64, 72); + this.lbcategory.Name = "lbcategory"; + this.lbcategory.Size = new System.Drawing.Size(219, 26); + this.lbcategory.TabIndex = 11; + this.lbcategory.Text = "Upgrades"; + this.lbcategory.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // btnhack + // + this.btnhack.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.btnhack.AutoSize = true; + this.btnhack.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnhack.Location = new System.Drawing.Point(143, 218); + this.btnhack.Name = "btnhack"; + this.btnhack.Size = new System.Drawing.Size(68, 25); + this.btnhack.TabIndex = 12; + this.btnhack.Text = "Hack it."; + this.btnhack.UseVisualStyleBackColor = true; + this.btnhack.Visible = false; + this.btnhack.Click += new System.EventHandler(this.btnhack_Click); + // + // Frontend + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(701, 462); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.Name = "Frontend"; + this.Text = "Shiftorium"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Frontend_Load); + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.pnlinfo.ResumeLayout(false); + this.pnlintro.ResumeLayout(false); + this.pnlintro.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.picpreview)).EndInit(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.ListView lbupgrades; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Panel pnlinfo; + internal System.Windows.Forms.Label lbcodepoints; + internal System.Windows.Forms.Button btnbuy; + internal System.Windows.Forms.Label lbprice; + internal System.Windows.Forms.PictureBox picpreview; + internal System.Windows.Forms.Label lbudescription; + internal System.Windows.Forms.Label lbupgradename; + internal System.Windows.Forms.Panel pnlintro; + internal System.Windows.Forms.Label Label4; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Label Label5; + internal System.Windows.Forms.Timer tmrcodepointsupdate; + internal System.Windows.Forms.Label lbcategory; + private System.Windows.Forms.Button btnforward; + private System.Windows.Forms.Button btnback; + private System.Windows.Forms.Button btnhack; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Shiftorium.cs b/source/WindowsFormsApplication1/Apps/Shiftorium.cs new file mode 100644 index 0000000..ce9dbfc --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftorium.cs @@ -0,0 +1,215 @@ +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; +using SaveSystem; + +namespace Shiftorium +{ + public partial class Frontend : Form + { + public Frontend() + { + InitializeComponent(); + } + + List<Upgrade> AvailableUpgrades = new List<Upgrade>(); + Upgrade selectedUpgrade = null; + + private void tmrcodepointsupdate_Tick(object sender, EventArgs e) + { + lbcodepoints.Text = "Codepoints: " + API.Codepoints.ToString(); + } + + private void Frontend_Load(object sender, EventArgs e) + { + ColumnHeader name = new ColumnHeader(); + name.Text = "Upgrade Name"; + name.Width = lbupgrades.Width; + + lbupgrades.Columns.Add(name); + GetUpgrades(); + } + + public void GetUpgrades() + { + bool ShowUpgrades = true; + lbupgrades.Items.Clear(); + AvailableUpgrades.Clear(); + Categories.Clear(); + foreach (Upgrade upgrade in Utilities.GetAvailable()) + { + AvailableUpgrades.Add(upgrade); + } + GetCategories(); + try { + lbcategory.Text = Categories[SelectedCategory].ToUpper(); + if(lbcategory.Text != "FUNDAMENTAL") { + if(API.Upgrades["hacking"] == false) + { + Hacking.StartTutorial(); + PreviousCategory(); + } + else + { + if(API.Upgrades.ContainsKey(lbcategory.Text.ToLower())) + { + if(API.Upgrades[lbcategory.Text.ToLower()] == false) + { + btnhack.Show(); + ShowUpgrades = false; + } + else + { + btnhack.Hide(); + } + } + } + } + else + { + btnhack.Hide(); + } + } + catch + { + lbcategory.Text = "No upgrades!"; + } + foreach(Upgrade upg in AvailableUpgrades) + { + if (ShowUpgrades == true) + { + AddItem(upg); + } + } + } + + public void AddItem(Upgrade upgrade) + { + ListViewItem lv = new ListViewItem(); + var c = upgrade.Cost / API.CurrentSave.PriceDivider; + lv.Text = upgrade.Name.Replace(upgrade.Cost.ToString(), c.ToString()); + lv.Tag = upgrade.id; + if (upgrade.Category.ToUpper() == lbcategory.Text.ToUpper()) + { + if (!upgrade.id.Contains("dummy")) + { + lbupgrades.Items.Add(lv); + } + } + } + + public void GetCategories() + { + foreach(var upg in AvailableUpgrades) + { + if(Categories.Contains(upg.Category)) + { + } + else + { + Categories.Add(upg.Category); + } + } + } + + private void lbupgrades_SelectedIndexChanged(object sender, EventArgs e) + { + try { + ListViewItem item = lbupgrades.SelectedItems[0]; + string upg = (string)item.Tag; + foreach (Upgrade upgrade in AvailableUpgrades) + { + if (upgrade.id == upg) + { + pnlintro.Hide(); + lbupgradename.Text = upgrade.Name.Replace($" - {upgrade.Cost} CP", ""); + lbudescription.Text = upgrade.Description; + btnbuy.Show(); + lbprice.Text = (upgrade.Cost / API.CurrentSave.PriceDivider).ToString() + " CP"; + picpreview.Image = upgrade.Preview; + selectedUpgrade = upgrade; + } + } + } catch + { + //do nothing. + } + + } + + private void btnbuy_Click(object sender, EventArgs e) + { + if(Utilities.Buy(selectedUpgrade) == true) + { + btnbuy.Hide(); + lbprice.Text = "Upgrade installed."; + } + else + { + lbprice.Text = "Can't afford!"; + } + GetUpgrades(); + lbupgrades.Focus(); + } + + public List<string> Categories = new List<string>(); + public int SelectedCategory = 0; + + public void PreviousCategory() + { + if(SelectedCategory > 0) + { + SelectedCategory -= 1; + GetUpgrades(); + } + else + { + API.PlaySound(ShiftOS.Properties.Resources._3beepvirus); + } + } + + public void NextCategory() + { + if (SelectedCategory < Categories.Count - 1) + { + SelectedCategory += 1; + GetUpgrades(); + } + else + { + API.PlaySound(ShiftOS.Properties.Resources._3beepvirus); + } + } + + private void btnback_Click(object sender, EventArgs e) + { + PreviousCategory(); + } + + private void btnforward_Click(object sender, EventArgs e) + { + NextCategory(); + } + + private void btnhack_Click(object sender, EventArgs e) + { + if(API.Upgrades["multitasking"] == true) + { + var t = new Terminal(); + API.CreateForm(t, API.LoadedNames.TerminalName, ShiftOS.Properties.Resources.iconTerminal); + t.StartHackingSession(lbcategory.Text.ToLower()); + } + else + { + API.CreateInfoboxSession("Dependencies not met.", "You need the following upgrades: Multitasking to embark on this activity.", infobox.InfoboxMode.Info); + } + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/Shiftorium.resx b/source/WindowsFormsApplication1/Apps/Shiftorium.resx new file mode 100644 index 0000000..c732bd4 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Shiftorium.resx @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="Label2.Text" xml:space="preserve"> + <value>Welcome to the Shiftorium. The Shiftorium is a place where you can spend Codepoints to upgrade the operating system and buy new applications. + +Codepoints can be earned by performing various tasks and using apps in ShiftOS, like playing Knowledge Input. + +It is generally recommended to invest in new applications instead of GUI upgrades, because more apps equal more ways to earn Codepoints. Investing in GUI upgrades first may make the OS more user-friendly, but it may become harder to get Codepoints. + +Some GUI upgrades may require you to close applications to take effect. Just close and re-open applications and the upgrades will be applied.</value> + </data> + <metadata name="tmrcodepointsupdate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/SkinLoader.Designer.cs b/source/WindowsFormsApplication1/Apps/SkinLoader.Designer.cs new file mode 100644 index 0000000..72561f6 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/SkinLoader.Designer.cs @@ -0,0 +1,739 @@ +using System; + +namespace ShiftOS +{ + partial class SkinLoader + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SkinLoader)); + this.pgcontents = new System.Windows.Forms.Panel(); + this.label3 = new System.Windows.Forms.Label(); + this.btnapplyskin = new System.Windows.Forms.Button(); + this.btnsaveskin = new System.Windows.Forms.Button(); + this.btnloadskin = new System.Windows.Forms.Button(); + this.Label2 = new System.Windows.Forms.Label(); + this.btnclose = new System.Windows.Forms.Button(); + this.pnldesktoppreview = new System.Windows.Forms.Panel(); + this.predesktoppanel = new System.Windows.Forms.Panel(); + this.prepnlpanelbuttonholder = new System.Windows.Forms.FlowLayoutPanel(); + this.prepnlpanelbutton = new System.Windows.Forms.Panel(); + this.pretbicon = new System.Windows.Forms.PictureBox(); + this.pretbctext = new System.Windows.Forms.Label(); + this.pretimepanel = new System.Windows.Forms.Panel(); + this.prepaneltimetext = new System.Windows.Forms.Label(); + this.preapplaunchermenuholder = new System.Windows.Forms.Panel(); + this.predesktopappmenu = new System.Windows.Forms.MenuStrip(); + this.ApplicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.KnowledgeInputToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShiftoriumToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ClockToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.TerminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ShifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ToolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.ShutdownToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.Label1 = new System.Windows.Forms.Label(); + this.pnlwindowpreview = new System.Windows.Forms.Panel(); + this.prepgcontent = new System.Windows.Forms.Panel(); + this.prepgbottom = new System.Windows.Forms.Panel(); + this.prepgleft = new System.Windows.Forms.Panel(); + this.prepgbottomlcorner = new System.Windows.Forms.Panel(); + this.prepgright = new System.Windows.Forms.Panel(); + this.prepgbottomrcorner = new System.Windows.Forms.Panel(); + this.pretitlebar = new System.Windows.Forms.Panel(); + this.preminimizebutton = new System.Windows.Forms.Panel(); + this.prepnlicon = new System.Windows.Forms.PictureBox(); + this.prerollupbutton = new System.Windows.Forms.Panel(); + this.preclosebutton = new System.Windows.Forms.Panel(); + this.pretitletext = new System.Windows.Forms.Label(); + this.prepgtoplcorner = new System.Windows.Forms.Panel(); + this.prepgtoprcorner = new System.Windows.Forms.Panel(); + this.pnlskinpacks = new System.Windows.Forms.Panel(); + this.btnapplypackskin = new System.Windows.Forms.Button(); + this.label6 = new System.Windows.Forms.Label(); + this.cbpackfiles = new System.Windows.Forms.ComboBox(); + this.btnbrowse = new System.Windows.Forms.Button(); + this.txtpackpath = new System.Windows.Forms.TextBox(); + this.btnbacktoskinloader = new System.Windows.Forms.Button(); + this.label5 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pgcontents.SuspendLayout(); + this.pnldesktoppreview.SuspendLayout(); + this.predesktoppanel.SuspendLayout(); + this.prepnlpanelbuttonholder.SuspendLayout(); + this.prepnlpanelbutton.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).BeginInit(); + this.pretimepanel.SuspendLayout(); + this.preapplaunchermenuholder.SuspendLayout(); + this.predesktopappmenu.SuspendLayout(); + this.pnlwindowpreview.SuspendLayout(); + this.prepgleft.SuspendLayout(); + this.prepgright.SuspendLayout(); + this.pretitlebar.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).BeginInit(); + this.pnlskinpacks.SuspendLayout(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.BackColor = System.Drawing.Color.White; + this.pgcontents.Controls.Add(this.label3); + this.pgcontents.Controls.Add(this.btnapplyskin); + this.pgcontents.Controls.Add(this.btnsaveskin); + this.pgcontents.Controls.Add(this.btnloadskin); + this.pgcontents.Controls.Add(this.Label2); + this.pgcontents.Controls.Add(this.btnclose); + this.pgcontents.Controls.Add(this.pnldesktoppreview); + this.pgcontents.Controls.Add(this.Label1); + this.pgcontents.Controls.Add(this.pnlwindowpreview); + 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(476, 462); + this.pgcontents.TabIndex = 20; + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label3.Location = new System.Drawing.Point(10, 384); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(454, 31); + this.label3.TabIndex = 10; + this.label3.Text = "The preview is based on the currently loaded skin, not the one selected by the \"L" + + "oad Skin\" button."; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnapplyskin + // + this.btnapplyskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnapplyskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapplyskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnapplyskin.Location = new System.Drawing.Point(352, 418); + this.btnapplyskin.Name = "btnapplyskin"; + this.btnapplyskin.Size = new System.Drawing.Size(107, 32); + this.btnapplyskin.TabIndex = 9; + this.btnapplyskin.Text = "Apply Skin"; + this.btnapplyskin.UseVisualStyleBackColor = true; + this.btnapplyskin.Click += new System.EventHandler(this.btnapplyskin_Click); + // + // btnsaveskin + // + this.btnsaveskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.btnsaveskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsaveskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsaveskin.Location = new System.Drawing.Point(239, 418); + this.btnsaveskin.Name = "btnsaveskin"; + this.btnsaveskin.Size = new System.Drawing.Size(107, 32); + this.btnsaveskin.TabIndex = 8; + this.btnsaveskin.Text = "Save Skin"; + this.btnsaveskin.UseVisualStyleBackColor = true; + this.btnsaveskin.Click += new System.EventHandler(this.btnsaveskin_Click); + // + // btnloadskin + // + this.btnloadskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnloadskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnloadskin.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnloadskin.Location = new System.Drawing.Point(126, 418); + this.btnloadskin.Name = "btnloadskin"; + this.btnloadskin.Size = new System.Drawing.Size(107, 32); + this.btnloadskin.TabIndex = 7; + this.btnloadskin.Text = "Load Skin"; + this.btnloadskin.UseVisualStyleBackColor = true; + this.btnloadskin.Click += new System.EventHandler(this.btnloadskin_Click); + // + // Label2 + // + this.Label2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.Label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label2.Location = new System.Drawing.Point(4, 200); + this.Label2.Name = "Label2"; + this.Label2.Size = new System.Drawing.Size(464, 30); + this.Label2.TabIndex = 6; + this.Label2.Text = "Desktop Preview"; + this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btnclose + // + this.btnclose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnclose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnclose.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnclose.Location = new System.Drawing.Point(13, 418); + this.btnclose.Name = "btnclose"; + this.btnclose.Size = new System.Drawing.Size(107, 32); + this.btnclose.TabIndex = 5; + this.btnclose.Text = "Close"; + this.btnclose.UseVisualStyleBackColor = true; + this.btnclose.Click += new System.EventHandler(this.btnclose_Click); + // + // pnldesktoppreview + // + this.pnldesktoppreview.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.pnldesktoppreview.Controls.Add(this.predesktoppanel); + this.pnldesktoppreview.Location = new System.Drawing.Point(13, 233); + this.pnldesktoppreview.Name = "pnldesktoppreview"; + this.pnldesktoppreview.Size = new System.Drawing.Size(448, 148); + this.pnldesktoppreview.TabIndex = 4; + // + // predesktoppanel + // + this.predesktoppanel.BackColor = System.Drawing.Color.Gray; + this.predesktoppanel.Controls.Add(this.prepnlpanelbuttonholder); + this.predesktoppanel.Controls.Add(this.pretimepanel); + this.predesktoppanel.Controls.Add(this.preapplaunchermenuholder); + this.predesktoppanel.Dock = System.Windows.Forms.DockStyle.Top; + this.predesktoppanel.Location = new System.Drawing.Point(0, 0); + this.predesktoppanel.Name = "predesktoppanel"; + this.predesktoppanel.Size = new System.Drawing.Size(448, 25); + this.predesktoppanel.TabIndex = 1; + // + // prepnlpanelbuttonholder + // + this.prepnlpanelbuttonholder.BackColor = System.Drawing.Color.Transparent; + this.prepnlpanelbuttonholder.Controls.Add(this.prepnlpanelbutton); + this.prepnlpanelbuttonholder.Dock = System.Windows.Forms.DockStyle.Fill; + this.prepnlpanelbuttonholder.Location = new System.Drawing.Point(116, 0); + this.prepnlpanelbuttonholder.Name = "prepnlpanelbuttonholder"; + this.prepnlpanelbuttonholder.Padding = new System.Windows.Forms.Padding(2, 0, 0, 0); + this.prepnlpanelbuttonholder.Size = new System.Drawing.Size(235, 25); + this.prepnlpanelbuttonholder.TabIndex = 7; + // + // prepnlpanelbutton + // + this.prepnlpanelbutton.BackColor = System.Drawing.Color.Black; + this.prepnlpanelbutton.Controls.Add(this.pretbicon); + this.prepnlpanelbutton.Controls.Add(this.pretbctext); + this.prepnlpanelbutton.Location = new System.Drawing.Point(5, 3); + this.prepnlpanelbutton.Name = "prepnlpanelbutton"; + this.prepnlpanelbutton.Size = new System.Drawing.Size(126, 20); + this.prepnlpanelbutton.TabIndex = 18; + this.prepnlpanelbutton.Visible = false; + // + // pretbicon + // + this.pretbicon.BackColor = System.Drawing.Color.Transparent; + this.pretbicon.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.pretbicon.Image = global::ShiftOS.Properties.Resources.iconShifter; + this.pretbicon.Location = new System.Drawing.Point(4, 2); + this.pretbicon.Name = "pretbicon"; + this.pretbicon.Size = new System.Drawing.Size(16, 16); + this.pretbicon.TabIndex = 1; + this.pretbicon.TabStop = false; + // + // pretbctext + // + this.pretbctext.AutoSize = true; + this.pretbctext.BackColor = System.Drawing.Color.Transparent; + this.pretbctext.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.pretbctext.ForeColor = System.Drawing.Color.White; + this.pretbctext.Location = new System.Drawing.Point(24, 2); + this.pretbctext.Name = "pretbctext"; + this.pretbctext.Size = new System.Drawing.Size(45, 16); + this.pretbctext.TabIndex = 0; + this.pretbctext.Text = "Shifter"; + // + // pretimepanel + // + this.pretimepanel.Controls.Add(this.prepaneltimetext); + this.pretimepanel.Dock = System.Windows.Forms.DockStyle.Right; + this.pretimepanel.Location = new System.Drawing.Point(351, 0); + this.pretimepanel.Name = "pretimepanel"; + this.pretimepanel.Size = new System.Drawing.Size(97, 25); + this.pretimepanel.TabIndex = 5; + // + // prepaneltimetext + // + this.prepaneltimetext.AutoSize = true; + this.prepaneltimetext.BackColor = System.Drawing.Color.Transparent; + this.prepaneltimetext.Font = new System.Drawing.Font("Trebuchet MS", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.prepaneltimetext.Location = new System.Drawing.Point(5, 0); + this.prepaneltimetext.Name = "prepaneltimetext"; + this.prepaneltimetext.Size = new System.Drawing.Size(80, 24); + this.prepaneltimetext.TabIndex = 1; + this.prepaneltimetext.Text = "5000023"; + this.prepaneltimetext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // preapplaunchermenuholder + // + this.preapplaunchermenuholder.Controls.Add(this.predesktopappmenu); + this.preapplaunchermenuholder.Dock = System.Windows.Forms.DockStyle.Left; + this.preapplaunchermenuholder.Location = new System.Drawing.Point(0, 0); + this.preapplaunchermenuholder.Name = "preapplaunchermenuholder"; + this.preapplaunchermenuholder.Size = new System.Drawing.Size(116, 25); + this.preapplaunchermenuholder.TabIndex = 4; + // + // predesktopappmenu + // + this.predesktopappmenu.AutoSize = false; + this.predesktopappmenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.ApplicationsToolStripMenuItem}); + this.predesktopappmenu.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; + this.predesktopappmenu.Location = new System.Drawing.Point(0, 0); + this.predesktopappmenu.Name = "predesktopappmenu"; + this.predesktopappmenu.Padding = new System.Windows.Forms.Padding(0); + this.predesktopappmenu.Size = new System.Drawing.Size(116, 24); + this.predesktopappmenu.TabIndex = 0; + this.predesktopappmenu.Text = "MenuStrip1"; + // + // ApplicationsToolStripMenuItem + // + this.ApplicationsToolStripMenuItem.AutoSize = false; + this.ApplicationsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.KnowledgeInputToolStripMenuItem, + this.ShiftoriumToolStripMenuItem, + this.ClockToolStripMenuItem, + this.TerminalToolStripMenuItem, + this.ShifterToolStripMenuItem, + this.ToolStripSeparator1, + this.ShutdownToolStripMenuItem}); + this.ApplicationsToolStripMenuItem.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.749999F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.ApplicationsToolStripMenuItem.Name = "ApplicationsToolStripMenuItem"; + this.ApplicationsToolStripMenuItem.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0); + this.ApplicationsToolStripMenuItem.ShowShortcutKeys = false; + this.ApplicationsToolStripMenuItem.Size = new System.Drawing.Size(102, 24); + this.ApplicationsToolStripMenuItem.Text = "Applications"; + this.ApplicationsToolStripMenuItem.TextDirection = System.Windows.Forms.ToolStripTextDirection.Horizontal; + this.ApplicationsToolStripMenuItem.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage; + // + // KnowledgeInputToolStripMenuItem + // + this.KnowledgeInputToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.KnowledgeInputToolStripMenuItem.Name = "KnowledgeInputToolStripMenuItem"; + this.KnowledgeInputToolStripMenuItem.ShowShortcutKeys = false; + this.KnowledgeInputToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.KnowledgeInputToolStripMenuItem.Text = "Knowledge Input"; + // + // ShiftoriumToolStripMenuItem + // + this.ShiftoriumToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShiftoriumToolStripMenuItem.Name = "ShiftoriumToolStripMenuItem"; + this.ShiftoriumToolStripMenuItem.ShowShortcutKeys = false; + this.ShiftoriumToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShiftoriumToolStripMenuItem.Text = "Shiftorium"; + // + // ClockToolStripMenuItem + // + this.ClockToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ClockToolStripMenuItem.Name = "ClockToolStripMenuItem"; + this.ClockToolStripMenuItem.ShowShortcutKeys = false; + this.ClockToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ClockToolStripMenuItem.Text = "Clock"; + // + // TerminalToolStripMenuItem + // + this.TerminalToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.TerminalToolStripMenuItem.Name = "TerminalToolStripMenuItem"; + this.TerminalToolStripMenuItem.ShowShortcutKeys = false; + this.TerminalToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.TerminalToolStripMenuItem.Text = "Terminal"; + // + // ShifterToolStripMenuItem + // + this.ShifterToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShifterToolStripMenuItem.Name = "ShifterToolStripMenuItem"; + this.ShifterToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShifterToolStripMenuItem.Text = "Shifter"; + // + // ToolStripSeparator1 + // + this.ToolStripSeparator1.BackColor = System.Drawing.Color.Transparent; + this.ToolStripSeparator1.ForeColor = System.Drawing.Color.White; + this.ToolStripSeparator1.Name = "ToolStripSeparator1"; + this.ToolStripSeparator1.Size = new System.Drawing.Size(178, 6); + // + // ShutdownToolStripMenuItem + // + this.ShutdownToolStripMenuItem.BackColor = System.Drawing.Color.Transparent; + this.ShutdownToolStripMenuItem.Name = "ShutdownToolStripMenuItem"; + this.ShutdownToolStripMenuItem.Size = new System.Drawing.Size(181, 22); + this.ShutdownToolStripMenuItem.Text = "Shut Down"; + // + // Label1 + // + this.Label1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.Label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label1.Location = new System.Drawing.Point(4, 6); + this.Label1.Name = "Label1"; + this.Label1.Size = new System.Drawing.Size(464, 30); + this.Label1.TabIndex = 2; + this.Label1.Text = "Window Preview"; + this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // pnlwindowpreview + // + this.pnlwindowpreview.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.pnlwindowpreview.Controls.Add(this.prepgcontent); + this.pnlwindowpreview.Controls.Add(this.prepgbottom); + this.pnlwindowpreview.Controls.Add(this.prepgleft); + this.pnlwindowpreview.Controls.Add(this.prepgright); + this.pnlwindowpreview.Controls.Add(this.pretitlebar); + this.pnlwindowpreview.Location = new System.Drawing.Point(13, 39); + this.pnlwindowpreview.Name = "pnlwindowpreview"; + this.pnlwindowpreview.Size = new System.Drawing.Size(448, 148); + this.pnlwindowpreview.TabIndex = 1; + // + // prepgcontent + // + this.prepgcontent.Dock = System.Windows.Forms.DockStyle.Fill; + this.prepgcontent.Location = new System.Drawing.Point(2, 30); + this.prepgcontent.Name = "prepgcontent"; + this.prepgcontent.Size = new System.Drawing.Size(444, 116); + this.prepgcontent.TabIndex = 20; + // + // prepgbottom + // + this.prepgbottom.BackColor = System.Drawing.Color.Gray; + this.prepgbottom.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottom.Location = new System.Drawing.Point(2, 146); + this.prepgbottom.Name = "prepgbottom"; + this.prepgbottom.Size = new System.Drawing.Size(444, 2); + this.prepgbottom.TabIndex = 23; + // + // prepgleft + // + this.prepgleft.BackColor = System.Drawing.Color.Gray; + this.prepgleft.Controls.Add(this.prepgbottomlcorner); + this.prepgleft.Dock = System.Windows.Forms.DockStyle.Left; + this.prepgleft.Location = new System.Drawing.Point(0, 30); + this.prepgleft.Name = "prepgleft"; + this.prepgleft.Size = new System.Drawing.Size(2, 118); + this.prepgleft.TabIndex = 21; + // + // prepgbottomlcorner + // + this.prepgbottomlcorner.BackColor = System.Drawing.Color.Red; + this.prepgbottomlcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottomlcorner.Location = new System.Drawing.Point(0, 116); + this.prepgbottomlcorner.Name = "prepgbottomlcorner"; + this.prepgbottomlcorner.Size = new System.Drawing.Size(2, 2); + this.prepgbottomlcorner.TabIndex = 14; + // + // prepgright + // + this.prepgright.BackColor = System.Drawing.Color.Gray; + this.prepgright.Controls.Add(this.prepgbottomrcorner); + this.prepgright.Dock = System.Windows.Forms.DockStyle.Right; + this.prepgright.Location = new System.Drawing.Point(446, 30); + this.prepgright.Name = "prepgright"; + this.prepgright.Size = new System.Drawing.Size(2, 118); + this.prepgright.TabIndex = 22; + // + // prepgbottomrcorner + // + this.prepgbottomrcorner.BackColor = System.Drawing.Color.Red; + this.prepgbottomrcorner.Dock = System.Windows.Forms.DockStyle.Bottom; + this.prepgbottomrcorner.Location = new System.Drawing.Point(0, 116); + this.prepgbottomrcorner.Name = "prepgbottomrcorner"; + this.prepgbottomrcorner.Size = new System.Drawing.Size(2, 2); + this.prepgbottomrcorner.TabIndex = 15; + // + // pretitlebar + // + this.pretitlebar.BackColor = System.Drawing.Color.Gray; + this.pretitlebar.Controls.Add(this.preminimizebutton); + this.pretitlebar.Controls.Add(this.prepnlicon); + this.pretitlebar.Controls.Add(this.prerollupbutton); + this.pretitlebar.Controls.Add(this.preclosebutton); + this.pretitlebar.Controls.Add(this.pretitletext); + this.pretitlebar.Controls.Add(this.prepgtoplcorner); + this.pretitlebar.Controls.Add(this.prepgtoprcorner); + this.pretitlebar.Dock = System.Windows.Forms.DockStyle.Top; + this.pretitlebar.ForeColor = System.Drawing.Color.White; + this.pretitlebar.Location = new System.Drawing.Point(0, 0); + this.pretitlebar.Name = "pretitlebar"; + this.pretitlebar.Size = new System.Drawing.Size(448, 30); + this.pretitlebar.TabIndex = 19; + // + // preminimizebutton + // + this.preminimizebutton.BackColor = System.Drawing.Color.Black; + this.preminimizebutton.Location = new System.Drawing.Point(362, 5); + this.preminimizebutton.Name = "preminimizebutton"; + this.preminimizebutton.Size = new System.Drawing.Size(22, 22); + this.preminimizebutton.TabIndex = 32; + // + // prepnlicon + // + this.prepnlicon.BackColor = System.Drawing.Color.Transparent; + this.prepnlicon.Image = global::ShiftOS.Properties.Resources.iconSkinLoader; + this.prepnlicon.Location = new System.Drawing.Point(8, 8); + this.prepnlicon.Name = "prepnlicon"; + this.prepnlicon.Size = new System.Drawing.Size(16, 16); + this.prepnlicon.TabIndex = 32; + this.prepnlicon.TabStop = false; + this.prepnlicon.Visible = false; + // + // prerollupbutton + // + this.prerollupbutton.BackColor = System.Drawing.Color.Black; + this.prerollupbutton.Location = new System.Drawing.Point(390, 5); + this.prerollupbutton.Name = "prerollupbutton"; + this.prerollupbutton.Size = new System.Drawing.Size(22, 22); + this.prerollupbutton.TabIndex = 31; + // + // preclosebutton + // + this.preclosebutton.BackColor = System.Drawing.Color.Black; + this.preclosebutton.Location = new System.Drawing.Point(419, 5); + this.preclosebutton.Name = "preclosebutton"; + this.preclosebutton.Size = new System.Drawing.Size(22, 22); + this.preclosebutton.TabIndex = 20; + // + // pretitletext + // + this.pretitletext.AutoSize = true; + this.pretitletext.BackColor = System.Drawing.Color.Transparent; + this.pretitletext.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.pretitletext.Location = new System.Drawing.Point(29, 7); + this.pretitletext.Name = "pretitletext"; + this.pretitletext.Size = new System.Drawing.Size(77, 18); + this.pretitletext.TabIndex = 19; + this.pretitletext.Text = "Template"; + // + // prepgtoplcorner + // + this.prepgtoplcorner.BackColor = System.Drawing.Color.Red; + this.prepgtoplcorner.Dock = System.Windows.Forms.DockStyle.Left; + this.prepgtoplcorner.Location = new System.Drawing.Point(0, 0); + this.prepgtoplcorner.Name = "prepgtoplcorner"; + this.prepgtoplcorner.Size = new System.Drawing.Size(2, 30); + this.prepgtoplcorner.TabIndex = 17; + // + // prepgtoprcorner + // + this.prepgtoprcorner.BackColor = System.Drawing.Color.Red; + this.prepgtoprcorner.Dock = System.Windows.Forms.DockStyle.Right; + this.prepgtoprcorner.Location = new System.Drawing.Point(446, 0); + this.prepgtoprcorner.Name = "prepgtoprcorner"; + this.prepgtoprcorner.Size = new System.Drawing.Size(2, 30); + this.prepgtoprcorner.TabIndex = 16; + // + // pnlskinpacks + // + this.pnlskinpacks.BackColor = System.Drawing.Color.White; + this.pnlskinpacks.Controls.Add(this.btnapplypackskin); + this.pnlskinpacks.Controls.Add(this.label6); + this.pnlskinpacks.Controls.Add(this.cbpackfiles); + this.pnlskinpacks.Controls.Add(this.btnbrowse); + this.pnlskinpacks.Controls.Add(this.txtpackpath); + this.pnlskinpacks.Controls.Add(this.btnbacktoskinloader); + this.pnlskinpacks.Controls.Add(this.label5); + this.pnlskinpacks.Controls.Add(this.label4); + this.pnlskinpacks.Dock = System.Windows.Forms.DockStyle.Fill; + this.pnlskinpacks.Location = new System.Drawing.Point(0, 0); + this.pnlskinpacks.Name = "pnlskinpacks"; + this.pnlskinpacks.Size = new System.Drawing.Size(476, 462); + this.pnlskinpacks.TabIndex = 11; + // + // btnapplypackskin + // + this.btnapplypackskin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnapplypackskin.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnapplypackskin.Location = new System.Drawing.Point(379, 418); + this.btnapplypackskin.Name = "btnapplypackskin"; + this.btnapplypackskin.Size = new System.Drawing.Size(94, 41); + this.btnapplypackskin.TabIndex = 7; + this.btnapplypackskin.Text = "Apply Skin"; + this.btnapplypackskin.UseVisualStyleBackColor = true; + this.btnapplypackskin.Click += new System.EventHandler(this.btnapplyskin_Click); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(15, 192); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(71, 13); + this.label6.TabIndex = 6; + this.label6.Text = "Select a skin:"; + // + // cbpackfiles + // + this.cbpackfiles.FormattingEnabled = true; + this.cbpackfiles.Location = new System.Drawing.Point(126, 188); + this.cbpackfiles.Name = "cbpackfiles"; + this.cbpackfiles.Size = new System.Drawing.Size(328, 21); + this.cbpackfiles.TabIndex = 5; + this.cbpackfiles.SelectedIndexChanged += new System.EventHandler(this.cbpackfiles_SelectedIndexChanged); + // + // btnbrowse + // + this.btnbrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btnbrowse.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbrowse.Location = new System.Drawing.Point(389, 138); + this.btnbrowse.Name = "btnbrowse"; + this.btnbrowse.Size = new System.Drawing.Size(75, 23); + this.btnbrowse.TabIndex = 4; + this.btnbrowse.Text = "Browse..."; + this.btnbrowse.UseVisualStyleBackColor = true; + this.btnbrowse.Click += new System.EventHandler(this.btnbrowse_Click); + // + // txtpackpath + // + this.txtpackpath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.txtpackpath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtpackpath.Location = new System.Drawing.Point(13, 141); + this.txtpackpath.Name = "txtpackpath"; + this.txtpackpath.Size = new System.Drawing.Size(370, 20); + this.txtpackpath.TabIndex = 3; + // + // btnbacktoskinloader + // + this.btnbacktoskinloader.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.btnbacktoskinloader.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnbacktoskinloader.Location = new System.Drawing.Point(3, 418); + this.btnbacktoskinloader.Name = "btnbacktoskinloader"; + this.btnbacktoskinloader.Size = new System.Drawing.Size(94, 41); + this.btnbacktoskinloader.TabIndex = 2; + this.btnbacktoskinloader.Text = "Back to Skin Loader"; + this.btnbacktoskinloader.UseVisualStyleBackColor = true; + this.btnbacktoskinloader.Click += new System.EventHandler(this.btnbacktoskinloader_Click); + // + // label5 + // + this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 10F); + this.label5.Location = new System.Drawing.Point(5, 28); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(470, 110); + this.label5.TabIndex = 1; + this.label5.Text = resources.GetString("label5.Text"); + this.label5.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // 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", 13F); + this.label4.Location = new System.Drawing.Point(3, 6); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(470, 22); + this.label4.TabIndex = 0; + this.label4.Text = "Skin Packs"; + this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter; + // + // panel1 + // + this.panel1.Controls.Add(this.pgcontents); + this.panel1.Controls.Add(this.pnlskinpacks); + 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(476, 462); + this.panel1.TabIndex = 8; + // + // SkinLoader + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(476, 462); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.Name = "SkinLoader"; + this.Text = "Skin_Loader"; + this.TopMost = true; + this.Load += new System.EventHandler(this.SkinLoader_Load); + this.pgcontents.ResumeLayout(false); + this.pnldesktoppreview.ResumeLayout(false); + this.predesktoppanel.ResumeLayout(false); + this.prepnlpanelbuttonholder.ResumeLayout(false); + this.prepnlpanelbutton.ResumeLayout(false); + this.prepnlpanelbutton.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pretbicon)).EndInit(); + this.pretimepanel.ResumeLayout(false); + this.pretimepanel.PerformLayout(); + this.preapplaunchermenuholder.ResumeLayout(false); + this.predesktopappmenu.ResumeLayout(false); + this.predesktopappmenu.PerformLayout(); + this.pnlwindowpreview.ResumeLayout(false); + this.prepgleft.ResumeLayout(false); + this.prepgright.ResumeLayout(false); + this.pretitlebar.ResumeLayout(false); + this.pretitlebar.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.prepnlicon)).EndInit(); + this.pnlskinpacks.ResumeLayout(false); + this.pnlskinpacks.PerformLayout(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.Label Label1; + internal System.Windows.Forms.Panel pnlwindowpreview; + internal System.Windows.Forms.Panel prepgcontent; + internal System.Windows.Forms.Panel prepgbottom; + internal System.Windows.Forms.Panel prepgleft; + internal System.Windows.Forms.Panel prepgbottomlcorner; + internal System.Windows.Forms.Panel prepgright; + internal System.Windows.Forms.Panel prepgbottomrcorner; + internal System.Windows.Forms.Panel pretitlebar; + internal System.Windows.Forms.PictureBox prepnlicon; + internal System.Windows.Forms.Panel prerollupbutton; + internal System.Windows.Forms.Panel preclosebutton; + internal System.Windows.Forms.Label pretitletext; + internal System.Windows.Forms.Panel prepgtoplcorner; + internal System.Windows.Forms.Panel prepgtoprcorner; + internal System.Windows.Forms.Button btnapplyskin; + internal System.Windows.Forms.Button btnsaveskin; + internal System.Windows.Forms.Button btnloadskin; + internal System.Windows.Forms.Label Label2; + internal System.Windows.Forms.Button btnclose; + internal System.Windows.Forms.Panel pnldesktoppreview; + internal System.Windows.Forms.Panel predesktoppanel; + internal System.Windows.Forms.Panel pretimepanel; + internal System.Windows.Forms.Label prepaneltimetext; + internal System.Windows.Forms.Panel preapplaunchermenuholder; + internal System.Windows.Forms.MenuStrip predesktopappmenu; + internal System.Windows.Forms.ToolStripMenuItem ApplicationsToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem KnowledgeInputToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ShiftoriumToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ClockToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem TerminalToolStripMenuItem; + internal System.Windows.Forms.ToolStripMenuItem ShifterToolStripMenuItem; + internal System.Windows.Forms.ToolStripSeparator ToolStripSeparator1; + internal System.Windows.Forms.ToolStripMenuItem ShutdownToolStripMenuItem; + internal System.Windows.Forms.Panel preminimizebutton; + internal System.Windows.Forms.FlowLayoutPanel prepnlpanelbuttonholder; + internal System.Windows.Forms.Panel prepnlpanelbutton; + internal System.Windows.Forms.PictureBox pretbicon; + internal System.Windows.Forms.Label pretbctext; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Panel pnlskinpacks; + private System.Windows.Forms.Button btnbacktoskinloader; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.Button btnbrowse; + private System.Windows.Forms.TextBox txtpackpath; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox cbpackfiles; + private System.Windows.Forms.Button btnapplypackskin; + private System.Windows.Forms.Panel panel1; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/SkinLoader.cs b/source/WindowsFormsApplication1/Apps/SkinLoader.cs new file mode 100644 index 0000000..e6d5328 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/SkinLoader.cs @@ -0,0 +1,652 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class SkinLoader : Form + { + public SkinLoader() + { + InitializeComponent(); + } + + public Skinning.Skin PreviewSkin = null; + public Skinning.Images PreviewImages = null; + + private void btnclose_Click(object sender, EventArgs e) + { + this.Close(); + } + + public string LoadedSkinFile = "fail"; + + public void LoadSkin(string res) + { + LoadedSkinFile = res; + ExtractSkin(res); + SetupDesktop(); + setupborders(); + setuptitlebar(); + setskin(); + } + + private void ExtractSkin(string file) + { + if(Directory.Exists(Paths.ToBeLoaded)) + { + Directory.Delete(Paths.ToBeLoaded, true); + } + API.ExtractFile(file, Paths.ToBeLoaded, false); + PreviewSkin = JsonConvert.DeserializeObject<Skinning.Skin>(File.ReadAllText(Paths.ToBeLoaded + "data.json")); + LoadImages(); + } + + private void LoadImages() + { + PreviewImages = new Skinning.Images(); + PreviewImages.applauncherclick = GetImage(PreviewSkin.applauncherclickpath); + PreviewImages.panelbutton = GetImage(PreviewSkin.panelbuttonpath); + PreviewImages.applaunchermouseover = GetImage(PreviewSkin.applaunchermouseoverpath); + PreviewImages.applauncher = GetImage(PreviewSkin.applauncherpath); + PreviewImages.panelclock = GetImage(PreviewSkin.panelclockpath); + PreviewImages.desktopbackground = GetImage(PreviewSkin.desktopbackgroundpath); + PreviewImages.desktoppanel = GetImage(PreviewSkin.desktoppanelpath); + PreviewImages.minbtnhover = GetImage(PreviewSkin.minbtnhoverpath); + PreviewImages.minbtnclick = GetImage(PreviewSkin.minbtnclickpath); + PreviewImages.rightcorner = GetImage(PreviewSkin.rightcornerpath); + PreviewImages.titlebar = GetImage(PreviewSkin.titlebarpath); + PreviewImages.borderright = GetImage(PreviewSkin.borderrightpath); + PreviewImages.borderleft = GetImage(PreviewSkin.borderleftpath); + PreviewImages.borderbottom = GetImage(PreviewSkin.borderbottompath); + PreviewImages.closebtn = GetImage(PreviewSkin.closebtnpath); + PreviewImages.closebtnhover = GetImage(PreviewSkin.closebtnhoverpath); + PreviewImages.closebtnclick = GetImage(PreviewSkin.closebtnclickpath); + PreviewImages.rollbtn = GetImage(PreviewSkin.rollbtnpath); + PreviewImages.rollbtnhover = GetImage(PreviewSkin.rollbtnhoverpath); + PreviewImages.rollbtnclick = GetImage(PreviewSkin.rollbtnclickpath); + PreviewImages.minbtn = GetImage(PreviewSkin.minbtnpath); + PreviewImages.leftcorner = GetImage(PreviewSkin.leftcornerpath); + PreviewImages.bottomleftcorner = GetImage(PreviewSkin.bottomleftcornerpath); + PreviewImages.bottomrightcorner = GetImage(PreviewSkin.bottomrightcornerpath); + } + + private Bitmap GetImage(string fileName) + { + Bitmap ret; + if (File.Exists(Paths.ToBeLoaded + fileName)) + { + using (Image img = Image.FromFile(Paths.ToBeLoaded + fileName)) + { + ret = new Bitmap(img); + } + } + else + { + ret = null; + } + return ret; + } + + private void btnloadskin_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".skn;.spk", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string res = API.GetFSResult(); + if(res != "fail") + { + if(res.EndsWith(".skn")) + { + LoadedSkinFile = res; + ExtractSkin(res); + SetupDesktop(); + setupborders(); + setuptitlebar(); + setskin(); + } + else if(res.EndsWith(".spk")) + { + LoadedPack = res; + SetupPackUI(); + } + } + }; + } + + public string LoadedPack = ""; + + public void SetupPackUI() + { + pgcontents.Hide(); + pnlskinpacks.Show(); + + txtpackpath.Text = LoadedPack; + + if(Directory.Exists(Paths.SkinDir + "_packdata")) + { + Directory.Delete(Paths.SkinDir + "_packdata", true); + } + API.ExtractFile(LoadedPack, Paths.SkinDir + "_packdata", false); + cbpackfiles.Items.Clear(); + foreach (string file in Directory.GetFiles(Paths.SkinDir + "_packdata")) + { + var finf = new FileInfo(file); + cbpackfiles.Items.Add(finf.Name); + + } + } + + private void ScanForSkinFiles(string dir, ref List<string> files) + { + foreach(string file in Directory.GetFiles(dir)) + { + var finf = new FileInfo(file); + if(finf.Extension == ".skn") + { + files.Add(finf.FullName); + } + } + foreach(string dirname in Directory.GetDirectories(dir)) + { + ScanForSkinFiles(dirname, ref files); + } + } + + private void btnapplyskin_Click(object sender, EventArgs e) + { + if(LoadedSkinFile != "fail") + { + try + { + if (Viruses.InfectedWith("skininceptor")) + { + var rnd = new Random(); + switch(rnd.Next(0, 10)) + { + case 1: + case 3: + case 5: + case 7: + case 9: + //Load another random skin. + List<string> skinfiles = new List<string>(); + ScanForSkinFiles(Paths.SaveRoot, ref skinfiles); + string fname = skinfiles[rnd.Next(0, skinfiles.Count - 1)]; + Skinning.Utilities.loadsknfile(fname); + Skinning.Utilities.loadskin(); + API.CurrentSession.SetupDesktop(); + API.UpdateWindows(); + break; + default: + File.Delete(LoadedSkinFile); + //Corrupting binary is fun. + API.CreateInfoboxSession("Skin Loader - Error", "It appears that the provided skin file is either corrupted or not supported by this version of ShiftOS.", infobox.InfoboxMode.Info); + Skinning.Utilities.loadedSkin = new Skinning.Skin(); + Skinning.Utilities.loadedskin_images = new Skinning.Images(); + API.UpdateWindows(); + break; + } + } + else { + Skinning.Utilities.loadsknfile(LoadedSkinFile); + Skinning.Utilities.loadskin(); + API.CurrentSession.SetupDesktop(); + API.UpdateWindows(); + PreviewSkin = API.CurrentSkin; + PreviewImages = API.CurrentSkinImages; + SetupDesktop(); + setupborders(); + setuptitlebar(); + setskin(); + } + } + catch (Exception ex) + { + if (API.DeveloperMode == false) + { + API.CreateInfoboxSession("Skin Loader - Error", "It appears that the provided skin file is either corrupted or not supported by this version of ShiftOS.", infobox.InfoboxMode.Info); + } + else + { + API.CreateInfoboxSession("Skin Loader - Error", ex.Message, infobox.InfoboxMode.Info); + } + } + } + else + { + API.CreateInfoboxSession("Skin Loader - Error", "You have not selected a skin file to load! Try pressing \"Load Skin\" and selecting a .skn file.", infobox.InfoboxMode.Info); + } + } + + private void SkinLoader_Load(object sender, EventArgs e) + { + + PreviewSkin = API.CurrentSkin; + PreviewImages = API.CurrentSkinImages; + LoadPreview(); + pnlskinpacks.Hide(); + pgcontents.Show(); + } + + private void LoadPreview() + { + SetupDesktop(); + setupborders(); + setuptitlebar(); + setskin(); + + } + + #region Preview Skinning + + public void SetupDesktop() + { + + if (API.Upgrades["desktoppanel"] == true) + { + if (PreviewImages.desktoppanel == null) + { + predesktoppanel.BackColor = PreviewSkin.desktoppanelcolour; + predesktoppanel.BackgroundImage = null; + } + else { + predesktoppanel.BackgroundImage = PreviewImages.desktoppanel; + predesktoppanel.BackgroundImageLayout = (ImageLayout)PreviewSkin.desktoppanellayout; + predesktoppanel.BackColor = Color.Transparent; + } + + predesktoppanel.Size = new Size(predesktoppanel.Size.Width, PreviewSkin.desktoppanelheight); + switch (PreviewSkin.desktoppanelposition) + { + case "Top": + predesktoppanel.Dock = DockStyle.Top; + predesktopappmenu.Dock = DockStyle.Top; + break; + case "Bottom": + predesktoppanel.Dock = DockStyle.Bottom; + predesktopappmenu.Dock = DockStyle.Bottom; + break; + } + predesktoppanel.Show(); + } + else { + predesktoppanel.Hide(); + } + + + if (API.Upgrades["applaunchermenu"] == true) + { + ApplicationsToolStripMenuItem.Font = new Font(PreviewSkin.applicationbuttontextfont, PreviewSkin.applicationbuttontextsize, PreviewSkin.applicationbuttontextstyle); + ApplicationsToolStripMenuItem.Text = PreviewSkin.applicationlaunchername; + + + + ApplicationsToolStripMenuItem.Height = PreviewSkin.applicationbuttonheight; + if (PreviewImages.applauncher != null) + { + ApplicationsToolStripMenuItem.Text = ""; + ApplicationsToolStripMenuItem.BackColor = Color.Transparent; + } + else { + ApplicationsToolStripMenuItem.Text = PreviewSkin.applicationlaunchername; + ApplicationsToolStripMenuItem.BackColor = PreviewSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImage = null; + } + + preapplaunchermenuholder.Width = PreviewSkin.applaunchermenuholderwidth; + predesktopappmenu.Width = PreviewSkin.applaunchermenuholderwidth; + ApplicationsToolStripMenuItem.Width = PreviewSkin.applaunchermenuholderwidth; + preapplaunchermenuholder.Height = PreviewSkin.applicationbuttonheight; + predesktopappmenu.Height = PreviewSkin.applicationbuttonheight; + ApplicationsToolStripMenuItem.Height = PreviewSkin.applicationbuttonheight; + + if (PreviewImages.applauncher != null) + { + ApplicationsToolStripMenuItem.BackgroundImage = PreviewImages.applauncher; + } + else { + ApplicationsToolStripMenuItem.BackColor = PreviewSkin.applauncherbackgroundcolour; + ApplicationsToolStripMenuItem.BackgroundImageLayout = (ImageLayout)PreviewSkin.applauncherlayout; + } + } + else { + ApplicationsToolStripMenuItem.Visible = false; + } + + if (API.Upgrades["desktoppanelclock"] == true) + { + + prepaneltimetext.ForeColor = PreviewSkin.clocktextcolour; + + if (PreviewImages.panelclock == null) + { + pretimepanel.BackColor = PreviewSkin.clockbackgroundcolor; + pretimepanel.BackgroundImage = null; + } + else { + pretimepanel.BackColor = Color.Transparent; + pretimepanel.BackgroundImage = PreviewImages.panelclock; + pretimepanel.BackgroundImageLayout = (ImageLayout)PreviewSkin.panelclocklayout; + } + prepaneltimetext.Font = new Font(PreviewSkin.panelclocktextfont, PreviewSkin.panelclocktextsize, PreviewSkin.panelclocktextstyle); + pretimepanel.Size = new Size(prepaneltimetext.Width + 3, pretimepanel.Height); + prepaneltimetext.Location = new Point(0, PreviewSkin.panelclocktexttop); + pretimepanel.Show(); + } + else { + pretimepanel.Hide(); + } + + + ApplicationsToolStripMenuItem.BackColor = PreviewSkin.applauncherbuttoncolour; + + pnldesktoppreview.BackColor = PreviewSkin.desktopbackgroundcolour; + pnldesktoppreview.BackgroundImage = PreviewImages.desktopbackground; + pnldesktoppreview.BackgroundImageLayout = (ImageLayout)PreviewSkin.desktopbackgroundlayout; + + if (API.Upgrades["panelbuttons"] == true) + { + prepnlpanelbutton.Visible = API.Upgrades["panelbuttons"]; + + pretbicon.Image = Properties.Resources.iconTerminal; + pretbctext.Text = "Terminal"; + + prepnlpanelbutton.Margin = new Padding(0, PreviewSkin.panelbuttonfromtop, PreviewSkin.panelbuttongap, 0); + + if (API.Upgrades["appicons"] == true) + { + pretbicon.Show(); + } + else + { + pretbicon.Hide(); + } + pretbicon.Location = new Point(PreviewSkin.panelbuttoniconside, PreviewSkin.panelbuttonicontop); + pretbicon.Size = new Size(PreviewSkin.panelbuttoniconsize, PreviewSkin.panelbuttoniconsize); + prepnlpanelbutton.Size = new Size(PreviewSkin.panelbuttonwidth, PreviewSkin.panelbuttonheight); + prepnlpanelbutton.BackColor = PreviewSkin.panelbuttoncolour; + prepnlpanelbutton.BackgroundImage = PreviewImages.panelbutton; + prepnlpanelbutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.panelbuttonlayout; + pretbctext.ForeColor = PreviewSkin.panelbuttontextcolour; + pretbctext.Font = new Font(PreviewSkin.panelbuttontextfont, PreviewSkin.panelbuttontextsize, PreviewSkin.panelbuttontextstyle); + pretbctext.Location = new Point(PreviewSkin.panelbuttontextside, PreviewSkin.panelbuttontexttop); + + + pretbicon.Size = new Size(PreviewSkin.panelbuttoniconsize, PreviewSkin.panelbuttoniconsize); + + } + prepnlpanelbuttonholder.Padding = new Padding(PreviewSkin.panelbuttoninitialgap, 0, 0, 0); + + + } + + + + public void setskin() + { + + //disposals + preclosebutton.BackgroundImage = null; + pretitlebar.BackgroundImage = null; + prerollupbutton.BackgroundImage = null; + prepgtoplcorner.BackgroundImage = null; + prepgtoprcorner.BackgroundImage = null; + preminimizebutton.BackgroundImage = null; + //apply new skin + if (PreviewImages.closebtn == null) + preclosebutton.BackColor = PreviewSkin.closebtncolour; + else + preclosebutton.BackgroundImage = PreviewImages.closebtn; + preclosebutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.closebtnlayout; + if (PreviewImages.titlebar == null) + pretitlebar.BackColor = PreviewSkin.titlebarcolour; + else + pretitlebar.BackgroundImage = PreviewImages.titlebar; + pretitlebar.BackgroundImageLayout = (ImageLayout)PreviewSkin.titlebarlayout; + if (PreviewImages.rollbtn == null) + prerollupbutton.BackColor = PreviewSkin.rollbtncolour; + else + prerollupbutton.BackgroundImage = PreviewImages.rollbtn; + prerollupbutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.rollbtnlayout; + if (PreviewImages.leftcorner == null) + prepgtoplcorner.BackColor = PreviewSkin.leftcornercolour; + else + prepgtoplcorner.BackgroundImage = PreviewImages.leftcorner; + prepgtoplcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.leftcornerlayout; + if (PreviewImages.rightcorner == null) + prepgtoprcorner.BackColor = PreviewSkin.rightcornercolour; + else + prepgtoprcorner.BackgroundImage = PreviewImages.rightcorner; + prepgtoprcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.rightcornerlayout; + if (PreviewImages.minbtn == null) + preminimizebutton.BackColor = PreviewSkin.minbtncolour; + else + preminimizebutton.BackgroundImage = PreviewImages.minbtn; + preminimizebutton.BackgroundImageLayout = (ImageLayout)PreviewSkin.minbtnlayout; + if (PreviewImages.borderleft == null) + prepgleft.BackColor = PreviewSkin.borderleftcolour; + else + prepgleft.BackgroundImage = PreviewImages.borderleft; + prepgleft.BackgroundImageLayout = (ImageLayout)PreviewSkin.borderleftlayout; + if (PreviewImages.borderright == null) + prepgright.BackColor = PreviewSkin.borderrightcolour; + else + prepgright.BackgroundImage = PreviewImages.borderright; + prepgleft.BackgroundImageLayout = (ImageLayout)PreviewSkin.borderrightlayout; + if (PreviewImages.borderbottom == null) + prepgbottom.BackColor = PreviewSkin.borderbottomcolour; + else + prepgbottom.BackgroundImage = PreviewImages.borderbottom; + prepgbottom.BackgroundImageLayout = (ImageLayout)PreviewSkin.borderbottomlayout; + if (PreviewSkin.enablebordercorners == true) + { + if (PreviewImages.bottomleftcorner == null) + prepgbottomlcorner.BackColor = PreviewSkin.bottomleftcornercolour; + else + prepgbottomlcorner.BackgroundImage = PreviewImages.bottomleftcorner; + prepgbottomlcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.bottomleftcornerlayout; + if (PreviewImages.bottomrightcorner == null) + prepgbottomrcorner.BackColor = PreviewSkin.bottomrightcornercolour; + else + prepgbottomrcorner.BackgroundImage = PreviewImages.bottomrightcorner; + prepgbottomrcorner.BackgroundImageLayout = (ImageLayout)PreviewSkin.bottomrightcornerlayout; + } + else { + prepgbottomlcorner.BackColor = PreviewSkin.borderrightcolour; + prepgbottomrcorner.BackColor = PreviewSkin.borderrightcolour; + prepgbottomlcorner.BackgroundImage = null; + prepgbottomrcorner.BackgroundImage = null; + } + + //set bottom border corner size + prepgbottomlcorner.Size = new Size(PreviewSkin.borderwidth, PreviewSkin.borderwidth); + prepgbottomrcorner.Size = new Size(PreviewSkin.borderwidth, PreviewSkin.borderwidth); + prepgbottomlcorner.Location = new Point(0, pnlwindowpreview.Height - PreviewSkin.borderwidth); + prepgbottomrcorner.Location = new Point(pnlwindowpreview.Width, pnlwindowpreview.Height - PreviewSkin.borderwidth); + } + + private void setupborders() + { + if (API.Upgrades["windowborders"] == false) + { + prepgleft.Hide(); + prepgbottom.Hide(); + prepgright.Hide(); + } + } + + private void setuptitlebar() + { + setupborders(); + + prepgleft.Width = PreviewSkin.borderwidth; + prepgright.Width = PreviewSkin.borderwidth; + prepgbottom.Height = PreviewSkin.borderwidth; + pretitlebar.Height = PreviewSkin.titlebarheight; + + if (PreviewSkin.enablecorners == true) + { + prepgtoplcorner.Show(); + prepgtoprcorner.Show(); + prepgtoprcorner.Width = PreviewSkin.titlebarcornerwidth; + prepgtoplcorner.Width = PreviewSkin.titlebarcornerwidth; + } + else { + prepgtoplcorner.Hide(); + prepgtoprcorner.Hide(); + } + + if (API.Upgrades["titlebar"] == false) + { + pretitlebar.Hide(); + } + + if (API.Upgrades["titletext"] == false) + { + pretitletext.Hide(); + } + else { + pretitletext.Font = new Font(PreviewSkin.titletextfontfamily, PreviewSkin.titletextfontsize, PreviewSkin.titletextfontstyle, GraphicsUnit.Point); + pretitletext.Text = "Your app name here"; + pretitletext.Show(); + } + + if (API.Upgrades["closebutton"] == false) + { + preclosebutton.Hide(); + } + else { + preclosebutton.BackColor = PreviewSkin.closebtncolour; + preclosebutton.Size = PreviewSkin.closebtnsize; + preclosebutton.Show(); + } + + if (API.Upgrades["rollupbutton"] == false) + { + prerollupbutton.Hide(); + } + else { + prerollupbutton.BackColor = PreviewSkin.rollbtncolour; + prerollupbutton.Size = PreviewSkin.rollbtnsize; + prerollupbutton.Show(); + } + + if (API.Upgrades["minimizebutton"] == false) + { + preminimizebutton.Hide(); + } + else { + preminimizebutton.BackColor = PreviewSkin.minbtncolour; + preminimizebutton.Size = PreviewSkin.minbtnsize; + preminimizebutton.Show(); + } + + if (API.Upgrades["windowborders"] == true) + { + preclosebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.closebtnfromside - preclosebutton.Size.Width, PreviewSkin.closebtnfromtop); + prerollupbutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.rollbtnfromside - prerollupbutton.Size.Width, PreviewSkin.rollbtnfromtop); + preminimizebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.minbtnfromside - preminimizebutton.Size.Width, PreviewSkin.minbtnfromtop); + switch (PreviewSkin.titletextpos) + { + case "Left": + pretitletext.Location = new Point(PreviewSkin.titletextfromside, PreviewSkin.titletextfromtop); + break; + case "Centre": + pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, PreviewSkin.titletextfromtop); + break; + } + pretitletext.ForeColor = PreviewSkin.titletextcolour; + } + else { + preclosebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.closebtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preclosebutton.Size.Width, PreviewSkin.closebtnfromtop); + prerollupbutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.rollbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - prerollupbutton.Size.Width, PreviewSkin.rollbtnfromtop); + preminimizebutton.Location = new Point(pretitlebar.Size.Width - PreviewSkin.minbtnfromside - prepgtoplcorner.Width - prepgtoprcorner.Width - preminimizebutton.Size.Width, PreviewSkin.minbtnfromtop); + switch (PreviewSkin.titletextpos) + { + case "Left": + pretitletext.Location = new Point(PreviewSkin.titletextfromside + prepgtoplcorner.Width, PreviewSkin.titletextfromtop); + break; + case "Centre": + pretitletext.Location = new Point((pretitlebar.Width / 2) - pretitletext.Width / 2, PreviewSkin.titletextfromtop); + break; + } + pretitletext.ForeColor = PreviewSkin.titletextcolour; + } + + //Change when Icon skinning complete + // Change to program's icon + if (API.Upgrades["appicons"] == true) + { + prepnlicon.Visible = true; + prepnlicon.Location = new Point(PreviewSkin.titleiconfromside, PreviewSkin.titleiconfromtop); + prepnlicon.Size = new Size(PreviewSkin.titlebariconsize, PreviewSkin.titlebariconsize); + prepnlicon.Image = Properties.Resources.iconShifter; + + } + + } + + #endregion + + private void btnsaveskin_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".skn", File_Skimmer.FileSkimmerMode.Save); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string res = API.GetFSResult(); + if (res != "fail") + { + Skinning.Utilities.saveskintofile(res); + API.CreateInfoboxSession("Skin Loader", "The skin has been saved successfully.", infobox.InfoboxMode.Info); + } + }; + } + + private void btnbacktoskinloader_Click(object sender, EventArgs e) + { + pnlskinpacks.Hide(); + pgcontents.Show(); + } + + private void cbpackfiles_SelectedIndexChanged(object sender, EventArgs e) + { + if(cbpackfiles.Text.EndsWith(".skn")) + { + string dirsepchar = "\\"; + switch(OSInfo.GetPlatformID()) + { + case "microsoft": + dirsepchar = "\\"; + break; + default: + dirsepchar = "/"; + break; + } + LoadedSkinFile = Paths.SkinDir + "_packdata" + dirsepchar + cbpackfiles.Text; + } + } + + private void btnbrowse_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".spk", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string res = API.GetFSResult(); + if(res != "fail") + { + LoadedPack = res; + SetupPackUI(); + } + }; + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/SkinLoader.resx b/source/WindowsFormsApplication1/Apps/SkinLoader.resx new file mode 100644 index 0000000..a4bf070 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/SkinLoader.resx @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="predesktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <data name="label5.Text" xml:space="preserve"> + <value>Skin Packs are a handy way of grouping your skins together into one file so that you don't have to load separate .skn files. You can simply select any skin in the loaded pack, hit Apply and be on your way!</value> + </data> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Terminal.Designer.cs b/source/WindowsFormsApplication1/Apps/Terminal.Designer.cs new file mode 100644 index 0000000..5f7ba27 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Terminal.Designer.cs @@ -0,0 +1,126 @@ +using System; + +namespace ShiftOS +{ + partial class Terminal + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.txtterm = new System.Windows.Forms.TextBox(); + this.tmrfirstrun = new System.Windows.Forms.Timer(this.components); + this.tmrshutdown = 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.tmrstorylineupdate = new System.Windows.Forms.Timer(this.components); + this.panel2 = new System.Windows.Forms.Panel(); + this.tmrsetfont = new System.Windows.Forms.Timer(this.components); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // txtterm + // + this.txtterm.BackColor = System.Drawing.Color.Black; + this.txtterm.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtterm.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtterm.Dock = System.Windows.Forms.DockStyle.Fill; + this.txtterm.Font = new System.Drawing.Font("Lucida Console", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtterm.ForeColor = System.Drawing.Color.White; + this.txtterm.Location = new System.Drawing.Point(0, 0); + this.txtterm.Multiline = true; + this.txtterm.Name = "txtterm"; + this.txtterm.Size = new System.Drawing.Size(650, 396); + this.txtterm.TabIndex = 0; + this.txtterm.KeyUp += new System.Windows.Forms.KeyEventHandler(this.ScrollDeactivate); + this.txtterm.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ScrollTerm); + // + // tmrfirstrun + // + this.tmrfirstrun.Interval = 1000; + // + // pullbs + // + this.pullbs.Interval = 1; + // + // pullbottom + // + this.pullbottom.Interval = 1; + // + // pullside + // + this.pullside.Interval = 1; + // + // tmrstorylineupdate + // + this.tmrstorylineupdate.Interval = 1000; + // + // panel2 + // + this.panel2.Controls.Add(this.txtterm); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(0, 0); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(650, 396); + this.panel2.TabIndex = 3; + // + // tmrsetfont + // + this.tmrsetfont.Tick += new System.EventHandler(this.tmrsetfont_Tick); + // + // Terminal + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.Black; + this.ClientSize = new System.Drawing.Size(650, 396); + this.Controls.Add(this.panel2); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.KeyPreview = true; + this.MinimumSize = new System.Drawing.Size(350, 200); + this.Name = "Terminal"; + this.Text = "Terminal"; + this.TopMost = true; + this.Load += new System.EventHandler(this.Terminal_Load); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.ResumeLayout(false); + + } + internal System.Windows.Forms.TextBox txtterm; + internal System.Windows.Forms.Timer tmrfirstrun; + internal System.Windows.Forms.Timer tmrshutdown; + internal System.Windows.Forms.Timer pullbs; + internal System.Windows.Forms.Timer pullbottom; + internal System.Windows.Forms.Timer pullside; + internal System.Windows.Forms.Timer tmrstorylineupdate; + + #endregion + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Timer tmrsetfont; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/Terminal.cs b/source/WindowsFormsApplication1/Apps/Terminal.cs new file mode 100644 index 0000000..944b333 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Terminal.cs @@ -0,0 +1,2757 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Drawing.Text; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class Terminal : Form + { + string current_dir = ""; + + public Terminal() + { + InitializeComponent(); + current_dir = Paths.SaveRoot; + } + + public Terminal(bool modlog) + { + ModLogger = modlog; + InitializeComponent(); + API.LoggerTerminal = this; + current_dir = Paths.SaveRoot; + } + + public void StartOtherPlayerStory() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("IP Address <hidden> is connecting as '???'..."); + break; + case 1: + WriteLine("Connection established."); + break; + case 2: + WriteLine("???: Hi, ShiftOS user. I have something to tell you."); + break; + case 3: + WriteLine("???: I'm not a hacker. I'm not a programmer. I am just like you."); + break; + case 4: + WriteLine("???: I am... the Other Player."); + break; + case 5: + WriteLine("???: I too have heard DevX's story about ShiftOS being an experimental operating system."); + break; + case 6: + WriteLine("???: I have also met another user. We'll call him... I don't know... Robert."); + break; + case 7: + WriteLine("???: And this Robert guy, well, he knows a lot about ShiftOS, and DevX."); + break; + case 8: + WriteLine("???: Robert is a fake name I'm calling him. You might know him as Hacker101."); + break; + case 9: + WriteLine("???: Anyways, He told me about you, so I figured I would help you get out of this mess."); + break; + case 10: + WriteLine("???: He said he'll help me get my hard drive back, and get ShiftOS off my system. Once he does, I'll tell you."); + break; + case 11: + WriteLine("???: In the meantime, I have one word for you. Survive. Do NOT let DevX get to you. Do not fall for his tricks. Just play along until I contact you."); + break; + case 12: + WriteLine("???: I'll talk to you about this soon."); + break; + case 13: + t.Stop(); + this.Close(); + API.Upgrades["otherplayerstory1"] = true; + break; + } + i += 1; + }; + t.Start(); + } + + public bool ModLogger = false; + + private void Terminal_Load(object sender, EventArgs e) + { + objToWriteTo = this.txtterm; + SaveSystem.Utilities.LoadedSave.newgame = false; + if(API.Upgrades["windowedterminal"] == true) + { + this.WindowState = FormWindowState.Normal; + } else + { + this.WindowState = FormWindowState.Maximized; + } + + txtterm.KeyDown += new KeyEventHandler(txtterm_KeyPress); + txtterm.Click += new EventHandler(txtterm_Click); + tmrfirstrun.Tick += new EventHandler(tmrfirstrun_Tick); + tmrshutdown.Tick += new EventHandler(tmrshutdown_Tick); + if (Hacking == false) + { + WriteLine(prefix); + } + txtterm.Select(txtterm.TextLength, 0); + if (API.Upgrades["terminalscrollbar"] == true) + { + txtterm.ScrollBars = ScrollBars.Vertical; + } + else + { + txtterm.ScrollBars = ScrollBars.None; + + } + txtterm.MouseWheel += (object s, MouseEventArgs a) => + { + if (Zooming == true) + { + txtterm.ScrollBars = ScrollBars.None; + if (ZoomMultiplier > 0) + { + if (a.Delta > 0) + { + ZoomMultiplier += 1; + } else + { + ZoomMultiplier -= 1; + } + ResetTerminalFont(); + } + else + { + ZoomMultiplier = 1; + } + } + }; + ResetTerminalFont(); + StartLogCheck(); + tmrsetfont.Start(); + + + } + + + private void StartLogCheck() + { + if(ModLogger == true) + { + var tmrlog = new System.Windows.Forms.Timer(); + tmrlog.Interval = 500; + tmrlog.Tick += (object s, EventArgs a) => + { + if (File.Exists(Paths.Mod_Temp + "cmdlog")) + { + string log = File.ReadAllText(Paths.Mod_Temp + "cmdlog"); + API.CreateInfoboxSession("test", log, infobox.InfoboxMode.Info); + } + }; + tmrlog.Start(); + } + } + + public string[] cmds; + public int rolldownsize; + public int oldbordersize; + public int oldtitlebarheight; + public bool justopened = false; + public bool needtorollback = false; + public int minimumsizewidth = 350; + + public int minimumsizeheight = 200; + + public string EndOfAlias; + public string command; + int trackpos; + int firstrun; + public bool sendinputtomod = false; + + string prefix = $"{API.Username}@{API.OSName} $> "; + + private void ReadCommand() + { + command = txtterm.Lines[txtterm.Lines.Length - 1]; + command = command.Replace(prefix, ""); + command = command.ToLower(); + } + + internal void StartDanaRossStory() + { + var t = new Thread(new ThreadStart(new Action(() => + { + WriteLine("User <65.48.121.24> connecting as 'Dana'"); + API.PlaySound(Properties.Resources.dial_up_modem_02); + WriteLine("Dana: Hey! That was quite the battle, huh?"); + BeepSleep(1000); + WriteLine("Dana: Well - since you beat me, let me let you in on a little secret."); + BeepSleep(3000); + WriteLine("Dana: ShiftOS's desktop may seem pretty complicated and customizable for you right now, but trust me. It gets better."); + BeepSleep(2500); + WriteLine("Dana: I'm gonna patch your Shiftorium so you can get some neat upgrades!"); + BeepSleep(3000); + WriteLine("Dana: Also, if you feel like doing more hacker battles, why not check out Tier 2 in the Network Browser?"); + BeepSleep(2750); + WriteLine("Dana: I've also added my network modules to your network - you'll just have to wait for them to regenerate."); + BeepSleep(500); + WriteLine("Dana: Well, talk to you some other time!"); + BeepSleep(1000); + this.Invoke(new Action(() => + { + API.Upgrades["midgamebridge"] = true; + this.Close(); + })); + }))); + t.Start(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtterm_Click(object sender, EventArgs e) + { + txtterm.Select(txtterm.TextLength, 0); + txtterm.ScrollToCaret(); + } + + public void SelectBottom() + { + txtterm.Focus(); + txtterm.Select(txtterm.TextLength, 0); + } + + // ERROR: Handles clauses are not supported in C# + private void txtterm_KeyPress(object sender, System.Windows.Forms.KeyEventArgs e) + { + if(e.Control) { + if(API.Upgrades["zoomableterminal"] == true) + { + Zooming = true; + } + } + + if (e.KeyCode == Keys.T && e.Control && blockctrlt == false) + { + this.Close(); + e.SuppressKeyPress = true; + } + + switch (e.KeyCode) + { + case Keys.ShiftKey: + trackpos = trackpos - 1; + break; + case Keys.Alt: + trackpos = trackpos - 1; + break; + case Keys.CapsLock: + trackpos = trackpos - 1; + break; + case Keys.ControlKey: + trackpos = trackpos - 1; + break; + case Keys.LWin: + trackpos = trackpos - 1; + break; + case Keys.RWin: + trackpos = trackpos - 1; + break; + case Keys.Right: + if (Hacking == false) + { + if (txtterm.SelectionStart == txtterm.TextLength) + { + trackpos = trackpos - 1; + } + } + else + { + switch (SelectedMode) + { + case 1: + if (SelectedCharacter < ShiftOS.Hacking.Tools.Count - 1) + { + SelectedCharacter += 1; + ShowTools(); + } + break; + case 2: + if (SelectedCharacter < ShiftOS.Hacking.Characters.Count - 1) + { + SelectedCharacter += 1; + ShowChar(); + } + break; + } + } + break; + case Keys.Left: + if (Hacking == false) + { + if (trackpos < 1) + { + e.SuppressKeyPress = true; + trackpos = trackpos - 1; + } + else { + trackpos = trackpos - 2; + } + } + else + { + switch(SelectedMode) + { + case 1: + if (SelectedCharacter > 0) + { + SelectedCharacter -= 1; + ShowTools(); + } + + break; + case 2: + if (SelectedCharacter > 0) + { + SelectedCharacter -= 1; + ShowChar(); + } + break; + + } + } + break; + case Keys.Up: + e.SuppressKeyPress = true; + ReadCommand(); + if (API.LastRanCommand != "" && command == "") + { + txtterm.Text += API.LastRanCommand; + trackpos += API.LastRanCommand.Length; + txtterm.Select(txtterm.TextLength, 0); + } + else { + trackpos = trackpos - 1; + } + break; + case Keys.Down: + e.SuppressKeyPress = true; + trackpos = trackpos - 1; + break; + case Keys.D1: + if (Hacking == true) + { + SelectedMode = 1; + Hack_ShowCharacters(); + e.SuppressKeyPress = true; + } + else + { + trackpos -= 1; + } + break; + case Keys.D2: + if (Hacking == true && SelectedMode == 0) + { + SelectedMode = 2; + Hack_ShowCharacters(); + e.SuppressKeyPress = true; + } + else + { + trackpos -= 1; + } + break; + } + + if (e.KeyCode == Keys.Enter) + { + e.SuppressKeyPress = true; + if (LuaMode == false) + { + if (Hacking == false) + { + ReadCommand(); + if (command != "") + { + DoCommand(); + } + + if (command == "clear") + { + txtterm.Text = txtterm.Text + prefix; + txtterm.Select(txtterm.Text.Length, 0); + } + else + { + txtterm.Text = txtterm.Text + Environment.NewLine + prefix; + txtterm.Select(txtterm.Text.Length, 0); + } + trackpos = 0; + } + else + { + switch(SelectedMode) + { + case 1: + ShiftOS.Hacking.StartHack(SelectedCharacter, UpgradeToHack); + this.Close(); + break; + case 2: + var c = ShiftOS.Hacking.Characters[SelectedCharacter].Cost; + if(API.Codepoints >= c) + { + API.RemoveCodepoints(c); + ShiftOS.Hacking.StartHackWithCharacter(SelectedCharacter, UpgradeToHack); + this.Close(); + } + else + { + WriteLine("You can't afford to pay this partner. Please choose another."); + } + break; + } + } + } + else + { + trackpos = 0; + var lua = txtterm.Lines[txtterm.Lines.Length - 1]; + try { + Interpreter.mod(lua); + } + catch(Exception ex) + { + WriteLine(ex.Message); + } + if (LuaMode == true) + { + WriteLine(""); + } + txtterm.Select(txtterm.TextLength, 0); + } + } + else { + if (e.KeyCode == Keys.Back) + { + } + else { + if (Viruses.InfectedWith("keyboardfucker")) { + var rnd = new Random(); + if(rnd.Next(0, 20) == 10) + { + e.Handled = true; + txtterm.Text += Viruses.KeyboardInceptor.Intercept(); + trackpos += 1; + } + else + { + trackpos += 1; + } + } + else { + trackpos = trackpos + 1; + } + } + } + + if (e.KeyCode == Keys.Back) + { + if (trackpos < 1) + { + e.SuppressKeyPress = true; + } + else { + if (txtterm.SelectedText.Length < 1) + { + trackpos = trackpos - 1; + } + else { + e.SuppressKeyPress = true; + } + } + } + + if (SaveSystem.ShiftoriumRegistry.ShiftoriumUpgrades["autoscrollterminal"] == true) + { + txtterm.Select(txtterm.TextLength, 0); + txtterm.ScrollToCaret(); + } + + } + + internal void StartShellShock() + { + var t = new Thread(new ThreadStart(new Action(() => + { + Thread.Sleep(300); + WriteLine("Sending false packet to shiftnet://devx/tracker..."); + Thread.Sleep(100); + WriteLine("Awaiting reply from server..."); + Thread.Sleep(5000); + WriteLine("Got reply with header \"SOS_TRK_GET\"."); + Thread.Sleep(50); + WriteLine("[kernel] Sending usage log to server..."); + WriteLine("Intercepting outgoing request..."); + Thread.Sleep(200); + WriteLine("Got packet contents..."); + Thread.Sleep(25); + WriteLine("Sifting..."); + Thread.Sleep(500); + WriteLine("Found connection data for shiftnet://devx/tracker."); + Thread.Sleep(100); + WriteLine(@"Username: devx +Password: z7fjsd3"); + Thread.Sleep(100); + WriteLine("Authenticating with SSH server on shiftnet://devx/tracker running Arch Linux x86_64..."); + Thread.Sleep(1000); + WriteLine("[SSH] Access granted."); + Thread.Sleep(100); + WriteLine($"[Message] ???: We're in. In about 75 seconds DevX's server will go down. It'll be quite cool actually, Don't know if you've ever seen a forkbomb in action, but because you're in an SSH session with DevX's server and I'm also controlling the same session you're gonna see one. Oh, yeah, this server's the only one of his that doesn't actually run ShiftOS."); + Thread.Sleep(25000); + this.Invoke(new Action(() => + { + txtterm.Text = ""; + })); + int i = 60; + while(i >= 1) + { + Thread.Sleep(1000); + WriteLine($"Beginning attack on server in {i} seconds."); + i -= 1; + } + WriteLine("[devx@tracker ~]$ "); + string cmd = ":`(`)`{` `:`|`:` `&` `}`;`:"; //yep. I'm pretending to use a forkbomb on DevX's server. This'll be FUN to code. </sarcasm> + foreach(string c in cmd.Split('`')) + { + Thread.Sleep(100); + this.Invoke(new Action(() => + { + txtterm.Text += c; + })); + } + WriteLine("[devx@tracker ~]$ "); + WriteLine("[Message] ???: Alright. I entered the command for you. Looks like it did nothing. DevX wouldn't even know what's happening... but keep your terminal open for 30 seconds."); + Thread.Sleep(30000); + this.Invoke(new Action(() => + { + FinalMission.EndGameHandler.GoToNextObjective(); + })); + int progress = 0; + while(progress <= 10000) + { + int r = new Random().Next(0, 1); + switch(r) + { + case 0: + WriteLine("-bash: fork: Resource temporarily unavailable"); + break; + case 1: + WriteLine("-bash: fork: retry: Resource temporarily unavailable"); + break; + } + Thread.Sleep(progress / 10); + progress++; + } + WriteLine("[SSH] Connection to server dropped."); + this.Invoke(new Action(() => + { + FinalMission.EndGameHandler.GoToNextObjective(); + })); + this.Invoke(new Action(() => { this.Close(); })); + }))); + t.Start(); + } + + public void SetPrefix(string _prefix) + { + prefix = _prefix; + } + + internal void StartBridgeToMidGame() + { + var t2 = new System.Windows.Forms.Timer(); + t2.Interval = 4000; + int i2 = 0; + t2.Tick += (object s, EventArgs e) => + { + switch (i2) + { + case 0: + if(API.Upgrades["hacker101"] == true) + { + WriteLine("Hacker101: Hello. We meet again. The Other Player told me about your situation."); + } + else + { + API.Upgrades["hacker101"] = true; + WriteLine("Hacker101: The Other Player told me about your situation."); + } + break; + case 1: + WriteLine("Hacker101: Lemme guess. DevX found out about you having the Shiftnet, didn't he..."); + break; + case 2: + WriteLine("Hacker101: Well I guess we'll have to fight fire with fire. You remember that person who told you about Hacker Battles?"); + break; + case 3: + WriteLine("Hacker101: It's time you know who he is. He is, in fact, me, and to continue on about Hacker Battles..."); + break; + case 4: + WriteLine("Hacker101: I can help you take down DevX, but we'll need to take down his defenses and get into his network."); + break; + case 5: + WriteLine("Hacker101: DevX's network of servers is larger than any datacenter on Earth, and it'll take time to plan the perfect attack."); + break; + case 6: + WriteLine("Hacker101: Think of it this way. DevX has a network of networks, each with their own leader."); + break; + case 7: + WriteLine("Hacker101: I can help you find these networks, but it's up to you to take 'em down."); + break; + case 8: + WriteLine("Hacker101: Of course, it's hard to hack a network if you don't know how to start a battle."); + break; + case 9: + WriteLine("Hacker101: Introducing the Battle Preparation Screen."); + break; + case 10: + WriteLine("Hacker101: It'll show you any network I've found, and it'll tell you some useful info about it."); + break; + case 11: + WriteLine("Hacker101: However the spkg package for this thing is HUGE, and will require lots of tweaks to the ShiftOS desktop. spkg will hopefully administer the tweaks for you, but here's a rundown of what'll happen."); + break; + case 12: + WriteLine("Hacker101: For one, you'll be able to have multiple desktop panels to fit more widgets on them."); + break; + case 13: + WriteLine("Hacker101: And if you have the App Launcher, it will get sorted so it doesn't take up the entire screen when you get so many applications installed."); + break; + case 14: + WriteLine("Hacker101: And the rest is a surprise. I'll initiate the install sequence."); + break; + case 15: + InstallMidGameDesktop(); + break; + } + i2 += 1; + }; + + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + + t.Tick += (object s, EventArgs a) => + { + + + switch (i) + { + case 0: + WriteLine("IP <hidden> connecting as Hacker101..."); + break; + case 1: + WriteLine("Hacker101: Hello, ShiftOS user. I am a hacker."); + break; + case 2: + if (API.BitnoteAddress != null) + { + WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, your Bitnote Address is {API.BitnoteAddress.Address}, and you have {API.BitnoteAddress.Bitnotes}. That's your private address, by the way."); + } + else + { + WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, and you do not have a Bitnote Address."); + } + break; + case 3: + WriteLine("Hacker101: Enough fun in games. Listen. There are two things you need to know."); + break; + case 4: + WriteLine("Hacker101: Thing #1. DevX isn't real."); + break; + case 5: + WriteLine("Hacker101: I've decompiled parts of ShiftOS. And you know what I found?"); + break; + case 6: + WriteLine("Hacker101: Everything DevX says. Everything he does. Everything he THINKS. It's all hardcoded directly into ShiftOS's core."); + break; + case 7: + WriteLine("Hacker101: Want proof? Here. I'll run a quick Lua script for you."); + string DecompiledCode = Properties.Resources.DecompiledCode; + var l = new LuaInterpreter(); + Form win = l.mod.create_window("Decompiled Code", null, 720, 480); + TextBox txt = new TextBox(); + txt.Multiline = true; + txt.Text = Properties.Resources.DecompiledCode; + txt.BorderStyle = BorderStyle.None; + txt.BackColor = Color.Black; + txt.ForeColor = Color.White; + txt.Font = new Font(OSInfo.GetMonospaceFont(), 9); + l.mod.set_dock(txt, "fill"); + l.mod.add_widget_to_window(win, txt); + break; + case 8: + WriteLine("Hacker101: Not only is that some nice, smokin' fresh C# code directly from ShiftOS, but that's a nice steaming pile of bird poop on DevX's doorstep."); + break; + case 9: + WriteLine("Hacker101: Thing #2. The Shiftnet holds some secrets."); + break; + case 10: + WriteLine("Hacker101: What kind of secrets, I hear you ask through your microphone (jesus, do you seriously talk to us with your voice? Are you that bored?)"); + break; + case 11: + WriteLine("Hacker101: Well. I'm talking, pieces of a Lua script that could help stop DevX dead in his digital tracks."); + break; + case 12: + WriteLine("Hacker101: All you gotta do is use my decryption utilities to find the pieces of this encrypted script, download them, decrypt them, and the utility will automatically piece them together for you."); + break; + case 13: + WriteLine("Hacker101: Shiftnet pages ending with .enc are your best bet."); + break; + case 14: + WriteLine("Hacker101: You can install the utilities using spkg install secret."); + break; + case 15: + WriteLine("Hacker101: Then, when the application installs, run it, and use the password 'binary_hell' to install the REAL utilities."); + break; + case 16: + WriteLine("Hacker101: Anyways, that wraps that up. But hang on. One more thing..."); + t.Stop(); + ShiftOS.Hacking.AddCharacter(new Character("Hacker101", "Let's get the job done.", 75, 45, 5)); + t2.Start(); + break; + } + i += 1; + }; + if(API.Upgrades["hacker101"] == true) + { + t2.Start(); + } + else + { + t.Start(); + } + + + } + + private void InstallMidGameDesktop() + { + //throw new NotImplementedException(); + } + + int SelectedMode = 0; + int SelectedCharacter = 0; + + public void ShowChar() + { + txtterm.Text = ""; + var h = ShiftOS.Hacking.Characters[SelectedCharacter]; + WriteLine(" == Partner Select =="); + WriteLine($"Partner: {SelectedCharacter + 1}/{ShiftOS.Hacking.Characters.Count}"); + WriteLine($"Name: {h.Name}"); + WriteLine($"Skill: {h.Skill}/100"); + WriteLine($"Speed: {h.Speed}/100"); + WriteLine($"Cost: {h.Cost}"); + WriteLine($"Bio: {h.Bio}"); + WriteLine(Environment.NewLine + "LEFT: Previous Partner, RIGHT: Next Partner, ENTER: Confirm"); + } + + public void ShowTools() + { + txtterm.Text = ""; + try + { + var h = ShiftOS.Hacking.Tools[SelectedCharacter]; + WriteLine(" == Attack Select =="); + WriteLine($"Attack: {SelectedCharacter + 1}/{ShiftOS.Hacking.Tools.Count}"); + WriteLine($"Name: {h.Name}"); + WriteLine($"Effectiveness: {h.Effectiveness}"); + WriteLine($"Description: {h.Description}"); + WriteLine(Environment.NewLine + "LEFT: Previous Attack, RIGHT: Next Attack, ENTER: Confirm"); + } + catch + { + WriteLine("There are no entries to display in this list."); + } + } + + private void Hack_ShowCharacters() + { + switch(SelectedMode) + { + case 1: + ShiftOS.Hacking.GetCharacters(); + SelectedCharacter = 0; + ShowTools(); + break; + case 2: + ShiftOS.Hacking.GetCharacters(); + SelectedCharacter = 0; + ShowChar(); + break; + } + } + + internal void StartAidenNirhStory() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("User 151.43.85.33 connecting as \"Aiden\"..."); + break; + case 2: + WriteLine($"Aiden: Hey there, {API.Username}1 I'm Aiden Nirh."); + break; + case 3: + WriteLine("Aiden: Have you seen Appscape?"); + break; + case 4: + WriteLine("Aiden: It's my package manager for ShiftOS. It's pretty neat."); + break; + case 5: + WriteLine("Aiden: You should check it out, it's on the Shiftnet at shiftnet://main/appscape!"); + break; + case 6: + WriteLine("Aiden: But remember, when browsing the Shiftnet try not to venture from the main server!"); + break; + case 7: + API.Upgrades["aidennirh"] = true; + t.Stop(); + this.Close(); + break; + } + i += 1; + }; + t.Start(); + } + + internal void StartHacker101Story() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("IP <hidden> connecting as Hacker101..."); + break; + case 1: + WriteLine("Hacker101: Hello, ShiftOS user. I am a hacker."); + break; + case 2: + if (API.BitnoteAddress != null) + { + WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, your Bitnote Address is {API.BitnoteAddress.Address}, and you have {API.BitnoteAddress.Bitnotes}. That's your private address, by the way."); + } + else + { + WriteLine($"Hacker101: I can prove it. You have {API.Codepoints} Codepoints, and you do not have a Bitnote Address."); + } + break; + case 3: + WriteLine("Hacker101: Enough fun in games. Listen. There are two things you need to know."); + break; + case 4: + WriteLine("Hacker101: Thing #1. DevX isn't real."); + break; + case 5: + WriteLine("Hacker101: I've decompiled parts of ShiftOS. And you know what I found?"); + break; + case 6: + WriteLine("Hacker101: Everything DevX says. Everything he does. Everything he THINKS. It's all hardcoded directly into ShiftOS's core."); + break; + case 7: + WriteLine("Hacker101: Want proof? Here. I'll run a quick Lua script for you."); + string DecompiledCode = Properties.Resources.DecompiledCode; + var l = new LuaInterpreter(); + Form win = l.mod.create_window("Decompiled Code", null, 720, 480); + TextBox txt = new TextBox(); + txt.Multiline = true; + txt.Text = Properties.Resources.DecompiledCode; + txt.BorderStyle = BorderStyle.None; + txt.BackColor = Color.Black; + txt.ForeColor = Color.White; + txt.Font = new Font(OSInfo.GetMonospaceFont(), 9); + l.mod.set_dock(txt, "fill"); + l.mod.add_widget_to_window(win, txt); + break; + case 8: + WriteLine("Hacker101: Not only is that some nice, smokin' fresh C# code directly from ShiftOS, but that's a nice steaming pile of bird poop on DevX's doorstep."); + break; + case 9: + WriteLine("Hacker101: Thing #2. The Shiftnet holds some secrets."); + break; + case 10: + WriteLine("Hacker101: What kind of secrets, I hear you ask through your microphone (jesus, do you seriously talk to us with your voice? Are you that bored?)"); + break; + case 11: + WriteLine("Hacker101: Well. I'm talking, pieces of a Lua script that could help stop DevX dead in his digital tracks."); + break; + case 12: + WriteLine("Hacker101: All you gotta do is use my decryption utilities to find the pieces of this encrypted script, download them, decrypt them, and the utility will automatically piece them together for you."); + break; + case 13: + WriteLine("Hacker101: Shiftnet pages ending with .enc are your best bet."); + break; + case 14: + WriteLine("Hacker101: You can install the utilities using spkg install secret."); + break; + case 15: + WriteLine("Hacker101: Then, when the application installs, run it, and use the password 'binary_hell' to install the REAL utilities."); + break; + case 16: + WriteLine("Hacker101: Now go. We need that script. I know a friend who will help you get your hard drive back from DevX if you can do this."); + t.Stop(); + ShiftOS.Hacking.AddCharacter(new Character("Hacker101", "Let's get the job done.", 75, 45, 5)); + API.Upgrades["hacker101"] = true; + this.Close(); + break; + } + i += 1; + }; + t.Start(); + } + + internal void StartOtherPlayerSysFix() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("User <hidden> connected as ???."); + break; + case 1: + if(API.Upgrades["otherplayerstory"] == true) + { + WriteLine($"???: {API.Username}! Did he find out? Oh God, I hope he can see this..."); + } + else + { + WriteLine("???: Hello? Uhhhh, is this stupid thing working?"); + } + break; + case 2: + if(API.Upgrades["otherplayerstory"] == true) + { + WriteLine("???: Ahh. Good. You can read this. It's me, the other player."); + } + else + { + WriteLine("???: Thank heaven. You can hear me. Don't ask who I am."); + } + break; + case 3: + WriteLine("???: Looks like DevX hit you hard. Guess he found out you had the Shiftnet."); + break; + case 4: + WriteLine("???: Relax. It's not your fault."); + break; + case 5: + WriteLine("???: Actually, the Shiftnet regularly sends data about it's usage, unencrypted, directly to DevX."); + break; + case 6: + WriteLine("???: This code seems to be embedded into all .saa files. It's actually how I found out about you."); + break; + case 7: + WriteLine("???: It seems weird, I know, but everytime you run a .saa file, an uplink is made to DevX's servers"); + break; + case 8: + if (API.Upgrades["otherplayerstory"] == true) + { + WriteLine("???: And, well, I think we could use this. I'll see if Hacker101 can track this uplink. If he can, you will know it the next time you run a .saa."); + } + else + { + WriteLine("???: And, well, I think we could use this. I have a friend who's good with his hacking skills. I'll see if he can help you stop DevX dead. If he can, he will contact you next time you run a .saa."); + } + break; + case 9: + WriteLine("???: Anyways, connected to your system, I can see your desktop. Looks pretty messed up, huh?"); + break; + case 10: + WriteLine("???: You're lucky you don't have the Windows Everywhere virus."); + break; + case 11: + Viruses.InfectFile(Paths.Drivers + "Keyboard.dri", Viruses.VirusID.WindowsEverywhere); + Viruses.CheckForInfected(); + WriteLine("???: Crap! I spoke too soon."); + break; + case 12: + WriteLine("???: Alright. I'll see if I can hijack your Shiftorium Registry, install a virus scanner, and get rid of the viruses."); + break; + case 13: + API.Upgrades["virusscanner"] = true; + var trm = new Terminal(); + API.CreateForm(trm, API.LoadedNames.TerminalName, Properties.Resources.iconTerminal); + trm.command = "vscan"; + trm.DoCommand(); + break; + case 14: + WriteLine("???: All better. I hope. As for those random files on your desktop, well, it seems DevX dropped some sort of secret message onto your system."); + break; + case 15: + WriteLine("???: Go ahead and try to decrypt it. The Shiftnet Lua API is very useful."); + break; + case 16: + if(API.Upgrades["otherplayerstory"] == true) + { + WriteLine("???: Anyways, I'm gonna go work with Hacker101, discuss those .saa uplinks, and see if we can come up with a suitable attack plan."); + } + else + { + WriteLine("???: Well, your system is all better. You don't have to thank me. Just, when you open a .saa file, I'll try to contact you if I'm not busy."); + } + break; + case 17: + WriteLine("???: Talk to you soon. And, remember. ShiftOS is like a forest. DevX is the predator, you are the prey. Watch your back."); + break; + case 18: + t.Stop(); + this.Close(); + API.Upgrades["otherplayerrescue"] = true; + break; + } + i += 1; + }; + t.Start(); + } + + internal void StartHackerBattleIntro() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + API.Upgrades["hackerbattles"] = true; + API.Upgrades["hackcommand"] = true; + WriteLine("IP address <unidentified> connecting with no identity..."); + break; + case 1: + WriteLine("Hey there. So I see you're into hacking."); + break; + case 2: + WriteLine("Oh, how rude of me. You don't know if I'm DevX or not."); + break; + case 3: + WriteLine("Well now you do. I will not show my identity, but I am not DevX."); + break; + case 4: + WriteLine("Anyways. There are two things you must know about hacking within ShiftOS."); + break; + case 5: + WriteLine("1. You can hack more than just the Shiftorium. Look around the user interface for any 'Hack it' buttons."); + break; + case 6: + WriteLine("Also, running 'hack' in the Terminal will let you do even more damage to DevX's security systems as well as give you some advantages."); + break; + case 7: + WriteLine("Ever wanted to make the Shiftorium have a bit of a sale, or even better, make all applications pay out more Codepoints than DevX intends?"); + break; + case 8: + WriteLine("Well that 'hack' command is useful then. Go ahead. Try it in another Terminal window. But good God do not close this one."); + break; + case 9: + WriteLine("Because there's one more thing you need to know."); + break; + case 10: + WriteLine("You are not the only person DevX has contacted with ShiftOS."); + break; + case 11: + WriteLine("There are others. Some of them, friendly. Some of them, knowledgable enough to help you."); + break; + case 12: + WriteLine("ShiftOS is like a private community. Anyone can contact anyone provided they have the skill to get in."); + break; + case 13: + WriteLine("Meaning, you may meet some very cool people."); + break; + case 14: + WriteLine("But some of us are... how do you say it... hostile."); + break; + case 15: + WriteLine("Enter the era of Hacker Battles."); + break; + case 16: + WriteLine("It's a network-vs-network every-man-for-himself affair. You'll meet criminals, hackers, agencies and much more."); + break; + case 17: + WriteLine("All offering a little surprise if you can take their network down."); + break; + case 18: + WriteLine("And it's best you get trained, for at any time, anyone could challenge you to one."); + break; + case 19: + WriteLine("And the amount of networks devastated due to untrained users picking a fight with the wrong person is alarmingly huge."); + break; + case 20: + WriteLine("I'll launch a practice program which will teach you the Hacker Battle interface and the fundamentals."); + break; + case 21: + WriteLine("And if you can complete the entire training session, you will be able to defend against anyone who dare battle you."); + break; + case 22: + WriteLine("Starting training session #53D8G in 5 seconds...."); + break; + case 23: + WriteLine("Don't worry. It shouldn't be too difficult for you."); + t.Stop(); + ShiftOS.Hacking.StartBattleTutorial(); + break; + } + i += 1; + }; + t.Start(); + } + + internal void StartDevXFuriousStory() + { + var t = new System.Windows.Forms.Timer(); + t.Interval = 4000; + int i = 0; + t.Tick += (object s, EventArgs a) => + { + switch (i) + { + case 0: + WriteLine("IP 199.108.232.1 Connecting..."); + break; + case 1: + WriteLine("DevX: WHAT HAVE YOU DONE?"); + break; + case 2: + WriteLine("DevX: How the HELL did you get the Shiftnet?"); + break; + case 3: + WriteLine("DevX: What sites have you seen? TALK TO ME."); + break; + case 4: + WriteLine("DevX: Alright, got nothing to say? Fine. You will pay for this..."); + break; + case 5: + WriteLine("DevX: I don't know what I'll do... I don't know when I'll do it... but you will wish you never touched a computer in your life..."); + break; + case 6: + t.Stop(); + Viruses.DropDevXPayload(); + this.Close(); + var trm = new Terminal(); + API.CreateForm(trm, API.LoadedNames.TerminalName, API.GetIcon("Terminal")); + trm.StartDevXFuriousStory2(); + break; + } + i += 1; + }; + t.Start(); + } + + private void StartDevXFuriousStory2() + { + var t = new Thread(new ThreadStart(new Action(() => + { + WriteLine("User '???' connecting..."); + API.PlaySound(Properties.Resources.dial_up_modem_02); + WriteLine("???: Hello? Ummm... this is awkward..."); + BeepSleep(3000); + WriteLine("???: Listen - I'm a hacker. Well, not really. I'm friends with one."); + BeepSleep(3000); + WriteLine("???: Seems like DevX completely obliterated your system with one of his viruses."); + BeepSleep(2500); + WriteLine("???: I'll fix that for you."); + API.Upgrades["virusscanner"] = true; + this.Invoke(new Action(() => + { + this.command = "vscan"; + this.DoCommand(); + })); + BeepSleep(1000); + WriteLine("???: Better? Cool. Now, I need your help."); + BeepSleep(1250); + WriteLine("???: I can't reveal my identity yet - but I co-own this chat-room..."); + BeepSleep(1175); + WriteLine("???: It's called the 'Hacker Alliance'."); + BeepSleep(1000); + WriteLine("???: I'm going to install something called 'HoloChat' on your system. It'll be quick."); + BeepSleep(2000); + WriteLine("Installing HoloChat..."); + API.Upgrades["holochat"] = true; + Thread.Sleep(100); + WriteLine("Done. Resetting desktop..."); + this.Invoke(new Action(() => { API.CurrentSession.SetupDesktop(); })); + WriteLine("Done."); + Thread.Sleep(3000); + WriteLine("???: Alright - I'll talk to you soon. Just join that chat room when you're ready."); + BeepSleep(1000); + this.Invoke(new Action(() => + { + this.Close(); + })); + }))); + t.Start(); + } + + private LuaInterpreter Interpreter = null; + private bool blockctrlt = false; + + /// <summary> + /// Call after creating a Terminal to let Maureen Fenn talk + /// to the player about the Shiftnet and the Appscape Package Manager. + /// </summary> + public void StartShiftnetStory() + { + System.Windows.Forms.Timer tmrstory = new System.Windows.Forms.Timer(); + tmrstory.Interval = 10000; + WriteLine("IP <hidden@shiftnet> connecting as 'Maureen Fenn'..."); + API.PlaySound(Properties.Resources.dial_up_modem_02); + var t = new Thread(new ThreadStart(new Action(() => + { + WriteLine("Maureen Fenn: Hey there, user! I have something to show you."); + BeepSleep(4000); + WriteLine("Maureen Fenn: So, there's this thing called the 'Shiftnet'"); + BeepSleep(3750); + WriteLine("Maureen Fenn: Turns out, that DevX wants to keep it a secret, as such he only installed it on his and my systems."); + BeepSleep(4250); + WriteLine("Maureen Fenn: But what's the point of listening to DevX when we have people like you who like to experiment?"); + BeepSleep(4000); + WriteLine("Maureen Fenn: Well, to be fair - he can destroy whatever he wants. Just like he did my company, Minimatch."); + BeepSleep(3000); + WriteLine("Maureen Fenn: But who cares! I'm going to install a few things on your system."); + API.Upgrades["shiftnet"] = true; + this.Invoke(new Action(() => + { + this.command = "spkg install shiftnet"; + this.DoCommand(); + })); + WriteLine("Shiftnet installed on system..."); + Thread.Sleep(4000); + WriteLine("Maureen Fenn: All done! Oh - just before I leave... go ahead and explore the Shiftnet!"); + BeepSleep(3000); + WriteLine("Maureen Fenn: But, be careful. Don't venture off the main server. You never know what's elsewhere..."); + BeepSleep(1000); + WriteLine("Maureen Fenn: Well, bye!"); + this.Invoke(new Action(() => + { + API.CurrentSession.SetupDesktop(); + this.Close(); + })); + }))); + t.Start(); + } + + /// <summary> + /// *BEEP* ZZZZZZZZzzzzzzzzzzz....... + /// </summary> + /// <param name="time">Time to sleep.</param> + private void BeepSleep(int time) + { + API.PlaySound(Properties.Resources.writesound); + Thread.Sleep(time); + } + + private List<string> GetFonts() + { + var lst = new List<string>(); + // 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) + { + lst.Add(myFont.Name.ToLower()); + } + //font_family + + return lst; + } + + public List<string> GetColorList() + { + var lst = new List<string>(); + if(API.Upgrades["red"] == true) + lst.Add("red"); + if (API.Upgrades["green"] == true) + lst.Add("green"); + if (API.Upgrades["blue"] == true) + lst.Add("blue"); + if (API.Upgrades["brown"] == true) + lst.Add("brown"); + if (API.Upgrades["purple"] == true) + lst.Add("purple"); + if (API.Upgrades["yellow"] == true) + lst.Add("yellow"); + if (API.Upgrades["orange"] == true) + lst.Add("orange"); + if (API.Upgrades["pink"] == true) + lst.Add("pink"); + if (API.Upgrades["gray"] == true) + lst.Add("gray"); + lst.Add("black"); + lst.Add("white"); + return lst; + } + + public Color SetColor(string name) + { + Color col = Color.White; + switch(name) + { + case "black": + col = Color.Black; + break; + case "white": + col = Color.White; + break; + case "gray": + col = Color.Gray; + break; + case "red": + col = Color.Red; + break; + case "green": + col = Color.Green; + break; + case "blue": + col = Color.Blue; + break; + case "brown": + col = Color.Brown; + break; + case "purple": + col = Color.Purple; + break; + case "yellow": + col = Color.Yellow; + break; + case "orange": + col = Color.Orange; + break; + } + return col; + } + + private bool LuaMode = false; + + public string GetPath(string path) + { + return path.Replace(Paths.SaveRoot, "").Replace(OSInfo.DirectorySeparator, "/"); + } + + public string GetParent(string path) + { + var d = new DirectoryInfo(path); + return d.Parent.FullName; + } + + public void DoCommand() + { + API.LastRanCommand = command; + string[] args = command.ToLower().Split(' '); + switch (args[0]) + { + case "ls": + case "dir": + if(API.Upgrades["fileskimmer"]) + { + foreach(var d in Directory.GetDirectories(current_dir)) + { + WriteLine($"[DIR] {new DirectoryInfo(d).Name}"); + } + foreach (var d in Directory.GetFiles(current_dir)) + { + WriteLine($"{new FileInfo(d).Name}"); + } + } + else + { + wrongcommand(); + } + break; + case "cd": + if (API.Upgrades["fileskimmer"]) + { + if (args[1] == "..") + { + if (GetPath(current_dir) != "/") + { + current_dir = GetParent(current_dir); + SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> "); + } + else + { + WriteLine("cd: Can't go up past the root."); + } + } + else + { + string newdir = current_dir + OSInfo.DirectorySeparator; + foreach (var dir in Directory.GetDirectories(current_dir)) + { + if (new DirectoryInfo(dir).Name.ToLower() == args[1]) + newdir = dir; + } + current_dir = newdir; + SetPrefix($"{API.Username}@{API.OSName} in {GetPath(current_dir)} $> "); + } + } + break; + case "upg": + if(API.DeveloperMode) + { + try + { + switch(args[1]) + { + case "get": + WriteLine(API.Upgrades[args[2]].ToString()); + break; + } + } + catch + { + + } + } + else + { + wrongcommand(); + } + break; + case "endgame_test": + if (API.DeveloperMode) + { + try + { + switch (args[1]) + { + case "choice_screen": + var cscreen = new ShiftOS.FinalMission.ChooseYourApproach(); + cscreen.WindowState = FormWindowState.Maximized; + //cscreen.TopMost = true; + cscreen.Show(); + break; + case "limitedmode": + API.LimitedMode = !API.LimitedMode; + WriteLine($"Limited mode set to {API.LimitedMode}."); + break; + } + } + catch + { + WriteLine("Invalid arguments."); + } + } + else + { + wrongcommand(); + } + break; + case "htutorial": + ShiftOS.Hacking.StartBattleTutorial(); + break; + case "fake_buy": + if (API.DeveloperMode) + { + try + { + if (API.Upgrades.ContainsKey(args[1])) + { + API.Upgrades[args[1]] = true; + WriteLine($"Bought upgrade {args[1]}."); + API.CurrentSession.SetupAppLauncher(); + API.UpdateWindows(); + SaveSystem.Utilities.saveGame(); + } + else + { + WriteLine("Upgrade not found."); + } + } + catch + { + WriteLine("fake_buy: Bad arguments."); + } + } + else + { + wrongcommand(); + } + break; + case "connections": + try + { + switch(args[1]) + { + case "list": + foreach(var client in Package_Grabber.clients) + { + WriteLine($"Hostname: {client.Key}, Port: {client.Value.RemotePort}, Online: {client.Value.IsConnected}"); + } + break; + case "gui": + API.CreateForm(new ConnectionManager(), "Connections", API.GetIcon("Connections")); + break; + case "drop": + foreach(var client in Package_Grabber.clients) + { + Package_Grabber.Disconnect(client.Key); + } + break; + case "add": + string host = args[2]; + int port = 0; + int.TryParse(args[3], out port); + if (!Package_Grabber.clients.ContainsKey(host)) + { + Package_Grabber.ConnectToServer(host, port); + WriteLine("Connection to host established successfully."); + } + else + { + var c = Package_Grabber.clients[host]; + if (c.IsConnected == false) + { + c.Connect(host, port); + WriteLine("Re-established connection with host."); + } + else { + WriteLine("This host has been connected to already."); + } + } + break; + } + } + catch + { + WriteLine("connections: Missing arguments."); + } + break; + case "story": + if(API.DeveloperMode == true && API.Upgrades["shiftnet"]) + { + try + { + switch(args[1]) + { + case "aidennirh": + StartAidenNirhStory(); + break; + case "devxfurious": + StartDevXFuriousStory(); + break; + case "battletut": + StartHackerBattleIntro(); + break; + case "otherplayer": + StartDevXFuriousStory(); + break; + case "hacker101": + StartHacker101Story(); + break; + } + } + catch + { + WriteLine("Missing arguments."); + } + } + else { wrongcommand(); } + break; + case "make": + try + { + string path = command.Replace("make ", ""); + string realpath = $"{Paths.SaveRoot}{path.Replace("/", OSInfo.DirectorySeparator)}"; + if (File.Exists(realpath + OSInfo.DirectorySeparator + "main.lua")) + { + WriteLine("Compiling to " + path + ".saa"); + ZipFile.CreateFromDirectory(realpath, realpath + ".saa"); + } + else + { + WriteLine($"make: *** No rule to make target \"{realpath}\". Stop."); + } + } + catch + { + WriteLine("make: Invalid arguments."); + } + break; + case "linux": + if(API.DeveloperMode) + { + WriteLine("Upgrading your system..."); + foreach(var upg in Shiftorium.Utilities.GetAvailable()) + { + API.Upgrades[upg.id] = true; + WriteLine("Installed upgrade \"" + upg.Name + "\"..."); + } + API.UpdateWindows(); + API.CurrentSession.SetupDesktop(); + } + else + { + wrongcommand(); + } + break; + case "netgen": + WriteLine("Starting netgen..."); + API.CreateForm(new NetGen(), "Network Generator", API.GetIcon("Terminal")); + break; + case "lua": + if(API.DeveloperMode == true) + { + try + { + string f = args[1]; + WriteLine(f); + f = command.Remove(0, 4); + WriteLine(f); + string real = $"{Paths.SaveRoot}{f.Replace("/", OSInfo.DirectorySeparator)}"; + WriteLine(real); + if (File.Exists(real)) + { + WriteLine("Running Lua script at " + f + "."); + var l = new LuaInterpreter(real); + } + else + { + WriteLine("Lua script file not found."); + } + } + catch + { + this.LuaMode = true; + this.Interpreter = new LuaInterpreter(); + this.Interpreter.mod.print = new Action<string>((text) => WriteLine(text)); + this.Interpreter.mod.exit = new Action(() => + { + this.LuaMode = false; + this.Interpreter = null; + WriteLine($"{API.CurrentSave.username}@{API.CurrentSave.osname} $> "); + }); + WriteLine("ShiftOS Lua Interpreter - v1.0"); + WriteLine("Created by Michael VanOverbeek"); + WriteLine(Environment.NewLine + "How to use: Simply type some Lua code and watch it come to life. Code can be executed on one line, and unlike most interpreters, you can access code from one line in another."); + WriteLine(Environment.NewLine + "When you're done, simply press the Enter key to execute the code." + Environment.NewLine); + } + } + else + { + wrongcommand(); + } + break; + case "hack": + if(API.Upgrades["hacking"] == true) + { + StartHackingSession("random"); + } + else + { + wrongcommand(); + } + break; + case "virusscanner": + case "vscan": + if(API.Upgrades["virusscanner"] == true) + { + WriteLine("Scanning for infected files..."); + var goodList = new Dictionary<string, string>(); + foreach (KeyValuePair<string, string> kv in Viruses.Infections) + { + if(kv.Value.Contains(";")) + { + foreach(string file in kv.Value.Split(';')) + { + if (goodList.ContainsKey(file)) + { + goodList[file] += ", " + kv.Key; + } + else { + goodList.Add(file, kv.Key); + } + } + } + else + { + if (goodList.ContainsKey(kv.Value)) + { + goodList[kv.Value] += ", " + kv.Key; + } + else { + goodList.Add(kv.Value, kv.Key); + } + } + } + WriteLine("Scan complete."); + if (goodList.Count > 0) + { + foreach (KeyValuePair<string, string> kv in goodList) + { + WriteLine("File " + kv.Key + " is infected with " + kv.Value + ". Disinfecting..."); + Viruses.DisInfect(kv.Key); + } + WriteLine("Disinfection complete."); + } + else + { + WriteLine("No infections found. You are safe."); + } + } + break; + case "infections": + if (API.DeveloperMode == true) + { + foreach (KeyValuePair<string, string> kv in Viruses.Infections) + { + WriteLine(kv.Key + " @ " + kv.Value); + } + } + else + { + wrongcommand(); + } + break; + case "binarywater": + if (API.DeveloperMode) + { + ShiftOS.Hacking.AddCharacter(new Character("Philip Adams", "Hello, and welcome to another episode of OSFirstTimer.", 100, 100, 0)); + WriteLine("Philip Adams is now in the list of hirable hackers."); + } + else + { + WriteLine("I see you went in the ShiftOS source code... ummm yeah... this isn't a developer mode release so I can't just give you a full-skilled hacker even if you beg."); + } + break; + case "color": + try + { + if(API.Upgrades["setterminalcolors"] == true) + { + + Color bcol = SetColor(args[1]); + Color tcol = SetColor(args[2]); + API.CurrentSkin.TerminalTextColor = tcol; + API.CurrentSkin.TerminalBackColor = bcol; + + } + } + catch(Exception) + { + WriteLine("color: Missing arguments."); + } + break; + case "encrypt": + if (API.DeveloperMode == true) + { + string messageToEncrypt = command.Replace("encrypt ", ""); + string encryptedMessage = API.Encryption.Encrypt(messageToEncrypt); + WriteLine("Encrypted Message: " + encryptedMessage); + } + else + { + wrongcommand(); + } + break; + case "font": + if(API.Upgrades["setterminalfont"] == true) + { + var fname = command.Replace("font ", ""); + if(GetFonts().Contains(fname)) + { + API.CurrentSkin.TerminalFontStyle = fname; + } + else + { + WriteLine("font: Unrecognized font name \"" + fname + "\". Note: Font names are case sensitive."); + } + } + else + { + wrongcommand(); + } + break; + case "colorlist": + if(API.Upgrades["setterminalcolors"] == true) + { + foreach(string itm in GetColorList()) + { + WriteLine(itm); + } + } + else + { + wrongcommand(); + } + break; + case "spkg": + if (!API.LimitedMode) + { + if (API.Upgrades["shiftnet"] == true) + { + try + { + switch (args[1].ToLower()) + { + case "install": + if (args[2] != null && args[2] != "") + { + string pkgname = args[2].ToLower().Replace(".pkg", ""); + if (Package_Grabber.GetPackage(pkgname) == true) + { + WriteLine("Downloaded package '" + pkgname + "' from shiftnet://main/spkg/ successfully. Installing now."); + string r = Package_Grabber.ExtractPackage(); + if (r == "fail") + { + WriteLine("[FATAL] Could not install package."); + WriteLine("spkg: Killed."); + } + else + { + WriteLine("Extracted " + pkgname + " to " + r + "..."); + var res2 = Package_Grabber.InstallPackage(r + "\\"); + if (res2 != "success") + { + WriteLine("[FATAL] Could not install package. " + res2); + WriteLine("spkg: Killed."); + } + else + { + WriteLine("[DONE] Package installed."); + } + } + } + else + { + WriteLine("spkg: Package '" + args[2] + "' not found."); + } + } + break; + default: + WriteLine("spkg: Invalid argument: " + args[1]); + break; + } + } + catch (Exception ex) + { + WriteLine("spkg: " + ex.Message); + } + } + else + { + wrongcommand(); + } + } + else + { + try + { + if(args[2] == "god_utils") + { + if(FinalMission.EndGameHandler.GodModeInstallEnabled == true) + { + var t = new Thread(new ThreadStart(new Action(() => + { + WriteLine("Downloading package 'god_utils'... Please wait."); + Thread.Sleep(10000); + WriteLine("Download complete."); + Thread.Sleep(100); + WriteLine("Beginning installation."); + Thread.Sleep(1000); + WriteLine(@" == GOD MODE == + +God Mode gives you FULL control of ShiftOS. You can add/remove Codepoints, buy or unbuy Shiftorium upgrades, and can do whatever you want. + +Installing core applications..."); + Thread.Sleep(250); + WriteLine("Installing subpackage 'json_edit'..."); + Thread.Sleep(250); + WriteLine("Installing subpackage 'upgrade_mod'..."); + Thread.Sleep(100); + WriteLine("Installing subpackage 'hijacker'..."); + Thread.Sleep(500); + WriteLine(@" == HIJACKER by DevX == + +HIJACKER is a utility that allows you to hijack any system and install ShiftOS on it during a hacker battle."); + Thread.Sleep(100); + WriteLine("[hijacker] Injecting HIJACKER code into hbattleui.sft..."); + Thread.Sleep(150); + WriteLine("[hijacker] Done."); + this.Invoke(new Action(() => + { + StartChoice1EndStory(); + })); + }))); + t.Start(); + } + else + { + WriteLine("spkg: Package '" + args[2] + "' not found."); + } + } + else + { + WriteLine("spkg: Package '" + args[2] + "' not found."); + } + } + catch + { + WriteLine("spkg: Missing arguments."); + } + } + break; + case "alias": + try + { + switch(args[1]) + { + case "-?": + case "--help": + WriteLine("Aliases Help" + Environment.NewLine); + WriteLine("Alias is a command that lets you create aliases for other commands. You could make a command 'upgrade' alias 'shiftorium' if you wanted." + Environment.NewLine); + WriteLine("Arguments:"); + WriteLine(" -h, --help: Displays this screen."); + WriteLine("-a, --add <alias> <command>: Adds a new alias."); + WriteLine("-d, --delete <alias>: Deletes an alias."); + WriteLine("-l, --list: Shows all available aliases."); + break; + case "--add": + case "-a": + if(API.AddAlias(args[2], command.Replace("alias " + args[1] + " " + args[2] + " ", ""))) + { + WriteLine("Alias added successfully."); + API.SaveAliases(); + } + else + { + WriteLine("That alias already exists."); + } + break; + case "--delete": + case "-d": + if(API.RemoveAlias(args[2]) == true) + { + WriteLine("Alias \"" + args[2] + "\" removed successfully."); + API.SaveAliases(); + } + else + { + WriteLine("That alias doesn't exist."); + } + break; + case "-l": + case "--list": + WriteLine("Aliases:"); + foreach(KeyValuePair<string, string> kv in API.CommandAliases) + { + WriteLine(kv.Key + " => " + kv.Value); + } + break; + default: + WriteLine("alias: Invalid argument. Try alias --help for help with the Alias command."); + break; + } + } + catch + { + WriteLine("alias: Missing arguments. Try alias --help for help with the Alias command."); + } + break; + case "username": + if(API.Upgrades["customusername"] == true) + { + try + { + API.CurrentSave.username = args[1]; + } + catch + { + WriteLine("username: Missing arguments."); + } + } + else + { + wrongcommand(); + } + break; + case "osname": + if (API.Upgrades["customusername"] == true) + { + try + { + API.CurrentSave.osname = args[1]; + } + catch + { + WriteLine("osname: Missing arguments."); + } + } + else + { + wrongcommand(); + } + break; + + case "unity": + if (API.Upgrades["unitymode"] == true) + { + API.CurrentSession.SetUnityMode(); + API.CurrentSession.SetupDesktop(); + txtterm.Focus(); + } else + { + wrongcommand(); + } + break; + case "time": + if (API.Upgrades["pmandam"] == false) + { + if (API.Upgrades["hourssincemidnight"] == false) + { + if (API.Upgrades["minutessincemidnight"] == false) + { + if (API.Upgrades["secondssincemidnight"] == true) { + WriteLine("Since midnight, " + API.GetTime() + " seconds have passed."); + } else { + wrongcommand(); + } + } else + { + WriteLine("Since midnight, " + API.GetTime() + " minutes have passed."); + } + } + else + { + WriteLine("Since Midnight, " + API.GetTime() + " hours have passed."); + } + } else + { + WriteLine("Current time: " + API.GetTime()); + } + break; + case "saa": + if (API.Upgrades["shiftnet"]) { + var f = command.Replace("saa ", ""); + if (f.StartsWith("/")) + { + var withoutslash = f.Remove(0, 1); + var dirsep = OSInfo.DirectorySeparator; + var rightdir = $"{Paths.SaveRoot}{dirsep}{f.Replace("/", dirsep)}"; + if (File.Exists(rightdir)) + { + var finf = new FileInfo(rightdir); + if (finf.Extension == ".saa") + { + API.LaunchMod(finf.FullName); + } + else + { + WriteLine("saa: Cannot launch the file '" + finf.FullName + " because it isn't a valid stand-alone app."); + } + } + else + { + WriteLine("saa: Cannot launch the file '" + f + "' because it doesn't exist."); + } + } + else + { + WriteLine("saa: Cannot launch the file '" + f + "' because it doesn't exist."); + } + } + else + { + wrongcommand(); + } + break; + case "help": + try + { + showhelp(args[1]); + } + catch + { + showhelp(); + } + break; + case "codepoints": + case "cp": + WriteLine("You have " + API.Codepoints.ToString() + " Codepoints."); + break; + case "shutdown": + API.ShutDownShiftOS(); + break; + case "clear": + txtterm.Text = ""; + break; + case "close": + if (command.Contains("close ")) + { + var pid = command.Replace("close ", ""); + if (API.CloseProgram(pid) == true) + { + WriteLine("Closed all running " + pid + "s."); + } + else + { + WriteLine("No processes with id '" + pid + "' were found!"); + } + } + else + { + WriteLine("Insufficient arguments."); + } + break; + case "05tray": + if (API.DeveloperMode == true) + { + API.AddCodepoints(500); + WriteLine("You've been granted 500 Codepoints."); + } else + { + wrongcommand(); + } + + break; + case "debug": + if (API.DeveloperMode == true) + { + try + { + switch (args[1].ToLower()) + { + case "shiftnet-story": + WriteLine("Debugging Shiftnet Story..."); + StartShiftnetStory(); + break; + case "devmode": + API.DeveloperMode = false; + WriteLine("Turned off developer mode. Use the passcode to turn it back on."); + break; + default: + WriteLine("Invalid argument: " + args[1] + ". Debug can only debug the following: 'shiftnet-story'."); + break; + } + + } + catch (Exception ex) + { + WriteLine("debug: " + ex.Message); + } + } else { + try + { + switch (args[1].ToLower()) + { + case "developers123": + WriteLine("Turned Developer Mode on!"); + API.DeveloperMode = true; + break; + default: + wrongcommand(); + break; + } + } catch + { + wrongcommand(); //Debug command pretends to be an invalid command if an exception is thrown. + } + } + break; + case "echo": + if(command.Contains("echo ")) + { + WriteLine(command.Replace("echo ", "")); + } + else + { + WriteLine("echo: Insufficient Parameters."); + } + break; + case "syncsave": + WriteLine("Command removed."); + break; + + default: + if (API.OpenProgram(args[0]) == false) + { + if (API.Upgrades["trmfiles"] == false) + { + bool done = false; + foreach(KeyValuePair<string, string> kv in API.CommandAliases) + { + if(kv.Key == command) + { + command = kv.Value; + done = true; + DoCommand(); + } + + } + if(done == false) + { + wrongcommand(); + } + } + else + { + var f = command.Replace("\\", "/"); + if (f.StartsWith("/")) + { + var withoutslash = f.Remove(0, 1); + var dirsep = OSInfo.DirectorySeparator; + var proper = $"{Paths.SaveRoot}{dirsep}{withoutslash.Replace("/", dirsep)}"; + if (File.Exists(proper)) + { + runterminalfile(proper); + } + else + { + wrongcommand(); + } + } + else + { + bool done = false; + foreach (KeyValuePair<string, string> kv in API.CommandAliases) + { + if (kv.Key == command) + { + command = kv.Value; + done = true; + DoCommand(); + } + + } + if (done == false) + { + wrongcommand(); + } + } + } + } + break; + } + } + + private void StartChoice1EndStory() + { + var t = new System.Windows.Forms.Timer(); + int i = 0; + t.Interval = 4000; + t.Tick += (object s, EventArgs a) => + { + switch(i) + { + case 0: + WriteLine("User '<unknown>' connected as '???'"); + break; + case 1: + WriteLine($"???: {API.Username}! What are you doing!?"); + break; + case 2: + WriteLine("???: I went onto the Hacker Alliance room earlier and DevX was on there..."); + break; + case 3: + WriteLine("???: And he told me you SIDED WITH HIM."); + break; + case 4: + WriteLine("???: This is a HUGE mistake! Listen!"); + break; + case 5: + WriteLine("???: He's lying to you. Listen. DevX is not what you think he is."); + break; + case 6: + WriteLine("???: He isn't a human! He's an AI! We were all played!"); + break; + case 7: + WriteLine("???: I'm telling the truth, I swear!"); + break; + case 8: + WriteLine("???: You want proof? - holochat_cmd: ERROR: Remote host closed connection."); + break; + case 9: + WriteLine("spkg: Rebooting system in 8 seconds."); + break; + case 11: + API.Upgrades["titlebar"] = false; + API.Upgrades["windowedterminal"] = false; //terminals must be fullscreen + var trm = new Terminal(); + this.Close(); + API.CreateForm(trm, "Terminal", API.GetIcon("Terminal")); + trm.StartReboot(); + break; + } + i += 1; + }; + t.Start(); + } + + public void StartReboot() + { + txtterm.Text = ""; + var t1 = new Thread(new ThreadStart(new Action(() => + { + Thread.Sleep(500); + WriteLine("ShiftOS: Kernel deactivated."); + Thread.Sleep(1000); + this.Invoke(new Action(() => + { + txtterm.Text = ""; + })); + Thread.Sleep(1000); + WriteLine("Welcome to ShiftOS."); + Thread.Sleep(500); + WriteLine("Starting core..."); + API.Upgrades["windowedterminal"] = true; + Thread.Sleep(450); + WriteLine($"Your username is {API.Username}."); + Thread.Sleep(100); + WriteLine($"You have {API.Codepoints} Codepoints."); + WriteLine("Loading modules..."); + Thread.Sleep(750); + foreach(var upg in API.Upgrades) + { + if(upg.Value == true) + { + WriteLine($"Loaded module {upg.Key}..."); + } + Thread.Sleep(100); + } + WriteLine("Starting desktop."); + this.Invoke(new Action(() => + { + var s = new ShiftOSDesktop(); + s.Show(); + s.EndGame_AttachEvents(); + })); + Thread.Sleep(1000); + this.Invoke(new Action(() => + { + FinalMission.EndGameHandler.GoToNextObjective(); + })); + API.Upgrades["titlebar"] = true; + }))); + t1.Start(); + } + + public void Crash() + { + txtterm.Text = ""; + WriteLine(" *** SYSTEM PANIC *** "); + WriteLine(Environment.NewLine); + WriteLine("PANIC_ID: 750_15_4W3S0M3"); + WriteLine("PANIC_DESC: System became too unstable to function properly. In 5 seconds, your session will be resumed."); + var t = new System.Windows.Forms.Timer(); + t.Interval = 1000; + int p = 0; + t.Tick += (object s, EventArgs a) => + { + if(p == 4) + { + t.Stop(); + this.Close(); + } + p += 1; + }; + t.Start(); + } + + private void wrongcommand() + { + txtterm.Text = txtterm.Text + Environment.NewLine + "Command not recognized - Type 'help' for a list of commands!" + Environment.NewLine; + } + + bool Hacking = false; + + private Control objToWriteTo = null; + private string UpgradeToHack = null; + + public void StartHackingSession(string id) + { + UpgradeToHack = id; + objToWriteTo = txtterm; + Hacking = true; + txtterm.ReadOnly = true; + WriteLine("To continue, choose which way you "); + WriteLine("would like to go about this. "); + WriteLine(" "); + WriteLine("1. Go it alone. "); + WriteLine("2. Hire someone. "); + WriteLine(" "); + WriteLine("Press the key that corresponds to "); + WriteLine("the option you want. "); + + } + + public void showhackinghelp() + { + WriteLine(" - Hacking - "); + WriteLine(Environment.NewLine + "Hacking allows you to gain more features and upgrades by unlocking more of the OS's capabilities."); + WriteLine(Environment.NewLine + "There are two ways you can execute a hack:"); + WriteLine(" - On your own: It'll take skill, and time, but if you have the correct tools you can do it on your own."); + WriteLine(" - With a more competent partner: You have the option of employing a partner from a list of various hackers. The speed and success of the hack depends on their skill, and how fast they can pull it off. You will need to pay them a fee of Codepoints however. They can also grant you tools to do it on your own."); + WriteLine(Environment.NewLine + "Some hacks are capable of:"); + WriteLine(" - Decreasing or increasing the price of Shiftorium Upgrades"); + WriteLine(" - Decreasing or increasing the amount of Codepoints earned by doing various tasks."); + WriteLine(" - Unlocking more upgrades."); + WriteLine(Environment.NewLine + "To start a hack, go to a locked or empty Shiftorium category and click the \"Hack It\" button."); + API.Upgrades["hacking"] = true; + } + + public void showhelp(string topic) + { + switch(topic) + { + case "hacking": + showhackinghelp(); + break; + default: + WriteLine("No help available for this topic. Try 'help' for general help."); + break; + } + } + + public void showhelp() + { + listinfo(); + WriteLine(" "); + listcommands(); + listprograms(); + } + + private void listprograms() + { + WriteLine("Programs installed: " + Environment.NewLine); + WriteLine(" - terminal: A command-line application that lets you run programs in ShiftOS"); + WriteLine(" - shiftorium: An application where you can buy upgrades and new apps using codepoints."); + /* TEMP-REMOVED - I just can't get it to work. + WriteLine(" - jumper: A simple 'jump over the obstacle' game."); + */ + WriteLine(" - knowledge_input: Test your knowledge, and gain some Codepoints too."); + if (API.Upgrades["shifter"] == true) + WriteLine(" - shifter: Allows you to customize ShiftOS."); + if (API.Upgrades["skinning"] == true) + WriteLine(" - skinloader: Load and save ShiftOS skins."); + if (API.Upgrades["pong"] == true) + WriteLine(" - pong: A good ole' game of Pong."); + if (API.Upgrades["fileskimmer"] == true) + WriteLine(" - fileskimmer: Browse the files on your computer."); + if (API.Upgrades["textpad"] == true) + WriteLine(" - textpad: \"Write, save, and open a text document.\" - Philip Adams"); + if (API.Upgrades["artpad"] == true) + WriteLine(" - artpad: A simple, but useful drawing application."); + if (API.Upgrades["shiftnet"] == true) + WriteLine("Also, more apps can be run by opening .saa files. Apps can also be installed using spkg or by double clicking .pkg or .stp files."); + } + + public void listcommands() + { + WriteLine(" == Commands == " + Environment.NewLine); + WriteLine(" - clear: Clears the screen."); + WriteLine(" - shutdown: Shuts down your PC."); + WriteLine(" - codepoints: Shows how many codepoints you have."); + WriteLine(" - help: Shows this screen."); + if(API.Upgrades["secondssincemidnight"] == true) + { + WriteLine(" - time: Shows the current time."); + } + if (API.Upgrades["unitymode"] == true) + WriteLine(" - unity: Toggles Unity Mode."); + if (API.Upgrades["customusername"] == true) + { + WriteLine(" - username <new_name>: Changes your username."); + WriteLine(" - osname <newname>: Changes the operating system name."); + } + if(API.Upgrades["shiftnet"] == true) + { + WriteLine(" - saa: Runs a specified .saa file."); + WriteLine(" - spkg: Shiftnet Package Manager (more info at shiftnet://main/spkg"); + } + } + + public void listinfo() + { + WriteLine(SaveSystem.Utilities.LoadedSave.osname + " - Version " + SaveSystem.Utilities.LoadedSave.ingameversion); + WriteLine("==========================" + Environment.NewLine); + WriteLine(" == Info == " + Environment.NewLine); + if(API.Upgrades["applaunchermenu"] == true) + { + WriteLine(" - Apps can be run using the App Launcher on the desktop."); + } else + { + WriteLine(" - Apps can be run by typing their name in the Terminal."); + } + if (API.Upgrades["windowedterminal"] == true) + { + WriteLine(" - The Terminal runs in a window."); + } + else + { + WriteLine(" - The Terminal runs fullscreen at all times."); + } + if(API.Upgrades["titlebar"] == true) + { + WriteLine(" - Applications have a titlebar to help distinguish between other apps."); + } + if(API.Upgrades["windowborders"] == true) + { + WriteLine(" - Applications have a window border to help distinguish between other apps."); + } + if(API.Upgrades["multitasking"] == true) + { + WriteLine(" - Multiple apps can be run at the same time, and you can even run more than one of the same app!"); + } + if(API.Upgrades["movablewindows"] == true) + { + WriteLine(" - Applications can be moved using CTRL+W,A,S,D."); + } + if(API.Upgrades["draggablewindows"] == true) + { + WriteLine(" - You can drag apps around the screen by dragging their titlebars."); + } + if(API.Upgrades["resizablewindows"] == true) + { + WriteLine(" - You can resize windows by dragging their borders."); + } + if(API.Upgrades["panelbuttons"] == true) + { + WriteLine($" - A list of open apps is shown at the {API.CurrentSkin.desktoppanelposition.ToLower()} of the screen."); + } + if(API.Upgrades["usefulpanelbuttons"] == true) + { + WriteLine(" - You can minimize and restore apps using the panel buttons."); + } + if(API.Upgrades["titletext"] == true) + { + WriteLine(" - Apps display their names on the titlebar."); + } + if(API.Upgrades["appicons"] == true) + { + WriteLine(" - Apps display their icons, and they are displayed in their titlebars."); + } + if(API.Upgrades["autoscrollterminal"] == true) + { + WriteLine(" - The Terminal will automatically scroll to the bottom."); + } + if(API.Upgrades["terminalscrollbar"] == true) + { + WriteLine(" - You can scroll up and down the Terminal's buffer."); + } + if(API.Upgrades["zoomableterminal"] == true) + { + WriteLine(" - You can zoom the Terminal in and out by holding CTRL and scrolling up or down."); + } + } + + + // ERROR: Handles clauses are not supported in C# + private void tmrfirstrun_Tick(object sender, EventArgs e) + { + switch (firstrun) + { + case 1: + txtterm.Text = txtterm.Text + "Installation Successfull" + Environment.NewLine; + blockctrlt = true; + break; + case 2: + txtterm.Text = txtterm.Text + "IP 199.108.232.1 Connecting..." + Environment.NewLine + "User@" + SaveSystem.Utilities.LoadedSave.osname + " $> "; + API.PlaySound(Properties.Resources.dial_up_modem_02); + break; + case 12: + txtterm.Text = txtterm.Text + "IP 199.108.232.1 Connected!" + Environment.NewLine + "User@" + SaveSystem.Utilities.LoadedSave.osname + " $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 15: + txtterm.Text = txtterm.Text + "DevX: Hi, my name is DevX and you are now using an early version of my operating system \"ShiftOS\"." + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 22: + txtterm.Text = txtterm.Text + "DevX: Currently the terminal is open and I am using it to communicate with you remotely." + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 28: + txtterm.Text = txtterm.Text + "DevX: ShiftOS is going to be the most revolutionary operating system in the world that will run on every electronic device you can think of." + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 36: + txtterm.Text = txtterm.Text + "DevX: I can't tell you much about my future plans right now but if you can help me then I may tell you more in future" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 44: + txtterm.Text = txtterm.Text + "DevX: ShiftOS is barely usable in it's current state so I need you to help me evolve it using codepoints" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 50: + txtterm.Text = txtterm.Text + "DevX: Once you acquire codepoints you can use them to upgrade certain components of ShiftOS or add new software" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 59: + txtterm.Text = txtterm.Text + "DevX: I'll close the terminal now and send you to the blank ShiftOS desktop" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 65: + txtterm.Text = txtterm.Text + "DevX: You can open and close the terminal at any time by pressing CTRL + T" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 70: + txtterm.Text = txtterm.Text + "DevX: Once you are on the desktop open the terminal, type \"help\" and then press enter for a guide on using ShiftOS" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 80: + txtterm.Text = txtterm.Text + "DevX: Gotta run now but I'll contact you soon to see how you are going with evolving ShiftOS for me while I... Work on something else" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 89: + txtterm.Text = txtterm.Text + "DevX: Remember to always click the black desktop first and then press press CTRL + T to open the terminal otherwise the terminal won't open!" + Environment.NewLine + "User@ShiftOS $> "; + API.PlaySound(Properties.Resources.writesound); + break; + case 94: + API.PlaySound(Properties.Resources.typesound); + txtterm.Text = "User@" + SaveSystem.Utilities.LoadedSave.osname + " $> "; + tmrfirstrun.Stop(); + this.Close(); + blockctrlt = false; + SaveSystem.Utilities.saveGame(); + break; + } + firstrun = firstrun + 1; + txtterm.SelectionStart = txtterm.TextLength; + } + + public void runterminalfile(string path) + { + if(File.Exists(path)) + { + string[] cmds = File.ReadAllLines(path); + foreach(string cmd in cmds) + { + command = cmd; + DoCommand(); + } + } + } + + // ERROR: Handles clauses are not supported in C# + private void tmrshutdown_Tick(object sender, EventArgs e) + { + Application.Exit(); + } + + public void WriteLine(string text) + { + API.CurrentSession.Invoke(new Action(() => + { + if (txtterm.Text.Length > 0) + { + txtterm.Text += Environment.NewLine + text; + } + else + { + txtterm.Text += text; + } + txtterm.Select(txtterm.TextLength, 0); + txtterm.ScrollToCaret(); + })); + } + private bool Zooming = false; + + private void ScrollDeactivate(object sender, KeyEventArgs e) + { + if(Zooming == true) + { + Zooming = false; + } + } + + private int ZoomMultiplier = 1; + + private void ResetTerminalFont() + { + string fname = "Font"; + if(API.Upgrades["setterminalfont"] == true) + { + fname = API.CurrentSkin.TerminalFontStyle; + } + else + { + fname = OSInfo.GetMonospaceFont(); + } + int fsize = 9 * ZoomMultiplier; + try { + txtterm.Font = new Font(fname, fsize); + } + catch + { + txtterm.Font = new Font(fname, 9); + } + } + + private void Zoom(object sender, ScrollEventArgs e) + { + + } + + private void ScrollTerm(object sender, MouseEventArgs e) + { + if(Zooming == true) + { + + } else + { + if(API.Upgrades["terminalscrollbar"] == true) + { + txtterm.ScrollBars = ScrollBars.Vertical; + } + } + } + + private void tmrsetfont_Tick(object sender, EventArgs e) + { + ResetTerminalFont(); + if(API.Upgrades["setterminalcolors"] == true) + { + txtterm.BackColor = API.CurrentSkin.TerminalBackColor; + txtterm.ForeColor = API.CurrentSkin.TerminalTextColor; + } + } + } + +} diff --git a/source/WindowsFormsApplication1/Apps/Terminal.resx b/source/WindowsFormsApplication1/Apps/Terminal.resx new file mode 100644 index 0000000..d0442f6 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/Terminal.resx @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="tmrfirstrun.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="tmrshutdown.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>127, 17</value> + </metadata> + <metadata name="pullbs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>250, 102</value> + </metadata> + <metadata name="pullbottom.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>254, 22</value> + </metadata> + <metadata name="pullside.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>449, 17</value> + </metadata> + <metadata name="tmrstorylineupdate.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>543, 17</value> + </metadata> + <metadata name="tmrsetfont.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>334, 3</value> + </metadata> + <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>78</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs b/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs new file mode 100644 index 0000000..3ac11b4 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/TextPad.Designer.cs @@ -0,0 +1,181 @@ +using System; +using System.Windows.Forms; + +namespace ShiftOS +{ + partial class TextPad + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.pgcontents = new System.Windows.Forms.Panel(); + this.txtuserinput = new System.Windows.Forms.TextBox(); + this.pnlbreak = new System.Windows.Forms.Panel(); + this.pnloptions = new System.Windows.Forms.Panel(); + this.btnsave = new System.Windows.Forms.Button(); + this.btnopen = new System.Windows.Forms.Button(); + this.btnnew = new System.Windows.Forms.Button(); + this.tmrcodepointcooldown = new System.Windows.Forms.Timer(this.components); + this.tmrshowearnedcodepoints = new System.Windows.Forms.Timer(this.components); + this.pgcontents.SuspendLayout(); + this.pnloptions.SuspendLayout(); + this.SuspendLayout(); + // + // pgcontents + // + this.pgcontents.Controls.Add(this.txtuserinput); + this.pgcontents.Controls.Add(this.pnlbreak); + this.pgcontents.Controls.Add(this.pnloptions); + 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(530, 330); + this.pgcontents.TabIndex = 20; + // + // txtuserinput + // + this.txtuserinput.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.txtuserinput.BackColor = System.Drawing.Color.White; + this.txtuserinput.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.txtuserinput.Font = new System.Drawing.Font("Microsoft Sans Serif", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.txtuserinput.ForeColor = System.Drawing.Color.Black; + this.txtuserinput.Location = new System.Drawing.Point(4, 2); + this.txtuserinput.Multiline = true; + this.txtuserinput.Name = "txtuserinput"; + this.txtuserinput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; + this.txtuserinput.Size = new System.Drawing.Size(528, 272); + this.txtuserinput.TabIndex = 0; + // + // pnlbreak + // + this.pnlbreak.BackColor = System.Drawing.Color.White; + this.pnlbreak.BackgroundImage = global::ShiftOS.Properties.Resources.uparrow; + this.pnlbreak.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center; + this.pnlbreak.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlbreak.ForeColor = System.Drawing.Color.Black; + this.pnlbreak.Location = new System.Drawing.Point(0, 277); + this.pnlbreak.Name = "pnlbreak"; + this.pnlbreak.Size = new System.Drawing.Size(530, 15); + this.pnlbreak.TabIndex = 2; + // + // pnloptions + // + this.pnloptions.BackColor = System.Drawing.Color.White; + this.pnloptions.Controls.Add(this.btnsave); + this.pnloptions.Controls.Add(this.btnopen); + this.pnloptions.Controls.Add(this.btnnew); + this.pnloptions.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnloptions.Location = new System.Drawing.Point(0, 292); + this.pnloptions.Name = "pnloptions"; + this.pnloptions.Size = new System.Drawing.Size(530, 38); + this.pnloptions.TabIndex = 1; + this.pnloptions.Visible = false; + // + // btnsave + // + this.btnsave.BackColor = System.Drawing.Color.White; + this.btnsave.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnsave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnsave.Image = global::ShiftOS.Properties.Resources.saveicon; + this.btnsave.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnsave.Location = new System.Drawing.Point(168, 4); + this.btnsave.Name = "btnsave"; + this.btnsave.Size = new System.Drawing.Size(76, 31); + this.btnsave.TabIndex = 2; + this.btnsave.Text = "Save"; + this.btnsave.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnsave.UseVisualStyleBackColor = false; + // + // btnopen + // + this.btnopen.BackColor = System.Drawing.Color.White; + this.btnopen.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnopen.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnopen.Image = global::ShiftOS.Properties.Resources.openicon; + this.btnopen.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnopen.Location = new System.Drawing.Point(86, 4); + this.btnopen.Name = "btnopen"; + this.btnopen.Size = new System.Drawing.Size(76, 31); + this.btnopen.TabIndex = 1; + this.btnopen.Text = "Open"; + this.btnopen.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnopen.UseVisualStyleBackColor = false; + // + // btnnew + // + this.btnnew.BackColor = System.Drawing.Color.White; + this.btnnew.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnnew.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnnew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.btnnew.Location = new System.Drawing.Point(4, 4); + this.btnnew.Name = "btnnew"; + this.btnnew.Size = new System.Drawing.Size(76, 31); + this.btnnew.TabIndex = 0; + this.btnnew.Text = "New"; + this.btnnew.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.btnnew.UseVisualStyleBackColor = false; + // + // tmrcodepointcooldown + // + this.tmrcodepointcooldown.Interval = 10000; + // + // tmrshowearnedcodepoints + // + this.tmrshowearnedcodepoints.Interval = 3000; + // + // TextPad + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(530, 330); + this.Controls.Add(this.pgcontents); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.MinimumSize = new System.Drawing.Size(230, 230); + this.Name = "TextPad"; + this.Text = "TextPad"; + this.TopMost = true; + this.pgcontents.ResumeLayout(false); + this.pgcontents.PerformLayout(); + this.pnloptions.ResumeLayout(false); + this.ResumeLayout(false); + this.txtuserinput.TextChanged += new EventHandler(this.txtuserinput_TextChanged); + this.btnsave.Click += new EventHandler(this.btnsave_Click); + this.btnnew.Click += new EventHandler(this.btnnew_Click); + this.btnopen.Click += new EventHandler(this.btnopen_Click); + this.Load += new EventHandler(this.TextPad_Load); + this.tmrcodepointcooldown.Tick += new EventHandler(tmrcodepointcooldown_Tick); + this.tmrshowearnedcodepoints.Tick += new EventHandler(tmrshowearnedcodepoints_Tick); + this.pnlbreak.MouseEnter += new EventHandler(this.pnlbreak_MouseEnter); + } + internal System.Windows.Forms.Panel pgcontents; + internal System.Windows.Forms.TextBox txtuserinput; + internal System.Windows.Forms.Panel pnloptions; + internal System.Windows.Forms.Button btnnew; + internal System.Windows.Forms.Button btnsave; + internal System.Windows.Forms.Button btnopen; + internal System.Windows.Forms.Panel pnlbreak; + internal System.Windows.Forms.Timer tmrcodepointcooldown; + internal System.Windows.Forms.Timer tmrshowearnedcodepoints; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/TextPad.cs b/source/WindowsFormsApplication1/Apps/TextPad.cs new file mode 100644 index 0000000..1b49129 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/TextPad.cs @@ -0,0 +1,239 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class TextPad : Form + { + private bool codepointscooldown = false; + private int codepointsearned = 0; + private bool needtosave = false; + + public TextPad() + { + InitializeComponent(); + } + + private void TextPad_Load(object sender, EventArgs e) + { + txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height + pnloptions.Height); + setupoptions(); + } + + // ERROR: Handles clauses are not supported in C# + private void pnlbreak_MouseEnter(object sender, EventArgs e) + { + if (pnloptions.Visible == false) + { + pnlbreak.BackgroundImage = Properties.Resources.downarrow; + pnloptions.Show(); + txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height - pnloptions.Height); + } + else { + pnlbreak.BackgroundImage = Properties.Resources.uparrow; + pnloptions.Hide(); + txtuserinput.Size = new Size(txtuserinput.Size.Width, txtuserinput.Size.Height + pnloptions.Height); + } + } + + // ERROR: Handles clauses are not supported in C# + private void btnnew_Click(object sender, EventArgs e) + { + if (needtosave == true) + { + API.CreateInfoboxSession("Textpad - Save?", "It appears that your text document currently contains unsaved changes." + Environment.NewLine + Environment.NewLine + "Are you sure you want to start a new document without saving the changes?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object s, FormClosingEventArgs a) => + { + string result = API.GetInfoboxResult(); + switch(result) + { + case "Yes": + codepointsearned = 0; + this.txtuserinput.Text = ""; + break; + case "No": + SaveFile(); + break; + } + }; + } + else { + makenewdoc(); + } + } + + private void SaveFile() + { + if (API.Upgrades["trmfiles"] == true) + { + API.CreateFileSkimmerSession(".txt;.trm", File_Skimmer.FileSkimmerMode.Save); + + } + else + { + API.CreateFileSkimmerSession(".txt", File_Skimmer.FileSkimmerMode.Save); + } + API.FileSkimmerSession.FormClosing += (object se, FormClosingEventArgs ea) => + { + string res = API.GetFSResult(); + if (res != "fail") + { + File.WriteAllText(res, txtuserinput.Text); + } + }; + } + + private void SaveFile(string text) + { + if (API.Upgrades["trmfiles"] == true) + { + API.CreateFileSkimmerSession(".txt;.trm", File_Skimmer.FileSkimmerMode.Save); + + } + else + { + API.CreateFileSkimmerSession(".txt", File_Skimmer.FileSkimmerMode.Save); + } + API.FileSkimmerSession.FormClosing += (object se, FormClosingEventArgs ea) => + { + string res = API.GetFSResult(); + if (res != "fail") + { + File.WriteAllText(res, text); + } + }; + } + + public void makenewdoc() + { + txtuserinput.Text = ""; + needtosave = false; + codepointsearned = 0; + } + + // ERROR: Handles clauses are not supported in C# + private void btnsave_Click(object sender, EventArgs e) + { + SaveFile(); + } + + // ERROR: Handles clauses are not supported in C# + private void btnopen_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".txt", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + if (needtosave == true) + { + API.CreateInfoboxSession("Textpad - Save?", "It appears that your text document currently contains unsaved changes." + Environment.NewLine + Environment.NewLine + "Are you sure you want to start a new document without saving the changes?", infobox.InfoboxMode.YesNo); + API.InfoboxSession.FormClosing += (object se, FormClosingEventArgs ea) => + { + string result = API.GetInfoboxResult(); + switch (result) + { + case "Yes": + codepointsearned = 0; + string res = API.GetFSResult(); + if (res != "fail") + { + string fContents = File.ReadAllText(res); + + txtuserinput.Text = fContents; + } + break; + case "No": + string fcontents = txtuserinput.Text; + SaveFile(fcontents); + string res2 = API.GetFSResult(); + if (res2 != "fail") + { + string fContents = File.ReadAllText(res2); + + txtuserinput.Text = fContents; + } + break; + } + }; + } + else { + string res = API.GetFSResult(); + if (res != "fail") + { + try { + string fContents = File.ReadAllText(res); + + txtuserinput.Text = fContents; + } + catch(Exception ex) + { + txtuserinput.Text = ex.Message; + } + } + } + }; + } + + public void setupoptions() + { + if (API.Upgrades["textpadnew"] == true) + btnnew.Show(); + else + btnnew.Hide(); + if (API.Upgrades["textpadopen"] == true) + btnopen.Show(); + else + btnopen.Hide(); + if (API.Upgrades["textpadsave"] == true) + btnsave.Show(); + else + btnsave.Hide(); + if (API.Upgrades["textpadnew"] == false && API.Upgrades["textpadsave"] == false && API.Upgrades["textpadopen"] == false) + pnlbreak.Hide(); + } + + // ERROR: Handles clauses are not supported in C# + private void txtuserinput_TextChanged(object sender, EventArgs e) + { + needtosave = true; + if (codepointscooldown == true) + { + } + else { + codepointsearned = codepointsearned + 1; + codepointscooldown = true; + tmrcodepointcooldown.Start(); + } + if (Viruses.InfectedWith("keyboardfucker")) + { + var rnd = new Random(); + if (rnd.Next(0, 20) == 10) + { + txtuserinput.Text += Viruses.KeyboardInceptor.Intercept(); + } + } + } + + // 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) + { + API.CreateInfoboxSession("TextPad", "You have earned " + codepointsearned.ToString() + " Codepoints from typing up and saving that document!", infobox.InfoboxMode.Info); + API.AddCodepoints(codepointsearned); + tmrshowearnedcodepoints.Stop(); + } + } +} diff --git a/source/WindowsFormsApplication1/Apps/TextPad.resx b/source/WindowsFormsApplication1/Apps/TextPad.resx new file mode 100644 index 0000000..6994a67 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/TextPad.resx @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="tmrcodepointcooldown.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> + <metadata name="tmrshowearnedcodepoints.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>197, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/WidgetManager.Designer.cs b/source/WindowsFormsApplication1/Apps/WidgetManager.Designer.cs new file mode 100644 index 0000000..4140581 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/WidgetManager.Designer.cs @@ -0,0 +1,252 @@ +namespace ShiftOS +{ + partial class WidgetManager + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.panel1 = new System.Windows.Forms.Panel(); + this.pnlbuttons = new System.Windows.Forms.FlowLayoutPanel(); + this.btndone = new System.Windows.Forms.Button(); + this.btnadd = new System.Windows.Forms.Button(); + this.cbpanel = new System.Windows.Forms.ComboBox(); + this.txtwidth = new System.Windows.Forms.TextBox(); + this.lbwidth = new System.Windows.Forms.Label(); + this.txtx = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.lbtitle = new System.Windows.Forms.Label(); + this.lvwidgets = new System.Windows.Forms.ListView(); + this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); + this.listView1 = new System.Windows.Forms.ListView(); + this.tmrcheckvalid = new System.Windows.Forms.Timer(this.components); + this.btninstallwidgets = new System.Windows.Forms.Button(); + this.panel1.SuspendLayout(); + this.pnlbuttons.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.White; + this.panel1.Controls.Add(this.pnlbuttons); + this.panel1.Controls.Add(this.lbtitle); + this.panel1.Controls.Add(this.lvwidgets); + this.panel1.Controls.Add(this.listView1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel1.ForeColor = System.Drawing.Color.Black; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(697, 459); + this.panel1.TabIndex = 0; + // + // pnlbuttons + // + this.pnlbuttons.BackColor = System.Drawing.Color.Gray; + this.pnlbuttons.Controls.Add(this.btndone); + this.pnlbuttons.Controls.Add(this.btnadd); + this.pnlbuttons.Controls.Add(this.cbpanel); + this.pnlbuttons.Controls.Add(this.txtwidth); + this.pnlbuttons.Controls.Add(this.lbwidth); + this.pnlbuttons.Controls.Add(this.txtx); + this.pnlbuttons.Controls.Add(this.label1); + this.pnlbuttons.Controls.Add(this.btninstallwidgets); + this.pnlbuttons.Dock = System.Windows.Forms.DockStyle.Bottom; + this.pnlbuttons.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; + this.pnlbuttons.ForeColor = System.Drawing.Color.White; + this.pnlbuttons.Location = new System.Drawing.Point(0, 429); + this.pnlbuttons.Name = "pnlbuttons"; + this.pnlbuttons.Size = new System.Drawing.Size(697, 30); + this.pnlbuttons.TabIndex = 3; + // + // btndone + // + this.btndone.AutoSize = true; + this.btndone.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btndone.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btndone.Location = new System.Drawing.Point(649, 3); + this.btndone.Name = "btndone"; + this.btndone.Size = new System.Drawing.Size(45, 25); + this.btndone.TabIndex = 0; + this.btndone.Text = "Done"; + this.btndone.UseVisualStyleBackColor = true; + this.btndone.Click += new System.EventHandler(this.btndone_Click); + // + // btnadd + // + this.btnadd.AutoSize = true; + this.btnadd.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btnadd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnadd.Location = new System.Drawing.Point(605, 3); + this.btnadd.Name = "btnadd"; + this.btnadd.Size = new System.Drawing.Size(38, 25); + this.btnadd.TabIndex = 2; + this.btnadd.Text = "Add"; + this.btnadd.UseVisualStyleBackColor = true; + this.btnadd.Click += new System.EventHandler(this.btnadd_Click); + // + // cbpanel + // + this.cbpanel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbpanel.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.cbpanel.FormattingEnabled = true; + this.cbpanel.Location = new System.Drawing.Point(478, 3); + this.cbpanel.Name = "cbpanel"; + this.cbpanel.Size = new System.Drawing.Size(121, 21); + this.cbpanel.TabIndex = 1; + // + // txtwidth + // + this.txtwidth.Location = new System.Drawing.Point(443, 3); + this.txtwidth.Name = "txtwidth"; + this.txtwidth.Size = new System.Drawing.Size(29, 20); + this.txtwidth.TabIndex = 3; + // + // lbwidth + // + this.lbwidth.Location = new System.Drawing.Point(393, 0); + this.lbwidth.Name = "lbwidth"; + this.lbwidth.Size = new System.Drawing.Size(44, 28); + this.lbwidth.TabIndex = 5; + this.lbwidth.Text = "Width:"; + this.lbwidth.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // txtx + // + this.txtx.Location = new System.Drawing.Point(355, 3); + this.txtx.Name = "txtx"; + this.txtx.Size = new System.Drawing.Size(32, 20); + this.txtx.TabIndex = 4; + // + // label1 + // + this.label1.Location = new System.Drawing.Point(246, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(103, 28); + this.label1.TabIndex = 6; + this.label1.Text = "Horizontal Location:"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // lbtitle + // + this.lbtitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.lbtitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 13F); + this.lbtitle.Location = new System.Drawing.Point(12, 9); + this.lbtitle.Name = "lbtitle"; + this.lbtitle.Size = new System.Drawing.Size(673, 32); + this.lbtitle.TabIndex = 2; + this.lbtitle.Text = "Desktop Panel Widgets"; + this.lbtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lvwidgets + // + this.lvwidgets.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.lvwidgets.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { + this.columnHeader1, + this.columnHeader2}); + this.lvwidgets.FullRowSelect = true; + this.lvwidgets.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; + this.lvwidgets.Location = new System.Drawing.Point(12, 44); + this.lvwidgets.Name = "lvwidgets"; + this.lvwidgets.Size = new System.Drawing.Size(673, 381); + this.lvwidgets.TabIndex = 1; + this.lvwidgets.UseCompatibleStateImageBehavior = false; + this.lvwidgets.View = System.Windows.Forms.View.Details; + this.lvwidgets.SelectedIndexChanged += new System.EventHandler(this.lvwidgets_SelectedIndexChanged); + // + // columnHeader1 + // + this.columnHeader1.Text = "Name"; + // + // columnHeader2 + // + this.columnHeader2.Text = "Description"; + // + // listView1 + // + this.listView1.Location = new System.Drawing.Point(212, 76); + this.listView1.Name = "listView1"; + this.listView1.Size = new System.Drawing.Size(121, 97); + this.listView1.TabIndex = 0; + this.listView1.UseCompatibleStateImageBehavior = false; + // + // tmrcheckvalid + // + this.tmrcheckvalid.Enabled = true; + this.tmrcheckvalid.Tick += new System.EventHandler(this.tmrcheckvalid_Tick); + // + // btninstallwidgets + // + this.btninstallwidgets.AutoSize = true; + this.btninstallwidgets.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.btninstallwidgets.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btninstallwidgets.Location = new System.Drawing.Point(152, 3); + this.btninstallwidgets.Name = "btninstallwidgets"; + this.btninstallwidgets.Size = new System.Drawing.Size(88, 25); + this.btninstallwidgets.TabIndex = 7; + this.btninstallwidgets.Text = "Install Widgets"; + this.btninstallwidgets.UseVisualStyleBackColor = true; + this.btninstallwidgets.Click += new System.EventHandler(this.btninstallwidgets_Click); + // + // WidgetManager + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(697, 459); + this.Controls.Add(this.panel1); + this.Name = "WidgetManager"; + this.Text = "WidgetManager"; + this.Load += new System.EventHandler(this.WidgetManager_Load); + this.panel1.ResumeLayout(false); + this.pnlbuttons.ResumeLayout(false); + this.pnlbuttons.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.ListView listView1; + private System.Windows.Forms.FlowLayoutPanel pnlbuttons; + private System.Windows.Forms.Button btndone; + private System.Windows.Forms.Button btnadd; + private System.Windows.Forms.ComboBox cbpanel; + private System.Windows.Forms.Label lbtitle; + private System.Windows.Forms.ListView lvwidgets; + private System.Windows.Forms.ColumnHeader columnHeader1; + private System.Windows.Forms.ColumnHeader columnHeader2; + private System.Windows.Forms.TextBox txtwidth; + private System.Windows.Forms.Label lbwidth; + private System.Windows.Forms.TextBox txtx; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Timer tmrcheckvalid; + private System.Windows.Forms.Button btninstallwidgets; + } +}
\ No newline at end of file diff --git a/source/WindowsFormsApplication1/Apps/WidgetManager.cs b/source/WindowsFormsApplication1/Apps/WidgetManager.cs new file mode 100644 index 0000000..2a3954f --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/WidgetManager.cs @@ -0,0 +1,174 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.IO.Compression; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShiftOS +{ + public partial class WidgetManager : Form + { + public WidgetManager() + { + InitializeComponent(); + } + + private void WidgetManager_Load(object sender, EventArgs e) + { + SetupList(); + } + + public void SetupList() + { + lvwidgets.Items.Clear(); + foreach(ColumnHeader c in lvwidgets.Columns) + { + c.Width = lvwidgets.Width / 2; + } + if(!Directory.Exists(Paths.WidgetFiles)) + { + Directory.CreateDirectory(Paths.WidgetFiles); + } + foreach(var f in Directory.GetFiles(Paths.WidgetFiles)) + { + var finf = new FileInfo(f); + if(finf.Extension == ".json") + { + var json = File.ReadAllText(finf.FullName); + var widget = JsonConvert.DeserializeObject<DesktopWidgetModel>(json); + var lv = new ListViewItem(); + lv.Text = widget.Name; + lv.Tag = widget; + lvwidgets.Items.Add(lv); + lv.SubItems.Add(widget.Description); + } + } + } + + private DesktopWidgetModel SelectedFutureWidget = null; + + private void lvwidgets_SelectedIndexChanged(object sender, EventArgs e) + { + SelectedFutureWidget = (DesktopWidgetModel)lvwidgets.SelectedItems[0].Tag; + cbpanel.Items.Clear(); + foreach(var p in API.CurrentSkin.DesktopPanels) + { + cbpanel.Items.Add(p.Position); + } + cbpanel.Text = (string)cbpanel.Items[0]; + } + + private void btndone_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void btnadd_Click(object sender, EventArgs e) + { + try { + if (cbpanel.Text != null) + { + var w = new Skinning.DesktopWidget(); + w.Name = SelectedFutureWidget.Name; + w.Panel = cbpanel.Text; + w.XLocation = Convert.ToInt32(txtx.Text); + w.Width = Convert.ToInt32(txtwidth.Text); + w.Lua = SelectedFutureWidget.Lua; + w.Type = SelectedFutureWidget.Type; + API.CurrentSkin.Widgets.Add(w); + GC.Collect(); + API.CurrentSession.SetupWidgets(); + Skinning.Utilities.saveskin(); + } + else + { + API.CreateInfoboxSession("Please select a location.", "Please select a desktop panel for the new widget!", infobox.InfoboxMode.Info); + } + } + catch + { + API.CreateInfoboxSession("Missing information", "Not enough valid info was given for the new widget. Remember, the width and location must be valid integers and the position must be either \"Top\" or \"Bottom\".", infobox.InfoboxMode.Info); + } + GC.Collect(); + } + + private void tmrcheckvalid_Tick(object sender, EventArgs e) + { + if(SelectedFutureWidget != null) + { + btnadd.Show(); + lbwidth.Show(); + txtwidth.Show(); + cbpanel.Show(); + label1.Show(); + txtx.Show(); + } + else + { + btnadd.Hide(); + lbwidth.Hide(); + txtwidth.Hide(); + cbpanel.Hide(); + label1.Hide(); + txtx.Hide(); + } + } + + private void btninstallwidgets_Click(object sender, EventArgs e) + { + API.CreateFileSkimmerSession(".wgt", File_Skimmer.FileSkimmerMode.Open); + API.FileSkimmerSession.FormClosing += (object s, FormClosingEventArgs a) => + { + var res = API.GetFSResult(); + if (res != "fail") + { + try + { + if(!Directory.Exists(Paths.WidgetFiles)) + { + Directory.CreateDirectory(Paths.WidgetFiles); + } + if(Directory.Exists(Paths.Mod_Temp + "_newwidget")) + { + Directory.Delete(Paths.Mod_Temp + "_newwidget", true); + } + ZipFile.ExtractToDirectory(res, Paths.Mod_Temp + "_newwidget"); + foreach(var f in Directory.GetFiles(Paths.Mod_Temp + "_newwidget")) + { + var finf = new FileInfo(f); + File.Copy(f, res + OSInfo.DirectorySeparator + finf.Name, true); + } + SetupList(); + } + catch + { + API.CreateInfoboxSession("Invalid widget pack.", "The widget pack you selected is not a valid widget pack.", infobox.InfoboxMode.Info); + } + } + }; + } + } + + public class DesktopWidgetModel + { + public string Name { get; set; } + public string Description { get; set; } + public WidgetType Type { get; set; } + public string Lua { get; set; } + } + + public enum WidgetType + { + Icon, + Menu, + DisplayText, + FreePanel + } +} diff --git a/source/WindowsFormsApplication1/Apps/WidgetManager.resx b/source/WindowsFormsApplication1/Apps/WidgetManager.resx new file mode 100644 index 0000000..27fa601 --- /dev/null +++ b/source/WindowsFormsApplication1/Apps/WidgetManager.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="tmrcheckvalid.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file |
