Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/03/09 01:42:55 (15 years ago)
Author:
mstoeger
Message:

added many new persisted properties.
removed useless comments.
added XmlSupport class since the code for setting xml attributes is always the same.
#639

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Visualization/3.2/LabelProvider/StringLabelProvider.cs

    r1385 r1993  
    11using System;
    22using System.Collections.Generic;
    3 using HeuristicLab.Visualization.LabelProvider;
    43using System.Xml;
    54
     
    2827    }
    2928
    30     public XmlNode GetLabelProviderXmlNode() {
    31       XmlDocument Xdoc = new XmlDocument();
    32 
    33       XmlNode lblProvInfo = Xdoc.CreateNode(XmlNodeType.Element, "LabelProvider", null);
     29    public XmlNode GetLabelProviderXmlNode(XmlDocument document) {
     30      XmlNode lblProvInfo = document.CreateNode(XmlNodeType.Element, "LabelProvider", null);
    3431      lblProvInfo.InnerText = "StringLabelProvider";
    3532
    3633      foreach (KeyValuePair<int, string> pair in labels)
    3734      {
    38         XmlNode strLbl = Xdoc.CreateNode(XmlNodeType.Element, "String", null);
     35        XmlNode strLbl = document.CreateNode(XmlNodeType.Element, "String", null);
    3936
    40         XmlAttribute idStrLbl = Xdoc.CreateAttribute("id");
     37        XmlAttribute idStrLbl = document.CreateAttribute("id");
    4138        idStrLbl.Value = pair.Key.ToString();
    4239        strLbl.Attributes.Append(idStrLbl);
Note: See TracChangeset for help on using the changeset viewer.