public XMLElement(XmlNode xmlNode, XMLEditor xmlEditor) { this._xmlNode = xmlNode; this._xmlEditor = xmlEditor; this._xmlEditor.CursorRoh.ChangedEvent += new EventHandler(this.Cursor_ChangedEvent); this._xmlEditor.MouseDownEvent += new MouseEventHandler(this._xmlEditor_MouseDownEvent); this._xmlEditor.MouseUpEvent += new MouseEventHandler(this._xmlEditor_MouseUpEvent); this._xmlEditor.MouseDownMoveEvent += new MouseEventHandler(this._xmlEditor_MouseDownMoveEvent); this._xmlEditor.xmlElementeAufraeumenEvent += new EventHandler(this._xmlEditor_xmlElementeAufraeumenEvent); }
public XMLElement_TextNode(XmlNode xmlNode, XMLEditor xmlEditor) : base(xmlNode, xmlEditor) { if (XMLElement_TextNode._drawFont == null) { XMLElement_TextNode._drawFormat = (StringFormat)StringFormat.GenericTypographic.Clone(); XMLElement_TextNode._drawFormat.FormatFlags = (XMLElement_TextNode._drawFormat.FormatFlags | StringFormatFlags.MeasureTrailingSpaces); XMLElement_TextNode._drawFormat.Trimming = StringTrimming.None; XMLElement_TextNode._drawFont = new Font("Courier New", 10f, GraphicsUnit.Point); XMLElement_TextNode._breiteProBuchstabe = ToolboxUsercontrols.MeasureDisplayStringWidth(xmlEditor.ZeichnungsSteuerelement.CreateGraphics(), "W", XMLElement_TextNode._drawFont, XMLElement_TextNode._drawFormat); XMLElement_TextNode._hoeheProBuchstabe = XMLElement_TextNode._drawFont.Height; } this.FarbenSetzen(); }
public XMLElement_StandardNode(XmlNode xmlNode, XMLEditor xmlEditor) : base(xmlNode, xmlEditor) { if (XMLElement_StandardNode._drawFontNodeName == null) { XMLElement_StandardNode._drawFormat = (StringFormat)StringFormat.GenericTypographic.Clone(); XMLElement_StandardNode._drawFormat.FormatFlags |= StringFormatFlags.MeasureTrailingSpaces; XMLElement_StandardNode._drawFormat.Trimming = StringTrimming.None; XMLElement_StandardNode._drawFontNodeName = new Font("Arial", 10f, GraphicsUnit.Point); XMLElement_StandardNode._hoeheProBuchstabeNodeName = XMLElement_StandardNode._drawFontNodeName.Height; XMLElement_StandardNode._drawFontAttribute = new Font("Courier New", 8f, GraphicsUnit.Point); XMLElement_StandardNode._breiteProBuchstabeAttribute = ToolboxUsercontrols.MeasureDisplayStringWidth(xmlEditor.ZeichnungsSteuerelement.CreateGraphics(), "W", XMLElement_StandardNode._drawFontAttribute, XMLElement_StandardNode._drawFormat); XMLElement_StandardNode._hoeheProBuchstabeAttribut = XMLElement_StandardNode._drawFontAttribute.Height; } this._ankerEinzugY = XMLElement_StandardNode._hoeheProBuchstabeNodeName / 2 + 2; }
protected virtual void Dispose(bool disposing) { if (!this._disposed && disposing) { this._xmlEditor.CursorRoh.ChangedEvent -= new EventHandler(this.Cursor_ChangedEvent); this._xmlEditor.MouseDownEvent -= new MouseEventHandler(this._xmlEditor_MouseDownEvent); this._xmlEditor.MouseUpEvent -= new MouseEventHandler(this._xmlEditor_MouseUpEvent); this._xmlEditor.MouseDownMoveEvent -= new MouseEventHandler(this._xmlEditor_MouseDownMoveEvent); this._xmlEditor.xmlElementeAufraeumenEvent -= new EventHandler(this._xmlEditor_xmlElementeAufraeumenEvent); foreach (XMLElement xmlElement in this._childElemente) { if (xmlElement != null) { xmlElement.Dispose(); } } this._paintPos = (XMLEditorPaintPos)null; this._xmlEditor = (XMLEditor)null; } this._disposed = true; }
protected virtual void Dispose(bool disposing) { if (!this._disposed && disposing) { this._xmlEditor.CursorRoh.ChangedEvent -= this.Cursor_ChangedEvent; this._xmlEditor.MouseDownEvent -= this._xmlEditor_MouseDownEvent; this._xmlEditor.MouseUpEvent -= this._xmlEditor_MouseUpEvent; this._xmlEditor.MouseDownMoveEvent -= this._xmlEditor_MouseDownMoveEvent; this._xmlEditor.xmlElementeAufraeumenEvent -= this._xmlEditor_xmlElementeAufraeumenEvent; foreach (XMLElement item in this._childElemente) { if (item != null) { item.Dispose(); } } this._paintPos = null; this._xmlEditor = null; } this._disposed = true; }
public XMLElement_Kommentar(XmlNode xmlNode, XMLEditor xmlEditor) : base(xmlNode, xmlEditor) { }