Exemple #1
0
 internal override DocumentMapNode GetDocumentMap(string rootLabel)
 {
     try
     {
         lock (m_syncObject)
         {
             if (!m_processingHost.ExecutionInfo.HasSnapshot)
             {
                 throw new InvalidOperationException(CommonStrings.ReportNotReady);
             }
             IDocumentMap documentMap;
             try
             {
                 documentMap = m_processingHost.GetDocumentMap();
             }
             catch (Exception processingException)
             {
                 throw WrapProcessingException(processingException);
             }
             return(DocumentMapNode.CreateTree(documentMap, rootLabel));
         }
     }
     catch (SecurityException processingException2)
     {
         throw new LocalProcessingException(CommonStrings.LocalModeMissingFullTrustErrors, processingException2);
     }
 }
        internal static DocumentMapNode CreateTree(IDocumentMap docMap, string rootName)
        {
            DocumentMapNode documentMapNode = CreateNode(docMap);

            if (documentMapNode != null)
            {
                documentMapNode.m_label = rootName;
            }
            return(documentMapNode);
        }
        internal static DocumentMapNode CreateTree(Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.DocumentMapNode serverNode, string rootName)
        {
            DocumentMapNode documentMapNode = CreateNode(serverNode);

            if (documentMapNode != null)
            {
                documentMapNode.m_label = rootName;
            }
            return(documentMapNode);
        }
Exemple #4
0
 private void AddNodeData(DocumentMapNode node, TreeNode inTreeNode)
 {
     if (!m_allNodes.ContainsKey(node.Id))
     {
         NodeData nodeData = new NodeData(node);
         inTreeNode.Text = nodeData.Label;
         inTreeNode.Tag  = nodeData.ID;
         m_allNodes.Add(nodeData.ID, nodeData);
     }
 }
Exemple #5
0
 private void AddChildren(DocumentMapNode thisNode, TreeNode inTreeNode)
 {
     foreach (DocumentMapNode child in thisNode.Children)
     {
         TreeNode treeNode = new TreeNode(child.Label);
         inTreeNode.Nodes.Add(treeNode);
         AddNodeData(child, treeNode);
         AddChildren(child, treeNode);
     }
 }
Exemple #6
0
 public void PopulateTree(DocumentMapNode rootNode)
 {
     Clear();
     if (rootNode != null)
     {
         SuspendLayout();
         TreeNode treeNode = new TreeNode(rootNode.Label);
         AddNodeData(rootNode, treeNode);
         AddChildren(rootNode, treeNode);
         base.Nodes.Add(treeNode);
         base.Nodes[0].Expand();
         ResumeLayout();
         m_hasDocMap = true;
     }
 }
 private static void CollapseTopLevel(Stack <NodeStackEntry> nodeStack, List <DocumentMapNode> workspace)
 {
     if (nodeStack != null && nodeStack.Count > 1)
     {
         int level = nodeStack.Peek().Level;
         workspace.Clear();
         while (nodeStack.Peek().Level == level)
         {
             workspace.Add(nodeStack.Pop().Node);
         }
         DocumentMapNode node = nodeStack.Peek().Node;
         node.SetNodeChildren(new DocumentMapNode[workspace.Count]);
         for (int num = workspace.Count - 1; num >= 0; num--)
         {
             node.Children[workspace.Count - num - 1] = workspace[num];
         }
     }
 }
        internal static DocumentMapNode CreateNode(Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.DocumentMapNode serverNode)
        {
            if (serverNode == null)
            {
                return(null);
            }
            int num = 0;

            if (serverNode.Children != null)
            {
                num = serverNode.Children.Length;
            }
            DocumentMapNode[] array = new DocumentMapNode[num];
            for (int i = 0; i < num; i++)
            {
                array[i] = CreateNode(serverNode.Children[i]);
            }
            return(new DocumentMapNode(serverNode.Label, serverNode.UniqueName, array));
        }
Exemple #9
0
 public DocumentMapNode GetDocumentMap(string rootLabel)
 {
     return(DocumentMapNode.CreateTree(Service.GetDocumentMap(), rootLabel));
 }
Exemple #10
0
 public NodeData(DocumentMapNode node)
 {
     m_label = node.Label;
     m_id    = node.Id;
 }