Пример #1
0
        // ReSharper disable once UnusedParameter.Local
        private void JsonTreeView_AfterSelectImplementation(JValueTreeNode node, TreeViewEventArgs e)
        {
            newtonsoftJsonTypeTextBox.Text = node.Tag.GetType().Name;

            jsonTypeComboBox.Text = node.JValueTag.Type.ToString();

            switch (node.JValueTag.Type)
            {
            case JTokenType.String:
                jsonValueTextBox.Text = @"""" + node.JValueTag + @"""";
                break;

            default:
                jsonValueTextBox.Text = node.JValueTag.ToString();
                break;
            }
        }
Пример #2
0
 /// <summary>
 /// Copies a JValue into a JArray as first child.
 /// </summary>
 /// <param name="sourceNode"></param>
 /// <param name="targetNode"></param>
 private void DoDragDropCopy(JValueTreeNode sourceNode, JArrayTreeNode targetNode)
 {
     sourceNode.ClipboardCopy();
     targetNode.ClipboardPasteInto();
 }
        // ReSharper disable once UnusedParameter.Local
        private void JsonTreeView_AfterSelectImplementation(JValueTreeNode node, TreeViewEventArgs e)
        {
            newtonsoftJsonTypeTextBox.Text = node.Tag.GetType().Name;

            jsonTypeComboBox.Text = node.JValueTag.Type.ToString();

            switch (node.JValueTag.Type)
            {
                case JTokenType.String:
                    jsonValueTextBox.Text = @"""" + node.JValueTag + @"""";
                    break;
                default:
                    jsonValueTextBox.Text = node.JValueTag.ToString();
                    break;
            }
        }
Пример #4
0
 /// <summary>
 /// Copies a JValue into a JArray as first child.
 /// </summary>
 /// <param name="sourceNode"></param>
 /// <param name="targetNode"></param>
 private void DoDragDropCopy(JValueTreeNode sourceNode, JArrayTreeNode targetNode)
 {
     sourceNode.ClipboardCopy();
     targetNode.ClipboardPasteInto();
 }
Пример #5
0
        /// <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);
        }
        /// <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;
        }