Example #1
0
 private void Redraw()
 {
     try
     {
         tvJson.BeginUpdate();
         try
         {
             Reset();
             if (!String.IsNullOrEmpty(_json))
             {
                 JsonObjectTree tree = JsonObjectTree.Parse(_json);
                 VisualizeJsonTree(tree);
             }
         }
         finally
         {
             tvJson.EndUpdate();
         }
     }
     catch (JsonParseError e)
     {
         GetParseErrorDetails(e);
     }
     catch (Exception e)
     {
         ShowException(e);
     }
 }
Example #2
0
        private void VisualizeJsonTree(JsonObjectTree tree)
        {
            AddNode(tvJson.Nodes, tree.Root);
            JsonViewerTreeNode node = GetRootNode();

            InitVisualizers(node);
            node.Expand();
            tvJson.SelectedNode = node;
        }