private void treeViewObjects_BeforeExpand(object sender, CancelableNodeEventArgs e)
 {
     if (e.TreeNode != null)
     {
         CreatChildNodes(e.TreeNode);
     }
 }
Exemple #2
0
        private void applicationsTree_BeforeExpand(object sender, CancelableNodeEventArgs e)
        {
            UltraTreeNode node = e.TreeNode;

            if (node.FullPath.StartsWith("Software Publishers\\"))
            {
                PopulateApplications(node);
            }
        }
Exemple #3
0
 void uTree_BeforeActivate(object sender, CancelableNodeEventArgs e)
 {
     try
     {
     }
     catch (Exception ex)
     {
         throw;
     }
 }
        private void applicationsTree_BeforeExpand(object sender, CancelableNodeEventArgs e)
        {
            UltraTreeNode node = e.TreeNode;

            if (node.Parent == null)
            {
                return;
            }

            node.Nodes.Clear();

            InstalledApplication theApplication;
            string key;

            if (node.Parent == AllPublishersNode)
            {
                _presenter.ExpandApplications(node);
            }
            else if (node.Parent.Parent == AllPublishersNode)
            {
                // here after clicking the application node - show licenses and installations

                string publisher = node.FullPath.Substring(20);
                theApplication = node.Tag as InstalledApplication;
                key            = publisher + "|" + theApplication.Name + "|" + theApplication.ApplicationID;

                UltraTreeNode licensesNode = new UltraTreeNode(key + "|" + MiscStrings.ApplicationLicenseNode, "Licenses");
                licensesNode.Tag = theApplication;
                node.Nodes.Add(licensesNode);

                UltraTreeNode instancesNode = new UltraTreeNode(key + "|" + MiscStrings.ApplicationInstanceNode, "Installations");
                instancesNode.Tag = theApplication;
                node.Nodes.Add(instancesNode);

                theApplication.LoadData();
            }
            else if (node.Parent == AllOperatingSystemsNode)
            {
                // Beneath each Operating System we have placeholders for licenses and instances which
                // we can add now as two sub-nodes
                key = node.Key;

                InstalledOS theOS = node.Tag as InstalledOS;

                UltraTreeNode licensesNode = new UltraTreeNode(key + "|" + MiscStrings.ApplicationLicenseNode, "Licenses");
                licensesNode.LeftImages.Add(Properties.Resources.application_license_16);
                licensesNode.Tag = theOS;
                node.Nodes.Add(licensesNode);
                //
                UltraTreeNode instancesNode = new UltraTreeNode(key + "|" + MiscStrings.ApplicationInstanceNode, "Installations");
                instancesNode.LeftImages.Add(Properties.Resources.computer16);
                instancesNode.Tag = theOS;
                node.Nodes.Add(instancesNode);
            }
        }
        void mUltraTree_BeforeExpand(object sender, CancelableNodeEventArgs e)
        {
            if (e.TreeNode.Level == 0)
            {
                IEnumerable <UltraTreeNode> readonlySites = mUltraTree.Nodes[0].Nodes.Cast <UltraTreeNode>().
                                                            Where(node => ((DbElement)node.Tag).GetBool(DbAttributeInstance.DBWRIT) == false);
                foreach (UltraTreeNode node in readonlySites)
                {
                    e.TreeNode.Override.NodeAppearance.BackColor = Color.LightGray;
                    node.Override.NodeAppearance.Image           = Properties.Resources.Readonly;
                }


                //DbElement site = (DbElement)e.TreeNode.Tag;
                //bool writable= site.GetBool(DbAttributeInstance.DBWRIT);
                //if(!writable)
                //    e.TreeNode.Override.NodeAppearance.BackColor = Color.LightGray;
            }

            //If Exists, Pipe Spool it would be coloured yellow
            //node를 Traversing해서 검색을 해가니 2레벨 아래에 녀석들이 제대로 안나온다.
            //node의 tag가 Dbelement를 담고 있어서 그걸통해서 조건문을 만들어서 원하는 결과를 얻어냈다. 아래를 참조하자.
            if (e.TreeNode.Text.StartsWith("ZONE"))
            {
                IEnumerable <UltraTreeNode> pipenodes = e.TreeNode.Nodes.Cast <UltraTreeNode>().
                                                        Where(node => node.Text.StartsWith("PIPE") && ((DbElement)node.Tag).Members().Cast <DbElement>().
                                                              Where(part => part.GetElementType() == DbElementTypeInstance.PSLIST && part.Members().Count() > 0).Count() > 0);
                IEnumerable <UltraTreeNode> noteRedaynodes = e.TreeNode.Nodes.Cast <UltraTreeNode>().
                                                             Where(node => node.Text.StartsWith("PIPE") && ((DbElement)node.Tag).Members().Cast <DbElement>().
                                                                   Where(part => part.GetElementType() == DbElementTypeInstance.PSLIST).Count() == 0);
                Console.WriteLine("11");
                foreach (UltraTreeNode pipe in pipenodes)
                {
                    pipe.Override.NodeAppearance.BackColor = Color.GreenYellow;
                    //pipe.Override.NodeAppearance.BackColor2 = Color.RosyBrown;

                    //pipe.Override.NodeAppearance.CreateFont(new Font("굴림체",15.0f));
                }
                foreach (UltraTreeNode pipe in noteRedaynodes)
                {
                    pipe.Override.NodeAppearance.BackColor = Color.Bisque;
                    //pipe.Override.NodeAppearance.BackColor2 = Color.RosyBrown;

                    //pipe.Override.NodeAppearance.CreateFont(new Font("굴림체",15.0f));
                }
            }
        }
        private void treeViewObjects_BeforeLabelEdit(object sender, CancelableNodeEventArgs e)
        {
            var nodeTag = e.TreeNode.Tag.ToString();

            if (nodeTag == "root" || nodeTag == "tables" || nodeTag == "procs" || nodeTag == "views" || nodeTag == "functions")
            {
                e.Cancel = true;
            }
            else if (nodeTag == "table" || nodeTag == "proc" || nodeTag == "view" || nodeTag == "function")
            {
                e.Cancel = true;
            }

            else
            {
                cellTextBeforeEdit = e.TreeNode.Text;
            }
        }
