Example #1
0
    /// <summary>
    /// Configures and initializes stuff required for app to run.
    /// </summary>
    internal void Start()
    {
        _themeService.SetupThemes();
        _terminalHandler.Initialize();
        _windowManager.ShowMainWindow();

        var showWindowHotkey = MGlobalHotkeys.WPF.Hotkey.FromString(_config.ShowHideWindowHotkey);

        _globalHotkeys.InitializeHandle(_windowManager.GetMainWindowHandle());
        _globalHotkeys.HotkeyActions.Add(HotkeyUse.ToggleMainWindow, _windowManager.ShowHideMainWindow);
        _globalHotkeys.Register(showWindowHotkey, HotkeyUse.ToggleMainWindow);

        if (_config.CheckUpdates)
        {
            _updateChecker.CheckUpdatesAsync(App.Version).SafeFireAndForget();
        }
    }