Ejemplo n.º 1
0
        /// <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);
        }
Ejemplo n.º 2
0
 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;
         }
     }
 }
Ejemplo n.º 3
0
 public void Select(Violation violation)
 {
     this.Select();
     this.SelectedViolation = violation;
     this.ViolationSelected = true;
 }
Ejemplo n.º 4
0
 /// <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;
 }
Ejemplo n.º 5
0
 public void Select(Violation violation)
 {
     this.Select();
     this.SelectedViolation = violation;
     this.ViolationSelected = true;
 }
Ejemplo n.º 6
0
 /// <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;
 }