diff --git a/ShiftOS.Engine/UI/ShiftStripRenderer.cs b/ShiftOS.Engine/UI/ShiftStripRenderer.cs index 7b8498f..fe64ff9 100644 --- a/ShiftOS.Engine/UI/ShiftStripRenderer.cs +++ b/ShiftOS.Engine/UI/ShiftStripRenderer.cs @@ -8,14 +8,23 @@ using System.Windows.Forms; namespace ShiftOS.Engine.UI { - public class ShiftStripRenderer : ToolStripProfessionalRenderer + public class ShiftStripRenderer : ToolStripRenderer { - protected override void OnRenderLabelBackground(ToolStripItemRenderEventArgs e) + SolidBrush sb; + + protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e) { - using (var b = new SolidBrush(e.Item.BackColor)) + if (!e.Item.Selected) { - e.Graphics.FillRectangle(b, new Rectangle(Point.Empty, e.Item.Size)); + base.OnRenderButtonBackground(e); + } + else + { + sb = new SolidBrush(Color.FromArgb(64, 64, 64)); + Rectangle rectangle = new Rectangle(0, 0, e.Item.Size.Width - 1, e.Item.Size.Height - 1); + e.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(64,64,64)), rectangle); + e.Graphics.DrawRectangle(new Pen(sb, 1F), rectangle); } } } -} +} \ No newline at end of file diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs index 3279179..82575d1 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs @@ -32,8 +32,8 @@ this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.changeSize = new System.Windows.Forms.Timer(this.components); this.label1 = new System.Windows.Forms.TextBox(); - this.btnOpt2 = new ShiftOS.Engine.UI.ShiftButton(); this.btnOpt1 = new ShiftOS.Engine.UI.ShiftButton(); + this.btnOpt2 = new ShiftOS.Engine.UI.ShiftButton(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // @@ -64,9 +64,26 @@ this.label1.Size = new System.Drawing.Size(256, 125); this.label1.TabIndex = 6; // + // btnOpt1 + // + this.btnOpt1.BackColor = System.Drawing.Color.White; + this.btnOpt1.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.btnOpt1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnOpt1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnOpt1.ForeColor = System.Drawing.Color.Black; + this.btnOpt1.Location = new System.Drawing.Point(105, 163); + this.btnOpt1.Margin = new System.Windows.Forms.Padding(0); + this.btnOpt1.MinimumSize = new System.Drawing.Size(75, 23); + this.btnOpt1.Name = "btnOpt1"; + this.btnOpt1.Padding = new System.Windows.Forms.Padding(3); + this.btnOpt1.Size = new System.Drawing.Size(105, 26); + this.btnOpt1.TabIndex = 7; + this.btnOpt1.Text = "shiftButton1"; + this.btnOpt1.UseVisualStyleBackColor = false; + // // btnOpt2 // - this.btnOpt2.BackColor = System.Drawing.SystemColors.Control; + this.btnOpt2.BackColor = System.Drawing.Color.White; this.btnOpt2.FlatAppearance.BorderColor = System.Drawing.Color.Black; this.btnOpt2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOpt2.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -76,35 +93,18 @@ this.btnOpt2.MinimumSize = new System.Drawing.Size(75, 23); this.btnOpt2.Name = "btnOpt2"; this.btnOpt2.Padding = new System.Windows.Forms.Padding(3); - this.btnOpt2.Size = new System.Drawing.Size(117, 31); - this.btnOpt2.TabIndex = 5; + this.btnOpt2.Size = new System.Drawing.Size(105, 26); + this.btnOpt2.TabIndex = 8; this.btnOpt2.Text = "shiftButton2"; this.btnOpt2.UseVisualStyleBackColor = false; // - // btnOpt1 - // - this.btnOpt1.BackColor = System.Drawing.SystemColors.Control; - this.btnOpt1.FlatAppearance.BorderColor = System.Drawing.Color.Black; - this.btnOpt1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.btnOpt1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOpt1.ForeColor = System.Drawing.Color.Black; - this.btnOpt1.Location = new System.Drawing.Point(90, 163); - this.btnOpt1.Margin = new System.Windows.Forms.Padding(0); - this.btnOpt1.MinimumSize = new System.Drawing.Size(75, 23); - this.btnOpt1.Name = "btnOpt1"; - this.btnOpt1.Padding = new System.Windows.Forms.Padding(3); - this.btnOpt1.Size = new System.Drawing.Size(117, 31); - this.btnOpt1.TabIndex = 4; - this.btnOpt1.Text = "shiftButton1"; - this.btnOpt1.UseVisualStyleBackColor = false; - // // InfoboxTemplate // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.label1); this.Controls.Add(this.btnOpt2); this.Controls.Add(this.btnOpt1); + this.Controls.Add(this.label1); this.Controls.Add(this.pictureBox1); this.Name = "InfoboxTemplate"; this.Size = new System.Drawing.Size(438, 210); @@ -118,8 +118,8 @@ #endregion public System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.Timer changeSize; + public System.Windows.Forms.TextBox label1; private UI.ShiftButton btnOpt1; private UI.ShiftButton btnOpt2; - public System.Windows.Forms.TextBox label1; } } diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs index 72bb530..54d2a0a 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs @@ -8,8 +8,10 @@ using ShiftOS.Engine.Properties; namespace ShiftOS.Engine.WindowManager { public partial class InfoboxTemplate : UserControl - { - public enum ButtonType + { + public bool isOK = false; + public bool isNo = false; + public enum ButtonType { YesNo, OkCancel, @@ -48,17 +50,9 @@ namespace ShiftOS.Engine.WindowManager void btnOpt1_Click(object sender, EventArgs e) { - switch (btnOpt1.Text) - { - case "OK": - btnOpt1.DialogResult = System.Windows.Forms.DialogResult.OK; - ParentForm?.Close(); - break; - case "Yes": - btnOpt1.DialogResult = System.Windows.Forms.DialogResult.Yes; - ParentForm?.Close(); - break; - } + isOK = true; + MessageBox.Show("button was clicked"); + ParentForm?.Close(); } void btnOpt2_Click(object sender, EventArgs e) @@ -66,11 +60,11 @@ namespace ShiftOS.Engine.WindowManager switch (btnOpt2.Text) { case "No": - btnOpt2.DialogResult = System.Windows.Forms.DialogResult.No; + isNo = true; ParentForm?.Close(); break; case "Cancel": - btnOpt2.DialogResult = System.Windows.Forms.DialogResult.Cancel; + isNo = true; break; } } diff --git a/ShiftOS.Engine/WindowManager/ShiftSkinData.cs b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs index cfaf4be..0b00db0 100644 --- a/ShiftOS.Engine/WindowManager/ShiftSkinData.cs +++ b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs @@ -11,10 +11,20 @@ namespace ShiftOS.Engine.WindowManager public class skinTextures { - public skinTextures() - { - - } + public Image LeftTopCornerImage; + public Image TitleBarImage; + public Image RightTopCornerImage; + public Image BtnCloseImage; + public Image BtnMaxImage; + public Image BtnMinImage; + public Image BtnCloseHoverImage; + public Image BtnMaxHoverImage; + public Image BtnMinHoverImage; + public Image LeftSideImage; + public Image RightSideImage; + public Image LeftBottomCornerImage; + public Image BottomSideImage; + public Image RightBottomCornerImage; } } diff --git a/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.Designer.cs b/ShiftOS.Main/MainGame/Apps/FileSkimmer.Designer.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/FileSkimmer.Designer.cs rename to ShiftOS.Main/MainGame/Apps/FileSkimmer.Designer.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.cs b/ShiftOS.Main/MainGame/Apps/FileSkimmer.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/FileSkimmer.cs rename to ShiftOS.Main/MainGame/Apps/FileSkimmer.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/FileSkimmer.resx b/ShiftOS.Main/MainGame/Apps/FileSkimmer.resx similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/FileSkimmer.resx rename to ShiftOS.Main/MainGame/Apps/FileSkimmer.resx diff --git a/ShiftOS.Main/ShiftOS/Apps/ShiftDemo.Designer.cs b/ShiftOS.Main/MainGame/Apps/ShiftDemo.Designer.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/ShiftDemo.Designer.cs rename to ShiftOS.Main/MainGame/Apps/ShiftDemo.Designer.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/ShiftDemo.cs b/ShiftOS.Main/MainGame/Apps/ShiftDemo.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/ShiftDemo.cs rename to ShiftOS.Main/MainGame/Apps/ShiftDemo.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/ShiftDemo.resx b/ShiftOS.Main/MainGame/Apps/ShiftDemo.resx similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/ShiftDemo.resx rename to ShiftOS.Main/MainGame/Apps/ShiftDemo.resx diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs b/ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.Designer.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.Designer.cs rename to ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.Designer.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs b/ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.cs rename to ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.resx b/ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.resx similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/ShifterStuff/SelectColor.resx rename to ShiftOS.Main/MainGame/Apps/ShifterStuff/SelectColor.resx diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs b/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.Designer.cs similarity index 88% rename from ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs rename to ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.Designer.cs index d94aebe..fc0d417 100644 --- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.Designer.cs +++ b/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.Designer.cs @@ -1,4 +1,5 @@ -namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff +using ShiftOS.Engine.UI; +namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff { partial class Shifter { @@ -30,6 +31,9 @@ { this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); + this.shiftButton2 = new ShiftButton(); + this.button7 = new System.Windows.Forms.Button(); + this.shiftButton1 = new Engine.UI.ShiftButton(); this.button6 = new System.Windows.Forms.Button(); this.btnLoad = new System.Windows.Forms.Button(); this.btnSave = new System.Windows.Forms.Button(); @@ -40,8 +44,6 @@ this.groupBox1 = new System.Windows.Forms.GroupBox(); this.button1 = new System.Windows.Forms.Button(); this.tabPage2 = new System.Windows.Forms.TabPage(); - this.shiftButton1 = new Engine.UI.ShiftButton(); - this.button7 = new System.Windows.Forms.Button(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.groupBox1.SuspendLayout(); @@ -62,6 +64,7 @@ // // tabPage1 // + this.tabPage1.Controls.Add(this.shiftButton2); this.tabPage1.Controls.Add(this.button7); this.tabPage1.Controls.Add(this.shiftButton1); this.tabPage1.Controls.Add(this.button6); @@ -80,6 +83,54 @@ this.tabPage1.Text = "Titlebar"; this.tabPage1.UseVisualStyleBackColor = true; // + // shiftButton2 + // + this.shiftButton2.BackColor = System.Drawing.Color.White; + this.shiftButton2.FlatAppearance.BorderColor = System.Drawing.Color.Black; + this.shiftButton2.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.shiftButton2.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.shiftButton2.ForeColor = System.Drawing.Color.Black; + this.shiftButton2.Location = new System.Drawing.Point(194, 77); + this.shiftButton2.Margin = new System.Windows.Forms.Padding(0); + this.shiftButton2.MinimumSize = new System.Drawing.Size(75, 23); + this.shiftButton2.Name = "shiftButton2"; + this.shiftButton2.Padding = new System.Windows.Forms.Padding(3); + this.shiftButton2.Size = new System.Drawing.Size(121, 27); + this.shiftButton2.TabIndex = 11; + this.shiftButton2.Text = "Test Textures"; + this.shiftButton2.UseVisualStyleBackColor = false; + this.shiftButton2.Click += new System.EventHandler(this.shiftButton2_Click); + // + // button7 + // + this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button7.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.button7.Location = new System.Drawing.Point(205, 51); + this.button7.Name = "button7"; + this.button7.Size = new System.Drawing.Size(100, 23); + this.button7.TabIndex = 10; + this.button7.Text = "NormalBtn"; + this.button7.UseVisualStyleBackColor = true; + this.button7.Click += new System.EventHandler(this.shiftButton2_Click); + // + // shiftButton1 + // + this.shiftButton1.BackColor = System.Drawing.Color.White; + this.shiftButton1.FlatAppearance.BorderColor = System.Drawing.Color.Gray; + this.shiftButton1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; + this.shiftButton1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.shiftButton1.ForeColor = System.Drawing.Color.Black; + this.shiftButton1.Location = new System.Drawing.Point(205, 25); + this.shiftButton1.Margin = new System.Windows.Forms.Padding(0); + this.shiftButton1.MinimumSize = new System.Drawing.Size(75, 23); + this.shiftButton1.Name = "shiftButton1"; + this.shiftButton1.Padding = new System.Windows.Forms.Padding(3); + this.shiftButton1.Size = new System.Drawing.Size(100, 23); + this.shiftButton1.TabIndex = 9; + this.shiftButton1.Text = "ShiftButton"; + this.shiftButton1.UseVisualStyleBackColor = false; + this.shiftButton1.Click += new System.EventHandler(this.shiftButton1_Click); + // // button6 // this.button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; @@ -195,34 +246,6 @@ this.tabPage2.Text = "tabPage2"; this.tabPage2.UseVisualStyleBackColor = true; // - // shiftButton1 - // - this.shiftButton1.BackColor = System.Drawing.Color.White; - this.shiftButton1.FlatAppearance.BorderColor = System.Drawing.Color.Gray; - this.shiftButton1.FlatStyle = System.Windows.Forms.FlatStyle.Popup; - this.shiftButton1.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.shiftButton1.ForeColor = System.Drawing.Color.Black; - this.shiftButton1.Location = new System.Drawing.Point(205, 25); - this.shiftButton1.Margin = new System.Windows.Forms.Padding(0); - this.shiftButton1.MinimumSize = new System.Drawing.Size(75, 23); - this.shiftButton1.Name = "shiftButton1"; - this.shiftButton1.Padding = new System.Windows.Forms.Padding(3); - this.shiftButton1.Size = new System.Drawing.Size(100, 23); - this.shiftButton1.TabIndex = 9; - this.shiftButton1.Text = "ShiftButton"; - this.shiftButton1.UseVisualStyleBackColor = false; - // - // button7 - // - this.button7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.button7.Font = new System.Drawing.Font("Lucida Console", 8.25F); - this.button7.Location = new System.Drawing.Point(205, 51); - this.button7.Name = "button7"; - this.button7.Size = new System.Drawing.Size(100, 23); - this.button7.TabIndex = 10; - this.button7.Text = "NormalBtn"; - this.button7.UseVisualStyleBackColor = true; - // // Shifter // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -253,5 +276,6 @@ private System.Windows.Forms.Button button6; private System.Windows.Forms.Button button7; private Engine.UI.ShiftButton shiftButton1; + private Engine.UI.ShiftButton shiftButton2; } } diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs b/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.cs similarity index 68% rename from ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs rename to ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.cs index 2c3cd8e..529e603 100644 --- a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.cs +++ b/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.cs @@ -11,7 +11,8 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff { public partial class Shifter : UserControl { - public int ColorType; //This is a check to see what option was chosen. + public static readonly ImageConverter imageConverter = new ImageConverter(); + public int ColorType; //This is a check to see what option was chosen. public Shifter() { InitializeComponent(); @@ -100,11 +101,40 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff window.Invoke(new Action(() => window.btnMin.BackColor = ShiftSkinData.Colors.BtnMinColor)); } } + void ApplyTexturedSkin() //not implemented + { + throw new NotImplementedException("Not implemented."); + + /*foreach (var window in ShiftWM.Windows) + { + window.Invoke(new Action(() => window.titleBar.Height = ShiftSkinData.Images.TitleBarImage.Height)); + window.Invoke(new Action(() => window.leftTopCorner.Width = ShiftSkinData.Images.LeftTopCornerImage.Width)); + window.Invoke(new Action(() => window.rightTopCorner.Width = ShiftSkinData.Images.RightTopCornerImage.Width)); + window.Invoke(new Action(() => window.leftSide.Width = ShiftSkinData.Images.LeftSideImage.Width)); + window.Invoke(new Action(() => window.rightSide.Width = ShiftSkinData.Images.RightSideImage.Width)); + window.Invoke(new Action(() => window.leftBottomCorner.Width = ShiftSkinData.Images.LeftBottomCornerImage.Width)); + window.Invoke(new Action(() => window.bottomSide.Width = ShiftSkinData.Images.BottomSideImage.Width)); + window.Invoke(new Action(() => window.rightBottomCorner.Width = ShiftSkinData.Images.RightBottomCornerImage.Width)); + window.Invoke(new Action(() => window.btnClose.Width = ShiftSkinData.Images.BtnCloseImage.Width)); + window.Invoke(new Action(() => window.btnMax.Width = ShiftSkinData.Images.BtnMaxImage.Width)); + window.Invoke(new Action(() => window.btnMin.Width = ShiftSkinData.Images.BtnMinImage.Width)); + window.Invoke(new Action(() => window.titleBar.BackgroundImage = ShiftSkinData.Images.TitleBarImage)); + window.Invoke(new Action(() => window.leftTopCorner.BackgroundImage = ShiftSkinData.Images.LeftTopCornerImage)); + window.Invoke(new Action(() => window.rightTopCorner.BackgroundImage = ShiftSkinData.Images.RightTopCornerImage)); + window.Invoke(new Action(() => window.leftSide.BackgroundImage = ShiftSkinData.Images.LeftSideImage)); + window.Invoke(new Action(() => window.rightSide.BackgroundImage = ShiftSkinData.Images.RightSideImage)); + window.Invoke(new Action(() => window.leftBottomCorner.BackgroundImage = ShiftSkinData.Images.LeftBottomCornerImage)); + window.Invoke(new Action(() => window.bottomSide.BackgroundImage = ShiftSkinData.Images.BottomSideImage)); + window.Invoke(new Action(() => window.rightBottomCorner.BackgroundImage = ShiftSkinData.Images.RightBottomCornerImage)); + window.Invoke(new Action(() => window.btnClose.BackgroundImage = ShiftSkinData.Images.BtnCloseImage)); + window.Invoke(new Action(() => window.btnMax.BackgroundImage = ShiftSkinData.Images.BtnMaxImage)); + window.Invoke(new Action(() => window.btnMin.BackgroundImage = ShiftSkinData.Images.BtnMinImage)); + }*/ + } void btnSave_Click(object sender, EventArgs e) { Color[] shiftSkinColors = new Color[14]; - int i = 0; shiftSkinColors[0] = ShiftSkinData.Colors.LeftTopCornerColor; shiftSkinColors[1] = ShiftSkinData.Colors.TitleBarColor; @@ -124,10 +154,11 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff using (var fobj = File.OpenWrite(@"C:\Users\Public\Documents\Skin.whoa")) Whoa.Whoa.SerialiseObject(fobj, shiftSkinColors); - ShiftWM.StartInfoboxSession( + InfoboxTemplate shiftWindow = ShiftWM.StartInfoboxSession( "Saved Skin", "Saved Skin to C:\\Users\\Public\\Documents\\Skin.whoa", InfoboxTemplate.ButtonType.Ok); + } private void btnLoad_Click(object sender, EventArgs e) @@ -170,5 +201,27 @@ namespace ShiftOS.Main.ShiftOS.Apps.ShifterStuff Color.FromArgb(15, 29, 160)); ApplySkin(); } + + private void shiftButton1_Click(object sender, EventArgs e) + { + MessageBox.Show("This was clicked."); + } + + private void shiftButton2_Click(object sender, EventArgs e) + { + + } + public static Bitmap LoadImage(byte[] byteArray) + { + var bm = (Bitmap)imageConverter.ConvertFrom(byteArray); + + if (bm != null && (bm.HorizontalResolution != (int)bm.HorizontalResolution || + bm.VerticalResolution != (int)bm.VerticalResolution)) + { + bm.SetResolution((int)(bm.HorizontalResolution + 0.5f), + (int)(bm.VerticalResolution + 0.5f)); + } + return bm; + } } } \ No newline at end of file diff --git a/ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.resx b/ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.resx similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/ShifterStuff/Shifter.resx rename to ShiftOS.Main/MainGame/Apps/ShifterStuff/Shifter.resx diff --git a/ShiftOS.Main/ShiftOS/Apps/Terminal.Designer.cs b/ShiftOS.Main/MainGame/Apps/Terminal.Designer.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/Terminal.Designer.cs rename to ShiftOS.Main/MainGame/Apps/Terminal.Designer.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/Terminal.cs b/ShiftOS.Main/MainGame/Apps/Terminal.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/Terminal.cs rename to ShiftOS.Main/MainGame/Apps/Terminal.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/Terminal.resx b/ShiftOS.Main/MainGame/Apps/Terminal.resx similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/Terminal.resx rename to ShiftOS.Main/MainGame/Apps/Terminal.resx diff --git a/ShiftOS.Main/ShiftOS/Apps/TestForm.Designer.cs b/ShiftOS.Main/MainGame/Apps/TestForm.Designer.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/TestForm.Designer.cs rename to ShiftOS.Main/MainGame/Apps/TestForm.Designer.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/TestForm.cs b/ShiftOS.Main/MainGame/Apps/TestForm.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/TestForm.cs rename to ShiftOS.Main/MainGame/Apps/TestForm.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/TestForm.resx b/ShiftOS.Main/MainGame/Apps/TestForm.resx similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/TestForm.resx rename to ShiftOS.Main/MainGame/Apps/TestForm.resx diff --git a/ShiftOS.Main/ShiftOS/Apps/TextPad.Designer.cs b/ShiftOS.Main/MainGame/Apps/TextPad.Designer.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/TextPad.Designer.cs rename to ShiftOS.Main/MainGame/Apps/TextPad.Designer.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/TextPad.cs b/ShiftOS.Main/MainGame/Apps/TextPad.cs similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/TextPad.cs rename to ShiftOS.Main/MainGame/Apps/TextPad.cs diff --git a/ShiftOS.Main/ShiftOS/Apps/TextPad.resx b/ShiftOS.Main/MainGame/Apps/TextPad.resx similarity index 100% rename from ShiftOS.Main/ShiftOS/Apps/TextPad.resx rename to ShiftOS.Main/MainGame/Apps/TextPad.resx diff --git a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs b/ShiftOS.Main/MainGame/Desktop.Designer.cs similarity index 92% rename from ShiftOS.Main/ShiftOS/Desktop.Designer.cs rename to ShiftOS.Main/MainGame/Desktop.Designer.cs index 722f619..5378aac 100644 --- a/ShiftOS.Main/ShiftOS/Desktop.Designer.cs +++ b/ShiftOS.Main/MainGame/Desktop.Designer.cs @@ -33,13 +33,13 @@ this.clockPanel = new System.Windows.Forms.Panel(); this.lblClock = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); - this.timer1 = new System.Windows.Forms.Timer(this.components); this.menuStrip1 = new System.Windows.Forms.MenuStrip(); this.applicationsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.shifterToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.terminalToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.textPadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.fileSkimmerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.timer1 = new System.Windows.Forms.Timer(this.components); this.taskbar.SuspendLayout(); this.clockPanel.SuspendLayout(); this.panel2.SuspendLayout(); @@ -68,7 +68,7 @@ // // lblClock // - this.lblClock.BackColor = System.Drawing.Color.Transparent; + this.lblClock.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.lblClock.Dock = System.Windows.Forms.DockStyle.Fill; this.lblClock.Font = new System.Drawing.Font("Lucida Console", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblClock.ForeColor = System.Drawing.Color.White; @@ -88,23 +88,20 @@ this.panel2.Size = new System.Drawing.Size(102, 24); this.panel2.TabIndex = 0; // - // timer1 - // - this.timer1.Tick += new System.EventHandler(this.timer1_Tick); - // // menuStrip1 // - this.menuStrip1.BackgroundImage = global::ShiftOS.Main.Properties.Resources.pixel; + this.menuStrip1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.menuStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.menuStrip1.Dock = System.Windows.Forms.DockStyle.None; + this.menuStrip1.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.applicationsToolStripMenuItem}); this.menuStrip1.Location = new System.Drawing.Point(0, 0); this.menuStrip1.Name = "menuStrip1"; - this.menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional; - this.menuStrip1.Size = new System.Drawing.Size(93, 24); + this.menuStrip1.Size = new System.Drawing.Size(231, 24); this.menuStrip1.TabIndex = 2; this.menuStrip1.Text = "Applications"; + this.menuStrip1.MenuActivate += new System.EventHandler(this.menuStrip1_MenuActivate); // // applicationsToolStripMenuItem // @@ -115,37 +112,41 @@ this.fileSkimmerToolStripMenuItem}); this.applicationsToolStripMenuItem.ForeColor = System.Drawing.Color.White; this.applicationsToolStripMenuItem.Name = "applicationsToolStripMenuItem"; - this.applicationsToolStripMenuItem.Size = new System.Drawing.Size(85, 20); + this.applicationsToolStripMenuItem.Size = new System.Drawing.Size(103, 20); this.applicationsToolStripMenuItem.Text = "Applications"; // // shifterToolStripMenuItem // this.shifterToolStripMenuItem.Name = "shifterToolStripMenuItem"; - this.shifterToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.shifterToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.shifterToolStripMenuItem.Text = "Shifter"; this.shifterToolStripMenuItem.Click += new System.EventHandler(this.shifterToolStripMenuItem_Click); // // terminalToolStripMenuItem // this.terminalToolStripMenuItem.Name = "terminalToolStripMenuItem"; - this.terminalToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.terminalToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.terminalToolStripMenuItem.Text = "Terminal"; this.terminalToolStripMenuItem.Click += new System.EventHandler(this.terminalToolStripMenuItem_Click); // // textPadToolStripMenuItem // this.textPadToolStripMenuItem.Name = "textPadToolStripMenuItem"; - this.textPadToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.textPadToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.textPadToolStripMenuItem.Text = "TextPad"; this.textPadToolStripMenuItem.Click += new System.EventHandler(this.textPadToolStripMenuItem_Click); // // fileSkimmerToolStripMenuItem // this.fileSkimmerToolStripMenuItem.Name = "fileSkimmerToolStripMenuItem"; - this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.fileSkimmerToolStripMenuItem.Size = new System.Drawing.Size(158, 22); this.fileSkimmerToolStripMenuItem.Text = "File Skimmer"; this.fileSkimmerToolStripMenuItem.Click += new System.EventHandler(this.fileSkimmerToolStripMenuItem_Click); // + // timer1 + // + this.timer1.Tick += new System.EventHandler(this.timer1_Tick); + // // Desktop // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/ShiftOS.Main/ShiftOS/Desktop.cs b/ShiftOS.Main/MainGame/Desktop.cs similarity index 77% rename from ShiftOS.Main/ShiftOS/Desktop.cs rename to ShiftOS.Main/MainGame/Desktop.cs index 64dafdc..0cb3583 100644 --- a/ShiftOS.Main/ShiftOS/Desktop.cs +++ b/ShiftOS.Main/MainGame/Desktop.cs @@ -13,14 +13,20 @@ namespace ShiftOS.Main.ShiftOS // testing github because git hates me public partial class Desktop : Form { - Graphics g; + public Desktop() { - InitializeComponent(); + InitializeComponent(); + foreach (object t in applicationsToolStripMenuItem.DropDownItems) + { + var appList = t as ToolStripItem; + if (t == null) continue; + appList.BackColor = Color.FromArgb(64, 64, 64); + appList.ForeColor = Color.White; + } timer1.Start(); Closed += (sender, args) => { Application.Exit(); }; - var s = new ShiftStripRenderer(); - + } private void shifterToolStripMenuItem_Click(object sender, EventArgs e) @@ -57,11 +63,10 @@ namespace ShiftOS.Main.ShiftOS { lblClock.Text = DateTime.Now.ToString("hh:mm:ss"); } - - private void SetupToolStrip(ToolStripRenderEventArgs e, Graphics g) + + private void menuStrip1_MenuActivate(object sender, EventArgs e) { - var s = new ShiftStripRenderer(); - s.DrawToolStripBackground(e); + menuStrip1.BackColor = Color.FromArgb(64, 64, 64); } } } diff --git a/ShiftOS.Main/ShiftOS/Desktop.resx b/ShiftOS.Main/MainGame/Desktop.resx similarity index 100% rename from ShiftOS.Main/ShiftOS/Desktop.resx rename to ShiftOS.Main/MainGame/Desktop.resx diff --git a/ShiftOS.Main/ShiftOS.Main.csproj b/ShiftOS.Main/ShiftOS.Main.csproj index 7105060..86746dd 100644 --- a/ShiftOS.Main/ShiftOS.Main.csproj +++ b/ShiftOS.Main/ShiftOS.Main.csproj @@ -54,40 +54,40 @@ - + UserControl - + FileSkimmer.cs - + UserControl - + SelectColor.cs - + UserControl - + Shifter.cs - + UserControl - + Terminal.cs - + UserControl - + TextPad.cs - + Form - + Desktop.cs @@ -111,22 +111,22 @@ Resources.resx True - + FileSkimmer.cs - + SelectColor.cs - + Shifter.cs - + Terminal.cs - + TextPad.cs - + Desktop.cs @@ -153,7 +153,7 @@ - +