diff options
Diffstat (limited to 'ShiftOS.Engine')
| -rw-r--r-- | ShiftOS.Engine/UI/ShiftStripRenderer.cs | 19 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs | 46 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/InfoboxTemplate.cs | 24 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/ShiftSkinData.cs | 18 |
4 files changed, 60 insertions, 47 deletions
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) + { + base.OnRenderButtonBackground(e); + } + else { - e.Graphics.FillRectangle(b, new Rectangle(Point.Empty, e.Item.Size)); + 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; } } |
