From fd5c7773f5a7a35bfd8103b871d419d31b3d5433 Mon Sep 17 00:00:00 2001 From: Liang Dai Date: Fri, 3 Jun 2016 13:19:41 +0800 Subject: [PATCH 01/22] CA-150197:EN: Improvement: No confirmation message to ask if certain to delete Scheduler Signed-off-by: Liang Dai --- XenAdmin/Controls/Wlb/WlbOptModeScheduler.cs | 13 +++++++++++-- XenModel/Messages.Designer.cs | 20 +++++++++++++++++++- XenModel/Messages.ja.resx | 6 ++++++ XenModel/Messages.resx | 6 ++++++ XenModel/Messages.zh-CN.resx | 8 +++++++- 5 files changed, 49 insertions(+), 4 deletions(-) diff --git a/XenAdmin/Controls/Wlb/WlbOptModeScheduler.cs b/XenAdmin/Controls/Wlb/WlbOptModeScheduler.cs index 42a028b84..d2d28d858 100644 --- a/XenAdmin/Controls/Wlb/WlbOptModeScheduler.cs +++ b/XenAdmin/Controls/Wlb/WlbOptModeScheduler.cs @@ -646,8 +646,17 @@ namespace XenAdmin.Controls.Wlb { if (lvTaskList.SelectedItems.Count > 0) { - WlbScheduledTask task = TaskFromItem(lvTaskList.SelectedItems[0]); - DeleteTask(task); + var confirmResult = MessageBox.Show(this, + Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING, + Messages.DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION, + MessageBoxButtons.YesNo, + MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1); + + if (confirmResult == DialogResult.Yes) + { + WlbScheduledTask task = TaskFromItem(lvTaskList.SelectedItems[0]); + DeleteTask(task); + } } weekView1.Refresh(); } diff --git a/XenModel/Messages.Designer.cs b/XenModel/Messages.Designer.cs index 07338ca3c..f630645b5 100755 --- a/XenModel/Messages.Designer.cs +++ b/XenModel/Messages.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:4.0.30319.34209 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -10300,6 +10300,24 @@ namespace XenAdmin { } } + /// + /// Looks up a localized string similar to Delete WLB Optimization Scheduler. + /// + public static string DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION { + get { + return ResourceManager.GetString("DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This will delete the selected scheduler. Continue?. + /// + public static string DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING { + get { + return ResourceManager.GetString("DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING", resourceCulture); + } + } + /// /// Looks up a localized string similar to Deleted tag '{0}'. /// diff --git a/XenModel/Messages.ja.resx b/XenModel/Messages.ja.resx index 994158b59..0d4a5b557 100644 --- a/XenModel/Messages.ja.resx +++ b/XenModel/Messages.ja.resx @@ -3715,6 +3715,12 @@ VM 移行処理のパフォーマンスや信頼性を向上させるため、 VM 保護ポリシーの削除 + + Delete WLB Optimization Scheduler + + + This will delete the selected scheduler. Continue? + タグ '{0}' を削除しています diff --git a/XenModel/Messages.resx b/XenModel/Messages.resx index 03b0cdd42..e442f4777 100755 --- a/XenModel/Messages.resx +++ b/XenModel/Messages.resx @@ -3711,6 +3711,12 @@ This will also delete its subfolders. Delete VM Protection Policy + + Delete WLB Optimization Scheduler + + + This will delete the selected scheduler. Continue? + Deleting tag '{0}' diff --git a/XenModel/Messages.zh-CN.resx b/XenModel/Messages.zh-CN.resx index 21aa536d7..50c4824b5 100644 --- a/XenModel/Messages.zh-CN.resx +++ b/XenModel/Messages.zh-CN.resx @@ -1,4 +1,4 @@ - +