/// <summary> /// Determines whether the specified object is equal to the current object. /// </summary> /// <param name="obj">The object to compare with the current object.</param> /// <returns>true if the specified object is equal to the current object; otherwise, false.</returns> public override bool Equals(object obj) { Violation other = obj as Violation; if ((object)other == null) { return(false); } return(base.Equals(other) && this.CausingElement == other.CausingElement && this.Description == other.Description && this.Cell == other.Cell && this.Rule == other.Rule && this.Severity == other.Severity); }
protected override void HandleNewState(Violation.ViolationType type) { if (!load && !groupedViolation) { switch (type) { case ViolationType.NEW: DataModel.Instance.CurrentWorkbook.Violations.Add(this); break; case ViolationType.FALSEPOSITIVE: this.IsRead = true; DataModel.Instance.CurrentWorkbook.FalsePositives.Add(this); break; case ViolationType.LATER: this.IsRead = true; DataModel.Instance.CurrentWorkbook.LaterViolations.Add(this); break; case ViolationType.SOLVED: this.IsRead = false; DataModel.Instance.CurrentWorkbook.SolvedViolations.Add(this); break; } } }
public void Select(Violation violation) { this.Select(); this.SelectedViolation = violation; this.ViolationSelected = true; }
/// <summary> /// If a violation gets selected also this cell gets selected /// </summary> /// <param name="violation"></param> public void Select(Violation violation) { Select(); SelectedViolation = violation; ViolationSelected = true; }
public void Select(Violation violation) { this.Select(); this.SelectedViolation = violation; this.ViolationSelected = true; }
/// <summary> /// If a violation gets selected also this cell gets selected /// </summary> /// <param name="violation"></param> public void Select(Violation violation) { Select(); SelectedViolation = violation; ViolationSelected = true; }