B2019-101 Change dialog message and exit button based on whether there are child windows open

This commit is contained in:
2019-08-02 14:47:45 +00:00
parent 2b74bd52ab
commit 5923641a41
2 changed files with 24 additions and 11 deletions

View File

@@ -28,11 +28,21 @@ namespace VEPROMS
get { return _ExitPROMS; }
set { _ExitPROMS = value; }
}
public DlgCloseTabsOrExit()
public DlgCloseTabsOrExit(bool isMainWindow, bool hasChildWindows)
{
InitializeComponent();
if (!isMainWindow)
{
// B2019-101 if closing a child window change the dialog message and exit button text - Separate Windows
labelX1.Text = "Do you want to Close the Current Tab or\nClose this Separate Window?";
BtnExitPROMS.Text = "Close Separate Window";
}
else if (hasChildWindows)
{
// B2019-101 if closing a th main window and there are child windows then change the dialog message and exit button text - Separate Windows
labelX1.Text = "Do you want to Close the Current Tab or\nClose All Separate Windows and Exit PROMS?";
}
}
private void BtnClsTab_Click(object sender, EventArgs e)
{
_Cancel = false;