private void CreateAdvancedFilamentSettingsFrame() { var advancedfilamentsettings = Resources.advancedfilamentsettings; filamentSettingsFrame = new XMLFrame(); filamentSettingsFrame.Init(host, advancedfilamentsettings, new ButtonCallback(CustomTempButtonCallback)); filamentSettingsFrame.ID = 1002; filamentSettingsFrame.CenterHorizontallyInParent = true; filamentSettingsFrame.RelativeY = 0.1f; filamentSettingsFrame.RelativeWidth = 0.95f; filamentSettingsFrame.RelativeHeight = 0.9f; filamentSettingsFrame.BGColor = new Color4(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); filamentSettingsFrame.Visible = true; filamentSettingsFrame.Enabled = true; childFrame.AddChildElement(filamentSettingsFrame); filamentSettingsFrame.Refresh(); track_filament = (ButtonWidget)filamentSettingsFrame.FindChildElement(1100); if (track_filament != null) { track_filament.SetCallback(new ButtonCallback(FilamentSettingsFrameButtonCallback)); track_filament.Checked = settingsManager.CurrentFilamentSettings.TrackFilament; } clean_nozzle = (ButtonWidget)filamentSettingsFrame.FindChildElement(1102); if (clean_nozzle == null) { return; } clean_nozzle.SetCallback(new ButtonCallback(FilamentSettingsFrameButtonCallback)); clean_nozzle.Checked = settingsManager.CurrentFilamentSettings.CleanNozzleAfterInsert; }
private void CreateFilamentProfilesFrame() { var filamentprofilesframe = Resources.filamentprofilesframe; filamentProfilesFrame = new XMLFrame(); filamentProfilesFrame.Init(host, filamentprofilesframe, new ButtonCallback(CustomTempButtonCallback)); type_edit = (EditBoxWidget)filamentProfilesFrame.FindChildElement(1001); color_edit = (EditBoxWidget)filamentProfilesFrame.FindChildElement(1002); temperature_edit = (EditBoxWidget)filamentProfilesFrame.FindChildElement(1003); add_button = (ButtonWidget)filamentProfilesFrame.FindChildElement(1005); remove_button = (ButtonWidget)filamentProfilesFrame.FindChildElement(1006); TemperatureEditButton = (ButtonWidget)filamentProfilesFrame.FindChildElement(1007); TemperatureSaveButton = (ButtonWidget)filamentProfilesFrame.FindChildElement(1008); TemperatureResetButton = (ButtonWidget)filamentProfilesFrame.FindChildElement(1010); filamentprofile_list = (ListBoxWidget)filamentProfilesFrame.FindChildElement(1009); filamentprofile_list.SetOnChangeCallback(new ListBoxWidget.OnChangeCallback(MyOnChangeProfileCallback)); addfilament_frame = new AddFilamentProfileDialog(0, settingsManager, this); addfilament_frame.Init(host); addfilament_frame.SetSize(320, 300); addfilament_frame.CenterHorizontallyInParent = true; addfilament_frame.CenterVerticallyInParent = true; host.AddControlElement(addfilament_frame); addfilament_frame.Visible = false; addfilament_frame.Enabled = false; filamentProfilesFrame.ID = 1001; filamentProfilesFrame.CenterHorizontallyInParent = true; filamentProfilesFrame.RelativeY = 0.1f; filamentProfilesFrame.RelativeWidth = 0.99f; filamentProfilesFrame.RelativeHeight = 0.9f; filamentProfilesFrame.BGColor = new Color4(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); filamentProfilesFrame.Visible = false; filamentProfilesFrame.Enabled = false; childFrame.AddChildElement(filamentProfilesFrame); filamentProfilesFrame.Refresh(); }
public ManualControlsFrame(GUIHost host, SpoolerConnection spooler_connection, PopupMessageBox messagebox, SettingsManager settingsManager) { this.host = host; this.spooler_connection = spooler_connection; this.messagebox = messagebox; var manualcontrolsframeTabbuttons = Resources.manualcontrolsframe_tabbuttons; Init(host, manualcontrolsframeTabbuttons, new ButtonCallback(tabsFrameButtonCallback)); gCodeButton = (ButtonWidget)FindChildElement(3); advancedHeatedBedButton = (ButtonWidget)FindChildElement(4); basicButton = (ButtonWidget)FindChildElement(1); sdCardButton = (ButtonWidget)FindChildElement(5); TabFrame = (HorizontalLayout)FindChildElement(1004); Visible = false; Enabled = false; RelativeWidth = 1f; RelativeHeight = 1f; basicControlsFrame = new BasicControlsFrame(1001, host, messagebox, spooler_connection); AddChildElement(basicControlsFrame); basicControlsFrame.Refresh(); diagnosticsFrame = new DiagnosticsFrame(1002, host, spooler_connection); AddChildElement(diagnosticsFrame); diagnosticsFrame.Refresh(); advancedHeatedBedFrame = new AdvancedFrame(1004, host, messagebox, spooler_connection); AddChildElement(advancedHeatedBedFrame); advancedHeatedBedFrame.Refresh(); sdCardFrame = new SDCardFrame(1004, host, messagebox, spooler_connection, settingsManager); AddChildElement(sdCardFrame); sdCardFrame.Refresh(); gCodesFrame = new GCodeFrame(1003, host, messagebox, spooler_connection); AddChildElement(gCodesFrame); gCodesFrame.Refresh(); active_frame = basicControlsFrame; }
private void CreateAdvancedFrame(GUIHost host) { var interfaceframeAdvanced = Resources.interfaceframe_advanced; advancedFrame = new XMLFrame(); advancedFrame.Init(host, interfaceframeAdvanced, new ButtonCallback(AdvancedFrameButtonCallback)); advancedFrame.ID = 1003; advancedFrame.CenterHorizontallyInParent = true; advancedFrame.RelativeY = 0.1f; advancedFrame.RelativeWidth = 0.95f; advancedFrame.RelativeHeight = 0.9f; advancedFrame.BGColor = new Color4(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); advancedFrame.Visible = false; advancedFrame.Enabled = false; childFrame.AddChildElement(advancedFrame); advancedFrame.Refresh(); softwareupdate_options = (ComboBoxWidget)advancedFrame.FindChildElement(303); updateSoftware_button = (ButtonWidget)advancedFrame.FindChildElement(305); download_progress = (SpriteAnimationWidget)advancedFrame.FindChildElement(306); update_text = (TextWidget)advancedFrame.FindChildElement(304); softwareupdate_options.TextChangedCallback = new ComboBoxWidget.ComboBoxTextChangedCallback(AdvancedSettingsComboBoxCallback); softwareupdate_options.AddItem(Locale.GlobalLocale.T("T_UpdateOp_DownloadInstall")); softwareupdate_options.AddItem(Locale.GlobalLocale.T("T_UpdateOp_DownloadNoInstall")); softwareupdate_options.AddItem(Locale.GlobalLocale.T("T_UpdateOp_TakeNoAction")); softwareupdate_options.Select = softwareUpdater.UpdaterMode != Updater.UpdateSettings.DownloadNotInstall ? (softwareUpdater.UpdaterMode != Updater.UpdateSettings.NoAction ? 0 : 2) : 1; update_text.Visible = false; download_progress.Visible = false; updateSoftware_button.Enabled = true; updateSoftware_button.Visible = false; advancedFrame.DoOnUpdate = new ElementStandardDelegate(AdvancedSettingsOnUpdate); useMultipleModelsCheckbox = (ButtonWidget)advancedFrame.FindChildElement(313); showRemoveModelWarningCheckbox = (ButtonWidget)advancedFrame.FindChildElement(315); autoDetectUnitsCheckbox = (ButtonWidget)advancedFrame.FindChildElement(317); }
private void CreateAppearanceFrame(GUIHost host) { var interfaceframeAppearance = Resources.interfaceframe_appearance; appearanceFrame = new XMLFrame(); appearanceFrame.Init(host, interfaceframeAppearance, new ButtonCallback(AppearanceFrameButtonCallback)); appearanceFrame.ID = 1001; appearanceFrame.CenterHorizontallyInParent = true; appearanceFrame.RelativeY = 0.1f; appearanceFrame.RelativeWidth = 0.95f; appearanceFrame.RelativeHeight = 0.9f; appearanceFrame.BGColor = new Color4(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); appearanceFrame.Visible = true; appearanceFrame.Enabled = true; printercolorCombobox = (ComboBoxWidget)appearanceFrame.FindChildElement(104); printercolorCombobox.Select = 0; printercolorCombobox.TextChangedCallback = new ComboBoxWidget.ComboBoxTextChangedCallback(ColorComboboxChanged); modelcolorCombobox = (ComboBoxWidget)appearanceFrame.FindChildElement(106); modelcolorCombobox.Select = 0; modelcolorCombobox.TextChangedCallback = new ComboBoxWidget.ComboBoxTextChangedCallback(ColorComboboxChanged); iconcolorCombobox = (ComboBoxWidget)appearanceFrame.FindChildElement(108); iconcolorCombobox.Select = 0; iconcolorCombobox.TextChangedCallback = new ComboBoxWidget.ComboBoxTextChangedCallback(ColorComboboxChanged); var childElement = (TextWidget)appearanceFrame.FindChildElement(100); mm_button = (ButtonWidget)appearanceFrame.FindChildElement(101); inches_button = (ButtonWidget)appearanceFrame.FindChildElement(102); pro_button = (ButtonWidget)appearanceFrame.FindChildElement(110); m1_button = (ButtonWidget)appearanceFrame.FindChildElement(111); rendermode_combobox = (ComboBoxWidget)appearanceFrame.FindChildElement(207); rendermode_combobox.TextChangedCallback = new ComboBoxWidget.ComboBoxTextChangedCallback(RenderModeChanged); switch (OpenGLRendererObject.openGLRenderMode) { case OpenGLRendererObject.OpenGLRenderMode.VBOs: rendermode_combobox.Select = 0; break; case OpenGLRendererObject.OpenGLRenderMode.ARBVBOs: rendermode_combobox.Select = 1; break; case OpenGLRendererObject.OpenGLRenderMode.ImmediateMode: rendermode_combobox.Select = 1; break; } childFrame.AddChildElement(appearanceFrame); appearanceFrame.Refresh(); }
private void CreateMessagesFrame(GUIHost host) { var interfaceframeMessages = Resources.interfaceframe_messages; messagesFrame = new XMLFrame(); messagesFrame.Init(host, interfaceframeMessages, new ButtonCallback(MessagesFrameButtonCallback)); messagesFrame.ID = 1002; messagesFrame.CenterHorizontallyInParent = true; messagesFrame.RelativeY = 0.1f; messagesFrame.RelativeWidth = 0.95f; messagesFrame.RelativeHeight = 0.9f; messagesFrame.BGColor = new Color4(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue); messagesFrame.Visible = false; messagesFrame.Enabled = false; childFrame.AddChildElement(messagesFrame); messagesFrame.Refresh(); startFullScreenButton = (ButtonWidget)messagesFrame.FindChildElement(201); showAllWarningsButton = (ButtonWidget)messagesFrame.FindChildElement(203); printerMismatchButton = (ButtonWidget)messagesFrame.FindChildElement(209); var childElement1 = (ButtonWidget)messagesFrame.FindChildElement(205); var childElement2 = (TextWidget)messagesFrame.FindChildElement(204); IFileAssociations fileAssociations = settings.FileAssociations; if (fileAssociations == null) { return; } var str1 = fileAssociations.ExtensionOpenWith(".stl"); var str2 = fileAssociations.ExtensionOpenWith(".obj"); if (str1 != null && str2 != null && (str1.Contains(Application.ExecutablePath) && str2.Contains(Application.ExecutablePath))) { childElement1.Checked = true; } childElement1.ImageHasFocusColor = new Color4(100, 230, byte.MaxValue, byte.MaxValue); }