Exemplo n.º 1
0
 private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     if (e.Node is ContainerControlTreeNode)
     {
         this.Current = (ContainerControlTreeNode)e.Node;
     }
 }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        void _treeView_AfterCheck(object sender, System.Windows.Forms.TreeViewEventArgs e)
        {
            try
            {
                if (_document is CadKit.Interfaces.ILayerList)
                {
                    CadKit.Interfaces.ILayerList layerList = (CadKit.Interfaces.ILayerList)_document;
                    CadKit.Interfaces.ILayer     layer     = this._getLayer(e.Node);

                    if (null != layerList && null != layer)
                    {
                        if (e.Node.Checked)
                        {
                            e.Node.ForeColor = System.Drawing.Color.Black;
                            layerList.showLayer(layer, this);
                        }
                        else
                        {
                            e.Node.ForeColor = System.Drawing.Color.Gray;
                            layerList.hideLayer(layer, this);
                        }
                    }
                }
            }
            catch (System.Exception exception)
            {
                System.Console.WriteLine("Error 3400305770: Exception caught while trying to change visibility of a layer.");
                System.Console.WriteLine("Message: {0}", exception.Message);
            }
        }
        // <summary>
        // Called after a node is checked.  Forces all children to inherit current state, and notifies parents they may need to become 'mixed'
        // </summary>
        protected override void OnAfterCheck(System.Windows.Forms.TreeViewEventArgs e)
        {
            base.OnAfterCheck(e);

            if (IgnoreClickAction > 0)
            {
                return;
            }

            IgnoreClickAction++;                // we're making changes to the tree, ignore any other change requests

            // the checked state has already been changed, we just need to update the state index

            // node is either ticked or unticked.  ignore mixed state, as the node is still only ticked or unticked regardless of state of children
            System.Windows.Forms.TreeNode tn = e.Node;
            tn.StateImageIndex = tn.Checked ? (int)CheckedState.Checked : (int)CheckedState.UnChecked;

            // force all children to inherit the same state as the current node
            UpdateChildState(e.Node.Nodes, e.Node.StateImageIndex, e.Node.Checked, false);

            // populate state up the tree, possibly resulting in parents with mixed state
            UpdateParentState(e.Node.Parent);

            IgnoreClickAction--;
        }
Exemplo n.º 4
0
        protected override void OnAfterExpand(System.Windows.Forms.TreeViewEventArgs e)
        {
            base.OnAfterExpand(e);

            IgnoreClickAction++;
            UpdateChildState(e.Node.Nodes, e.Node.StateImageIndex, e.Node.Checked, true);
            IgnoreClickAction--;
        }
Exemplo n.º 5
0
 private void tvPatientList_AfterCheck(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     if (this.CheckBoxes && this.bControlChecked == false)
     {
         foreach (System.Windows.Forms.TreeNode node in e.Node.Nodes)
         {
             node.Checked = e.Node.Checked;
         }
     }
 }
        // <summary>
        // Called after a node is expanded.  Ensures any new nodes display an 'unchecked' image
        // </summary>
        protected override void OnAfterExpand(System.Windows.Forms.TreeViewEventArgs e)
        {
            // If any child node is new, give it the same check state as the current node
            // So if current node is ticked, child nodes will also be ticked
            base.OnAfterExpand(e);

            IgnoreClickAction++;                // we're making changes to the tree, ignore any other change requests
            UpdateChildState(e.Node.Nodes, e.Node.StateImageIndex, e.Node.Checked, true);
            IgnoreClickAction--;
        }
Exemplo n.º 7
0
        void ObjectModelBrowser_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
        {
            SelectedItemsCollection col = new SelectedItemsCollection();

            col.Add(this.SelectedElement);

            if (LanguageDSLDocData.ViewModelStore != null)
            {
                LanguageDSLDocData.ViewModelStore.EventManager.GetEvent <SelectionChangedEvent>().Publish(new SelectionChangedEventArgs(null, col));
            }
        }
Exemplo n.º 8
0
 private void tv1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     if (this.tv1.SelectedNode == null)
     {
         this.cmdRemove.Enabled = (this.tv1.SelectedNode != null);
     }
     else
     {
         this.DoNodeClick(this.tv1.SelectedNode);
     }
 }
Exemplo n.º 9
0
 private void motifTreeView_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     if (motifTreeView.SelectedNode == null || motifTreeView.SelectedNode.Text == null)
     {
         playlist.selectMotif("");
     }
     else
     {
         playlist.selectMotif(motifTreeView.SelectedNode.Text);
     }
     this.updatePlaylist();
 }
Exemplo n.º 10
0
 void _treeView_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     try
     {
         CadKit.Documents.Manager.Instance.ActiveView = this;
     }
     catch (System.Exception exception)
     {
         System.Console.WriteLine("Error 2270625540: Exception caught while trying to change selected index.");
         System.Console.WriteLine("Message: {0}", exception.Message);
     }
 }
Exemplo n.º 11
0
 void TreeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     if (TreeView1.SelectedNode.Index == 0)
     {
         Panel1.Visible = true;
         Panel2.Visible = false;
         TreeView1.Focus();
     }
     else if (TreeView1.SelectedNode.Index == 1)
     {
         Panel1.Visible = false;
         Panel2.Visible = true;
         TreeView1.Focus();
     }
 }
Exemplo n.º 12
0
        private void OnFolderSelected(object sender, System.Windows.Forms.TreeViewEventArgs e)
        {
            IResource dest = _treeFeeds.SelectedResource;

            _btnOK.Enabled = (dest != null);
            if (_btnOK.Enabled)
            {
                foreach (IResource res in _sourceSelected)
                {
                    if (res.Type == Props.RSSFeedGroupResource && res.Id == dest.Id)
                    {
                        _btnOK.Enabled = false;
                    }
                }
            }
        }
