Merge pull request #1011 from fillzero/master

CA-150197: Improvement: No confirmation message before delete wlb scheduler
This commit is contained in:
Mihaela Stoica 2016-06-06 13:38:29 +01:00
commit 41f749e941
5 changed files with 51 additions and 5 deletions

View File

@ -645,12 +645,22 @@ namespace XenAdmin.Controls.Wlb
private void buttonDelete_Click(object sender, EventArgs e)
{
if (lvTaskList.SelectedItems.Count > 0)
{
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();
}
}
}
private void lvTaskList_SelectedIndexChanged(object sender, EventArgs e)
{

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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 {
}
}
/// <summary>
/// Looks up a localized string similar to Delete WLB Optimization Scheduler.
/// </summary>
public static string DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION {
get {
return ResourceManager.GetString("DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to This will delete the selected scheduler. Continue?.
/// </summary>
public static string DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING {
get {
return ResourceManager.GetString("DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Deleted tag &apos;{0}&apos;.
/// </summary>

View File

@ -3715,6 +3715,12 @@ VM 移行処理のパフォーマンスや信頼性を向上させるため、
<data name="DELETE_VM_PROTECTION_TITLE" xml:space="preserve">
<value>VM 保護ポリシーの削除</value>
</data>
<data name="DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION" xml:space="preserve">
<value>Delete WLB Optimization Scheduler</value>
</data>
<data name="DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING" xml:space="preserve">
<value>This will delete the selected scheduler. Continue?</value>
</data>
<data name="DELETING_ALL_TAG" xml:space="preserve">
<value>タグ '{0}' を削除しています</value>
</data>

View File

@ -3711,6 +3711,12 @@ This will also delete its subfolders.</value>
<data name="DELETE_VM_PROTECTION_TITLE" xml:space="preserve">
<value>Delete VM Protection Policy</value>
</data>
<data name="DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION" xml:space="preserve">
<value>Delete WLB Optimization Scheduler</value>
</data>
<data name="DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING" xml:space="preserve">
<value>This will delete the selected scheduler. Continue?</value>
</data>
<data name="DELETING_ALL_TAG" xml:space="preserve">
<value>Deleting tag '{0}'</value>
</data>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
@ -3710,6 +3710,12 @@
<data name="DELETE_VM_PROTECTION_TITLE" xml:space="preserve">
<value>删除 VM 保护策略</value>
</data>
<data name="DELETE_WLB_OPTIMIZATION_SCHEDULE_CAPTION" xml:space="preserve">
<value>删除 WLB 优化模式</value>
</data>
<data name="DELETE_WLB_OPTIMIZATION_SCHEDULE_WARNING" xml:space="preserve">
<value>是否确实要删除选中的优化模式?</value>
</data>
<data name="DELETING_ALL_TAG" xml:space="preserve">
<value>正在删除标记“{0}”</value>
</data>