// ReSharper disable once UnusedParameter.Local private void JsonTreeView_AfterSelectImplementation(JValueTreeNode node, TreeViewEventArgs e) { switch (node.JValueTag.Type) { case JTokenType.String: jsonValueTextBox.Text = @"""" + node.JValueTag + @""""; break; default: jsonValueTextBox.Text = node.JValueTag.ToString(); break; } }
/// <summary> /// Create a TreeNode and its subtrees for the <paramref name="obj"/> instance beeing a <see cref="JValue"/> instance. /// </summary> /// <param name="obj"></param> /// <param name="depth"></param> /// <returns></returns> public static TreeNode Create(JValue obj, int depth) { var node = new JValueTreeNode(obj); return node; }