Changes to file menu - Added 'Submit A Bug' and 'Add a Printer', 'About MatterControl' now opens as window.
This commit is contained in:
parent
1dff90acfc
commit
c50a650090
4 changed files with 95 additions and 6 deletions
|
|
@ -43,6 +43,29 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
|
|||
MinimumSize = new Vector2(350, 400);
|
||||
}
|
||||
|
||||
static ConnectionWindow connectionWindow = null;
|
||||
static bool connectionWindowIsOpen = false;
|
||||
public static void Show()
|
||||
{
|
||||
if (connectionWindowIsOpen == false)
|
||||
{
|
||||
connectionWindow = new ConnectionWindow();
|
||||
connectionWindowIsOpen = true;
|
||||
connectionWindow.Closed += (parentSender, e) =>
|
||||
{
|
||||
connectionWindowIsOpen = false;
|
||||
connectionWindow = null;
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if (connectionWindow != null)
|
||||
{
|
||||
connectionWindow.BringToFront();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMouseUp(MouseEventArgs mouseEvent)
|
||||
{
|
||||
base.OnMouseUp(mouseEvent);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue