Revise WizardWindow api

- WizardPage instance should drive window namespace and title
- Key open windows page initial WizardPage type
This commit is contained in:
John Lewin 2017-08-23 15:51:29 -07:00
parent c27b6ec62d
commit 559c300cb4
32 changed files with 113 additions and 55 deletions

View file

@ -204,12 +204,16 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
waitingForUserInput = true;
macroData.showMaterialSelector = true;
macroData.waitOk = true;
UiThread.RunOnIdle(() => RunningMacroPage.Show(macroData));
UiThread.RunOnIdle(() =>
{
WizardWindow.Show(new RunningMacroPage(macroData));
});
break;
case "close":
runningMacro = false;
UiThread.RunOnIdle(() => WizardWindow.Close("Macro"));
UiThread.RunOnIdle(() => WizardWindow.Close(typeof(RunningMacroPage)));
break;
case "ding":
@ -218,7 +222,12 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
case "show_message":
waitingForUserInput = macroData.waitOk | macroData.expireTime > 0;
UiThread.RunOnIdle(() => RunningMacroPage.Show(macroData));
UiThread.RunOnIdle(() =>
{
WizardWindow.Show(new RunningMacroPage(macroData));
});
break;
default:
@ -250,7 +259,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
waitingForUserInput = false;
timeHaveBeenWaiting.Reset();
maxTimeToWaitForOk = 0;
UiThread.RunOnIdle(() => WizardWindow.Close("Macro"));
UiThread.RunOnIdle(() => WizardWindow.Close(typeof(RunningMacroPage)));
}
private bool TryGetAfterString(string macroLine, string variableName, out string value)