CA-150197:EN: Improvement: No confirmation message to ask if certain to delete Scheduler

Signed-off-by: Liang Dai <liang.dai1@citrix.com>
This commit is contained in:
Liang Dai 2016-06-06 15:55:40 +08:00
parent fd5c7773f5
commit 2a874bbf40

View File

@ -646,19 +646,20 @@ namespace XenAdmin.Controls.Wlb
{
if (lvTaskList.SelectedItems.Count > 0)
{
var confirmResult = MessageBox.Show(this,
Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING,
Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION,
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
DialogResult confirmResult = new ThreeButtonDialog(
new ThreeButtonDialog.Details(SystemIcons.Warning,
Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING,
Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION),
ThreeButtonDialog.ButtonYes,
ThreeButtonDialog.ButtonNo).ShowDialog(this);
if (confirmResult == DialogResult.Yes)
{
WlbScheduledTask task = TaskFromItem(lvTaskList.SelectedItems[0]);
DeleteTask(task);
weekView1.Refresh();
}
}
weekView1.Refresh();
}
private void lvTaskList_SelectedIndexChanged(object sender, EventArgs e)