本文整理汇总了C#中NBTExplorer.Model.DataNode.CanCreateTag方法的典型用法代码示例。如果您正苦于以下问题:C# DataNode.CanCreateTag方法的具体用法?C# DataNode.CanCreateTag怎么用?C# DataNode.CanCreateTag使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NBTExplorer.Model.DataNode
的用法示例。
在下文中一共展示了DataNode.CanCreateTag方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateIntArrayNodePred
private bool CreateIntArrayNodePred(DataNode dataNode, out GroupCapabilities caps)
{
caps = GroupCapabilities.Single;
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_INT_ARRAY);
}
示例2: CreateStringNodePred
private bool CreateStringNodePred(DataNode dataNode, out GroupCapabilities caps)
{
caps = GroupCapabilities.Single;
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_STRING);
}
示例3: CreateDoubleNodePred
private bool CreateDoubleNodePred(DataNode dataNode, out GroupCapabilities caps)
{
caps = GroupCapabilities.Single;
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_DOUBLE);
}
示例4: CreateFloatNodePred
private bool CreateFloatNodePred(DataNode dataNode, out GroupCapabilities caps)
{
caps = GroupCapabilities.Single;
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_FLOAT);
}
示例5: CreateCompoundNodePred
private bool CreateCompoundNodePred(DataNode dataNode, out GroupCapabilities caps)
{
caps = GroupCapabilities.Single;
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_COMPOUND);
}
示例6: UpdateUI
private void UpdateUI(DataNode node)
{
if (node == null)
return;
_buttonAddTagByte.Enabled = node.CanCreateTag(TagType.TAG_BYTE);
_buttonAddTagByteArray.Enabled = node.CanCreateTag(TagType.TAG_BYTE_ARRAY);
_buttonAddTagCompound.Enabled = node.CanCreateTag(TagType.TAG_COMPOUND);
_buttonAddTagDouble.Enabled = node.CanCreateTag(TagType.TAG_DOUBLE);
_buttonAddTagFloat.Enabled = node.CanCreateTag(TagType.TAG_FLOAT);
_buttonAddTagInt.Enabled = node.CanCreateTag(TagType.TAG_INT);
_buttonAddTagIntArray.Enabled = node.CanCreateTag(TagType.TAG_INT_ARRAY);
_buttonAddTagList.Enabled = node.CanCreateTag(TagType.TAG_LIST);
_buttonAddTagLong.Enabled = node.CanCreateTag(TagType.TAG_LONG);
_buttonAddTagShort.Enabled = node.CanCreateTag(TagType.TAG_SHORT);
_buttonAddTagString.Enabled = node.CanCreateTag(TagType.TAG_STRING);
_buttonSave.Enabled = CheckModifications();
_buttonCopy.Enabled = node.CanCopyNode && NbtClipboardController.IsInitialized;
_buttonCut.Enabled = node.CanCutNode && NbtClipboardController.IsInitialized;
_buttonDelete.Enabled = node.CanDeleteNode;
_buttonEdit.Enabled = node.CanEditNode;
_buttonFindNext.Enabled = node.CanSearchNode || _searchState != null;
_buttonPaste.Enabled = node.CanPasteIntoNode && NbtClipboardController.IsInitialized;
_buttonRename.Enabled = node.CanRenameNode;
_buttonRefresh.Enabled = node.CanRefreshNode;
_menuItemSave.Enabled = _buttonSave.Enabled;
_menuItemCopy.Enabled = node.CanCopyNode && NbtClipboardController.IsInitialized;
_menuItemCut.Enabled = node.CanCutNode && NbtClipboardController.IsInitialized;
_menuItemDelete.Enabled = node.CanDeleteNode;
_menuItemEditValue.Enabled = node.CanEditNode;
_menuItemFind.Enabled = node.CanSearchNode;
_menuItemPaste.Enabled = node.CanPasteIntoNode && NbtClipboardController.IsInitialized;
_menuItemRename.Enabled = node.CanRenameNode;
_menuItemRefresh.Enabled = node.CanRefreshNode;
_menuItemFind.Enabled = node.CanSearchNode;
_menuItemFindNext.Enabled = _searchState != null;
UpdateUI(_nodeTree.SelectedNodes);
}
示例7: UpdateUI
private void UpdateUI (DataNode node)
{
if (_appDelegate == null || node == null)
return;
_appDelegate.MenuInsertByte.Enabled = node.CanCreateTag(TagType.TAG_BYTE);
_appDelegate.MenuInsertShort.Enabled = node.CanCreateTag(TagType.TAG_SHORT);
_appDelegate.MenuInsertInt.Enabled = node.CanCreateTag(TagType.TAG_INT);
_appDelegate.MenuInsertLong.Enabled = node.CanCreateTag(TagType.TAG_LONG);
_appDelegate.MenuInsertFloat.Enabled = node.CanCreateTag(TagType.TAG_FLOAT);
_appDelegate.MenuInsertDouble.Enabled = node.CanCreateTag(TagType.TAG_DOUBLE);
_appDelegate.MenuInsertByteArray.Enabled = node.CanCreateTag(TagType.TAG_BYTE_ARRAY);
_appDelegate.MenuInsertIntArray.Enabled = node.CanCreateTag(TagType.TAG_INT_ARRAY);
_appDelegate.MenuInsertString.Enabled = node.CanCreateTag(TagType.TAG_STRING);
_appDelegate.MenuInsertList.Enabled = node.CanCreateTag(TagType.TAG_LIST);
_appDelegate.MenuInsertCompound.Enabled = node.CanCreateTag(TagType.TAG_COMPOUND);
_appDelegate.MenuSave.Enabled = CheckModifications();
_appDelegate.MenuCopy.Enabled = node.CanCopyNode && NbtClipboardController.IsInitialized;
_appDelegate.MenuCut.Enabled = node.CanCutNode && NbtClipboardController.IsInitialized;
_appDelegate.MenuPaste.Enabled = node.CanPasteIntoNode && NbtClipboardController.IsInitialized;
_appDelegate.MenuDelete.Enabled = node.CanDeleteNode;
_appDelegate.MenuEditValue.Enabled = node.CanEditNode;
_appDelegate.MenuRename.Enabled = node.CanRenameNode;
_appDelegate.MenuMoveUp.Enabled = node.CanMoveNodeUp;
_appDelegate.MenuMoveDown.Enabled = node.CanMoveNodeDown;
_appDelegate.MenuFind.Enabled = node.CanSearchNode;
_appDelegate.MenuFindNext.Enabled = _searchState != null;
_toolbarByte.Enabled = _appDelegate.MenuInsertByte.Enabled;
_toolbarShort.Enabled = _appDelegate.MenuInsertShort.Enabled;
_toolbarInt.Enabled = _appDelegate.MenuInsertInt.Enabled;
_toolbarLong.Enabled = _appDelegate.MenuInsertLong.Enabled;
_toolbarFloat.Enabled = _appDelegate.MenuInsertFloat.Enabled;
_toolbarDouble.Enabled = _appDelegate.MenuInsertDouble.Enabled;
_toolbarByteArray.Enabled = _appDelegate.MenuInsertByteArray.Enabled;
_toolbarIntArray.Enabled = _appDelegate.MenuInsertIntArray.Enabled;
_toolbarString.Enabled = _appDelegate.MenuInsertString.Enabled;
_toolbarList.Enabled = _appDelegate.MenuInsertList.Enabled;
_toolbarCompound.Enabled = _appDelegate.MenuInsertCompound.Enabled;
_toolbarSave.Enabled = _appDelegate.MenuSave.Enabled;
_toolbarDelete.Enabled = _appDelegate.MenuDelete.Enabled;
_toolbarEdit.Enabled = _appDelegate.MenuEditValue.Enabled;
_toolbarRename.Enabled = _appDelegate.MenuRename.Enabled;
}
示例8: CreateListNodePred
public static bool CreateListNodePred (DataNode dataNode, out GroupCapabilities caps)
{
caps = GroupCapabilities.Single;
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_LIST);
}
示例9: CreateByteArrayNodePred
public static bool CreateByteArrayNodePred (DataNode dataNode, out GroupCapabilities caps)
{
caps = GroupCapabilities.Single;
return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_BYTE_ARRAY);
}