private void OISTree_BeforeExpand(object sender, DevComponents.AdvTree.AdvTreeNodeCancelEventArgs e) { /* * Node parent = e.Node; * if (parent.Nodes.Count > 0) * return; * * //取得選取的OIS資料 * Com_PartOperation singleComPartOperation = new Com_PartOperation(); * foreach (Com_PartOperation i in listComPartOperation) * { * if (i.operation1 != parent.Cells[0].Text) * continue; * * singleComPartOperation = i; * } * * //填入此OIS相關資料 * status = cGetOISData.InsertDimenData(singleComPartOperation, parent); * if (!status) * { * MessageBox.Show("製程資料取得失敗,請聯繫開發工程師"); * this.Close(); * } */ }
private void fileExplorer_BeforeExpand(object sender, DevComponents.AdvTree.AdvTreeNodeCancelEventArgs e) { Node parent = e.Node; if (parent.Nodes.Count > 0) { if (toRefresh) { parent.Nodes.Clear(); } else { return; } } toRefresh = false; if (parent.Tag is DInfo) { explorerTree.BeginUpdate(); DInfo driveInfo = (DInfo)parent.Tag; LoadDirectories(parent, driveInfo.dir); parent.ExpandVisibility = eNodeExpandVisibility.Auto; explorerTree.EndUpdate(true); } else if (parent.Tag is DirectoryInfo) { LoadDirectories(parent, (DirectoryInfo)parent.Tag); } }
/// <summary> /// Adds new object to the collection and provides information about the source of the command /// </summary> /// <param name="node">Node to add</param> /// <param name="action">Source action</param> /// <returns></returns> public override int Add(Node node, eTreeAction action) { if (this.List.Contains(node)) return -1; if (TreeSelectionControl.MultiSelect) { if (TreeSelectionControl.MultiSelectRule == eMultiSelectRule.SameParent && this.Count>0) { if (this[0].Parent != node.Parent) throw new InvalidOperationException("Node being added does not belong to the same parent as currently selected nodes. See AdvTree.MultiSelectRule property"); } if (!SuspendEvents) { AdvTreeNodeCancelEventArgs cancelArgs = new AdvTreeNodeCancelEventArgs(action, node); TreeSelectionControl.InvokeOnBeforeNodeSelect(cancelArgs); if (cancelArgs.Cancel) return -1; } } return base.Add(node, action); }
private void TreeBeforeNodeSelect(object sender, AdvTreeNodeCancelEventArgs e) { if (SelectionChanging != null) SelectionChanging(this, e); }
void PropertyTreeBeforeNodeSelect(object sender, AdvTreeNodeCancelEventArgs e) { PropertyNode propertyNode = _PropertyTree.SelectedNode as PropertyNode; if (propertyNode == null) return; if (propertyNode.IsEditing) { if (!propertyNode.ApplyEdit()) e.Cancel = true; } }
/// <summary> /// Raises SelectionChanging event. /// </summary> /// <param name="e">Provides event arguments.</param> protected virtual void OnSelectionChanging(AdvTreeNodeCancelEventArgs e) { AdvTreeNodeCancelEventHandler handler = SelectionChanging; if (handler != null) handler(this, e); }
private void TreeBeforeNodeSelect(object sender, AdvTreeNodeCancelEventArgs e) { OnSelectionChanging(e); }
private void localVariableList_BeforeExpand(object sender, AdvTreeNodeCancelEventArgs e) { //if (IsPopulated) //{ // if (!PopulatedCollectionNodes.Contains(e.Node)) // { // Cursor = Cursors.WaitCursor; // AddChildrenToTreeview(e.Node.Tag as LocalVariableInformation, e.Node); // Cursor = Cursors.Default; // } //} }
/// <summary> /// 选择树结点之前 /// </summary> /// <param name="sender">事件发送者</param> /// <param name="e">事件参数</param> private void guideTree_BeforeNodeSelect(object sender, AdvTreeNodeCancelEventArgs e) { SaveRecord(); }
private void treeFiles_BeforeNodeSelect(object sender, AdvTreeNodeCancelEventArgs e) { SaveCurrent(); }
private void advTreeGroup_BeforeExpand(object sender, AdvTreeNodeCancelEventArgs e) { Node nodeParent = e.Node; nodeParent.Nodes.Clear(); AscmWipDiscreteJobs ascmGetMaterialTask = nodeParent.Tag as AscmWipDiscreteJobs; if (ascmGetMaterialTask != null) { //Structure nodes columns StructureAdvTreeSecondLevelColumns(nodeParent); //Get discretejobs list List<AscmWipRequirementOperations> list = DataBindAdvTreeSecondLevelNode(ascmGetMaterialTask.wipEntityId, ascmGetMaterialTask.mtlCategoryStatus); if (list != null && list.Count > 0) { advTreeGroup.BeginInit(); StrucureAdvTreeSecondLevelNode(list, nodeParent); advTreeGroup.EndInit(); } } }
private void treeList_BeforeExpand(object sender, AdvTreeNodeCancelEventArgs e) { if (e.Node.Nodes.Count == 1 && e.Node.Nodes[0].Tag.GetType() == typeof (string) && (string) e.Node.Nodes[0].Tag == "LAZY") { LazyLoadNodes(e.Node); } }