Exemple #1
0
 private WorkItemConfigurationTransformationItemEditorDialog(WorkItemConfigurationTransformationItem transformation, bool canCancel)
 {
     InitializeComponent();
     this.Transformation         = transformation;
     this.cancelButton.IsEnabled = canCancel;
     this.workItemConfigurationItemTypesComboBox.ItemsSource = Enum.GetValues(typeof(WorkItemConfigurationItemType)).Cast <WorkItemConfigurationItemType>().Select(t => new { Key = t, Value = WorkItemConfigurationItem.GetDisplayName(t) });
 }
Exemple #2
0
 protected override void OnObservablePropertyChanged(ObservablePropertyChangedEventArgs e)
 {
     base.OnObservablePropertyChanged(e);
     if (!string.IsNullOrEmpty(this.Description))
     {
         this.DisplayName = this.Description;
     }
     else
     {
         this.DisplayName = "{0} transformation of {1}".FormatCurrent(this.TransformationType.ToString().ToUpper(), WorkItemConfigurationItem.GetDisplayName(this.WorkItemConfigurationItemType, this.WorkItemTypeNames));
     }
     this.IsValid = !string.IsNullOrWhiteSpace(this.TransformationXml);
 }
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return(WorkItemConfigurationItem.GetDisplayName((WorkItemConfigurationItemType)value));
 }