Rename WizardPanels to WizardPage
This commit is contained in:
parent
5c926cc1a1
commit
6ff04a73d2
15 changed files with 42 additions and 42 deletions
|
|
@ -246,8 +246,8 @@
|
|||
<Compile Include="Library\Provider\LibraryProvider.cs" />
|
||||
<Compile Include="Queue\OptionsMenu\ExportGcodePlugin.cs" />
|
||||
<Compile Include="Queue\OptionsMenu\MergeQueueItems.cs" />
|
||||
<Compile Include="SetupWizard\AndroidConnectDevicePanel.cs" />
|
||||
<Compile Include="SetupWizard\WizardPanel.cs" />
|
||||
<Compile Include="SetupWizard\AndroidConnectDevicePage.cs" />
|
||||
<Compile Include="SetupWizard\WizardPage.cs" />
|
||||
<Compile Include="SetupWizard\SetupWizardHome.cs" />
|
||||
<Compile Include="SetupWizard\SetupWizardTroubleshooting.cs" />
|
||||
<Compile Include="SetupWizard\SetupWizardWifi.cs" />
|
||||
|
|
@ -336,7 +336,7 @@
|
|||
<Compile Include="PrinterControls\ManualPrinterControls.cs" />
|
||||
<Compile Include="PrinterControls\PrinterConnections\BaseConnectionWidget.cs" />
|
||||
<Compile Include="PrinterControls\PrinterConnections\PrinterChooser.cs" />
|
||||
<Compile Include="PrinterControls\PrinterConnections\ConnectionWizardPanel.cs" />
|
||||
<Compile Include="PrinterControls\PrinterConnections\ConnectionWizardPage.cs" />
|
||||
<Compile Include="PrinterControls\TemperatureIndicator.cs" />
|
||||
<Compile Include="PrinterControls\XYZJogControls.cs" />
|
||||
<Compile Include="Library\LibraryDataView.cs" />
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ using System;
|
|||
|
||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||
{
|
||||
public class ConnectionWizardPanel : WizardPanel
|
||||
public class ConnectionWizardPage : WizardPage
|
||||
{
|
||||
private PrinterInfo activePrinter;
|
||||
|
||||
public ConnectionWizardPanel() : base("Cancel")
|
||||
public ConnectionWizardPage() : base("Cancel")
|
||||
{
|
||||
cancelButton.Click += (s, e) => PrinterConnectionAndCommunication.Instance.HaltConnectionThread();
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ using System.Collections.Generic;
|
|||
|
||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||
{
|
||||
public class SetupStepBaudRate : ConnectionWizardPanel
|
||||
public class SetupStepBaudRate : ConnectionWizardPage
|
||||
{
|
||||
private List<RadioButton> BaudRateButtonsList = new List<RadioButton>();
|
||||
private FlowLayoutWidget printerBaudRateContainer;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ using System.Text.RegularExpressions;
|
|||
|
||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||
{
|
||||
public class SetupStepComPortManual : ConnectionWizardPanel
|
||||
public class SetupStepComPortManual : ConnectionWizardPage
|
||||
{
|
||||
private static Regex linuxDefaultUIFilter = new Regex("/dev/ttyS*\\d+", RegexOptions.CultureInvariant | RegexOptions.Compiled);
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
connectButton.Click += ConnectButton_Click;
|
||||
|
||||
refreshButton = textImageButtonFactory.Generate("Refresh".Localize());
|
||||
refreshButton.Click += (s, e) => WizardWindow.ChangeToPanel<SetupStepComPortManual>();
|
||||
refreshButton.Click += (s, e) => WizardWindow.ChangeToPage<SetupStepComPortManual>();
|
||||
|
||||
//Add buttons to buttonContainer
|
||||
footerRow.AddChild(nextButton);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ using System;
|
|||
|
||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||
{
|
||||
public class SetupStepComPortOne : ConnectionWizardPanel
|
||||
public class SetupStepComPortOne : ConnectionWizardPage
|
||||
{
|
||||
private Button nextButton;
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
{
|
||||
//Construct buttons
|
||||
nextButton = textImageButtonFactory.Generate("Continue".Localize());
|
||||
nextButton.Click += (s, e) => WizardWindow.ChangeToPanel<SetupStepComPortTwo>();
|
||||
nextButton.Click += (s, e) => WizardWindow.ChangeToPage<SetupStepComPortTwo>();
|
||||
|
||||
//Add buttons to buttonContainer
|
||||
footerRow.AddChild(nextButton);
|
||||
|
|
@ -67,7 +67,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
|
||||
Button manualLink = linkButtonFactory.Generate(LocalizedString.Get("Manually Configure Connection"));
|
||||
manualLink.Margin = new BorderDouble(0, 5);
|
||||
manualLink.Click += (s, e) => WizardWindow.ChangeToPanel<SetupStepComPortManual>();
|
||||
manualLink.Click += (s, e) => WizardWindow.ChangeToPage<SetupStepComPortManual>();
|
||||
|
||||
string printerMessageFourText = LocalizedString.Get("or");
|
||||
TextWidget printerMessageFour = new TextWidget(printerMessageFourText, 0, 0, 10);
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ using System.Linq;
|
|||
|
||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||
{
|
||||
public class SetupStepComPortTwo : ConnectionWizardPanel
|
||||
public class SetupStepComPortTwo : ConnectionWizardPage
|
||||
{
|
||||
private string[] startingPortNames;
|
||||
private string[] currentPortNames;
|
||||
|
|
@ -97,7 +97,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
|
||||
Button manualLink = linkButtonFactory.Generate("Manual Configuration".Localize());
|
||||
manualLink.Margin = new BorderDouble(0, 5);
|
||||
manualLink.Click += (s, e) => WizardWindow.ChangeToPanel<SetupStepComPortManual>();
|
||||
manualLink.Click += (s, e) => WizardWindow.ChangeToPage<SetupStepComPortManual>();
|
||||
|
||||
printerErrorMessage = new TextWidget("", 0, 0, 10);
|
||||
printerErrorMessage.AutoExpandBoundsToText = true;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using System.IO;
|
|||
|
||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||
{
|
||||
public class SetupStepInstallDriver : ConnectionWizardPanel
|
||||
public class SetupStepInstallDriver : ConnectionWizardPage
|
||||
{
|
||||
private FlowLayoutWidget printerDriverContainer;
|
||||
private TextWidget printerDriverMessage;
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ using System.IO;
|
|||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||
{
|
||||
//Normally step one of the setup process
|
||||
public class SetupStepMakeModelName : ConnectionWizardPanel
|
||||
public class SetupStepMakeModelName : ConnectionWizardPage
|
||||
{
|
||||
private FlowLayoutWidget printerModelContainer;
|
||||
private FlowLayoutWidget printerMakeContainer;
|
||||
|
|
@ -84,9 +84,9 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
if (canContinue)
|
||||
{
|
||||
#if __ANDROID__
|
||||
WizardWindow.ChangeToPanel<AndroidConnectDevicePanel>();
|
||||
WizardWindow.ChangeToPage<AndroidConnectDevicePage>();
|
||||
#else
|
||||
WizardWindow.ChangeToPanel<SetupStepInstallDriver>();
|
||||
WizardWindow.ChangeToPage<SetupStepInstallDriver>();
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ using MatterHackers.MatterControl.CustomWidgets;
|
|||
|
||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||
{
|
||||
public class ShowAuthPanel : ConnectionWizardPanel
|
||||
public class ShowAuthPanel : ConnectionWizardPage
|
||||
{
|
||||
public ShowAuthPanel()
|
||||
{
|
||||
|
|
@ -47,7 +47,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
nextButton.Name = "Connection Wizard Skip Sign In Button";
|
||||
nextButton.Click += (sender, e) =>
|
||||
{
|
||||
WizardWindow.ChangeToPanel<SetupStepMakeModelName>();
|
||||
WizardWindow.ChangeToPage<SetupStepMakeModelName>();
|
||||
};
|
||||
|
||||
var signInButton = textImageButtonFactory.Generate("Sign In");
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ using MatterHackers.MatterControl.PrinterCommunication;
|
|||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
public class AndroidConnectDevicePanel : WizardPanel
|
||||
public class AndroidConnectDevicePage : WizardPage
|
||||
{
|
||||
private event EventHandler unregisterEvents;
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ namespace MatterHackers.MatterControl
|
|||
private FlowLayoutWidget retryButtonContainer;
|
||||
private FlowLayoutWidget connectButtonContainer;
|
||||
|
||||
public AndroidConnectDevicePanel()
|
||||
public AndroidConnectDevicePage()
|
||||
{
|
||||
TextWidget printerNameLabel = new TextWidget("Connect Your Device".Localize() + ":", 0, 0, labelFontSize)
|
||||
{
|
||||
|
|
@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
//Construct buttons
|
||||
troubleshootButton = whiteImageButtonFactory.Generate("Troubleshoot".Localize(), centerText:true);
|
||||
troubleshootButton.Click += (s, e) => WizardWindow.ChangeToPanel<SetupWizardTroubleshooting>();
|
||||
troubleshootButton.Click += (s, e) => WizardWindow.ChangeToPage<SetupWizardTroubleshooting>();
|
||||
|
||||
retryButtonContainer = new FlowLayoutWidget()
|
||||
{
|
||||
|
|
@ -19,17 +19,17 @@ using MatterHackers.MatterControl.SlicerConfiguration;
|
|||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
//Normally step one of the setup process
|
||||
public class SetupWizardHome : WizardPanel
|
||||
public class SetupWizardHome : WizardPage
|
||||
{
|
||||
public SetupWizardHome()
|
||||
: base(unlocalizedTextForCancelButton: "Done")
|
||||
: base("Done")
|
||||
{
|
||||
headerLabel.Text = "Setup Options".Localize();
|
||||
|
||||
textImageButtonFactory.borderWidth = 1;
|
||||
textImageButtonFactory.normalBorderColor = RGBA_Bytes.White;
|
||||
|
||||
contentRow.AddChild(new SetupPrinterView(this.textImageButtonFactory) { WizardPanel = this });
|
||||
contentRow.AddChild(new SetupPrinterView(this.textImageButtonFactory) { WizardPage = this });
|
||||
contentRow.AddChild(new SetupAccountView(this.textImageButtonFactory));
|
||||
contentRow.AddChild(new EnterCodesView(this.textImageButtonFactory));
|
||||
|
||||
|
|
@ -89,7 +89,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public class SetupPrinterView : SetupViewBase
|
||||
{
|
||||
internal WizardPanel WizardPanel { get; set; }
|
||||
internal WizardPage WizardPage { get; set; }
|
||||
|
||||
private Button disconnectButton;
|
||||
private TextWidget connectionStatus;
|
||||
|
|
@ -114,7 +114,7 @@ namespace MatterHackers.MatterControl
|
|||
buttonContainer.AddChild(printerSelectorAndEditButton);
|
||||
|
||||
var printerSelector = new PrinterSelector();
|
||||
printerSelector.AddPrinter += (s, e) => WizardPanel.WizardWindow.ChangeToSetupPrinterForm();
|
||||
printerSelector.AddPrinter += (s, e) => WizardPage.WizardWindow.ChangeToSetupPrinterForm();
|
||||
printerSelectorAndEditButton.AddChild(printerSelector);
|
||||
|
||||
var editButton = TextImageButtonFactory.GetThemedEditButton();
|
||||
|
|
@ -128,7 +128,7 @@ namespace MatterHackers.MatterControl
|
|||
disconnectButton.Click += (sender, e) =>
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.Disable();
|
||||
WizardPanel.WizardWindow.ChangeToPanel<SetupWizardHome>();
|
||||
WizardPage.WizardWindow.ChangeToPage<SetupWizardHome>();
|
||||
};
|
||||
buttonContainer.AddChild(disconnectButton);
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ using Android.Content;
|
|||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
public class SetupWizardTroubleshooting : WizardPanel
|
||||
public class SetupWizardTroubleshooting : WizardPage
|
||||
{
|
||||
private Button nextButton;
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
//Construct buttons
|
||||
cancelButton = whiteImageButtonFactory.Generate("Cancel".Localize(), centerText:true);
|
||||
cancelButton.Click += (s, e) => this.WizardWindow.ChangeToPanel<AndroidConnectDevicePanel>();
|
||||
cancelButton.Click += (s, e) => this.WizardWindow.ChangeToPage<AndroidConnectDevicePage>();
|
||||
|
||||
//Construct buttons
|
||||
nextButton = textImageButtonFactory.Generate("Continue".Localize());
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ using MatterHackers.MatterControl.CustomWidgets;
|
|||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
//Normally step one of the setup process
|
||||
public class SetupWizardWifi : WizardPanel
|
||||
public class SetupWizardWifi : WizardPage
|
||||
{
|
||||
public SetupWizardWifi()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using MatterHackers.Localizations;
|
|||
|
||||
namespace MatterHackers.MatterControl
|
||||
{
|
||||
public class WizardPanel : GuiWidget
|
||||
public class WizardPage : GuiWidget
|
||||
{
|
||||
protected FlowLayoutWidget headerRow;
|
||||
protected FlowLayoutWidget contentRow;
|
||||
|
|
@ -25,7 +25,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
protected GuiWidget mainContainer;
|
||||
|
||||
public WizardPanel(string unlocalizedTextForCancelButton = "Cancel", TextImageButtonFactory textButtonFactory = null)
|
||||
public WizardPage(string unlocalizedTextForCancelButton = "Cancel", TextImageButtonFactory textButtonFactory = null)
|
||||
{
|
||||
whiteImageButtonFactory = new TextImageButtonFactory()
|
||||
{
|
||||
|
|
@ -24,7 +24,7 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
if (openToHome)
|
||||
{
|
||||
ChangeToPanel<SetupWizardHome>();
|
||||
ChangeToPage<SetupWizardHome>();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -32,7 +32,7 @@ namespace MatterHackers.MatterControl
|
|||
bool WifiDetected = MatterControlApplication.Instance.IsNetworkConnected();
|
||||
if (!WifiDetected)
|
||||
{
|
||||
ChangeToPanel<SetupWizardWifi>();
|
||||
ChangeToPage<SetupWizardWifi>();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -64,11 +64,11 @@ namespace MatterHackers.MatterControl
|
|||
bool showAuthPanel = ShouldShowAuthPanel?.Invoke() ?? false;
|
||||
if (showAuthPanel)
|
||||
{
|
||||
ChangeToPanel<ShowAuthPanel>();
|
||||
ChangeToPage<ShowAuthPanel>();
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeToPanel<SetupStepMakeModelName>();
|
||||
ChangeToPage<SetupStepMakeModelName>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -76,11 +76,11 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
if (ActiveSliceSettings.Instance.PrinterDrivers().Count > 0)
|
||||
{
|
||||
ChangeToPanel<SetupStepInstallDriver>();
|
||||
ChangeToPage<SetupStepInstallDriver>();
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeToPanel<SetupStepComPortOne>();
|
||||
ChangeToPage<SetupStepComPortOne>();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -88,15 +88,15 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
if (string.IsNullOrEmpty(PrinterConnectionAndCommunication.Instance?.ActivePrinter?.BaudRate()))
|
||||
{
|
||||
ChangeToPanel<SetupStepBaudRate>();
|
||||
ChangeToPage<SetupStepBaudRate>();
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeToPanel<SetupStepComPortOne>();
|
||||
ChangeToPage<SetupStepComPortOne>();
|
||||
}
|
||||
}
|
||||
|
||||
internal void ChangeToPanel<PanelType>() where PanelType : WizardPanel, new()
|
||||
internal void ChangeToPage<PanelType>() where PanelType : WizardPage, new()
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue