using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace VEPROMS { // B2019-071 Dialog will ask user if he wants to close the current tab, exit PROMS, or cancel // This is displayed when user click on the PROMS X (upper right corner), V button Exit, or the Word X button inside a Word attachment public partial class DlgCloseTabsOrExit : DevComponents.DotNetBar.Office2007Form { private bool _Cancel = true; public bool Cancel { get { return _Cancel; } } private bool _ExitPROMS; public bool ExitPROMS { get { return _ExitPROMS; } set { _ExitPROMS = value; } } 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; _ExitPROMS = false; this.Hide(); } private void BtnExitPROMS_Click(object sender, EventArgs e) { _Cancel = false; _ExitPROMS = true; this.Hide(); } private void btnCancel_Click(object sender, EventArgs e) { _Cancel = true; _ExitPROMS = false; this.Hide(); } } }