Esempio n. 1
0
 public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
 {
     if (values != null && values.Length == 3 &&
         values[0] is bool isEnabled &&
         values[1] is Scenario currentScenario &&
         values[2] is IEnumerable <Scenario> &&
         !isEnabled &&
         currentScenario.NatureCode == KnownScenarioNatures.Realized)
     {
         return(_converter.Convert(new [] { values[1], values[2] }, targetType, parameter, culture));
     }
     return(string.Format(LocalizeExtension.ShortcutStringFormat,
                          _localizationManager.GetValue("View_PrepareScenarios_Remove_Tooltip"),
                          ShortcutsManager.Manager[Shortcut.Delete]));;
 }