private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            e.Cancel = true;

            MessageBoxDialog messageDialog = new MessageBoxDialog();
            ConfigurationActionViewModel configurationActionViewModel = ((MainWindowViewModel)this.DataContext).ConfigurationActionViewDataContext;
            if (null != configurationActionViewModel.SelectedActionViewModel)
            {
                SettingsViewModelBase selectedActionViewModel = configurationActionViewModel.SelectedActionViewModel;
                if (true == selectedActionViewModel.IsChanged)
                {
                    messageDialog.Show(QuitApplication, "Warning", String.Format("The action {0} are not saved. Do you want to quit application?", selectedActionViewModel.Action.Name), MessageBoxButton.YesNo);
                    return;
                }
            }

            messageDialog.Show(QuitApplication, "Quit application?", "Do you want to quit application?", MessageBoxButton.YesNo);
        }
        private void CreateCopyAction()
        {
            bool isComplete = CheckCompletedActionViewModel(m_SelectedActionViewModel);
            if (true == isComplete)
            {
                ConfirmActionNameViewModel confirmActionNameVM = new ConfirmActionNameViewModel(m_ActionViewModels);
                ConfirmActionNameWindow confirmActionNameWindow = new ConfirmActionNameWindow();
                confirmActionNameWindow.DataContext = confirmActionNameVM;

                if (true == confirmActionNameWindow.ShowDialog())
                {
                    string defaultActionName = confirmActionNameVM.ActionName;

                    CopyActionModel action = new CopyActionModel();
                    action.Name = defaultActionName;
                    action.Sources = new List<DragDropData>();
                    action.Destinations = new List<DragDropData>();

                    CopyActionViewModel actionVM = new CopyActionViewModel(action);
                    ActionViewModels.Add(actionVM);

                    SelectedViewModelsIndex(m_ActionViewModels.Count - 1);
                }
            }
            else
            {
                MessageBoxDialog messageDialog = new MessageBoxDialog();
                messageDialog.Show(CanExecuteActionCallback, "Information", String.Format("Cannot create new action now. The action {0} must be completed or saved first.", m_SelectedActionViewModel.Action.Name),
                                   MessageBoxButton.OK);
            }
        }
 private void SaveChangedProcess(SettingsViewModelBase viewModel)
 {
     MessageBoxDialog messageDialog = new MessageBoxDialog();
     messageDialog.Show(SaveChangedCallback, "Confirm", String.Format("Do you want to save changed in {0}?", m_SelectedActionViewModel.Action.Name),
                        MessageBoxButton.YesNoCancel);
 }
 private void CanExecuteActionProcess(SettingsViewModelBase viewModel)
 {
     MessageBoxDialog messageDialog = new MessageBoxDialog();
     messageDialog.Show(CanExecuteActionCallback, "Warning", String.Format("Sources or destinations of {0} cannot empty.", viewModel.Action.Name),
                        MessageBoxButton.OK);
 }