GuiWiget Children working as a SafeList

This commit is contained in:
LarsBrubaker 2019-06-28 22:22:58 -07:00 committed by jlewin
parent 106db7e7f1
commit 58e77cfe60
40 changed files with 104 additions and 102 deletions

View file

@ -62,7 +62,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
// Construct buttons
nextButton = theme.CreateDialogButton("Done".Localize());
nextButton.Click += (s, e) => UiThread.RunOnIdle(Parent.Close);
nextButton.Click += (s, e) => Parent.Close();
nextButton.Visible = false;
connectButton = theme.CreateDialogButton("Connect".Localize());
@ -191,7 +191,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
printerComPortError.Text = "Connection succeeded".Localize() + "!";
nextButton.Visible = true;
connectButton.Visible = false;
UiThread.RunOnIdle(() => this?.Parent?.Close());
this?.Parent?.Close();
}
else if (printer.Connection.CommunicationState != CommunicationStates.AttemptingToConnect)
{