Exemplo n.º 1
0
 public StringOperationPrototype(StringOperation prototypeOperation, Window contextWindow)
 {
     prototype          = prototypeOperation;
     AddContext         = contextWindow as MainWindow;
     CreateNewOperation = new DelegateCommand(temp => {
         StringOperation tempOperation = prototype.Clone();
         AddContext.operationsList.Add(tempOperation);
         try
         {
             tempOperation.OpenDialog();
         }
         catch
         {
             //do nothing
         }
     }
                                              , null);
 }
Exemplo n.º 2
0
        private void DeleteButton_Click(object sender, RoutedEventArgs e)
        {
            StringOperation local = ((sender as System.Windows.Controls.Button).Tag as StringOperation);

            operationsList.Remove(local);
        }