Exemplo n.º 13
0
        private void ProjectsAfterCheck(object sender, System.Windows.Forms.TreeViewEventArgs e)
        {
            _ciEntryPointSetting.Url      = "http://mock";
            _ciEntryPointSetting.UserName = "******";
            _ciEntryPointSetting.SetPassword("Password");
            Settings.Save();

            MyBuildDefinition buildDefinition = e.Node.Tag as MyBuildDefinition;

            if (buildDefinition != null)
            {
                var buildDefSetting = _ciEntryPointSetting.FindAddBuildDefinition(buildDefinition, _mockCiEntryPoint.Name);
                buildDefSetting.Active = e.Node.Checked;
                Settings.Save();
            }
            ((ThreeStateTreeNode)e.Node).UpdateStateOfRelatedNodes();
        }
Exemplo n.º 14
0
        private void tvExc_AfterSelect(
            object sender,
            System.Windows.Forms.TreeViewEventArgs e)
        {
            //                 Handles tvExc.AfterSelect
            System.Exception ex = null;
            System.Windows.Forms.TreeNode tnode;
            System.Collections.ArrayList  ar      = new System.Collections.ArrayList();
            System.Collections.ArrayList  arShort = new System.Collections.ArrayList();
            StackEntry entry;

            try
            {
                tnode = tvExc.SelectedNode;
                if (tnode != null)
                {
                    if (tnode.Tag is System.Exception)
                    {
                        ex = (System.Exception)tnode.Tag;
                    }
                }
                if (ex != null)
                {
                    txtMessage.Text = ex.Message;
                    txtStack.Text   = ex.StackTrace;
                    string[] stack = ex.StackTrace.Split(Microsoft.VisualBasic.ControlChars.Cr);
                    for (int i = 0; i <= stack.GetUpperBound(0); i++)
                    {
                        entry = new StackEntry(stack[i], i);
                        ar.Add(entry);
                        if (!entry.IsFramework)
                        {
                            arShort.Add(entry);
                        }
                    }
                }
                mStackArray      = (StackEntry[])ar.ToArray(typeof(StackEntry));
                mStackArrayShort = (StackEntry[])arShort.ToArray(typeof(StackEntry));
                gridStack.SetDataBinding(mStackArrayShort, "");
            }
            catch (System.Exception exception)
            {
                System.Diagnostics.Debug.WriteLine(exception);
            }
        }
Exemplo n.º 15
0
        // <summary>
        // Called after a node is checked.  Forces all children to inherit current state, and notifies parents they may need to become 'mixed'
        // </summary>
        protected override void OnAfterCheck(System.Windows.Forms.TreeViewEventArgs e)
        {
            base.OnAfterCheck(e);

            if (IgnoreClickAction > 0)
            {
                return;
            }

            IgnoreClickAction++;

            System.Windows.Forms.TreeNode tn = e.Node;
            tn.StateImageIndex = tn.Checked ? (int)CheckedState.Checked : (int)CheckedState.UnChecked;
            UpdateChildState(e.Node.Nodes, e.Node.StateImageIndex, e.Node.Checked, false);
            UpdateParentState(e.Node.Parent);

            IgnoreClickAction--;
        }
Exemplo n.º 16
0
        private void fateTreeView_AfterCheck(object sender, System.Windows.Forms.TreeViewEventArgs e)
        {
            if (lockTreeEvent)
            {
                return;
            }
            lockTreeEvent = true;
            if (((string)e.Node.Tag).Contains("AREA:"))
            {
                foreach (System.Windows.Forms.TreeNode node in e.Node.Nodes)
                {
                    node.Checked = e.Node.Checked;
                }
            }
            else
            {
                if (e.Node.Checked == false)
                {
                    e.Node.Parent.Checked = false;
                }
                else
                {
                    bool flag = true;
                    foreach (System.Windows.Forms.TreeNode node in e.Node.Parent.Nodes)
                    {
                        flag &= node.Checked;
                    }
                    e.Node.Parent.Checked = flag;
                }
            }
            telegramSelectedFates.Clear();
            updateSelectedFates(telegramFateTreeView.Nodes);

            SaveSettings();

            lockTreeEvent = false;
        }
 private void TreeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     throw new System.NotImplementedException();
 }
Exemplo n.º 18
0
        protected override void AfterSelectEvent(object sender, System.Windows.Forms.TreeViewEventArgs e)
        {
            base.AfterSelectEvent(sender, e);

            CaclculateButtonVisibility();
        }
        public static void getStatus(System.Windows.Forms.TreeViewEventArgs e)
        {
            TriStateTreeView t = new TriStateTreeView();

            t.OnAfterCheck(e);
        }
Exemplo n.º 20
0
 private void obj_TreeView(System.Object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     this.OnChanged(sender);
 }
Exemplo n.º 21
0
 //===========================================================
 //		EventHandlers
 //===========================================================
 protected override void OnAfterSelect(System.Windows.Forms.TreeViewEventArgs e)
 {
     this.UpdateToTextBox();
     base.OnAfterSelect(e);
 }
 private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     propertyGrid1.SelectedObject = (TreeListViewItem)e.Node.Tag;
 }
Exemplo n.º 23
0
 private void kategorieTreeView_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     this.Reload();
 }
Exemplo n.º 24
0
 private void treeView1_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
 }
Exemplo n.º 25
0
 protected void OnAfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
 }
Exemplo n.º 26
0
 private void handle_AfterCheck(object sender, System.Windows.Forms.TreeViewEventArgs e)
 {
     RestoreNodeStateRemove(e.Node as FileSystemTreeNode);
 }