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
 private void SetFullView()
 {
     CurrentView = new GameManagerFullView();
     WindowProperties.SetMinSize(400, 300);
     WindowProperties.SetSize(640, 480);
 }
Esempio n. 3
0
 private void SetMinimizedView()
 {
     CurrentView = new GameManagerMinimizedView();
     WindowProperties.SetMinSize(250, 400);
     WindowProperties.SetSize(280, 520);
 }