Convert custom WizardPage actions/events to existing ones
- Remove PageIsBecomingActive, prefer existing OnLoad - Remove PageIsBecomingInactive, prefer existing OnClosed - Rename BecomingActive action to PageLoad, used for inline defs - Rename BecomingInactive action to PageClose, used for inline defs - Fire PageLoad/PageClose from page base OnLoad/OnClosed
This commit is contained in:
parent
ec826abd39
commit
1b463ffaa7
15 changed files with 65 additions and 136 deletions
|
|
@ -48,10 +48,8 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
this.probeStartPosition = probeStartPosition;
|
||||
}
|
||||
|
||||
public override void PageIsBecomingActive()
|
||||
public override void OnLoad(EventArgs args)
|
||||
{
|
||||
base.PageIsBecomingActive();
|
||||
|
||||
// make sure the probe is not deployed
|
||||
if (printer.Settings.GetValue<bool>(SettingsKey.has_z_probe)
|
||||
&& printer.Settings.GetValue<bool>(SettingsKey.use_z_probe)
|
||||
|
|
@ -72,18 +70,13 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
|
||||
zPlusControl.Click += zControl_Click;
|
||||
zMinusControl.Click += zControl_Click;
|
||||
|
||||
base.OnLoad(args);
|
||||
}
|
||||
|
||||
protected void zControl_Click(object sender, EventArgs mouseEvent)
|
||||
{
|
||||
NextButton.Enabled = true;
|
||||
}
|
||||
|
||||
public override void PageIsBecomingInactive()
|
||||
{
|
||||
NextButton.Enabled = true;
|
||||
|
||||
base.PageIsBecomingInactive();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue