// Methods public UndoStack() { this.undostack = new Stack(); this.redostack = new Stack(); this.tempstack = null; this.subundo = false; this.AcceptChanges = false; this.Dispose = false; }
// Methods public TextOperation(MouseArea mc) { this.currrentText = null; this.caretvisible = true; this.selectionstart = 0; this.selectionlength = 0; this.hmargin = 5; this.vmargin = 5; this.doc = null; this.activeText = null; this.sf = StringFormat.GenericTypographic; this.paint = Color.Black; this.stroke = Color.Black; this.font = new Font("Arial", 12f); this.caretChar = null; this.caretRect = RectangleF.Empty; this.startindex = 0; this.scale = 1f; this.scaleMatrix = new Matrix(); this.mouseAreaControl = null; this.editmode = false; this.preText = null; this.recordanim = true; this.undostack = new UndoStack(); this.enterUpdate = false; this.chars = new ArrayList(0x10); this.caretindex = 0; this.mouseAreaControl = mc; mc.Focus(); this.caretthread = new Thread(new ThreadStart(this.CaretMethod)); this.caretthread.IsBackground = true; this.caretthread.Start(); this.mouseAreaControl.Cursor = Cursors.IBeam; this.mouseAreaControl.KeyPress += new KeyPressEventHandler(this.OnKeyPress); this.sf.LineAlignment = StringAlignment.Near; }
public SvgDocument() { this.styleElements = new ArrayList(); this.recordanim = true; this.playAnim = false; this.controltime = 0; this.filename = "���"; this.update = true; this.undoStack = new UndoStack(); this.xmlreader = null; this.preelement = null; this.elements = new ArrayList(0x10); this.infos = new Hashtable(0x10); this.groups = new ArrayList(0x10); this.undoGroup = new ArrayList(0x10); this.errorinfos = new ArrayList(0x10); this.selectCollection = new SvgElementCollection(); this.oldSelect = new SvgElementCollection(); this.root = null; this.serialize = null; this.editRoots = new SvgElementCollection(); //this.styleSheetList = null; this.ChangeElements = new SvgElementCollection(); this.NumberOfUndoOperations = 1; this.ValidPath = new GraphicsPath(); this.firstload = false; this.FilePath = string.Empty; this.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; this.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault; this.Changed = false; this.SelectChanged = false; this.OnlyShowCurrent = false; this.DefsChanged = true; this.OldControlTime = 0; this.PlayAnimChanged = false; this.AutoShowAnim = false; this.XmlParserContext = null; XmlNamespaceManager manager1 = new XmlNamespaceManager(base.NameTable); manager1.PushScope(); manager1.AddNamespace("svg", SvgDocument.SvgNamespace); manager1.AddNamespace("xlink", SvgDocument.XLinkNamespace); manager1.AddNamespace("a", SvgDocument.AudioNamespace); manager1.AddNamespace("tonli", SvgDocument.TonliNamespace); base.NodeChanged += new XmlNodeChangedEventHandler(this.ChangeNode); base.NodeInserted += new XmlNodeChangedEventHandler(this.ChangeNode); base.NodeRemoved += new XmlNodeChangedEventHandler(this.ChangeNode); this.XmlParserContext = new System.Xml.XmlParserContext(base.NameTable, manager1, "", "svg", "-//W3C//DTD SVG 1.1//EN", "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd", this.BaseURI, "zh", XmlSpace.None, Encoding.UTF8); this.selectCollection.NotifyEvent = true; this.selectCollection.OnCollectionChangedEvent += new OnCollectionChangedEventHandler(this.ChangeSelect); this.serialize = new SerializeDocument(this); this.AddStyleElement(SvgDocument.SvgNamespace, "style"); this.SvgdataUid=string.Empty; layers =new SvgElementCollection(); }