コード例 #1
0
 public static FenestraSettingsArgs CreateDefault()
 {
     return(new FenestraSettingsArgs {
         Columns = 6,
         Rows = 4,
         HotKeys = FenestraSettingsHotKeys.CreateDefault(),
         StartAtLogin = false,
     });
 }
コード例 #2
0
        public static void SetupHotkey(Window parentWindow, FenestraSettingsHotKeys keys)
        {
            // Get hWnd (or create if window hasn't been shown)
            var hWnd = new WindowInteropHelper(parentWindow).EnsureHandle();

            HwndSource = HwndSource.FromHwnd(hWnd);
            if (HwndSource == null)
            {
                Environment.Exit(-1);
            }
            HwndSource.AddHook(HwndHook);
            RegisterHotKey(parentWindow, keys.ModifierKeys, keys.HotKey);
        }