Merge pull request #3435 from jlewin/design_tools
Rename WizardWindow to DialogWindow
This commit is contained in:
commit
b8081e2f1f
31 changed files with 52 additions and 52 deletions
|
|
@ -177,7 +177,7 @@ namespace MatterHackers.MatterControl
|
|||
};
|
||||
feedbackButton.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||
{
|
||||
this.WizardWindow.ChangeToPage<ContactFormPage>();
|
||||
this.DialogWindow.ChangeToPage<ContactFormPage>();
|
||||
});
|
||||
|
||||
this.AddPageAction(feedbackButton);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace MatterHackers.MatterControl
|
|||
};
|
||||
nextButton.Click += (s, e) =>
|
||||
{
|
||||
wizardContext.ShowNextPage(this.WizardWindow);
|
||||
wizardContext.ShowNextPage(this.DialogWindow);
|
||||
};
|
||||
|
||||
this.AddPageAction(nextButton);
|
||||
|
|
@ -82,7 +82,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
doneButton.Click += (s, e) =>
|
||||
{
|
||||
this.WizardWindow.CloseOnIdle();
|
||||
this.DialogWindow.CloseOnIdle();
|
||||
};
|
||||
|
||||
this.AddPageAction(doneButton);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
levelingContext.ShowNextPage(this.WizardWindow);
|
||||
levelingContext.ShowNextPage(this.DialogWindow);
|
||||
base.OnLoad(args);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,13 +102,13 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
this.WizardWindow.KeyDown += TopWindowKeyDown;
|
||||
this.DialogWindow.KeyDown += TopWindowKeyDown;
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
||||
public override void OnClosed(ClosedEventArgs e)
|
||||
{
|
||||
this.WizardWindow.KeyDown -= TopWindowKeyDown;
|
||||
this.DialogWindow.KeyDown -= TopWindowKeyDown;
|
||||
base.OnClosed(e);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
// hook our parent so we can turn off the bed when we are done with leveling
|
||||
this.WizardWindow.Closed += WizardWindow_Closed;
|
||||
this.DialogWindow.Closed += WizardWindow_Closed;
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
{
|
||||
// Make sure when the wizard closes we turn off the bed heating
|
||||
printer.Connection.TurnOffBedAndExtruders(TurnOff.AfterDelay);
|
||||
this.WizardWindow.Closed -= WizardWindow_Closed;
|
||||
this.DialogWindow.Closed -= WizardWindow_Closed;
|
||||
}
|
||||
|
||||
public override void PageIsBecomingActive()
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ namespace MatterHackers.MatterControl
|
|||
var affirmativeButton = theme.CreateDialogButton(yesOk);
|
||||
affirmativeButton.Click += (s, e) =>
|
||||
{
|
||||
UiThread.RunOnIdle(this.WizardWindow.Close);
|
||||
UiThread.RunOnIdle(this.DialogWindow.Close);
|
||||
|
||||
// If applicable, invoke the callback
|
||||
responseCallback?.Invoke(true);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
{
|
||||
if(!printer.Connection.IsConnected)
|
||||
{
|
||||
this.WizardWindow.CloseOnIdle();
|
||||
this.DialogWindow.CloseOnIdle();
|
||||
}
|
||||
}, ref unregisterEvents);
|
||||
}
|
||||
|
|
@ -177,7 +177,7 @@ namespace MatterHackers.MatterControl.EeProm
|
|||
{
|
||||
currentEePromSettings.Save(printer.Connection);
|
||||
currentEePromSettings.Clear();
|
||||
this.WizardWindow.Close();
|
||||
this.DialogWindow.Close();
|
||||
});
|
||||
};
|
||||
this.AddPageAction(buttonSave);
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl
|
|||
writableContainer);
|
||||
}
|
||||
|
||||
this.WizardWindow.CloseOnIdle();
|
||||
this.DialogWindow.CloseOnIdle();
|
||||
};
|
||||
|
||||
this.AddPageAction(acceptButton);
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
case FirmwareTypes.Repetier:
|
||||
if (repetierEEPromPage != null)
|
||||
{
|
||||
repetierEEPromPage.WizardWindow.BringToFront();
|
||||
repetierEEPromPage.DialogWindow.BringToFront();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -354,7 +354,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
case FirmwareTypes.Marlin:
|
||||
if (marlinEEPromPage != null)
|
||||
{
|
||||
marlinEEPromPage.WizardWindow.BringToFront();
|
||||
marlinEEPromPage.DialogWindow.BringToFront();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
|
||||
printer.Settings.Helpers.SetPrintLevelingData(newLevelingData, false);
|
||||
this.WizardWindow.Close();
|
||||
this.DialogWindow.Close();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ namespace MatterHackers.MatterControl
|
|||
printerSettings.Save();
|
||||
}
|
||||
|
||||
this.WizardWindow.ChangeToPage(new MacroListPage(printerSettings));
|
||||
this.DialogWindow.ChangeToPage(new MacroListPage(printerSettings));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -147,7 +147,7 @@ namespace MatterHackers.MatterControl
|
|||
protected override void OnCancel(out bool abortCancel)
|
||||
{
|
||||
abortCancel = true;
|
||||
this.WizardWindow.ChangeToPage(new MacroListPage(printerSettings));
|
||||
this.DialogWindow.ChangeToPage(new MacroListPage(printerSettings));
|
||||
}
|
||||
|
||||
private bool ValidateMacroForm()
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ namespace MatterHackers.MatterControl
|
|||
addMacroButton.ToolTipText = "Add a new Macro".Localize();
|
||||
addMacroButton.Click += (s, e) =>
|
||||
{
|
||||
this.WizardWindow.ChangeToPage(
|
||||
this.DialogWindow.ChangeToPage(
|
||||
new MacroDetailPage(
|
||||
new GCodeMacro()
|
||||
{
|
||||
|
|
@ -96,7 +96,7 @@ namespace MatterHackers.MatterControl
|
|||
editLink.Margin = new BorderDouble(right: 5);
|
||||
editLink.Click += (s, e) =>
|
||||
{
|
||||
this.WizardWindow.ChangeToPage(
|
||||
this.DialogWindow.ChangeToPage(
|
||||
new MacroDetailPage(localMacroReference, printerSettings));
|
||||
};
|
||||
macroRow.AddChild(editLink);
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
this.WizardWindow.ChangeToPage(new SetupStepComPortOne(printer));
|
||||
this.DialogWindow.ChangeToPage(new SetupStepComPortOne(printer));
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
refreshButton = theme.CreateDialogButton("Refresh".Localize());
|
||||
refreshButton.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.ChangeToPage(new SetupStepComPortManual(printer));
|
||||
DialogWindow.ChangeToPage(new SetupStepComPortManual(printer));
|
||||
});
|
||||
|
||||
this.AddPageAction(nextButton);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
manualLink.Margin = new BorderDouble(0, 5);
|
||||
manualLink.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.ChangeToPage(new SetupStepComPortManual(printer));
|
||||
DialogWindow.ChangeToPage(new SetupStepComPortManual(printer));
|
||||
});
|
||||
container.AddChild(manualLink);
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
var nextButton = theme.CreateDialogButton("Continue".Localize());
|
||||
nextButton.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.ChangeToPage(new SetupStepComPortTwo(printer));
|
||||
DialogWindow.ChangeToPage(new SetupStepComPortTwo(printer));
|
||||
});
|
||||
|
||||
this.AddPageAction(nextButton);
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
manualLink.Margin = new BorderDouble(0, 5);
|
||||
manualLink.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.ChangeToPage(new SetupStepComPortManual(printer));
|
||||
DialogWindow.ChangeToPage(new SetupStepComPortManual(printer));
|
||||
});
|
||||
|
||||
printerErrorMessage = new TextWidget("", 0, 0, 10)
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
#else
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.ChangeToPage(new SetupStepComPortOne(printer));
|
||||
DialogWindow.ChangeToPage(new SetupStepComPortOne(printer));
|
||||
});
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.Close();
|
||||
DialogWindow.Close();
|
||||
PrinterSetup.ChangeToAccountCreate();
|
||||
});
|
||||
};
|
||||
|
|
@ -94,7 +94,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.Close();
|
||||
DialogWindow.Close();
|
||||
PrinterSetup.ShowAuthDialog?.Invoke();
|
||||
});
|
||||
};
|
||||
|
|
@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.ChangeToPage<SetupStepMakeModelName>();
|
||||
DialogWindow.ChangeToPage<SetupStepMakeModelName>();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ namespace MatterHackers.MatterControl
|
|||
troubleshootButton = theme.WhiteButtonFactory.Generate("Troubleshoot".Localize());
|
||||
troubleshootButton.Click += (s, e) => UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.ChangeToPage<SetupWizardTroubleshooting>();
|
||||
DialogWindow.ChangeToPage<SetupWizardTroubleshooting>();
|
||||
});
|
||||
|
||||
retryButtonContainer = new FlowLayoutWidget()
|
||||
|
|
@ -150,7 +150,7 @@ namespace MatterHackers.MatterControl
|
|||
this.generalError.Text = "Please wait...";
|
||||
this.generalError.Visible = true;
|
||||
nextButton.Visible = false;
|
||||
UiThread.RunOnIdle(this.WizardWindow.Close);
|
||||
UiThread.RunOnIdle(this.DialogWindow.Close);
|
||||
}
|
||||
|
||||
private void communicationStateChanged(object sender, EventArgs args)
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ namespace MatterHackers.MatterControl
|
|||
// Close the window and update the PrintersImported flag
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
WizardWindow.Close();
|
||||
DialogWindow.Close();
|
||||
|
||||
ProfileManager.Instance.PrintersImported = true;
|
||||
ProfileManager.Instance.Save();
|
||||
|
|
|
|||
|
|
@ -139,7 +139,7 @@ namespace MatterHackers.MatterControl
|
|||
#endif
|
||||
}
|
||||
|
||||
public DialogWindow WizardWindow { get; set; }
|
||||
public DialogWindow DialogWindow { get; set; }
|
||||
|
||||
public string WindowTitle { get; set; }
|
||||
|
||||
|
|
@ -181,7 +181,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
if (!abortCancel)
|
||||
{
|
||||
UiThread.RunOnIdle(() => WizardWindow?.Close());
|
||||
this.DialogWindow?.CloseOnIdle();
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -199,7 +199,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
if (!abortCancel)
|
||||
{
|
||||
UiThread.RunOnIdle(() => WizardWindow?.Close());
|
||||
this.DialogWindow?.CloseOnIdle();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
activePage = pageToChangeTo;
|
||||
|
||||
pageToChangeTo.WizardWindow = this;
|
||||
pageToChangeTo.DialogWindow = this;
|
||||
this.CloseAllChildren();
|
||||
this.AddChild(pageToChangeTo);
|
||||
this.Invalidate();
|
||||
|
|
@ -140,7 +140,7 @@ namespace MatterHackers.MatterControl
|
|||
public DialogPage ChangeToPage<PanelType>() where PanelType : DialogPage, new()
|
||||
{
|
||||
PanelType panel = new PanelType();
|
||||
panel.WizardWindow = this;
|
||||
panel.DialogWindow = this;
|
||||
ChangeToPage(panel);
|
||||
|
||||
// in the event of a reload all make sure we rebuild the contents correctly
|
||||
|
|
@ -155,7 +155,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
// make new content with the possibly changed theme
|
||||
PanelType newPanel = new PanelType();
|
||||
newPanel.WizardWindow = this;
|
||||
newPanel.DialogWindow = this;
|
||||
AddChild(newPanel, thisIndex);
|
||||
panel.CloseOnIdle();
|
||||
|
||||
|
|
|
|||
|
|
@ -202,10 +202,10 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
string importSettingSuccessMessage = string.Format("You have successfully imported a new {0} setting. You can find '{1}' in your list of {0} settings.".Localize(), sectionName, layerName);
|
||||
|
||||
WizardWindow.ChangeToPage(
|
||||
DialogWindow.ChangeToPage(
|
||||
new ImportSucceeded(importSettingSuccessMessage)
|
||||
{
|
||||
WizardWindow = this.WizardWindow,
|
||||
DialogWindow = this.DialogWindow,
|
||||
});
|
||||
|
||||
if (destIsMaterial)
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace MatterHackers.MatterControl
|
|||
if (!string.IsNullOrEmpty(newName))
|
||||
{
|
||||
action.Invoke(newName);
|
||||
this.WizardWindow.CloseOnIdle();
|
||||
this.DialogWindow.CloseOnIdle();
|
||||
}
|
||||
};
|
||||
this.AddPageAction(actionButton);
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ public class LicenseAgreementPage : DialogPage
|
|||
acceptButton.Click += (s, e) =>
|
||||
{
|
||||
UserSettings.Instance.set(UserSettingsKey.SoftwareLicenseAccepted, "true");
|
||||
UiThread.RunOnIdle(WizardWindow.Close);
|
||||
UiThread.RunOnIdle(DialogWindow.Close);
|
||||
};
|
||||
|
||||
acceptButton.Visible = true;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace MatterHackers.MatterControl.SetupWizard
|
|||
ApplicationController.Instance.RefreshActiveInstance(printerSettings);
|
||||
}
|
||||
|
||||
UiThread.RunOnIdle(WizardWindow.Close);
|
||||
UiThread.RunOnIdle(DialogWindow.Close);
|
||||
}
|
||||
};
|
||||
this.AddPageAction(revertButton);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace MatterHackers.MatterControl
|
|||
RefreshStatus();
|
||||
|
||||
nextButton = theme.ButtonFactory.Generate("Continue".Localize());
|
||||
nextButton.Click += (sender, e) => UiThread.RunOnIdle(this.WizardWindow.Close);
|
||||
nextButton.Click += (sender, e) => UiThread.RunOnIdle(this.DialogWindow.Close);
|
||||
nextButton.Visible = false;
|
||||
|
||||
this.AddPageAction(nextButton);
|
||||
|
|
@ -69,7 +69,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
this.WizardWindow.ChangeToPage<AndroidConnectDevicePage>();
|
||||
this.DialogWindow.ChangeToPage<AndroidConnectDevicePage>();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
this.WizardWindow.ChangeToPage(PrinterSetup.GetBestStartPage());
|
||||
this.DialogWindow.ChangeToPage(PrinterSetup.GetBestStartPage());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace MatterHackers.MatterControl.SetupWizard
|
|||
// Switch to setup wizard if no profiles exist
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
this.WizardWindow.ChangeToPage(PrinterSetup.GetBestStartPage());
|
||||
this.DialogWindow.ChangeToPage(PrinterSetup.GetBestStartPage());
|
||||
});
|
||||
}
|
||||
else if (ProfileManager.Instance.ActiveProfiles.Count() == 1)
|
||||
|
|
@ -46,11 +46,11 @@ namespace MatterHackers.MatterControl.SetupWizard
|
|||
ProfileManager.SwitchToProfile(ProfileManager.Instance.ActiveProfiles.First().ID).ConfigureAwait(false);
|
||||
|
||||
// only close the window if we are not switching to the setup printer form
|
||||
UiThread.RunOnIdle(WizardWindow.Close);
|
||||
UiThread.RunOnIdle(DialogWindow.Close);
|
||||
}
|
||||
else // multiple printers - close the window
|
||||
{
|
||||
UiThread.RunOnIdle(WizardWindow.Close);
|
||||
UiThread.RunOnIdle(DialogWindow.Close);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
else
|
||||
{
|
||||
ApplicationController.Instance.EditMaterialPresetsPage.WizardWindow.BringToFront();
|
||||
ApplicationController.Instance.EditMaterialPresetsPage.DialogWindow.BringToFront();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -200,7 +200,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
}
|
||||
else
|
||||
{
|
||||
ApplicationController.Instance.EditQualityPresetsWindow.WizardWindow.BringToFront();
|
||||
ApplicationController.Instance.EditQualityPresetsWindow.DialogWindow.BringToFront();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
presetsContext.DeleteLayer();
|
||||
this.WizardWindow.Close();
|
||||
this.DialogWindow.Close();
|
||||
});
|
||||
};
|
||||
this.AddPageAction(deleteButton);
|
||||
|
|
@ -147,7 +147,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
this.WizardWindow.Padding = 0;
|
||||
this.DialogWindow.Padding = 0;
|
||||
footerRow.Padding = theme.DefaultContainerPadding;
|
||||
footerRow.Margin = 0;
|
||||
footerRow.Border = new BorderDouble(top: 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue