private void OnPropertyChanged(object sender, PropertyChangedEventArgs args) { if (string.IsNullOrEmpty(args.PropertyName) || args.PropertyName == "Data") { ConflictInfoCollection data = (ConflictInfoCollection)this.Data; ConflictDataPoint dataPoint = (ConflictDataPoint)this.DataPoint; if (data != null) { this.HasDetails = true; this.ConflictViewModel.LatestVersion = data.LatestVersion; this.ConflictViewModel.FilePath = dataPoint.MethodIdentifier.FilePath; if (data.Count > 1) { this.Descriptor = string.Format(CultureInfo.CurrentCulture, Strings.MultipleConflictsDetected, data.Count); } else if (data.Count == 1) { this.Descriptor = Strings.SingleConflictDetected; } } else { this.HasDetails = false; this.Descriptor = string.Empty; this.ConflictViewModel.LatestVersion = null; } } }
public ConflictDataPointViewModel(ConflictDataPoint dataPoint) : base(dataPoint) { this.PropertyChanged += this.OnPropertyChanged; this.ConflictViewModel = new ConflictViewModel(dataPoint.EditingSession.SCCService); }