Esempio n. 1
0
        public MainViewModel(GenericGameManager gameManager)
        {
            GameManager = gameManager;
            // Instantiate view models
            GameManagerVm = new GameManagerViewModel(GameManager);
            BookmarksVm   = new BookmarksViewModel(GameManager);

            // Create commands
            ToggleMinimizedUiCommand = new RelayCommand(ToggleMinimizedUi);

            // Set full UI as default
            WindowProperties = new WindowProperties {
                ResizeMode = ResizeMode.CanResize
            };
            SetFullView();

            // Setup keyboard hook
            GlobalKeyboardHook = new GlobalKeyboardHook();
            GlobalKeyboardHook.KeyboardPressed += OnKeyPressed;

            HotkeysToggleTooltip =
                "Enables hotkeys:\nR - reload level\nK - previous level\nL - next level\nP - save position\nO - load position\nB - add bookmark";
        }
Esempio n. 2
0
 public void Dispose()
 {
     GlobalKeyboardHook?.Dispose();
 }