Example #1
0
 private void SetCounterGenerator_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     try
     {
         GeneratorDialog diag = new GeneratorDialog(cursorViewer.Selection.Variable, GeneratorType.Counter);
         if (diag.ShowDialog() == true)
         {
             BaseGenerator generator = diag.Generator;
             generator.Fill(cursorViewer.Selection.Variable.Signal, cursorViewer.Selection.Start, cursorViewer.Selection.End);
             cursorViewer.Selection = null;
             UpdateSignalView();
             core.IsModified = true;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }