Changed: stupid design for hotkeys options

This commit is contained in:
Ray committed 2020-05-20 00:49:47 +01:00
1 parent 7fc399540f
commit 1d96222514
11 files changed
+542 -264

No files matched your search

+27 -4
View File
@@ -5,11 +5,34 @@ namespace AppLauncher.Models
{
public class LauncherSession
{
public int DefaultHeight { get; set; } = 280;
public int HotKeyX { get; set; } = -1;
public int HotKeyY { get; set; } = -1;
public bool AlwaysOnTop { get; set; } = false;
public class HotKeyOptions
{
public bool IsCtrl { get; set; } = false;
public bool IsAlt { get; set; } = false;
public bool IsShift { get; set; } = false;
public int Key { get; set; } = (int)System.Windows.Forms.Keys.None;
public int ModifierCode => ((this.IsAlt ? 1 : 0) + (this.IsCtrl ? 2 : 0) + (this.IsShift ? 4 : 0));
public System.Windows.Forms.Keys KeyCode => (System.Windows.Forms.Keys)this.Key;
}
public int DefaultHeight { get; set; } = 280;
public HotKeyOptions HotKey { get; set; } = null;
public bool AlwaysOnTop { get; set; } = false;
public List<TileGroupModel> Groups { get; set; } = new List<TileGroupModel>();
public LauncherSession ToSimple()
{
return new LauncherSession()
{
DefaultHeight = this.DefaultHeight,
HotKey = this.HotKey,
AlwaysOnTop = this.AlwaysOnTop,
Groups = null
};
}
}
}