This repository has been archived on 2024-08-06. You can view files and clone it, but cannot push or open issues or pull requests.
linear-app-launcher/Models/LauncherSession.cs

42 lines
1.4 KiB
C#
Raw Normal View History

using System.Collections.Generic;
2020-05-18 23:17:22 +00:00
using System.Drawing;
namespace AppLauncher.Models
{
public class LauncherSession
{
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;
2020-05-18 23:17:22 +00:00
public bool AlwaysOnTop { get; set; } = false;
2020-05-20 00:42:51 +00:00
public bool HideOnClose { get; set; } = false;
2020-05-20 01:03:12 +00:00
public bool HideOnClick { 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,
2020-05-20 00:42:51 +00:00
HideOnClose = this.HideOnClose,
2020-05-20 01:03:12 +00:00
HideOnClick = this.HideOnClick,
Groups = null
};
}
}
}