diff options
| author | Alex-TIMEHACK <[email protected]> | 2017-11-18 16:29:54 +0000 |
|---|---|---|
| committer | Alex-TIMEHACK <[email protected]> | 2017-11-18 16:29:54 +0000 |
| commit | 4037be53b29a122732cfc10693e9c0027f606bb0 (patch) | |
| tree | 8533ea9ee0ac8f5f7f696b85cb039f783657ada0 /ShiftOS.Engine/WindowManager | |
| parent | 65b7ac2b8cbc4478f6d31a21f106048aeb075078 (diff) | |
| parent | 97722fbe9d474adffbba0b92e9727c48a8205234 (diff) | |
| download | shiftos-rewind-4037be53b29a122732cfc10693e9c0027f606bb0.tar.gz shiftos-rewind-4037be53b29a122732cfc10693e9c0027f606bb0.tar.bz2 shiftos-rewind-4037be53b29a122732cfc10693e9c0027f606bb0.zip | |
Updated my fork!
Conflicts:
ShiftOS.Engine/ShiftOS.Engine.csproj
ShiftOS.Engine/Terminal/Commands/Hello.cs
ShiftOS.Engine/Terminal/TerminalBackend.cs
ShiftOS.Engine/Terminal/TerminalCommand.cs
ShiftOS.Main/ShiftOS.Main.csproj
ShiftOS.Main/ShiftOS/Apps/Terminal.cs
ShiftOS.Main/ShiftOS/Desktop.cs
Diffstat (limited to 'ShiftOS.Engine/WindowManager')
| -rw-r--r-- | ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs | 13 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/InfoboxTemplate.cs | 161 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/ShiftSkinData.cs | 36 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/ShiftWM.cs | 219 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs | 6 | ||||
| -rw-r--r-- | ShiftOS.Engine/WindowManager/ShiftWindow.cs | 104 |
6 files changed, 268 insertions, 271 deletions
diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs index a076c2a..58c191e 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.Designer.cs @@ -43,9 +43,9 @@ | System.Windows.Forms.AnchorStyles.Right))); this.btnOpt1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOpt1.Font = new System.Drawing.Font("Lucida Console", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnOpt1.Location = new System.Drawing.Point(65, 134); + this.btnOpt1.Location = new System.Drawing.Point(73, 170); this.btnOpt1.Name = "btnOpt1"; - this.btnOpt1.Size = new System.Drawing.Size(75, 23); + this.btnOpt1.Size = new System.Drawing.Size(117, 23); this.btnOpt1.TabIndex = 0; this.btnOpt1.Text = "button1"; this.btnOpt1.UseVisualStyleBackColor = true; @@ -57,9 +57,9 @@ | System.Windows.Forms.AnchorStyles.Right))); this.btnOpt2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnOpt2.Font = new System.Drawing.Font("Lucida Console", 9F); - this.btnOpt2.Location = new System.Drawing.Point(188, 134); + this.btnOpt2.Location = new System.Drawing.Point(243, 170); this.btnOpt2.Name = "btnOpt2"; - this.btnOpt2.Size = new System.Drawing.Size(75, 23); + this.btnOpt2.Size = new System.Drawing.Size(117, 23); this.btnOpt2.TabIndex = 1; this.btnOpt2.Text = "button2"; this.btnOpt2.UseVisualStyleBackColor = true; @@ -80,13 +80,12 @@ // changeSize // this.changeSize.Interval = 1; - this.changeSize.Tick += new System.EventHandler(this.changeSize_Tick); // // label1 // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Lucida Console", 9.25F); - this.label1.Location = new System.Drawing.Point(105, 55); + this.label1.Location = new System.Drawing.Point(107, 48); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(55, 13); this.label1.TabIndex = 3; @@ -101,7 +100,7 @@ this.Controls.Add(this.btnOpt2); this.Controls.Add(this.btnOpt1); this.Name = "InfoboxTemplate"; - this.Size = new System.Drawing.Size(346, 174); + this.Size = new System.Drawing.Size(438, 210); this.Load += new System.EventHandler(this.InfoboxTemplate_Load); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); diff --git a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs index a5be129..c2b45e0 100644 --- a/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs +++ b/ShiftOS.Engine/WindowManager/InfoboxTemplate.cs @@ -1,91 +1,94 @@ using System; using System.Drawing; -using System.Windows.Forms; -using System.Media; using System.IO; +using System.Media; +using System.Windows.Forms; +using ShiftOS.Engine.Properties; namespace ShiftOS.Engine.WindowManager { - public partial class InfoboxTemplate : UserControl - { - Stream _str; - private int _buttonChoice; - private int _buttonSelected; - public InfoboxTemplate(ButtonType type) - { - InitializeComponent(); - - switch (type) - { - case ButtonType.Ok: - btnOpt1.Text = "OK"; - btnOpt2.Hide(); - btnOpt1.Location = new Point(109, 134); - _buttonChoice = 1; - break; - case ButtonType.OkCancel: - btnOpt1.Text = "OK"; - btnOpt2.Text = "Cancel"; - _buttonChoice = 2; - break; - case ButtonType.YesNo: - btnOpt1.Text = "Yes"; - btnOpt2.Text = "No"; - _buttonChoice = 3; - break; - } - } + public partial class InfoboxTemplate : UserControl + { + public enum ButtonType + { + YesNo, + OkCancel, + Ok + } - public enum ButtonType - { - YesNo, - OkCancel, - Ok - } + public enum DialogResult + { + Yes, + No, + Cancel, + Ok + } - private void btnOpt1_Click(object sender, EventArgs e) - { - switch (btnOpt1.Text) - { - case "OK": - _buttonSelected = 1; - ParentForm?.Close(); - break; - case "Yes": - _buttonSelected = 2; - ParentForm?.Close(); - break; - } - } + int _buttonChoice; + int _buttonSelected; + Stream _str; - private void btnOpt2_Click(object sender, EventArgs e) - { - switch (btnOpt2.Text) - { - case "No": - _buttonSelected = 3; - break; - case "Cancel": - _buttonSelected = 4; - break; - } - } + public InfoboxTemplate(ButtonType type) + { + InitializeComponent(); - public void Play() - { - _str = Properties.Resources.infobox; - SoundPlayer sp = new SoundPlayer(_str); - sp.Play(); - sp.Stream.Position = 0; - } + switch (type) + { + case ButtonType.Ok: + btnOpt1.Text = "OK"; + btnOpt2.Hide(); + btnOpt1.Location = new Point(109, 134); + _buttonChoice = 1; + break; + case ButtonType.OkCancel: + btnOpt1.Text = "OK"; + btnOpt2.Text = "Cancel"; + _buttonChoice = 2; + break; + case ButtonType.YesNo: + btnOpt1.Text = "Yes"; + btnOpt2.Text = "No"; + _buttonChoice = 3; + break; + } + } - private void InfoboxTemplate_Load(object sender, EventArgs e) - => Play(); + void btnOpt1_Click(object sender, EventArgs e) + { + switch (btnOpt1.Text) + { + case "OK": + ParentForm?.Close(); + break; + case "Yes": + _buttonSelected = 2; + ParentForm?.Close(); + break; + } + } + + void btnOpt2_Click(object sender, EventArgs e) + { + switch (btnOpt2.Text) + { + case "No": + _buttonSelected = 3; + break; + case "Cancel": + _buttonSelected = 4; + break; + } + } - private void changeSize_Tick(object sender, EventArgs e) - { - this.Height += label1.Height; - this.Width += label1.Width; - } - } -} + public void Play() + { + _str = Resources.infobox; + var sp = new SoundPlayer(_str); + sp.Play(); + sp.Stream.Position = 0; + } + + void InfoboxTemplate_Load(object sender, EventArgs e) + => Play(); + } +}
\ No newline at end of file diff --git a/ShiftOS.Engine/WindowManager/ShiftSkinData.cs b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs index 2c03123..2c8c4c8 100644 --- a/ShiftOS.Engine/WindowManager/ShiftSkinData.cs +++ b/ShiftOS.Engine/WindowManager/ShiftSkinData.cs @@ -2,19 +2,23 @@ namespace ShiftOS.Engine.WindowManager { - public abstract class ShiftSkinData - { - // ColorData - public static Color leftTopCornerColor = Color.Empty; - public static Color titleBarColor = Color.Empty; - public static Color rightTopCornerColor = Color.Empty; - public static Color btnCloseColor = Color.Empty; - public static Color btnMaxColor = Color.Empty; - public static Color btnMinColor = Color.Empty; - public static Color leftSideColor = Color.Empty; - public static Color rightSideColor = Color.Empty; - public static Color leftBottomCornerColor = Color.Empty; - public static Color bottomSideColor = Color.Empty; - public static Color rightBottomCornerColor = Color.Empty; - } -} + public abstract class ShiftSkinData + { + // ColorData + public static Color LeftTopCornerColor = Color.Empty; + + public static Color TitleBarColor = Color.Empty; + public static Color RightTopCornerColor = Color.Empty; + public static Color BtnCloseColor = Color.Empty; + public static Color BtnMaxColor = Color.Empty; + public static Color BtnMinColor = Color.Empty; + public static Color BtnCloseHoverColor = Color.Empty; + public static Color BtnMaxHoverColor = Color.Empty; + public static Color BtnMinHoverColor = Color.Empty; + public static Color LeftSideColor = Color.Empty; + public static Color RightSideColor = Color.Empty; + public static Color LeftBottomCornerColor = Color.Empty; + public static Color BottomSideColor = Color.Empty; + public static Color RightBottomCornerColor = Color.Empty; + } +}
\ No newline at end of file diff --git a/ShiftOS.Engine/WindowManager/ShiftWM.cs b/ShiftOS.Engine/WindowManager/ShiftWM.cs index 64b84f9..fa16cf9 100644 --- a/ShiftOS.Engine/WindowManager/ShiftWM.cs +++ b/ShiftOS.Engine/WindowManager/ShiftWM.cs @@ -1,126 +1,127 @@ -using System; -using System.Collections.ObjectModel; -using System.Diagnostics; +using System.Diagnostics; using System.Drawing; using System.Linq; using System.Windows.Forms; +using ShiftOS.Engine.Misc; +using ShiftOS.Engine.Properties; using static ShiftOS.Engine.WindowManager.InfoboxTemplate; namespace ShiftOS.Engine.WindowManager { - public static class ShiftWM - { - public static ObservableCollection<ShiftWindow> Windows { get; } = new ObservableCollection<ShiftWindow>(); - - public static ShiftWindow GetShiftWindow(this UserControl control) - { - return Windows.First(p => (uint) control.Tag == p.Id); - } - - /// <summary> - /// Shows a new ShiftWindow based on a UserControl. - /// </summary> - /// <param name="content">The UserControl to use</param> - /// <param name="title">The program's title</param> - /// <param name="icon">The icon to show</param> - /// <param name="showAsInfobox">Checks if this is an infobox</param> - /// <param name="resize">Enables or disables resizing</param> - /// <returns></returns> - public static ShiftWindow Init(UserControl content, string title, Icon icon, bool showAsInfobox = false, bool resize = true) - { - // Setup Window - ShiftWindow app = new ShiftWindow - { - Text = title, - Title = {Text = title} - }; - - app.Width = content.Width + app.leftSide.Width + app.rightSide.Width; - app.Height = content.Height + app.bottomSide.Height + app.titleBar.Height; - - if (ShiftSkinData.titleBarColor == Color.Empty) - { - Color borderColor = Color.FromArgb(64, 64, 64); - ShiftSkinData.btnCloseColor = Color.Black; - ShiftSkinData.btnMaxColor = Color.Black; - ShiftSkinData.btnMinColor = Color.Black; - ShiftSkinData.leftTopCornerColor = borderColor; - ShiftSkinData.titleBarColor = borderColor; - ShiftSkinData.rightTopCornerColor = borderColor; - ShiftSkinData.leftSideColor = borderColor; - ShiftSkinData.rightSideColor = borderColor; - ShiftSkinData.leftBottomCornerColor = borderColor; - ShiftSkinData.bottomSideColor = borderColor; - ShiftSkinData.rightBottomCornerColor = borderColor; - } - - app.btnClose.BackColor = ShiftSkinData.btnCloseColor; - app.btnMax.BackColor = ShiftSkinData.btnMaxColor; - app.btnMin.BackColor = ShiftSkinData.btnMinColor; - app.leftTopCorner.BackColor = ShiftSkinData.leftTopCornerColor; - app.titleBar.BackColor = ShiftSkinData.titleBarColor; - app.rightTopCorner.BackColor = ShiftSkinData.rightTopCornerColor; - app.leftSide.BackColor = ShiftSkinData.leftSideColor; - app.rightSide.BackColor = ShiftSkinData.rightSideColor; - app.leftBottomCorner.BackColor = ShiftSkinData.leftBottomCornerColor; - app.bottomSide.BackColor = ShiftSkinData.bottomSideColor; - app.rightBottomCorner.BackColor = ShiftSkinData.rightBottomCornerColor; - - - // Icon Setup - if (icon == null) - { - app.programIcon.Hide(); - app.programIcon.Image = Properties.Resources.nullIcon; - app.Title.Location = new Point(2, 7); - } - - else - { - app.programIcon.Image = icon.ToBitmap(); - app.Icon = icon; - } + public static class ShiftWM + { + public static EventList<ShiftWindow> Windows = new EventList<ShiftWindow>(); + + public static ShiftWindow GetShiftWindow(this UserControl control) + { + return Windows.First(p => (uint) control.Tag == p.Id); + } + + /// <summary> + /// Shows a new ShiftWindow based on a UserControl. + /// </summary> + /// <param name="content">The UserControl to use</param> + /// <param name="title">The program's title</param> + /// <param name="icon">The icon to show</param> + /// <param name="showAsInfobox">Checks if this is an infobox</param> + /// <param name="resize">Enables or disables resizing</param> + /// <returns></returns> + public static ShiftWindow Init( + UserControl content, + string title, + Bitmap icon, + bool showAsInfobox = false, + bool resize = true) + { + // Setup Window + var app = new ShiftWindow + { + Text = title, + Title = { Text = title } + }; + + app.Width = content.Width + app.leftSide.Width + app.rightSide.Width; + app.Height = content.Height + app.bottomSide.Height + app.titleBar.Height; + + if (ShiftSkinData.TitleBarColor == Color.Empty) + { + var borderColor = Color.FromArgb(64, 64, 64); + ShiftSkinData.BtnCloseColor = Color.Black; + ShiftSkinData.BtnMaxColor = Color.Black; + ShiftSkinData.BtnMinColor = Color.Black; + ShiftSkinData.LeftTopCornerColor = borderColor; + ShiftSkinData.TitleBarColor = borderColor; + ShiftSkinData.RightTopCornerColor = borderColor; + ShiftSkinData.LeftSideColor = borderColor; + ShiftSkinData.RightSideColor = borderColor; + ShiftSkinData.LeftBottomCornerColor = borderColor; + ShiftSkinData.BottomSideColor = borderColor; + ShiftSkinData.RightBottomCornerColor = borderColor; + } + + app.btnClose.BackColor = ShiftSkinData.BtnCloseColor; + app.btnMax.BackColor = ShiftSkinData.BtnMaxColor; + app.btnMin.BackColor = ShiftSkinData.BtnMinColor; + app.leftTopCorner.BackColor = ShiftSkinData.LeftTopCornerColor; + app.titleBar.BackColor = ShiftSkinData.TitleBarColor; + app.rightTopCorner.BackColor = ShiftSkinData.RightTopCornerColor; + app.leftSide.BackColor = ShiftSkinData.LeftSideColor; + app.rightSide.BackColor = ShiftSkinData.RightSideColor; + app.leftBottomCorner.BackColor = ShiftSkinData.LeftBottomCornerColor; + app.bottomSide.BackColor = ShiftSkinData.BottomSideColor; + app.rightBottomCorner.BackColor = ShiftSkinData.RightBottomCornerColor; + + + // Icon Setup + if (icon == null) + { + app.programIcon.Hide(); + app.Title.Location = new Point(2, 7); + } + + else + { + app.programIcon.Image = icon; + app.Icon = icon.ToIcon(); + } // Setup UC content.Parent = app.programContent; - content.BringToFront(); - content.Dock = DockStyle.Fill; - app.Show(); + content.BringToFront(); + content.Dock = DockStyle.Fill; + app.Show(); - content.Tag = app.SetId(); + content.Tag = app.SetId(); Debug.WriteLine($"usercontrol: {content.Tag} window: {app.Id}"); - app.Closed += (sender, args) => - { - Windows.Remove((ShiftWindow) sender); - }; + app.Closed += (sender, args) => { Windows.Remove((ShiftWindow) sender); }; Windows.Add(app); - if (content is IShiftWindowExtensions extensions) - { - extensions.OnLoaded(app); - } - - return app; - } - - /// <summary> - /// Shows a new infobox. - /// </summary> - /// <param name="title">The title of the infobox.</param> - /// <param name="body">The infobox's content.</param> - /// <param name="type">The ButtonType used for the infobox.</param> - /// <returns></returns> - public static InfoboxTemplate StartInfoboxSession(string title, string body, ButtonType type) - { - InfoboxTemplate info = new InfoboxTemplate(type) - { - label1 = { Text = body } - }; - Init(info, title, Properties.Resources.iconInfoBox_fw.ToIcon(), true, false); - return info; - } - } -} + if (content is IShiftWindowExtensions extensions) + { + extensions.OnLoaded(app); + } + + return app; + } + + /// <summary> + /// Shows a new infobox. + /// </summary> + /// <param name="title">The title of the infobox.</param> + /// <param name="body">The infobox's content.</param> + /// <param name="type">The ButtonType used for the infobox.</param> + /// <returns></returns> + public static InfoboxTemplate StartInfoboxSession(string title, string body, ButtonType type) + { + var info = new InfoboxTemplate(type) + { + label1 = { Text = body } + }; + Init(info, title, Resources.iconInfoBox_fw, true, false); + return info; + } + } +}
\ No newline at end of file diff --git a/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs b/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs index 211324c..df479ba 100644 --- a/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs +++ b/ShiftOS.Engine/WindowManager/ShiftWindow.Designer.cs @@ -161,10 +161,8 @@ this.btnMax.Size = new System.Drawing.Size(21, 21); this.btnMax.TabIndex = 6; this.btnMax.TabStop = false; - this.btnMax.MouseDown += new System.Windows.Forms.MouseEventHandler(this.maximizebutton_MouseDown); this.btnMax.MouseEnter += new System.EventHandler(this.maximizebutton_MouseEnter); this.btnMax.MouseLeave += new System.EventHandler(this.maximizebutton_MouseLeave); - this.btnMax.MouseUp += new System.Windows.Forms.MouseEventHandler(this.maximizebutton_MouseUp); // // btnMin // @@ -175,10 +173,8 @@ this.btnMin.Size = new System.Drawing.Size(21, 21); this.btnMin.TabIndex = 5; this.btnMin.TabStop = false; - this.btnMin.MouseDown += new System.Windows.Forms.MouseEventHandler(this.minimizebutton_MouseDown); this.btnMin.MouseEnter += new System.EventHandler(this.minimizebutton_MouseEnter); this.btnMin.MouseLeave += new System.EventHandler(this.minimizebutton_MouseLeave); - this.btnMin.MouseUp += new System.Windows.Forms.MouseEventHandler(this.minimizebutton_MouseUp); // // Title // @@ -203,10 +199,8 @@ this.btnClose.TabIndex = 4; this.btnClose.TabStop = false; this.btnClose.Click += new System.EventHandler(this.closebutton_Click); - this.btnClose.MouseDown += new System.Windows.Forms.MouseEventHandler(this.closebutton_MouseDown); this.btnClose.MouseEnter += new System.EventHandler(this.closebutton_MouseEnter); this.btnClose.MouseLeave += new System.EventHandler(this.closebutton_MouseLeave); - this.btnClose.MouseUp += new System.Windows.Forms.MouseEventHandler(this.closebutton_MouseUp); // // rightSide // diff --git a/ShiftOS.Engine/WindowManager/ShiftWindow.cs b/ShiftOS.Engine/WindowManager/ShiftWindow.cs index c091d40..e407e33 100644 --- a/ShiftOS.Engine/WindowManager/ShiftWindow.cs +++ b/ShiftOS.Engine/WindowManager/ShiftWindow.cs @@ -1,72 +1,76 @@ using System; -using System.Drawing; using System.Linq; -using System.Windows.Forms; using System.Runtime.InteropServices; +using System.Windows.Forms; +using ShiftOS.Engine.Misc; namespace ShiftOS.Engine.WindowManager { - public partial class ShiftWindow : Form - { - public uint Id { get; private set; } + public partial class ShiftWindow : Form + { + const int WmNclbuttondown = 0xA1; + const int HtCaption = 0x2; + + public ShiftWindow() + { + InitializeComponent(); + } - public UserControl ChildControl { get; set; } + public uint Id { get; private set; } - public ShiftWindow() - { - InitializeComponent(); - } + public UserControl ChildControl { get; set; } - public uint SetId() - { + public uint SetId() + { do { - Id = (uint)Tools.Rnd.Next(100000, 999999); - } - while (ShiftWM.Windows.FirstOrDefault(w => w.Id == Id) != null); + Id = (uint) Tools.Rnd.Next(100000, 999999); + } while (ShiftWM.Windows.FirstOrDefault(w => w.Id == Id) != null); - return Id; - } + return Id; + } - private const int WM_NCLBUTTONDOWN = 0xA1; - private const int HT_CAPTION = 0x2; + [DllImport("user32.dll")] + static extern int SendMessage( + IntPtr hWnd, + int msg, + int wParam, + int lParam); - [DllImportAttribute("user32.dll")] - private static extern int SendMessage(IntPtr hWnd, - int Msg, int wParam, int lParam); + [DllImport("user32.dll")] + static extern bool ReleaseCapture(); - [DllImportAttribute("user32.dll")] - private static extern bool ReleaseCapture(); + void Programtopbar_drag(object sender, MouseEventArgs e) + { + if (e.Button != MouseButtons.Left) return; - private void Programtopbar_drag(object sender, MouseEventArgs e) - { - if (e.Button != MouseButtons.Left) return; + ReleaseCapture(); + SendMessage(Handle, WmNclbuttondown, HtCaption, 0); + } - ReleaseCapture(); - SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0); - } + void closebutton_Click(object sender, EventArgs e) + => Close(); - private void closebutton_Click(object sender, EventArgs e) - => this.Close(); + void closebutton_MouseEnter(object sender, EventArgs e) + => btnClose.BackColor = ShiftSkinData.BtnCloseHoverColor; - private void closebutton_MouseEnter(object sender, EventArgs e) - => btnClose.BackColor = Color.Gray; + void closebutton_MouseLeave(object sender, EventArgs e) + => btnClose.BackColor = ShiftSkinData.BtnCloseColor; - private void closebutton_MouseLeave(object sender, EventArgs e) - => btnClose.BackColor = Color.Black; + void maximizebutton_MouseEnter(object sender, EventArgs e) + => btnMax.BackColor = ShiftSkinData.BtnMaxHoverColor; - private void maximizebutton_MouseEnter(object sender, EventArgs e) - => btnMax.BackColor = Color.Gray; + void maximizebutton_MouseLeave(object sender, EventArgs e) + => btnMax.BackColor = ShiftSkinData.BtnMaxColor; - private void maximizebutton_MouseLeave(object sender, EventArgs e) - => btnMax.BackColor = Color.Black; + void minimizebutton_MouseEnter(object sender, EventArgs e) + => btnMin.BackColor = ShiftSkinData.BtnMinHoverColor; - private void minimizebutton_MouseEnter(object sender, EventArgs e) - => btnMin.BackColor = Color.Gray; - private void minimizebutton_MouseLeave(object sender, EventArgs e) - => btnMin.BackColor = Color.Black; + void minimizebutton_MouseLeave(object sender, EventArgs e) + => btnMin.BackColor = ShiftSkinData.BtnMinColor; + /* private void closebutton_MouseDown(object sender, MouseEventArgs e) => btnClose.BackColor = Color.Black; @@ -75,19 +79,11 @@ namespace ShiftOS.Engine.WindowManager private void minimizebutton_MouseDown(object sender, MouseEventArgs e) => btnMin.BackColor = Color.Black; - - private void minimizebutton_MouseUp(object sender, MouseEventArgs e) - => btnMin.BackColor = Color.Gray; - - private void maximizebutton_MouseUp(object sender, MouseEventArgs e) - => btnMax.BackColor = Color.Gray; - - private void closebutton_MouseUp(object sender, MouseEventArgs e) - => btnClose.BackColor = Color.Gray; + */ } public interface IShiftWindowExtensions { void OnLoaded(ShiftWindow window); } -} +}
\ No newline at end of file |
