private void RemoveCommand_OnExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            var item = (CompositionItem)e.Parameter;

            var res = new MessageBoxBuilder()
                      .Owner(this)
                      .Caption(Title)
                      .Text(LocalizedStrings.Str2884Params.Put(item.Element.Name))
                      .Button(MessageBoxButton.YesNo)
                      .Icon(MessageBoxImage.Question)
                      .Show();

            if (res != MessageBoxResult.Yes)
            {
                return;
            }

            _strategiesRegistry.Remove(item);
        }
Exemple #2
0
 private void StrategiesControl_OnRemoved(DiagramElementsControl ctrl, CompositionDiagramElement element)
 {
     _strategiesRegistry.Remove(element, false);
     SelectElement(null, false);
 }