00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 using System;
00013 using System.Windows.Forms;
00014
00015 namespace Mcs.Epm.MicrosoftProject.mpFx.WinForms
00016 {
00017
00018
00019
00020 public partial class DeleteProjectForm : Form
00021 {
00022 #region Instance Data
00023
00024 private readonly string _ProjectName;
00025
00026 #endregion
00027
00028 #region Public Properties
00029
00030 public bool DeleteWSS
00031 {
00032 get { return deleteSharePointSiteCheckBox.Checked; }
00033 }
00034
00035 public bool DeleteBoth
00036 {
00037 get { return deletePublishedCheckBox.Checked; }
00038 }
00039
00040 #endregion
00041
00042 #region Constructor
00043
00044 public DeleteProjectForm(string projectName)
00045 {
00046 InitializeComponent();
00047
00048 _ProjectName = projectName;
00049 projectNameTextBox.Text = projectName;
00050 }
00051
00052 #endregion
00053
00054 #region Event Handlers
00055
00056 private void deleteButton_Click(object sender,
00057 EventArgs e)
00058 {
00059 DialogResult = DialogResult.Yes;
00060 }
00061
00062 private void DeleteProjectForm_Load(object sender,
00063 EventArgs e)
00064 {
00065 if (MessageBox.Show(this,
00066 string.Format("Are you sure you want to delete '{0}? This action cannot be undone.", _ProjectName),
00067 "Test",
00068 MessageBoxButtons.YesNo,
00069 MessageBoxIcon.Question) == DialogResult.No)
00070 {
00071 Close();
00072 }
00073 }
00074
00075 #endregion
00076 }
00077 }