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 FlowLayoutWidget CreateActivePrinterInfoWidget() { FlowLayoutWidget container = new FlowLayoutWidget(FlowDirection.TopToBottom); container.Margin = new BorderDouble(6, 0, 6, 0); container.HAnchor = HAnchor.ParentLeftRight; container.VAnchor |= VAnchor.ParentTop; FlowLayoutWidget topRow = new FlowLayoutWidget(); topRow.Name = "PrintStatusRow.ActivePrinterInfo.TopRow"; topRow.HAnchor = HAnchor.ParentLeftRight; string nextPrintLabel = LocalizedString.Get("Next Print"); string nextPrintLabelFull = string.Format("{0}:", nextPrintLabel); activePrintLabel = getPrintStatusLabel(nextPrintLabelFull, pointSize: 11); activePrintLabel.VAnchor = VAnchor.ParentTop; topRow.AddChild(activePrintLabel); activePrintName = getPrintStatusLabel("this is the biggest name we will allow", pointSize: 14); activePrintName.AutoExpandBoundsToText = false; activePrintStatus = getPrintStatusLabel("this is the biggest label we will allow - bigger", pointSize: 11); activePrintStatus.AutoExpandBoundsToText = false; activePrintStatus.Text = ""; activePrintStatus.Margin = new BorderDouble(top: 3); activePrintInfo = getPrintStatusLabel("", pointSize: 11); activePrintInfo.AutoExpandBoundsToText = true; PrintActionRow printActionRow = new PrintActionRow(queueDataView); container.AddChild(topRow); container.AddChild(activePrintName); container.AddChild(activePrintStatus); //container.AddChild(activePrintInfo); container.AddChild(printActionRow); container.AddChild(new VerticalSpacer()); container.AddChild(new MessageActionRow()); return(container); }
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 FlowLayoutWidget CreateActivePrinterInfoWidget() { FlowLayoutWidget container = new FlowLayoutWidget(FlowDirection.TopToBottom); container.Margin = new BorderDouble(6, 0, 6, 0); container.HAnchor = HAnchor.ParentLeftRight; container.VAnchor |= VAnchor.ParentTop; FlowLayoutWidget topRow = new FlowLayoutWidget(); topRow.Name = "PrintStatusRow.ActivePrinterInfo.TopRow"; topRow.HAnchor = HAnchor.ParentLeftRight; string nextPrintLabel = LocalizedString.Get("Next Print"); string nextPrintLabelFull = string.Format("{0}:", nextPrintLabel); activePrintLabel = getPrintStatusLabel(nextPrintLabelFull, pointSize: 11); activePrintLabel.VAnchor = VAnchor.ParentTop; topRow.AddChild(activePrintLabel); activePrintName = getPrintStatusLabel("this is the biggest name we will allow", pointSize: 14); activePrintName.AutoExpandBoundsToText = false; activePrintStatus = getPrintStatusLabel("this is the biggest label we will allow - bigger", pointSize: 11); activePrintStatus.AutoExpandBoundsToText = false; activePrintStatus.Text = ""; activePrintStatus.Margin = new BorderDouble(top: 3); activePrintInfo = getPrintStatusLabel("", pointSize: 11); activePrintInfo.AutoExpandBoundsToText = true; PrintActionRow printActionRow = new PrintActionRow(queueDataView); container.AddChild(topRow); container.AddChild(activePrintName); container.AddChild(activePrintStatus); //container.AddChild(activePrintInfo); container.AddChild(printActionRow); return container; }