Esempio n. 1
0
 void tlVectorControl1_DocumentChanged(object sender, DocumentChangedEventArgs e)
 {
     if (e.ChangeElements.Length > 0) {
         string larid = "";
         if (((SvgElement)e.ChangeElements[0]) != null) {
             larid = ((SvgElement)e.ChangeElements[0]).GetAttribute("layer");
             if (!ChangeLayerList.Contains(larid)) {
                 ChangeLayerList.Add(larid);
             }
         }
     }
 }
Esempio n. 2
0
 private void vectorControl_DocumentChanged(object sender, DocumentChangedEventArgs e)
 {
     this.viewPic.Invalidate();
 }
 void tlVectorControl1_DocumentChanged(object sender, DocumentChangedEventArgs e)
 {
     if (tlVectorControl1.Operation == ToolOperation.InterEnclosurePrint)
     {
         tlVectorControl1.Operation = ToolOperation.Select;
     }
 }
Esempio n. 4
0
 void SVGDocument_OnDocumentChanged(object sender, DocumentChangedEventArgs e)
 {
     //string a = tlVectorControl1.SVGDocument.CurrentLayer.ID;
     //MessageBox.Show(a);
 }
Esempio n. 5
0
        void tlVectorControl1_DocumentChanged(object sender, DocumentChangedEventArgs e)
        {
            string larid = tlVectorControl1.SVGDocument.CurrentLayer.ID;

            if (!ChangeLayerList.Contains(larid))
            {
                ChangeLayerList.Add(larid);
            }
            if (tlVectorControl1.Operation == ToolOperation.InterEnclosurePrint)
            {
                tlVectorControl1.Operation = ToolOperation.Select;
            }
        }
Esempio n. 6
0
 private void ChangeDocument(object sender, DocumentChangedEventArgs e)
 {
     if (this.DocumentChanged!=null)
     {
         this.DocumentChanged(this,e);
     }
 }
Esempio n. 7
0
 private void DocumentChanged(object sender, DocumentChangedEventArgs e)
 {
     if (e.ChangeAction == ChangeAction.None)
     {
         base.Invalidate();
     }
     else if (e.ChangeElements != null)
     {
         this.changeelements.AddRange(e.ChangeElements);
     }
 }
Esempio n. 8
0
 public void ChangeElementExpand(SvgElement changeelement, bool oldexpand, bool animate)
 {
     if ((changeelement is IContainer) && !animate)
     {
         SvgElementCollection collection1 = new SvgElementCollection();
         if ((changeelement is IGraph) && !(changeelement is ClipPath))
         {
             SvgElement element1 = ((IGraph) changeelement).ClipPath;
             if (element1 != null)
             {
                 collection1.Add(element1);
             }
         }
         collection1.AddRange(((IContainer) changeelement).ChildList);
         if (this.serialize != null)
         {
             this.serialize.UpdateElementChilds(changeelement, oldexpand, collection1);
         }
     }
     else if (animate)
     {
         SvgElementCollection collection2 = new SvgElementCollection();
         collection2.AddRange(changeelement.AnimateList);
         if (this.serialize != null)
         {
             this.serialize.UpdateElementChilds(changeelement, oldexpand, collection2);
         }
     }
     if (this.OnDocumentChanged != null)
     {
         DocumentChangedEventArgs args1 = new DocumentChangedEventArgs();
         SvgElement[] elementArray1 = new SvgElement[1] { changeelement } ;
         args1.ChangeElements = elementArray1;
         this.OnDocumentChanged(this, args1);
     }
 }
Esempio n. 9
0
 private void ChangeNode(object sender, XmlNodeChangedEventArgs e)
 {
     if (((e.Action == XmlNodeChangedAction.Remove) && (e.OldParent is SvgElement)) && (e.Node is XmlAttribute))
     {
         ((SvgElement) e.OldParent).RemoveAttribute((XmlAttribute) e.Node);
     }
     else if ((e.NewParent is SvgElement) && (e.Node is XmlAttribute))
     {
         ((SvgElement) e.NewParent).AddAttribute((XmlAttribute) e.Node);
     }
     if (this.AcceptChanges && !this.firstload)
     {
         this.Update = false;
         XmlNode node1 = e.Node;
         XmlNode node2 = e.NewParent;
         XmlNode node3 = e.OldParent;
         XmlNodeChangedAction action1 = e.Action;
         SvgElement element1 = null;
         int num1 = this.undoGroup.Count;
         if ((this.ChangeElements.Count > 0) && (num1 < this.ChangeElements.Count))
         {
             element1 = (SvgElement) this.ChangeElements[num1];
         }
         if (node3 is SvgElement)
         {
             ((SvgElement) node3).pretime = -1;
         }
         if (node2 is SvgElement)
         {
             ((SvgElement) node2).pretime = -1;
         }
         if (element1 != null)
         {
             element1.pretime = -1;
         }
         UnDoOperation operation1 = new UnDoOperation(this, node1, node3, node2, action1, element1);
         this.PushUndo(operation1);
         if (this.OnDocumentChanged != null)
         {
             DocumentChangedEventArgs args1 = new DocumentChangedEventArgs();
             args1.ChangeElements = new ISvgElement[this.ChangeElements.Count];
             this.ChangeElements.CopyTo(args1.ChangeElements, 0);
             this.OnDocumentChanged(this, args1);
         }
     }
     else
     {
         this.ChangeElements.Clear();
     }
 }
Esempio n. 10
0
 public void Undo()
 {
     if (this.undoStack.CanUndo)
     {
         SvgElement[] elementArray1 = this.undoStack.Undo();
         if (elementArray1 != null)
         {
             DocumentChangedEventArgs args1 = new DocumentChangedEventArgs();
             args1.ChangeElements = elementArray1;
             if (this.OnDocumentChanged != null)
             {
                 this.OnDocumentChanged(this, args1);
             }
         }
     }
 }
Esempio n. 11
0
 public void PostChange(ISvgElement[] elements, ChangeAction action)
 {
     if (this.OnDocumentChanged != null)
     {
         DocumentChangedEventArgs args1 = new DocumentChangedEventArgs();
         args1.ChangeElements = elements;
         args1.ChangeAction = action;
         this.OnDocumentChanged(this, args1);
     }
 }