private void AddChildElements()
        {
            FlowLayoutWidget tempWidgets = new FlowLayoutWidget();

            tempWidgets.VAnchor = VAnchor.ParentBottomTop;

            tempWidgets.Width = 120;

            extruderTemperatureWidget = new TemperatureWidgetExtruder();
            //extruderTemperatureWidget.Margin = new BorderDouble(right: 6);
            extruderTemperatureWidget.VAnchor = VAnchor.ParentTop;

            bedTemperatureWidget         = new TemperatureWidgetBed();
            bedTemperatureWidget.VAnchor = VAnchor.ParentTop;

            tempWidgets.AddChild(extruderTemperatureWidget);
            tempWidgets.AddChild(new GuiWidget(6, 6));
            if (ActiveSliceSettings.Instance.GetValue <bool>(SettingsKey.has_heated_bed))
            {
                tempWidgets.AddChild(bedTemperatureWidget);
            }
            tempWidgets.AddChild(new GuiWidget(6, 6));

            FlowLayoutWidget printStatusContainer = CreateActivePrinterInfoWidget();

            PrintActionRow printActionRow = new PrintActionRow(queueDataView);

            printActionRow.VAnchor = VAnchor.ParentTop;

            ImageButtonFactory factory = new ImageButtonFactory();

            factory.InvertImageColor = false;

            setupButton         = factory.Generate(StaticData.Instance.LoadIcon("icon_gear_dot.png").InvertLightness(), null);
            setupButton.Margin  = new BorderDouble(left: 6);
            setupButton.VAnchor = VAnchor.ParentCenter;
            setupButton.Click  += (sender, e) =>
            {
                WizardWindow.Show <SetupOptionsPage>("/SetupOptions", "Setup Wizard");
                //WizardWindow.Show(true);
            };

            this.AddChild(printStatusContainer);
            this.AddChild(printActionRow);
            this.AddChild(tempWidgets);
            this.AddChild(setupButton);
            this.Height = 80;

            UpdatePrintStatus();
            UpdatePrintItemName();
        }
