SourceCode/PROMS/VEPROMS User Interface/DlgCloseTabsOrExit.cs
John fd00dc14ea B2019-071 If X in PROMS or in Word (attachment) is clicked, prompt user if we should close the current tab or close PROMS
B2019-071 Dialog that asks user if s/he wants to close the current tab, exit PROMS, or cancel
2019-05-30 13:43:17 +00:00

58 lines
1.2 KiB
C#

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()
{
InitializeComponent();
}
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();
}
}
}