本文整理汇总了C#中System.ConfigNode.get方法的典型用法代码示例。如果您正苦于以下问题:C# ConfigNode.get方法的具体用法?C# ConfigNode.get怎么用?C# ConfigNode.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.ConfigNode
的用法示例。
在下文中一共展示了ConfigNode.get方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: loadSettings
internal void loadSettings(ConfigNode toolbarNode)
{
Log.info("loading toolbar settings (toolbar '{0}')", toolbarNode.name);
rect.x = toolbarNode.get("x", DEFAULT_X);
rect.y = toolbarNode.get("y", DEFAULT_Y);
rect.width = toolbarNode.get("width", DEFAULT_WIDTH);
rect.height = toolbarNode.get("height", 0f);
autoHide = toolbarNode.get("autoHide", false);
showBorder = toolbarNode.get("drawBorder", true);
UseKSPSkin = toolbarNode.get("useKSPSkin", false);
savedButtonOrder = toolbarNode.get("buttonOrder", string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList();
savedVisibleButtons = new HashSet<string>(toolbarNode.get("visibleButtons", string.Empty).Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries));
if (toolbarNode.HasNode("folders")) {
foreach (ConfigNode folderNode in toolbarNode.GetNode("folders").nodes) {
string folderId = folderNode.name;
string texturePath = folderNode.get("texturePath", "000_Toolbar/folder");
if (!textureExists(texturePath)) {
texturePath = "000_Toolbar/folder";
}
string toolTip = folderNode.get("toolTip", string.Empty);
HashSet<string> buttonIds = new HashSet<string>(folderNode.get("buttons", string.Empty).Split(new char[] { ',' }));
Toolbar folder = createFolder(folderId, texturePath, toolTip, false);
savedFolderSettings[folderId].buttons = buttonIds;
}
}
savedMaxWidth = rect.width;
updateVisibleButtons();
sortButtons(buttons, compareButtonsUserOrder);
}