Ejemplo n.º 1
0
        public override void SetupDisplay()
        {
            if (_mainView == null)
            {
                switch (Common.AppSettings.Instance.MainDisplayStyle)
                {
                    case Common.DisplayStyle.TabbedInterface: _mainView = new Views.TabbedLayoutView(); break;
                    case Common.DisplayStyle.GridsOnlyInterface: _mainView = new Views.GridsOnlyView(); break;
                    case Common.DisplayStyle.AllInOne: _mainView = new Views.AllInOneView(); break;
                    case Common.DisplayStyle.GridsAutoOpenSources: _mainView = new Views.GridsOnlyView(); break;
                }

                if (_mainView != null)
                {
                    Grid.SetRow(_mainView, 1);
                    Grid.SetColumn(_mainView, 0);
                    _mainView.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                    _mainView.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
                    mainGrid.Children.Add(_mainView);
                }
            }

            base.SetupDisplay();

            vwUnitsOnScene.SetupDisplay();

            if (_mainView != null)
            {
                _mainView.SetupDisplay();
            }
        }
Ejemplo n.º 2
0
        public override void SetupDisplay()
        {
            if (_mainView == null)
            {
                switch (Common.AppSettings.Instance.MainDisplayStyle)
                {
                case Common.DisplayStyle.TabbedInterface: _mainView = new Views.TabbedLayoutView(); break;

                case Common.DisplayStyle.GridsOnlyInterface: _mainView = new Views.GridsOnlyView(); break;

                case Common.DisplayStyle.AllInOne: _mainView = new Views.AllInOneView(); break;

                case Common.DisplayStyle.GridsAutoOpenSources: _mainView = new Views.GridsOnlyView(); break;
                }

                if (_mainView != null)
                {
                    Grid.SetRow(_mainView, 1);
                    Grid.SetColumn(_mainView, 0);
                    _mainView.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
                    _mainView.VerticalAlignment   = System.Windows.VerticalAlignment.Stretch;
                    mainGrid.Children.Add(_mainView);
                }
            }

            base.SetupDisplay();

            vwUnitsOnScene.SetupDisplay();

            if (_mainView != null)
            {
                _mainView.SetupDisplay();
            }
        }