* Demo增加全局热键
This commit is contained in:
parent
fca53eefd7
commit
ae2356da67
Binary file not shown.
5
SunnyUI.Demo/FMain.Designer.cs
generated
5
SunnyUI.Demo/FMain.Designer.cs
generated
@ -52,6 +52,9 @@
|
|||||||
this.Aside.LineColor = System.Drawing.Color.Black;
|
this.Aside.LineColor = System.Drawing.Color.Black;
|
||||||
this.Aside.Location = new System.Drawing.Point(2, 145);
|
this.Aside.Location = new System.Drawing.Point(2, 145);
|
||||||
this.Aside.MenuStyle = Sunny.UI.UIMenuStyle.Black;
|
this.Aside.MenuStyle = Sunny.UI.UIMenuStyle.Black;
|
||||||
|
this.Aside.ScrollBarColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
|
||||||
|
this.Aside.ScrollBarHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
|
||||||
|
this.Aside.ScrollBarPressColor = System.Drawing.Color.FromArgb(((int)(((byte)(240)))), ((int)(((byte)(240)))), ((int)(((byte)(240)))));
|
||||||
this.Aside.ShowOneNode = true;
|
this.Aside.ShowOneNode = true;
|
||||||
this.Aside.ShowSecondBackColor = true;
|
this.Aside.ShowSecondBackColor = true;
|
||||||
this.Aside.ShowTips = true;
|
this.Aside.ShowTips = true;
|
||||||
@ -147,11 +150,11 @@
|
|||||||
this.Name = "FMain";
|
this.Name = "FMain";
|
||||||
this.Padding = new System.Windows.Forms.Padding(2, 35, 2, 2);
|
this.Padding = new System.Windows.Forms.Padding(2, 35, 2, 2);
|
||||||
this.ShowDragStretch = true;
|
this.ShowDragStretch = true;
|
||||||
this.ShowIcon = true;
|
|
||||||
this.ShowRadius = false;
|
this.ShowRadius = false;
|
||||||
this.ShowShadow = true;
|
this.ShowShadow = true;
|
||||||
this.Text = "SunnyUI.Net";
|
this.Text = "SunnyUI.Net";
|
||||||
this.Selecting += new Sunny.UI.UIMainFrame.OnSelecting(this.FMain_Selecting);
|
this.Selecting += new Sunny.UI.UIMainFrame.OnSelecting(this.FMain_Selecting);
|
||||||
|
this.HotKeyEventHandler += new Sunny.UI.HotKeyEventHandler(this.FMain_HotKeyEventHandler);
|
||||||
this.Controls.SetChildIndex(this.Header, 0);
|
this.Controls.SetChildIndex(this.Header, 0);
|
||||||
this.Controls.SetChildIndex(this.Aside, 0);
|
this.Controls.SetChildIndex(this.Aside, 0);
|
||||||
this.Header.ResumeLayout(false);
|
this.Header.ResumeLayout(false);
|
||||||
|
@ -87,6 +87,8 @@ namespace Sunny.UI.Demo
|
|||||||
Aside.SelectPage(1002);
|
Aside.SelectPage(1002);
|
||||||
|
|
||||||
Text = Version + " Build " + Properties.Resources.BuildDate;
|
Text = Version + " Build " + Properties.Resources.BuildDate;
|
||||||
|
|
||||||
|
RegisterHotKey(UI.ModifierKeys.Shift, Keys.F8);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Header_MenuItemClick(string text, int menuIndex, int pageIndex)
|
private void Header_MenuItemClick(string text, int menuIndex, int pageIndex)
|
||||||
@ -121,5 +123,13 @@ namespace Sunny.UI.Demo
|
|||||||
{
|
{
|
||||||
System.Diagnostics.Process.Start("https://gitee.com/yhuse/SunnyUI");
|
System.Diagnostics.Process.Start("https://gitee.com/yhuse/SunnyUI");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void FMain_HotKeyEventHandler(object sender, HotKeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.hotKey.ModifierKey == UI.ModifierKeys.Shift && e.hotKey.Key == Keys.F8)
|
||||||
|
{
|
||||||
|
ShowInfoTip("您按下了全局系统热键 Shift+F8");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user