Exemple #7
0
 void ultraTree1_BeforeActivate(object sender, CancelableNodeEventArgs e)
 {
     //try
     //{
     //    var activeNode = e.TreeNode;
     //    if (!GlobalFn.varIsNull(e.TreeNode.Cells["keySelf"].Value))
     //    {
     //        int position = BindingMaster.Find("keySelf", e.TreeNode.Cells["keySelf"].Value.ToString());
     //        if (position >= 0)
     //        {
     //            BindingMaster.Position = position;
     //        }
     //    }
     //}
     //catch (Exception ex)
     //{
     //    throw ex;
     //}
 }
Exemple #8
0
        /// <summary>
        /// Called as we select a new node within the tree - we may need to populate the node if we have
        /// not previously done so
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void networkTree_BeforeExpand(object sender, CancelableNodeEventArgs e)
        {
            UltraTreeNode node = e.TreeNode;

            ExpandNode(node);
        }
 private void locationsTree_BeforeExpand(object sender, CancelableNodeEventArgs e)
 {
     PopulateChildLocations(e.TreeNode);
 }
 void mUltraTree_BeforeNodeUpdate(object sender, CancelableNodeEventArgs e)
 {
     Console.WriteLine("1");
     //e.TreeNode;
 }
 void mUltraTree_BeforeActivate(object sender, CancelableNodeEventArgs e)
 {
     Console.WriteLine("33");
 }
 private void networkTree_BeforeExpand(object sender, CancelableNodeEventArgs e)
 {
     PopulateNode(e.TreeNode);
 }