public void DeletePartition(Model.PartitionArchive partitionArchive) { DeleteConfirmDialog.Message = String.Format(SR.AdminPartitionArchive_DeleteDialog_AreYouSure, partitionArchive.Description); DeleteConfirmDialog.MessageType = MessageBox.MessageTypeEnum.YESNO; DeleteConfirmDialog.Data = partitionArchive.GetKey(); DeleteConfirmDialog.Show(); }
/// <summary> /// Pops up a dialog box to let user to reschedule a work queue item /// </summary> private void RescheduleWorkQueueItem(Model.WorkQueue item) { if (item == null) { MessageBox.BackgroundCSS = string.Empty; MessageBox.Message = SR.SelectedWorkQueueNoLongerOnTheList; MessageBox.MessageStyle = "color: red; font-weight: bold;"; MessageBox.MessageType = MessageBox.MessageTypeEnum.ERROR; MessageBox.Show(); return; } var keys = new List<ServerEntityKey>(); keys.Add(item.GetKey()); ScheduleWorkQueueDialog.WorkQueueKeys = keys; if (WorkQueueItemDetailsPanel.WorkQueue != null) { if (WorkQueueItemDetailsPanel.WorkQueue.WorkQueueStatusEnum == WorkQueueStatusEnum.Failed) { MessageBox.Message = SR.WorkQueueRescheduleFailed_ItemHasFailed; MessageBox.MessageType = MessageBox.MessageTypeEnum.ERROR; MessageBox.Show(); return; } if (WorkQueueItemDetailsPanel.WorkQueue.WorkQueueStatusEnum == WorkQueueStatusEnum.InProgress) { MessageBox.Message = SR.WorkQueueBeingProcessed; MessageBox.MessageType = MessageBox.MessageTypeEnum.ERROR; MessageBox.Show(); return; } ScheduleWorkQueueDialog.Show(); } }