Merge pull request #883 from jlewin/master
Rename WizardPanels to WizardPage
This commit is contained in:
commit
97123744b5
18 changed files with 83 additions and 69 deletions
|
|
@ -35,7 +35,7 @@ using MatterHackers.VectorMath;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
public class InstructionsPage : WizardPage
|
public class InstructionsPage : WizardControlPage
|
||||||
{
|
{
|
||||||
double extraTextScaling = 1;
|
double extraTextScaling = 1;
|
||||||
protected FlowLayoutWidget topToBottomControls;
|
protected FlowLayoutWidget topToBottomControls;
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,13 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
public class WizardPage : GuiWidget
|
public class WizardControlPage : GuiWidget
|
||||||
{
|
{
|
||||||
private string stepDescription = "";
|
private string stepDescription = "";
|
||||||
|
|
||||||
public string StepDescription { get { return stepDescription; } set { stepDescription = value; } }
|
public string StepDescription { get { return stepDescription; } set { stepDescription = value; } }
|
||||||
|
|
||||||
public WizardPage(string stepDescription)
|
public WizardControlPage(string stepDescription)
|
||||||
{
|
{
|
||||||
StepDescription = stepDescription;
|
StepDescription = stepDescription;
|
||||||
}
|
}
|
||||||
|
|
@ -33,7 +33,7 @@ namespace MatterHackers.MatterControl
|
||||||
protected TextImageButtonFactory textImageButtonFactory = new TextImageButtonFactory();
|
protected TextImageButtonFactory textImageButtonFactory = new TextImageButtonFactory();
|
||||||
|
|
||||||
private FlowLayoutWidget bottomToTopLayout;
|
private FlowLayoutWidget bottomToTopLayout;
|
||||||
private List<WizardPage> pages = new List<WizardPage>();
|
private List<WizardControlPage> pages = new List<WizardControlPage>();
|
||||||
private int pageIndex = 0;
|
private int pageIndex = 0;
|
||||||
public Button backButton;
|
public Button backButton;
|
||||||
public Button nextButton;
|
public Button nextButton;
|
||||||
|
|
@ -210,7 +210,7 @@ namespace MatterHackers.MatterControl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddPage(WizardPage widgetForPage)
|
public void AddPage(WizardControlPage widgetForPage)
|
||||||
{
|
{
|
||||||
pages.Add(widgetForPage);
|
pages.Add(widgetForPage);
|
||||||
bottomToTopLayout.AddChild(widgetForPage);
|
bottomToTopLayout.AddChild(widgetForPage);
|
||||||
|
|
|
||||||
|
|
@ -246,9 +246,9 @@
|
||||||
<Compile Include="Library\Provider\LibraryProvider.cs" />
|
<Compile Include="Library\Provider\LibraryProvider.cs" />
|
||||||
<Compile Include="Queue\OptionsMenu\ExportGcodePlugin.cs" />
|
<Compile Include="Queue\OptionsMenu\ExportGcodePlugin.cs" />
|
||||||
<Compile Include="Queue\OptionsMenu\MergeQueueItems.cs" />
|
<Compile Include="Queue\OptionsMenu\MergeQueueItems.cs" />
|
||||||
<Compile Include="SetupWizard\AndroidConnectDevicePanel.cs" />
|
<Compile Include="SetupWizard\AndroidConnectDevicePage.cs" />
|
||||||
<Compile Include="SetupWizard\WizardPanel.cs" />
|
<Compile Include="SetupWizard\WizardPage.cs" />
|
||||||
<Compile Include="SetupWizard\SetupWizardHome.cs" />
|
<Compile Include="SetupWizard\AndroidSetupOptionsPage.cs" />
|
||||||
<Compile Include="SetupWizard\SetupWizardTroubleshooting.cs" />
|
<Compile Include="SetupWizard\SetupWizardTroubleshooting.cs" />
|
||||||
<Compile Include="SetupWizard\SetupWizardWifi.cs" />
|
<Compile Include="SetupWizard\SetupWizardWifi.cs" />
|
||||||
<Compile Include="SetupWizard\WizardWindow.cs" />
|
<Compile Include="SetupWizard\WizardWindow.cs" />
|
||||||
|
|
@ -336,7 +336,7 @@
|
||||||
<Compile Include="PrinterControls\ManualPrinterControls.cs" />
|
<Compile Include="PrinterControls\ManualPrinterControls.cs" />
|
||||||
<Compile Include="PrinterControls\PrinterConnections\BaseConnectionWidget.cs" />
|
<Compile Include="PrinterControls\PrinterConnections\BaseConnectionWidget.cs" />
|
||||||
<Compile Include="PrinterControls\PrinterConnections\PrinterChooser.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\TemperatureIndicator.cs" />
|
||||||
<Compile Include="PrinterControls\XYZJogControls.cs" />
|
<Compile Include="PrinterControls\XYZJogControls.cs" />
|
||||||
<Compile Include="Library\LibraryDataView.cs" />
|
<Compile Include="Library\LibraryDataView.cs" />
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,11 @@ using System;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
{
|
{
|
||||||
public class ConnectionWizardPanel : WizardPanel
|
public class ConnectionWizardPage : WizardPage
|
||||||
{
|
{
|
||||||
private PrinterInfo activePrinter;
|
private PrinterInfo activePrinter;
|
||||||
|
|
||||||
public ConnectionWizardPanel() : base("Cancel")
|
public ConnectionWizardPage() : base("Cancel")
|
||||||
{
|
{
|
||||||
cancelButton.Click += (s, e) => PrinterConnectionAndCommunication.Instance.HaltConnectionThread();
|
cancelButton.Click += (s, e) => PrinterConnectionAndCommunication.Instance.HaltConnectionThread();
|
||||||
}
|
}
|
||||||
|
|
@ -7,7 +7,7 @@ using System.Collections.Generic;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
{
|
{
|
||||||
public class SetupStepBaudRate : ConnectionWizardPanel
|
public class SetupStepBaudRate : ConnectionWizardPage
|
||||||
{
|
{
|
||||||
private List<RadioButton> BaudRateButtonsList = new List<RadioButton>();
|
private List<RadioButton> BaudRateButtonsList = new List<RadioButton>();
|
||||||
private FlowLayoutWidget printerBaudRateContainer;
|
private FlowLayoutWidget printerBaudRateContainer;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
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);
|
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;
|
connectButton.Click += ConnectButton_Click;
|
||||||
|
|
||||||
refreshButton = textImageButtonFactory.Generate("Refresh".Localize());
|
refreshButton = textImageButtonFactory.Generate("Refresh".Localize());
|
||||||
refreshButton.Click += (s, e) => WizardWindow.ChangeToPanel<SetupStepComPortManual>();
|
refreshButton.Click += (s, e) => WizardWindow.ChangeToPage<SetupStepComPortManual>();
|
||||||
|
|
||||||
//Add buttons to buttonContainer
|
//Add buttons to buttonContainer
|
||||||
footerRow.AddChild(nextButton);
|
footerRow.AddChild(nextButton);
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ using System;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
{
|
{
|
||||||
public class SetupStepComPortOne : ConnectionWizardPanel
|
public class SetupStepComPortOne : ConnectionWizardPage
|
||||||
{
|
{
|
||||||
private Button nextButton;
|
private Button nextButton;
|
||||||
|
|
||||||
|
|
@ -17,7 +17,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
{
|
{
|
||||||
//Construct buttons
|
//Construct buttons
|
||||||
nextButton = textImageButtonFactory.Generate("Continue".Localize());
|
nextButton = textImageButtonFactory.Generate("Continue".Localize());
|
||||||
nextButton.Click += (s, e) => WizardWindow.ChangeToPanel<SetupStepComPortTwo>();
|
nextButton.Click += (s, e) => WizardWindow.ChangeToPage<SetupStepComPortTwo>();
|
||||||
|
|
||||||
//Add buttons to buttonContainer
|
//Add buttons to buttonContainer
|
||||||
footerRow.AddChild(nextButton);
|
footerRow.AddChild(nextButton);
|
||||||
|
|
@ -67,7 +67,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
|
|
||||||
Button manualLink = linkButtonFactory.Generate(LocalizedString.Get("Manually Configure Connection"));
|
Button manualLink = linkButtonFactory.Generate(LocalizedString.Get("Manually Configure Connection"));
|
||||||
manualLink.Margin = new BorderDouble(0, 5);
|
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");
|
string printerMessageFourText = LocalizedString.Get("or");
|
||||||
TextWidget printerMessageFour = new TextWidget(printerMessageFourText, 0, 0, 10);
|
TextWidget printerMessageFour = new TextWidget(printerMessageFourText, 0, 0, 10);
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ using System.Linq;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
{
|
{
|
||||||
public class SetupStepComPortTwo : ConnectionWizardPanel
|
public class SetupStepComPortTwo : ConnectionWizardPage
|
||||||
{
|
{
|
||||||
private string[] startingPortNames;
|
private string[] startingPortNames;
|
||||||
private string[] currentPortNames;
|
private string[] currentPortNames;
|
||||||
|
|
@ -97,7 +97,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
|
|
||||||
Button manualLink = linkButtonFactory.Generate("Manual Configuration".Localize());
|
Button manualLink = linkButtonFactory.Generate("Manual Configuration".Localize());
|
||||||
manualLink.Margin = new BorderDouble(0, 5);
|
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 = new TextWidget("", 0, 0, 10);
|
||||||
printerErrorMessage.AutoExpandBoundsToText = true;
|
printerErrorMessage.AutoExpandBoundsToText = true;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ using System.IO;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
{
|
{
|
||||||
public class SetupStepInstallDriver : ConnectionWizardPanel
|
public class SetupStepInstallDriver : ConnectionWizardPage
|
||||||
{
|
{
|
||||||
private FlowLayoutWidget printerDriverContainer;
|
private FlowLayoutWidget printerDriverContainer;
|
||||||
private TextWidget printerDriverMessage;
|
private TextWidget printerDriverMessage;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ using System.IO;
|
||||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
{
|
{
|
||||||
//Normally step one of the setup process
|
//Normally step one of the setup process
|
||||||
public class SetupStepMakeModelName : ConnectionWizardPanel
|
public class SetupStepMakeModelName : ConnectionWizardPage
|
||||||
{
|
{
|
||||||
private FlowLayoutWidget printerModelContainer;
|
private FlowLayoutWidget printerModelContainer;
|
||||||
private FlowLayoutWidget printerMakeContainer;
|
private FlowLayoutWidget printerMakeContainer;
|
||||||
|
|
@ -84,9 +84,9 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
if (canContinue)
|
if (canContinue)
|
||||||
{
|
{
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
WizardWindow.ChangeToPanel<AndroidConnectDevicePanel>();
|
WizardWindow.ChangeToPage<AndroidConnectDevicePage>();
|
||||||
#else
|
#else
|
||||||
WizardWindow.ChangeToPanel<SetupStepInstallDriver>();
|
WizardWindow.ChangeToPage<SetupStepInstallDriver>();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ using MatterHackers.MatterControl.CustomWidgets;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
{
|
{
|
||||||
public class ShowAuthPanel : ConnectionWizardPanel
|
public class ShowAuthPanel : ConnectionWizardPage
|
||||||
{
|
{
|
||||||
public ShowAuthPanel()
|
public ShowAuthPanel()
|
||||||
{
|
{
|
||||||
|
|
@ -47,7 +47,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
||||||
nextButton.Name = "Connection Wizard Skip Sign In Button";
|
nextButton.Name = "Connection Wizard Skip Sign In Button";
|
||||||
nextButton.Click += (sender, e) =>
|
nextButton.Click += (sender, e) =>
|
||||||
{
|
{
|
||||||
WizardWindow.ChangeToPanel<SetupStepMakeModelName>();
|
WizardWindow.ChangeToPage<SetupStepMakeModelName>();
|
||||||
};
|
};
|
||||||
|
|
||||||
var signInButton = textImageButtonFactory.Generate("Sign In");
|
var signInButton = textImageButtonFactory.Generate("Sign In");
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ using MatterHackers.MatterControl.PrinterCommunication;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
public class AndroidConnectDevicePanel : WizardPanel
|
public class AndroidConnectDevicePage : WizardPage
|
||||||
{
|
{
|
||||||
private event EventHandler unregisterEvents;
|
private event EventHandler unregisterEvents;
|
||||||
|
|
||||||
|
|
@ -54,7 +54,7 @@ namespace MatterHackers.MatterControl
|
||||||
private FlowLayoutWidget retryButtonContainer;
|
private FlowLayoutWidget retryButtonContainer;
|
||||||
private FlowLayoutWidget connectButtonContainer;
|
private FlowLayoutWidget connectButtonContainer;
|
||||||
|
|
||||||
public AndroidConnectDevicePanel()
|
public AndroidConnectDevicePage()
|
||||||
{
|
{
|
||||||
TextWidget printerNameLabel = new TextWidget("Connect Your Device".Localize() + ":", 0, 0, labelFontSize)
|
TextWidget printerNameLabel = new TextWidget("Connect Your Device".Localize() + ":", 0, 0, labelFontSize)
|
||||||
{
|
{
|
||||||
|
|
@ -109,7 +109,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
//Construct buttons
|
//Construct buttons
|
||||||
troubleshootButton = whiteImageButtonFactory.Generate("Troubleshoot".Localize(), centerText:true);
|
troubleshootButton = whiteImageButtonFactory.Generate("Troubleshoot".Localize(), centerText:true);
|
||||||
troubleshootButton.Click += (s, e) => WizardWindow.ChangeToPanel<SetupWizardTroubleshooting>();
|
troubleshootButton.Click += (s, e) => WizardWindow.ChangeToPage<SetupWizardTroubleshooting>();
|
||||||
|
|
||||||
retryButtonContainer = new FlowLayoutWidget()
|
retryButtonContainer = new FlowLayoutWidget()
|
||||||
{
|
{
|
||||||
|
|
@ -1,43 +1,57 @@
|
||||||
using System;
|
/*
|
||||||
using System.Collections.Generic;
|
Copyright (c) 2016, Kevin Pope, John Lewin
|
||||||
using System.IO;
|
All rights reserved.
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
Redistribution and use in source and binary forms, with or without
|
||||||
using System.ComponentModel;
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
The views and conclusions contained in the software and documentation are those
|
||||||
|
of the authors and should not be interpreted as representing official policies,
|
||||||
|
either expressed or implied, of the FreeBSD Project.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
using MatterHackers.Agg;
|
using MatterHackers.Agg;
|
||||||
using MatterHackers.Agg.PlatformAbstract;
|
|
||||||
using MatterHackers.Agg.UI;
|
using MatterHackers.Agg.UI;
|
||||||
using MatterHackers.Localizations;
|
using MatterHackers.Localizations;
|
||||||
using MatterHackers.MatterControl.ConfigurationPage.PrintLeveling;
|
|
||||||
using MatterHackers.MatterControl.DataStorage;
|
|
||||||
using MatterHackers.MatterControl.CustomWidgets;
|
|
||||||
using MatterHackers.MatterControl.PrinterControls.PrinterConnections;
|
|
||||||
using MatterHackers.MatterControl.PrinterCommunication;
|
using MatterHackers.MatterControl.PrinterCommunication;
|
||||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
using MatterHackers.MatterControl.CustomWidgets;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
//Normally step one of the setup process
|
public class AndroidSetupOptionsPage : WizardPage
|
||||||
public class SetupWizardHome : WizardPanel
|
|
||||||
{
|
{
|
||||||
public SetupWizardHome()
|
public AndroidSetupOptionsPage()
|
||||||
: base(unlocalizedTextForCancelButton: "Done")
|
: base("Done")
|
||||||
{
|
{
|
||||||
headerLabel.Text = "Setup Options".Localize();
|
headerLabel.Text = "Setup Options".Localize();
|
||||||
|
|
||||||
textImageButtonFactory.borderWidth = 1;
|
textImageButtonFactory.borderWidth = 1;
|
||||||
textImageButtonFactory.normalBorderColor = RGBA_Bytes.White;
|
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 SetupAccountView(this.textImageButtonFactory));
|
||||||
contentRow.AddChild(new EnterCodesView(this.textImageButtonFactory));
|
contentRow.AddChild(new EnterCodesView(this.textImageButtonFactory));
|
||||||
|
|
||||||
GuiWidget hSpacer = new GuiWidget();
|
footerRow.AddChild(new HorizontalSpacer());
|
||||||
hSpacer.HAnchor = HAnchor.ParentLeftRight;
|
|
||||||
|
|
||||||
//Add buttons to buttonContainer
|
|
||||||
footerRow.AddChild(hSpacer);
|
|
||||||
footerRow.AddChild(cancelButton);
|
footerRow.AddChild(cancelButton);
|
||||||
|
|
||||||
cancelButton.Text = "Back".Localize();
|
cancelButton.Text = "Back".Localize();
|
||||||
|
|
@ -89,7 +103,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
public class SetupPrinterView : SetupViewBase
|
public class SetupPrinterView : SetupViewBase
|
||||||
{
|
{
|
||||||
internal WizardPanel WizardPanel { get; set; }
|
internal WizardPage WizardPage { get; set; }
|
||||||
|
|
||||||
private Button disconnectButton;
|
private Button disconnectButton;
|
||||||
private TextWidget connectionStatus;
|
private TextWidget connectionStatus;
|
||||||
|
|
@ -114,7 +128,7 @@ namespace MatterHackers.MatterControl
|
||||||
buttonContainer.AddChild(printerSelectorAndEditButton);
|
buttonContainer.AddChild(printerSelectorAndEditButton);
|
||||||
|
|
||||||
var printerSelector = new PrinterSelector();
|
var printerSelector = new PrinterSelector();
|
||||||
printerSelector.AddPrinter += (s, e) => WizardPanel.WizardWindow.ChangeToSetupPrinterForm();
|
printerSelector.AddPrinter += (s, e) => WizardPage.WizardWindow.ChangeToSetupPrinterForm();
|
||||||
printerSelectorAndEditButton.AddChild(printerSelector);
|
printerSelectorAndEditButton.AddChild(printerSelector);
|
||||||
|
|
||||||
var editButton = TextImageButtonFactory.GetThemedEditButton();
|
var editButton = TextImageButtonFactory.GetThemedEditButton();
|
||||||
|
|
@ -128,7 +142,7 @@ namespace MatterHackers.MatterControl
|
||||||
disconnectButton.Click += (sender, e) =>
|
disconnectButton.Click += (sender, e) =>
|
||||||
{
|
{
|
||||||
PrinterConnectionAndCommunication.Instance.Disable();
|
PrinterConnectionAndCommunication.Instance.Disable();
|
||||||
WizardPanel.WizardWindow.ChangeToPanel<SetupWizardHome>();
|
WizardPage.WizardWindow.ChangeToPage<AndroidSetupOptionsPage>();
|
||||||
};
|
};
|
||||||
buttonContainer.AddChild(disconnectButton);
|
buttonContainer.AddChild(disconnectButton);
|
||||||
|
|
||||||
|
|
@ -20,7 +20,7 @@ using Android.Content;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
public class SetupWizardTroubleshooting : WizardPanel
|
public class SetupWizardTroubleshooting : WizardPage
|
||||||
{
|
{
|
||||||
private Button nextButton;
|
private Button nextButton;
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
//Construct buttons
|
//Construct buttons
|
||||||
cancelButton = whiteImageButtonFactory.Generate("Cancel".Localize(), centerText:true);
|
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
|
//Construct buttons
|
||||||
nextButton = textImageButtonFactory.Generate("Continue".Localize());
|
nextButton = textImageButtonFactory.Generate("Continue".Localize());
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ using MatterHackers.MatterControl.CustomWidgets;
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
//Normally step one of the setup process
|
//Normally step one of the setup process
|
||||||
public class SetupWizardWifi : WizardPanel
|
public class SetupWizardWifi : WizardPage
|
||||||
{
|
{
|
||||||
public SetupWizardWifi()
|
public SetupWizardWifi()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ using MatterHackers.Localizations;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
public class WizardPanel : GuiWidget
|
public class WizardPage : GuiWidget
|
||||||
{
|
{
|
||||||
protected FlowLayoutWidget headerRow;
|
protected FlowLayoutWidget headerRow;
|
||||||
protected FlowLayoutWidget contentRow;
|
protected FlowLayoutWidget contentRow;
|
||||||
|
|
@ -25,7 +25,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
protected GuiWidget mainContainer;
|
protected GuiWidget mainContainer;
|
||||||
|
|
||||||
public WizardPanel(string unlocalizedTextForCancelButton = "Cancel", TextImageButtonFactory textButtonFactory = null)
|
public WizardPage(string unlocalizedTextForCancelButton = "Cancel", TextImageButtonFactory textButtonFactory = null)
|
||||||
{
|
{
|
||||||
whiteImageButtonFactory = new TextImageButtonFactory()
|
whiteImageButtonFactory = new TextImageButtonFactory()
|
||||||
{
|
{
|
||||||
|
|
@ -24,7 +24,7 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
if (openToHome)
|
if (openToHome)
|
||||||
{
|
{
|
||||||
ChangeToPanel<SetupWizardHome>();
|
ChangeToPage<AndroidSetupOptionsPage>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -32,7 +32,7 @@ namespace MatterHackers.MatterControl
|
||||||
bool WifiDetected = MatterControlApplication.Instance.IsNetworkConnected();
|
bool WifiDetected = MatterControlApplication.Instance.IsNetworkConnected();
|
||||||
if (!WifiDetected)
|
if (!WifiDetected)
|
||||||
{
|
{
|
||||||
ChangeToPanel<SetupWizardWifi>();
|
ChangeToPage<SetupWizardWifi>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -64,11 +64,11 @@ namespace MatterHackers.MatterControl
|
||||||
bool showAuthPanel = ShouldShowAuthPanel?.Invoke() ?? false;
|
bool showAuthPanel = ShouldShowAuthPanel?.Invoke() ?? false;
|
||||||
if (showAuthPanel)
|
if (showAuthPanel)
|
||||||
{
|
{
|
||||||
ChangeToPanel<ShowAuthPanel>();
|
ChangeToPage<ShowAuthPanel>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ChangeToPanel<SetupStepMakeModelName>();
|
ChangeToPage<SetupStepMakeModelName>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -76,11 +76,11 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
if (ActiveSliceSettings.Instance.PrinterDrivers().Count > 0)
|
if (ActiveSliceSettings.Instance.PrinterDrivers().Count > 0)
|
||||||
{
|
{
|
||||||
ChangeToPanel<SetupStepInstallDriver>();
|
ChangeToPage<SetupStepInstallDriver>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ChangeToPanel<SetupStepComPortOne>();
|
ChangeToPage<SetupStepComPortOne>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,15 +88,15 @@ namespace MatterHackers.MatterControl
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(PrinterConnectionAndCommunication.Instance?.ActivePrinter?.BaudRate()))
|
if (string.IsNullOrEmpty(PrinterConnectionAndCommunication.Instance?.ActivePrinter?.BaudRate()))
|
||||||
{
|
{
|
||||||
ChangeToPanel<SetupStepBaudRate>();
|
ChangeToPage<SetupStepBaudRate>();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ChangeToPanel<SetupStepComPortOne>();
|
ChangeToPage<SetupStepComPortOne>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void ChangeToPanel<PanelType>() where PanelType : WizardPanel, new()
|
internal void ChangeToPage<PanelType>() where PanelType : WizardPage, new()
|
||||||
{
|
{
|
||||||
UiThread.RunOnIdle(() =>
|
UiThread.RunOnIdle(() =>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
||||||
return extruder1StlFileToSlice;
|
return extruder1StlFileToSlice;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool runInProcess = false;
|
public static bool runInProcess = true;
|
||||||
private static Process slicerProcess = null;
|
private static Process slicerProcess = null;
|
||||||
|
|
||||||
private static void CreateSlicedPartsThread()
|
private static void CreateSlicedPartsThread()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue