本文整理匯總了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);
}