예제 #1
0
 /// <summary>
 /// フォームロードイベント
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ValueEditForm_Load(object sender, EventArgs e)
 {
     if (NBT != null)
     {
         switch (NBT.TagType)
         {
         case TagType.String:
             textBox1.Multiline = true;
             this.Height        = 200;
             break;
         }
         textBox1.Text = NBTAccesser.GetValue(NBT);
     }
 }
예제 #2
0
        /// <summary>
        /// NBTタグからノードを取得する
        /// </summary>
        /// <param name="tag"></param>
        /// <returns></returns>
        private static TreeNode GetNBTNode(TagBase tag)
        {
            var node = new TreeNode()
            {
                Tag        = tag,
                ImageIndex = GetImageIndex(tag)
            };

            if (!string.IsNullOrEmpty(tag.Name))
            {
                node.Text = $"{tag.Name}: ";
            }

            node.Text += NBTAccesser.GetValue(tag);
            node.SelectedImageIndex = node.ImageIndex;

            return(node);
        }