Ejemplo n.º 1
0
        public bool Equals(WorkspaceConfiguration other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            bool allProperiesEqual = Name == other.Name &&
                                     GroupByAttributeName == other.GroupByAttributeName &&
                                     HighlightPast == other.HighlightPast &&
                                     AreTooltipsEnabled == other.AreTooltipsEnabled &&
                                     IsDataRowEnabled == other.IsDataRowEnabled &&
                                     IsPlotRowEnabled == other.IsPlotRowEnabled &&
                                     ShowCountData == other.ShowCountData &&
                                     ShowDurationData == other.ShowDurationData &&
                                     RelativeDuration == other.RelativeDuration &&
                                     PlotType == other.PlotType &&
                                     PlotInterval == other.PlotInterval &&
                                     RelativeStartTime == other.RelativeStartTime &&
                                     ShowCurrentTime == other.ShowCurrentTime &&
                                     ShowHorizontalGridLines == other.ShowHorizontalGridLines &&
                                     ShowVerticalGridLines == other.ShowVerticalGridLines &&
                                     UseRelativeTime == other.UseRelativeTime &&
                                     OperationColorAttribute == other.OperationColorAttribute;

            if (!allProperiesEqual)
            {
                return(false);
            }

            if ((this.SelectedAttributes == null) && (other.SelectedAttributes == null))
            {
                return(true);
            }

            if ((this.SelectedAttributes == null) || (other.SelectedAttributes == null))
            {
                return(false);
            }

            if (this.SelectedAttributes.Count != other.SelectedAttributes.Count)
            {
                return(false);
            }

            return(this.SelectedAttributes.Count == 0 || SelectedAttributes.Any(s => other.SelectedAttributes.Contains(s)));
        }
Ejemplo n.º 2
0
 public void RemoveAttribute(string text)
 {
     SelectedAttributes.Remove(text);
     SetPropertyChanged(nameof(CanContinue));
 }
Ejemplo n.º 3
0
 public void RemoveAttribute(string text)
 {
     SelectedAttributes.Remove(text);
 }
Ejemplo n.º 4
0
 public void AddAttribute(string text)
 {
     SelectedAttributes.Add(text);
 }
Ejemplo n.º 5
0
 public bool IsBaseCombination()
 {
     return(SelectedAttributes.All(x => x.SelectedOption.Equals(AttributeOption.AnyValue)));
 }