예제 #1
0
        public CompactSlidePanel(QueueDataView queueDataView) : base(2)
        {
            this.queueDataView = queueDataView;

            // do the front panel stuff
            {
                // first add the print progress bar
                this.LeftPanel.AddChild(new PrintProgressBar());

                // construct the main controls tab control
                mainControlsTabControl = new FirstPanelTabView(queueDataView);

                var advancedControlsButtonFactory = new TextImageButtonFactory()
                {
                    normalTextColor  = ActiveTheme.Instance.PrimaryTextColor,
                    hoverTextColor   = ActiveTheme.Instance.PrimaryTextColor,
                    pressedTextColor = ActiveTheme.Instance.PrimaryTextColor,
                    fontSize         = 10,

                    disabledTextColor   = RGBA_Bytes.LightGray,
                    disabledFillColor   = ActiveTheme.Instance.PrimaryBackgroundColor,
                    disabledBorderColor = ActiveTheme.Instance.PrimaryBackgroundColor,

                    invertImageLocation = true
                };

                Button advancedControlsLinkButton = advancedControlsButtonFactory.Generate(LocalizedString.Get("Settings\n& Controls"),
                                                                                           StaticData.Instance.LoadIcon("icon_arrow_right_32x32.png", 32, 32));
                advancedControlsLinkButton.Name        = "SettingsAndControls";
                advancedControlsLinkButton.ToolTipText = "Switch to Settings, Controls and Options".Localize();
                advancedControlsLinkButton.Margin      = new BorderDouble(right: 3);
                advancedControlsLinkButton.VAnchor     = VAnchor.ParentBottom;
                advancedControlsLinkButton.Cursor      = Cursors.Hand;
                advancedControlsLinkButton.Click      += ToggleActivePanel_Click;

                mainControlsTabControl.TabBar.AddChild(new HorizontalSpacer());
                mainControlsTabControl.TabBar.AddChild(advancedControlsLinkButton);
                mainControlsTabControl.TabBar.HAnchor = HAnchor.Max_FitToChildren_ParentWidth;
                mainControlsTabControl.HAnchor        = HAnchor.Max_FitToChildren_ParentWidth;

                this.LeftPanel.AddChild(mainControlsTabControl);
            }

            // Right panel
            this.RightPanel.AddChild(new PrintProgressBar());

            var advancedControlsPanel = new AdvancedControlsPanel()
            {
                Name = "For - CompactSlidePanel"
            };

            advancedControlsPanel.BackClicked += ToggleActivePanel_Click;

            this.RightPanel.AddChild(advancedControlsPanel);

            WidescreenPanel.PreChangePanels.RegisterEvent(SaveCurrentPanelIndex, ref unregisterEvents);

            SetPanelIndexImmediate(lastPanelIndexBeforeReload);
        }
예제 #2
0
		public CompactSlidePanel(QueueDataView queueDataView) : base(2)
		{
			this.queueDataView = queueDataView;

			// do the front panel stuff
			{
				// first add the print progress bar
				this.LeftPanel.AddChild(new PrintProgressBar());

				// construct the main controls tab control
				mainControlsTabControl = new FirstPanelTabView(queueDataView);

				var advancedControlsButtonFactory = new TextImageButtonFactory()
				{
					normalTextColor = ActiveTheme.Instance.PrimaryTextColor,
					hoverTextColor = ActiveTheme.Instance.PrimaryTextColor,
					pressedTextColor = ActiveTheme.Instance.PrimaryTextColor,
					fontSize = 10,

					disabledTextColor = RGBA_Bytes.LightGray,
					disabledFillColor = ActiveTheme.Instance.PrimaryBackgroundColor,
					disabledBorderColor = ActiveTheme.Instance.PrimaryBackgroundColor,

					invertImageLocation = true
				};

				Button advancedControlsLinkButton = advancedControlsButtonFactory.Generate(LocalizedString.Get("Settings\n& Controls"), "icon_arrow_right_32x32.png");
				advancedControlsLinkButton.Name = "SettingsAndControls";
				advancedControlsLinkButton.ToolTipText = "Switch to Settings, Controls and Options".Localize();
				advancedControlsLinkButton.Margin = new BorderDouble(right: 3);
				advancedControlsLinkButton.VAnchor = VAnchor.ParentBottom;
				advancedControlsLinkButton.Cursor = Cursors.Hand;
				advancedControlsLinkButton.Click += ToggleActivePanel_Click;

				mainControlsTabControl.TabBar.AddChild(new HorizontalSpacer());
				mainControlsTabControl.TabBar.AddChild(advancedControlsLinkButton);
				mainControlsTabControl.TabBar.HAnchor = HAnchor.Max_FitToChildren_ParentWidth;
				mainControlsTabControl.HAnchor = HAnchor.Max_FitToChildren_ParentWidth;

				this.LeftPanel.AddChild(mainControlsTabControl);
			}

			// Right panel
			this.RightPanel.AddChild(new PrintProgressBar());

			var advancedControlsPanel = new AdvancedControlsPanel()
			{
				Name = "For - CompactSlidePanel"
			};
			advancedControlsPanel.BackClicked += ToggleActivePanel_Click;

			this.RightPanel.AddChild(advancedControlsPanel);

			WidescreenPanel.PreChangePanels.RegisterEvent(SaveCurrentPanelIndex, ref unregisterEvents);

			SetPanelIndexImmediate(lastPanelIndexBeforeReload);
		}