Exemple #1
0
 private void okButton_Clicked(object sender, RoutedEventArgs e)
 {
     if (!ValidateAll())
     {
         return;
     }
     viewModel.Save();
     this.DialogResult = true;
 }
Exemple #2
0
        private static void ReplaceIfThenElses(ControlConstructSchemeVM controlConstructScheme, Dictionary <IfThenElseVM, CreateBranchWindowVM> updatingIfThenElseDict)
        {
            Dictionary <IfThenElseVM, IfThenElseVM> ifThenElses = new Dictionary <IfThenElseVM, IfThenElseVM>();

            foreach (KeyValuePair <IfThenElseVM, CreateBranchWindowVM> pair in updatingIfThenElseDict)
            {
                IfThenElseVM         ifThenElse = pair.Key;
                CreateBranchWindowVM vm         = pair.Value;
                vm.Save();
                IfThenElseVM newIfThenElse = new IfThenElseVM(vm.IfThenElse);
                controlConstructScheme.ReplaceIfThenElse(ifThenElse, newIfThenElse);
            }
        }