Exemple #2
0
        private void AddChildElements()
        {
            activePrintPreviewImage         = new PartThumbnailWidget(null, "part_icon_transparent_100x100.png", "building_thumbnail_100x100.png", PartThumbnailWidget.ImageSizes.Size115x115);
            activePrintPreviewImage.VAnchor = VAnchor.ParentTop;
            activePrintPreviewImage.Padding = new BorderDouble(0);
            activePrintPreviewImage.HoverBackgroundColor = new RGBA_Bytes();
            activePrintPreviewImage.BorderWidth          = 3;

            FlowLayoutWidget temperatureWidgets = new FlowLayoutWidget(FlowDirection.TopToBottom);

            {
                extruderTemperatureWidget = new TemperatureWidgetExtruder();
                temperatureWidgets.AddChild(extruderTemperatureWidget);

                bedTemperatureWidget = new TemperatureWidgetBed();
                if (ActiveSliceSettings.Instance.GetValue <bool>(SettingsKey.has_heated_bed))
                {
                    temperatureWidgets.AddChild(bedTemperatureWidget);
                }
            }
            temperatureWidgets.VAnchor |= VAnchor.ParentTop;
            temperatureWidgets.Margin   = new BorderDouble(left: 6);

            FlowLayoutWidget printStatusContainer = CreateActivePrinterInfoWidget();

            printStatusContainer.VAnchor |= VAnchor.ParentTop;

            var iconContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);

            iconContainer.Name     = "PrintStatusRow.IconContainer";
            iconContainer.VAnchor |= VAnchor.ParentTop;
            iconContainer.Margin   = new BorderDouble(top: 3);
            iconContainer.AddChild(GetAutoLevelIndicator());

            this.AddChild(activePrintPreviewImage);
            this.AddChild(printStatusContainer);
            this.AddChild(iconContainer);
            this.AddChild(temperatureWidgets);

            UpdatePrintStatus();
            UpdatePrintItemName();
        }
		private void AddChildElements()
		{
			FlowLayoutWidget tempWidgets = new FlowLayoutWidget();
			tempWidgets.VAnchor = VAnchor.ParentBottomTop;

			tempWidgets.Width = 120;

			extruderTemperatureWidget = new TemperatureWidgetExtruder();
			//extruderTemperatureWidget.Margin = new BorderDouble(right: 6);
			extruderTemperatureWidget.VAnchor = VAnchor.ParentTop;

			bedTemperatureWidget = new TemperatureWidgetBed();
			bedTemperatureWidget.VAnchor = VAnchor.ParentTop;

			tempWidgets.AddChild(extruderTemperatureWidget);
			tempWidgets.AddChild(new GuiWidget(6, 6));
			if (ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.has_heated_bed))
			{
				tempWidgets.AddChild(bedTemperatureWidget);
			}
			tempWidgets.AddChild(new GuiWidget(6, 6));

			FlowLayoutWidget printStatusContainer = CreateActivePrinterInfoWidget();

			PrintActionRow printActionRow = new PrintActionRow(queueDataView);
			printActionRow.VAnchor = VAnchor.ParentTop;

			ImageButtonFactory factory = new ImageButtonFactory();
			factory.InvertImageColor = false;

			setupButton = factory.Generate(StaticData.Instance.LoadIcon("icon_gear_dot.png").InvertLightness(), null);
			setupButton.Margin = new BorderDouble(left: 6);
			setupButton.VAnchor = VAnchor.ParentCenter;
			setupButton.Click += (sender, e) =>
			{
				WizardWindow.Show<SetupOptionsPage>("/SetupOptions", "Setup Wizard");
				//WizardWindow.Show(true);
			};

			this.AddChild(printStatusContainer);
			this.AddChild(printActionRow);
			this.AddChild(tempWidgets);
			this.AddChild(setupButton);
			this.Height = 80;

			UpdatePrintStatus();
			UpdatePrintItemName();
		}
		private void AddChildElements()
		{
			activePrintPreviewImage = new PartThumbnailWidget(null, "part_icon_transparent_100x100.png", "building_thumbnail_100x100.png", PartThumbnailWidget.ImageSizes.Size115x115);
			activePrintPreviewImage.VAnchor = VAnchor.ParentTop;
			activePrintPreviewImage.Padding = new BorderDouble(0);
			activePrintPreviewImage.HoverBackgroundColor = new RGBA_Bytes();
			activePrintPreviewImage.BorderWidth = 3;

			FlowLayoutWidget temperatureWidgets = new FlowLayoutWidget(FlowDirection.TopToBottom);
			{
				extruderTemperatureWidget = new TemperatureWidgetExtruder();
				temperatureWidgets.AddChild(extruderTemperatureWidget);

				bedTemperatureWidget = new TemperatureWidgetBed();
				if (ActiveSliceSettings.Instance.GetValue<bool>(SettingsKey.has_heated_bed))
				{
					temperatureWidgets.AddChild(bedTemperatureWidget);
				}
			}
			temperatureWidgets.VAnchor |= VAnchor.ParentTop;
			temperatureWidgets.Margin = new BorderDouble(left: 6);

			FlowLayoutWidget printStatusContainer = CreateActivePrinterInfoWidget();
			printStatusContainer.VAnchor |= VAnchor.ParentTop;

			iconContainer = new FlowLayoutWidget(FlowDirection.TopToBottom);
			iconContainer.Name = "PrintStatusRow.IconContainer";
			iconContainer.VAnchor |= VAnchor.ParentTop;
			iconContainer.Margin = new BorderDouble(top: 3);
			iconContainer.AddChild(GetAutoLevelIndicator());

			this.AddChild(activePrintPreviewImage);
			this.AddChild(printStatusContainer);
			this.AddChild(iconContainer);
			this.AddChild(temperatureWidgets);

			UpdatePrintStatus();
			UpdatePrintItemName();
		}