Ejemplo n.º 1
0
        public void ChangeQuestionNumbers()
        {
            ChangeMultipleQuestionNumberWindowVM vm     = new ChangeMultipleQuestionNumberWindowVM(this);
            ChangeMultipleQuestionNumberWindow   window = new ChangeMultipleQuestionNumberWindow(vm);

            window.Owner = Application.Current.MainWindow;
            if (window.ShowDialog() == true)
            {
                using (UndoTransaction tx = new UndoTransaction(UndoManager))
                {
                    if (SequenceUtils.RenumberQuestionNumbers(this, vm.QuestionNumbers))
                    {
                        UpdateModel(false);
                        tx.Commit();
                    }
                }
            }
        }
 public ChangeMultipleQuestionNumberWindow(ChangeMultipleQuestionNumberWindowVM viewModel)
 {
     InitializeComponent();
     this.viewModel = viewModel;
     DataContext    = viewModel;
 }