public void ConfirmDelete()
{
var footer = MainAreaTimelineResources.MsgDeleteFooter;
var amendkey = KeyAssignManager.CurrentProfile
.FindAssignFromActionName("Amend", KeyAssignGroup.Input)
.FirstOrDefault();
if (amendkey != null)
{
footer = MainAreaTimelineResources.MsgDeleteFooterWithKeyFormat
.SafeFormat(amendkey.GetKeyDescribeString());
}
var response = Parent.Messenger.GetResponseSafe(() =>
new TaskDialogMessage(new TaskDialogOptions
{
Title = MainAreaTimelineResources.MsgDeleteTitle,
MainIcon = VistaTaskDialogIcon.Warning,
MainInstruction = MainAreaTimelineResources.MsgDeleteInst,
Content = MainAreaTimelineResources.MsgDeleteContent,
CustomButtons = new[] { MainAreaTimelineResources.MsgDeleteCmdDelete, Resources.MsgButtonCancel },
AllowDialogCancellation = true,
DefaultButtonIndex = 0,
FooterIcon = VistaTaskDialogIcon.Information,
FooterText = footer
}));
if (response.Response.CustomButtonResult == 0)
{
Delete();
}
}