Simplify naming
This commit is contained in:
parent
76ceddeec0
commit
d035c58d10
14 changed files with 43 additions and 49 deletions
|
|
@ -36,7 +36,6 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.CustomWidgets;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
|
|
@ -83,7 +82,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
return extruderCount > 1 && !printer.Settings.GetValue<bool>(SettingsKey.filament_1_has_been_loaded);
|
||||
}
|
||||
|
||||
protected override IEnumerator<PrinterSetupWizardPage> GetWizardSteps()
|
||||
protected override IEnumerator<WizardPage> GetWizardSteps()
|
||||
{
|
||||
var extruderCount = printer.Settings.GetValue<int>(SettingsKey.extruder_count);
|
||||
|
||||
|
|
@ -103,7 +102,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
|
||||
// show the trim filament message
|
||||
{
|
||||
var trimFilamentPage = new PrinterSetupWizardPage(this, "Trim Filament".Localize(), "")
|
||||
var trimFilamentPage = new WizardPage(this, "Trim Filament".Localize(), "")
|
||||
{
|
||||
PageLoad = (page) =>
|
||||
{
|
||||
|
|
@ -131,7 +130,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
// show the insert filament page
|
||||
{
|
||||
RunningInterval runningGCodeCommands = null;
|
||||
var insertFilamentPage = new PrinterSetupWizardPage(this, "Insert Filament".Localize(), "")
|
||||
var insertFilamentPage = new WizardPage(this, "Insert Filament".Localize(), "")
|
||||
{
|
||||
PageLoad = (page) =>
|
||||
{
|
||||
|
|
@ -189,7 +188,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
// show the loading filament progress bar
|
||||
{
|
||||
RunningInterval runningGCodeCommands = null;
|
||||
var loadingFilamentPage = new PrinterSetupWizardPage(this, "Loading Filament".Localize(), "")
|
||||
var loadingFilamentPage = new WizardPage(this, "Loading Filament".Localize(), "")
|
||||
{
|
||||
PageLoad = (page) =>
|
||||
{
|
||||
|
|
@ -300,7 +299,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
// extrude slowly so that we can prime the extruder
|
||||
{
|
||||
RunningInterval runningGCodeCommands = null;
|
||||
var runningCleanPage = new PrinterSetupWizardPage(this, "Wait For Running Clean".Localize(), "")
|
||||
var runningCleanPage = new WizardPage(this, "Wait For Running Clean".Localize(), "")
|
||||
{
|
||||
PageLoad = (page) =>
|
||||
{
|
||||
|
|
@ -358,7 +357,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
}
|
||||
}
|
||||
|
||||
public class DoneLoadingPage : PrinterSetupWizardPage
|
||||
public class DoneLoadingPage : WizardPage
|
||||
{
|
||||
public DoneLoadingPage(PrinterSetupWizard setupWizard, int extruderIndex)
|
||||
: base(setupWizard, "Success".Localize(), "Success!\n\nYour filament should now be loaded".Localize())
|
||||
|
|
|
|||
|
|
@ -27,14 +27,13 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.PrinterCommunication.Io;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.VectorMath;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
|
|
@ -136,7 +135,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
};
|
||||
}
|
||||
|
||||
protected override IEnumerator<PrinterSetupWizardPage> GetWizardSteps()
|
||||
protected override IEnumerator<WizardPage> GetWizardSteps()
|
||||
{
|
||||
var probePositions = new List<ProbePosition>(levelingPlan.ProbeCount);
|
||||
for (int j = 0; j < levelingPlan.ProbeCount; j++)
|
||||
|
|
@ -152,7 +151,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
|
||||
if (showWelcomeScreen)
|
||||
{
|
||||
yield return new PrinterSetupWizardPage(
|
||||
yield return new WizardPage(
|
||||
this,
|
||||
"Initial Printer Setup".Localize(),
|
||||
string.Format(
|
||||
|
|
@ -200,7 +199,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
}
|
||||
}
|
||||
|
||||
yield return new PrinterSetupWizardPage(
|
||||
yield return new WizardPage(
|
||||
this,
|
||||
"Print Leveling Overview".Localize(),
|
||||
buildWelcomeText());
|
||||
|
|
@ -259,7 +258,8 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
this,
|
||||
"Waiting For Printer To Heat".Localize(),
|
||||
heatingInstructions,
|
||||
targetBedTemp, new double[] { targetHotendTemp });
|
||||
targetBedTemp,
|
||||
new double[] { targetHotendTemp });
|
||||
}
|
||||
|
||||
double bedRadius = Math.Min(printer.Settings.GetValue<Vector2>(SettingsKey.bed_size).X, printer.Settings.GetValue<Vector2>(SettingsKey.bed_size).Y) / 2;
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
public abstract class PrinterSetupWizard
|
||||
{
|
||||
private IEnumerator<PrinterSetupWizardPage> pages;
|
||||
private IEnumerator<WizardPage> pages;
|
||||
|
||||
protected abstract IEnumerator<PrinterSetupWizardPage> GetWizardSteps();
|
||||
protected abstract IEnumerator<WizardPage> GetWizardSteps();
|
||||
|
||||
public string WindowTitle { get; internal set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -27,13 +27,12 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PrinterCommunication.Io;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.VectorMath;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
|
|
@ -93,7 +92,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
&& printer.Settings.GetValue<bool>(SettingsKey.use_z_probe);
|
||||
}
|
||||
|
||||
protected override IEnumerator<PrinterSetupWizardPage> GetWizardSteps()
|
||||
protected override IEnumerator<WizardPage> GetWizardSteps()
|
||||
{
|
||||
var levelingStrings = new LevelingStrings();
|
||||
var autoProbePositions = new List<ProbePosition>(3);
|
||||
|
|
@ -107,7 +106,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
// make a welcome page if this is the first time calibrating the probe
|
||||
if (!printer.Settings.GetValue<bool>(SettingsKey.probe_has_been_calibrated))
|
||||
{
|
||||
yield return new PrinterSetupWizardPage(
|
||||
yield return new WizardPage(
|
||||
this,
|
||||
"Initial Printer Setup".Localize(),
|
||||
string.Format(
|
||||
|
|
@ -117,7 +116,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
}
|
||||
|
||||
// show what steps will be taken
|
||||
yield return new PrinterSetupWizardPage(
|
||||
yield return new WizardPage(
|
||||
this,
|
||||
"Probe Calibration Overview".Localize(),
|
||||
string.Format(
|
||||
|
|
@ -188,7 +187,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
0);
|
||||
|
||||
// show what steps will be taken
|
||||
yield return new PrinterSetupWizardPage(
|
||||
yield return new WizardPage(
|
||||
this,
|
||||
"Measure the nozzle offset".Localize(),
|
||||
"{0}:\n\n\t• {1}\n\n{2}\n\n{3}".FormatWith(
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
this.extruderIndex = extruderIndex;
|
||||
}
|
||||
|
||||
protected override IEnumerator<PrinterSetupWizardPage> GetWizardSteps()
|
||||
protected override IEnumerator<WizardPage> GetWizardSteps()
|
||||
{
|
||||
var extruderCount = printer.Settings.GetValue<int>(SettingsKey.extruder_count);
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
int extruderPriorToUnload = printer.Connection.ActiveExtruderIndex;
|
||||
|
||||
RunningInterval runningGCodeCommands = null;
|
||||
var unloadingFilamentPage = new PrinterSetupWizardPage(this, "Unloading Filament".Localize(), "")
|
||||
var unloadingFilamentPage = new WizardPage(this, "Unloading Filament".Localize(), "")
|
||||
{
|
||||
PageLoad = (page) =>
|
||||
{
|
||||
|
|
@ -224,7 +224,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
}
|
||||
}
|
||||
|
||||
public class DoneUnloadingPage : PrinterSetupWizardPage
|
||||
public class DoneUnloadingPage : WizardPage
|
||||
{
|
||||
public DoneUnloadingPage(PrinterSetupWizard setupWizard, int extruderIndex)
|
||||
: base(setupWizard, "Success".Localize(), "Success!\n\nYour filament should now be unloaded".Localize())
|
||||
|
|
|
|||
|
|
@ -35,22 +35,22 @@ using MatterHackers.MatterControl.CustomWidgets;
|
|||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
public class PrinterSetupWizardPage : DialogPage
|
||||
public class WizardPage : DialogPage
|
||||
{
|
||||
public TextButton NextButton { get; }
|
||||
protected PrinterConfig printer;
|
||||
|
||||
public Action<PrinterSetupWizardPage> PageLoad { get; set; }
|
||||
public Action<WizardPage> PageLoad { get; set; }
|
||||
|
||||
public Action PageClose { get; set; }
|
||||
|
||||
protected PrinterSetupWizard wizardContext;
|
||||
protected PrinterSetupWizard wizardPage;
|
||||
|
||||
public PrinterSetupWizardPage(PrinterSetupWizard wizardContext, string headerText, string instructionsText)
|
||||
public WizardPage(PrinterSetupWizard wizardPage, string headerText, string instructionsText)
|
||||
{
|
||||
this.wizardContext = wizardContext;
|
||||
this.printer = wizardContext.Printer;
|
||||
this.WindowTitle = wizardContext.WindowTitle;
|
||||
this.wizardPage = wizardPage;
|
||||
this.printer = wizardPage.Printer;
|
||||
this.WindowTitle = wizardPage.WindowTitle;
|
||||
this.HeaderText = headerText;
|
||||
|
||||
if (!string.IsNullOrEmpty(instructionsText))
|
||||
|
|
@ -66,7 +66,7 @@ namespace MatterHackers.MatterControl
|
|||
};
|
||||
NextButton.Click += (s, e) =>
|
||||
{
|
||||
wizardContext.ShowNextPage(this.DialogWindow);
|
||||
wizardPage.ShowNextPage(this.DialogWindow);
|
||||
};
|
||||
|
||||
this.AddPageAction(NextButton);
|
||||
|
|
@ -31,16 +31,14 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MatterControl.Printing;
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.PrinterCommunication.Io;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
public class AutoProbeFeedback : PrinterSetupWizardPage
|
||||
public class AutoProbeFeedback : WizardPage
|
||||
{
|
||||
private Vector3 lastReportedPosition;
|
||||
private List<ProbePosition> probePositions;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ using MatterHackers.MatterControl.SlicerConfiguration;
|
|||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
public class CalibrateProbeLastPagelInstructions : PrinterSetupWizardPage
|
||||
public class CalibrateProbeLastPagelInstructions : WizardPage
|
||||
{
|
||||
private bool pageWasActive = false;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,12 +34,11 @@ using MatterHackers.Agg;
|
|||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.PrinterCommunication.Io;
|
||||
using MatterHackers.VectorMath;
|
||||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
public class FindBedHeight : PrinterSetupWizardPage
|
||||
public class FindBedHeight : WizardPage
|
||||
{
|
||||
private Vector3 lastReportedPosition;
|
||||
private List<ProbePosition> probePositions;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ using MatterHackers.VectorMath;
|
|||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
public class GettingThirdPointFor2PointCalibration : PrinterSetupWizardPage
|
||||
public class GettingThirdPointFor2PointCalibration : WizardPage
|
||||
{
|
||||
protected Vector3 probeStartPosition;
|
||||
private ProbePosition probePosition;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ using MatterHackers.MatterControl.SlicerConfiguration;
|
|||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
public class HomePrinterPage : PrinterSetupWizardPage
|
||||
public class HomePrinterPage : WizardPage
|
||||
{
|
||||
private bool autoAdvance;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,12 +34,11 @@ using MatterHackers.Agg.Platform;
|
|||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PrinterCommunication;
|
||||
using MatterHackers.MatterControl.PrinterCommunication.Io;
|
||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
public class LastPageInstructions : PrinterSetupWizardPage
|
||||
public class LastPageInstructions : WizardPage
|
||||
{
|
||||
private List<ProbePosition> probePositions;
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ using MatterHackers.MatterControl.SlicerConfiguration;
|
|||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
public class SelectMaterialPage : PrinterSetupWizardPage
|
||||
public class SelectMaterialPage : WizardPage
|
||||
{
|
||||
public SelectMaterialPage(PrinterSetupWizard context, string headerText, string instructionsText, string nextButtonText, int extruderIndex, bool showLoadFilamentButton, bool showAlreadyLoadedButton)
|
||||
: base(context, headerText, instructionsText)
|
||||
|
|
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
};
|
||||
loadFilamentButton.Click += (s, e) =>
|
||||
{
|
||||
wizardContext.ShowNextPage(this.DialogWindow);
|
||||
wizardPage.ShowNextPage(this.DialogWindow);
|
||||
};
|
||||
|
||||
this.AddPageAction(loadFilamentButton);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ using MatterHackers.MatterControl.SlicerConfiguration;
|
|||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
public class WaitForTempPage : PrinterSetupWizardPage
|
||||
public class WaitForTempPage : WizardPage
|
||||
{
|
||||
private ProgressBar bedProgressBar;
|
||||
private TextWidget bedProgressBarText;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue