当前位置: 首页>>代码示例>>C#>>正文


C# DataNode.CanCreateTag方法代码示例

本文整理汇总了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);
 }
开发者ID:emps2222,项目名称:NBTExplorer,代码行数:5,代码来源:MainForm.cs

示例2: CreateStringNodePred

 private bool CreateStringNodePred(DataNode dataNode, out GroupCapabilities caps)
 {
     caps = GroupCapabilities.Single;
     return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_STRING);
 }
开发者ID:emps2222,项目名称:NBTExplorer,代码行数:5,代码来源:MainForm.cs

示例3: CreateDoubleNodePred

 private bool CreateDoubleNodePred(DataNode dataNode, out GroupCapabilities caps)
 {
     caps = GroupCapabilities.Single;
     return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_DOUBLE);
 }
开发者ID:emps2222,项目名称:NBTExplorer,代码行数:5,代码来源:MainForm.cs

示例4: CreateFloatNodePred

 private bool CreateFloatNodePred(DataNode dataNode, out GroupCapabilities caps)
 {
     caps = GroupCapabilities.Single;
     return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_FLOAT);
 }
开发者ID:emps2222,项目名称:NBTExplorer,代码行数:5,代码来源:MainForm.cs

示例5: CreateCompoundNodePred

 private bool CreateCompoundNodePred(DataNode dataNode, out GroupCapabilities caps)
 {
     caps = GroupCapabilities.Single;
     return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_COMPOUND);
 }
开发者ID:emps2222,项目名称:NBTExplorer,代码行数:5,代码来源:MainForm.cs

示例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);
        }
开发者ID:emps2222,项目名称:NBTExplorer,代码行数:41,代码来源:MainForm.cs

示例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;
		}
开发者ID:DMV-Jumbo,项目名称:NBTExplorer,代码行数:46,代码来源:MainWindow.cs

示例8: CreateListNodePred

 public static bool CreateListNodePred (DataNode dataNode, out GroupCapabilities caps)
 {
     caps = GroupCapabilities.Single;
     return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_LIST);
 }
开发者ID:DMV-Jumbo,项目名称:NBTExplorer,代码行数:5,代码来源:NodeTreeController.cs

示例9: CreateByteArrayNodePred

 public static bool CreateByteArrayNodePred (DataNode dataNode, out GroupCapabilities caps)
 {
     caps = GroupCapabilities.Single;
     return (dataNode != null) && dataNode.CanCreateTag(TagType.TAG_BYTE_ARRAY);
 }
开发者ID:DMV-Jumbo,项目名称:NBTExplorer,代码行数:5,代码来源:NodeTreeController.cs


注:本文中的NBTExplorer.Model.DataNode.CanCreateTag方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。