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) if (lvTaskList.SelectedItems.Count > 0)
{ {
var confirmResult = MessageBox.Show(this, DialogResult confirmResult = new ThreeButtonDialog(
Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING, new ThreeButtonDialog.Details(SystemIcons.Warning,
Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION, Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING,
MessageBoxButtons.YesNo, Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION),
MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); ThreeButtonDialog.ButtonYes,
ThreeButtonDialog.ButtonNo).ShowDialog(this);
if (confirmResult == DialogResult.Yes) if (confirmResult == DialogResult.Yes)
{ {
WlbScheduledTask task = TaskFromItem(lvTaskList.SelectedItems[0]); WlbScheduledTask task = TaskFromItem(lvTaskList.SelectedItems[0]);
DeleteTask(task); DeleteTask(task);
weekView1.Refresh();
} }
} }
weekView1.Refresh();
} }
private void lvTaskList_SelectedIndexChanged(object sender, EventArgs e) private void lvTaskList_SelectedIndexChanged(object sender, EventArgs e)