Esempio n. 1
0
        public void Init()
        {
            GameSession  = new GameSession();
            InputManager = new InputManager();
            Parameters   = new Parameters();

            Parameters.WidthOrHeightChanged += UpdateSize;

            MessageWindow = new MessageWindow(Parameters.MessageX, Parameters.MessageY, Parameters.MessageWidth, Parameters.MessageHeight, ConWindow.BorderType.Double);

            BindingsWindow  = new BindingsWindow(Parameters.BindingsX, Parameters.BindingsY, Parameters.BindingsWidth, Parameters.BindingsHeight, ConWindow.BorderType.Double);
            StatsWindow     = new StatsWindow(Parameters.StatsX, Parameters.StatsY, Parameters.StatsWidth, Parameters.StatsHeight, ConWindow.BorderType.Double);
            LocationWindow  = new LocationWindow(Parameters.LocationX, Parameters.LocationY, Parameters.LocationWidth, Parameters.LocationHeight, ConWindow.BorderType.Single);
            TravelWindow    = new TravelWindow(Parameters.TravelX, Parameters.TravelY, Parameters.TravelWidth, Parameters.TravelHeight, ConWindow.BorderType.Double);
            InventoryWindow = new InventoryWindow(Parameters.InventoryX, Parameters.InventoryY, Parameters.InventoryWidth, Parameters.InventoryHeight, ConWindow.BorderType.Double);

            // dev
            DeveloperWindow = new DeveloperWindow(Parameters.DeveloperX, Parameters.DeveloperY, Parameters.DeveloperWidth, Parameters.DeveloperHeight, ConWindow.BorderType.Double, Parameters.DeveloperHeight - 2, "DEV CONSOLE", true, false);
            DeveloperWindow.Add("Developer window successfuly initialized.");

            CurrentlyFocused = FocusableWindows.MainWindow;
        }
        public DemoSelectorWindowViewModel(ArticleService articleService, CategoryService categoryService)
        {
            OpenBindingsViewCommand = new DelegateCommand(() =>
            {
                var bindingsWindow = new BindingsWindow {
                    DataContext = new BindingsWindowViewModel()
                };
                bindingsWindow.Show();
            });

            OpenTabViewCommand = new DelegateCommand(() =>
            {
                var tabWindow = new TabWindow();
                tabWindow.Show();
            });

            OpenArticleListViewCommand = new DelegateCommand(() =>
            {
                var articleListWindow = new ArticleListWindow {
                    DataContext = new ArticleListWindowViewModel(articleService, categoryService)
                };
                articleListWindow.Show();
            });
        }