本文整理汇总了C#中ConfigNode.AddChild方法的典型用法代码示例。如果您正苦于以下问题:C# ConfigNode.AddChild方法的具体用法?C# ConfigNode.AddChild怎么用?C# ConfigNode.AddChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigNode
的用法示例。
在下文中一共展示了ConfigNode.AddChild方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public static ConfigNode Read(XmlElement elem)
{
ConfigNode node = new ConfigNode(elem.LocalName);
foreach(XmlAttribute attr in elem.Attributes)
node[attr.LocalName] = attr.Value;
foreach(XmlNode ch in elem.ChildNodes) {
XmlElement ce = ch as XmlElement;
if(ce!=null)
node.AddChild(Read(ce));
}
return node;
}
示例2: Save
//�V���v���ȃe�L�X�g�`���ł�Save/Load
public void Save(ConfigNode parent)
{
ConfigNode node = new ConfigNode("key-definition");
foreach(Entry e in _entries) {
if(e.KeyIsModified)
node[e.CID.ToString()] = UILibUtil.KeyString(e.Modifiers, e.Key, ',');
}
parent.AddChild(node);
}
示例3: Save
public void Save(ConfigNode parent)
{
ConfigNode node = new ConfigNode("module");
node["path"] = _path;
node["title"] = _title;
node["debug"] = _debugMode.ToString();
Commands.Entry e = GApp.Options.Commands.FindMacroEntry(this.Index);
if(e!=null)
node["shortcut"] = UILibUtil.KeyString(e.Modifiers, e.Key, ',');
node["additional-assemblies"] = Concat(_additionalAssemblies);
parent.AddChild(node);
}
示例4: Save
public void Save(ConfigNode parent)
{
LimitCount(GApp.Options.MRUSize);
ConfigNode node = new ConfigNode("connection-history");
foreach(TerminalParam p in _history) {
ConfigNode con = new ConfigNode("connection");
p.Export(con);
node.AddChild(con);
}
parent.AddChild(node);
}
示例5: Save
public override void Save(ConfigNode parent)
{
ConfigNode ch = new ConfigNode("remote-to-local");
base.ExportTo(ch);
parent.AddChild(ch);
}
示例6: Save
public void Save(ConfigNode parent) {
ConfigNode node = new ConfigNode("options");
foreach (ConfigElementAttribute attr in _configAttributes) {
attr.ExportTo(this, node);
}
node["framePosition"] = String.Format("{0},{1},{2},{3}", _framePosition.X, _framePosition.Y, _framePosition.Width, _framePosition.Height);
parent.AddChild(node);
}
示例7: Save
public virtual void Save(ConfigNode parent)
{
ConfigNode node = new ConfigNode("poderosa-terminal");
foreach(ConfigElementAttribute attr in _configAttributes) {
attr.ExportTo(this, node);
}
if(!_esColorSet.IsDefault)
node["escape-sequence-color"] = _esColorSet.Format();
parent.AddChild(node);
}
示例8: Merge
public static ConfigNode Merge(IEnumerable<ConfigNode> nodes)
{
var result = new ConfigNode("ROOT", "ROOT");
foreach (var node in nodes)
{
foreach (var child in node._children)
{
result.AddChild(child);
}
foreach (var value in node._values)
{
result[value.Key] = value.Value;
}
}
return result;
}
示例9: Save
public override sealed void Save(ConfigNode parent)
{
ConfigNode node = new ConfigNode("poderosa-container");
foreach(ConfigElementAttribute attr in _configAttributes) {
attr.ExportTo(this, node);
}
node["framePosition"] = String.Format("{0},{1},{2},{3}", _framePosition.X, _framePosition.Y, _framePosition.Width, _framePosition.Height);
parent.AddChild(node);
_commands.Save(parent);
base.Save(parent);
}