public void ElementRemoved(ElementRemovedEventArgs e)
 {
     this.output.Clear();
     this.output.Append("Element Removed in left file at : " + e.LineNumber + Environment.NewLine);
     this.output.Append(e.Element.TruncateChildren() + Environment.NewLine + "xPath=>" + e.XPath);
     this.output.Append(Environment.NewLine);
     this.writeToFile(this.output.ToString());
 }
 public void ElementRemoved(ElementRemovedEventArgs e)
 {
     Console.WriteLine("--E: {0,-8}: {1}", e.LineNumber, e.XPath);
     Console.WriteLine("   : {0}", e.Element);
     Console.WriteLine();
     Differences.Add(new ReportData()
     {
         DifferenceType = DifferenceType.ElementMissing,
         Xpath          = e.XPath,
         LeftLineNumber = e.LineNumber,
         OldValue       = e.Element.Value
     });
 }
Beispiel #3
0
 /// <summary>
 /// Handles the ElementRemoved event of the Diagram control.
 /// Removes representation of the removed element
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="XCase.Model.ElementRemovedEventArgs"/> instance containing the event data.</param>
 private void Diagram_ElementRemoved(object sender, ElementRemovedEventArgs e)
 {
     if (ElementRepresentations.CanDeleteElement(e.Element))
     {
         IModelElementRepresentant representant = ElementRepresentations[e.Element];
         ISelectable selectable = representant as ISelectable;
         if (selectable != null)
         {
             selectable.IsSelected = false;
             SelectedItems.Remove(selectable);
         }
         ElementRepresentations.RemoveElement(e.Element);
         representant.DeleteFromCanvas();
         InvalidateMeasure();
     }
 }
Beispiel #4
0
 public void ElementRemoved(ElementRemovedEventArgs e)
 {
     Console.WriteLine("--E: {0,-8}: {1}", e.LineNumber, e.XPath);
     Console.WriteLine("   : {0}", e.Element);
     Console.WriteLine();
 }
Beispiel #5
0
 protected virtual void OnRemoved(ElementRemovedEventArgs <T> e)
 {
     Removed?.Invoke(this, e);
 }
 public void ElementRemoved(ElementRemovedEventArgs e)
 {
     Console.WriteLine("--E: {0,-8}: {1}", e.LineNumber, e.XPath);
     Console.WriteLine("   : {0}", e.Element);
     Console.WriteLine();
 }