Ejemplo n.º 1
0
 protected override void OnAfterCollapse(TreeViewEventArgs e)
 {
     if (!inRestoreExpandedNodesMode)
     {
         IntegrationQueueTreeNodeTag tag = e.Node.Tag as IntegrationQueueTreeNodeTag;
         if (tag != null && tag.IsQueueNode)
         {
             expandedNodes.Remove(GetQueueId(e.Node, tag));
         }
     }
     base.OnAfterCollapse(e);
 }
Ejemplo n.º 2
0
 public void RestoreExpandedNodes(TreeNode parentNode)
 {
     inRestoreExpandedNodesMode = true;
     foreach (TreeNode treeNode in parentNode.Nodes)
     {
         IntegrationQueueTreeNodeTag tag = treeNode.Tag as IntegrationQueueTreeNodeTag;
         if (tag != null && tag.IsQueueNode)
         {
             if (expandedNodes.Contains(GetQueueId(treeNode, tag)))
             {
                 treeNode.Expand();
             }
         }
     }
     inRestoreExpandedNodesMode = false;
 }
Ejemplo n.º 3
0
 private string GetQueueId(TreeNode treeNode, IntegrationQueueTreeNodeTag tag)
 {
     // Identify the queue using a combination of the server name, the server type and the queue name.
     return string.Format(System.Globalization.CultureInfo.CurrentCulture,"{0}:{1}:{2}", treeNode.Parent.Name, treeNode.Parent.ImageIndex, tag.QueueSnapshot.QueueName);
 }
Ejemplo n.º 4
0
 private string GetQueueId(TreeNode treeNode, IntegrationQueueTreeNodeTag tag)
 {
     // Identify the queue using a combination of the server name, the server type and the queue name.
     return(string.Format(System.Globalization.CultureInfo.CurrentCulture, "{0}:{1}:{2}", treeNode.Parent.Name, treeNode.Parent.ImageIndex, tag.QueueSnapshot.QueueName));
 }