Пример #1
0
 void OnShowHotbar()
 {
     if (HotbarIsActive)
     {
         _hotbar.Hide();
         HotbarIsActive = false;
     }
     else
     {
         _hotbar.Show();
         HotbarIsActive = true;
     }
 }
Пример #2
0
        public MainWindowViewModel()
        {
            _energyTimer = new EnergyTimer();

            MessageLog.GetLog().MessageAdded += (s, e) => SystemMessage = MessageLog.GetLog().MostRecentMessage;

            _itemScreen         = new ItemScreenViewModel();
            _shoppingListScreen = new ShoppingListScreenViewModel();

            ActiveViewModel = _itemScreen;

            _hotbar             = new HotBarWindow();
            _hotbar.DataContext = this;
            _hotbar.Show();
            _hotbarIsActive = true;
        }