private void advTreePoints_AfterCheck(object sender, AdvTreeCellEventArgs e) { //暂时去除事件,防止选中重复响应 this.advTreePoints.AfterCheck -= new DevComponents.AdvTree.AdvTreeCellEventHandler(this.advTreePoints_AfterCheck); Node nodeSelected = e.Cell.Parent; if (nodeSelected == null) { return; } //如果有子节点,表示是分组 if (nodeSelected.HasChildNodes) { GroupNodeAfterCheck(nodeSelected); } else { NodeAfterCheck(nodeSelected); } FormTabBase formTabBase = tabControlMain.SelectedPanel.Controls[0] as FormTabBase; formTabBase.DataRefresh(); SetLabelStatusSelectedPoints(); //重新注册事件 this.advTreePoints.AfterCheck += new DevComponents.AdvTree.AdvTreeCellEventHandler(this.advTreePoints_AfterCheck); }
private void doorTree_AfterCheck(object sender, AdvTreeCellEventArgs e) { if (e.Action == eTreeAction.Mouse) { ShowDoorText(); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void advTree1_AfterCheck(object sender, AdvTreeCellEventArgs e) { Node n = e.Cell.Parent; advTree1.AfterCheck -= this.advTree1_AfterCheck; foreach (Node tn in n.Nodes) { if (tn.CheckBoxStyle != DevComponents.DotNetBar.eCheckBoxStyle.RadioButton) { tn.Checked = n.Checked; } } if (n.Parent != null) { Node p = n.Parent; bool flag = true; foreach (Node item in p.Nodes) { if (item.CheckBoxStyle != DevComponents.DotNetBar.eCheckBoxStyle.RadioButton) { flag &= item.Checked; } } p.Checked = flag; } if (control != null) { NodeChangeHandler(); } advTree1.AfterCheck += this.advTree1_AfterCheck; }
/// <summary> /// 节点Check事件,用于查询图层内容 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void advTreeMain_AfterCheck(object sender, AdvTreeCellEventArgs e) { Node checkNode = e.Cell.Parent; AbstractLayer lyr = this.GetLayerByName(checkNode.Text); //影像图层加载 if (lyr == null) { string path = Path.Combine(Path.GetDirectoryName(_projectPath), checkNode.Text + ".xml"); if (File.Exists(path) == false) { return; } DomLayerInfo lyrInfo = XmlHelper.Deserialize <DomLayerInfo>(path); if (lyrInfo == null) { return; } lyr = LayerLoader.CreateDomLyr(lyrInfo, _globeView); } if (lyr != null) { lyr.Visible = e.Cell.Checked; } //飞行 if (e.Cell.Checked) { this.LocLyrByName(checkNode.Text); } }
/// <summary> /// Called when a layer visibility checkbox state is changed /// </summary> void toggleLayerVisibility(object sender, AdvTreeCellEventArgs e) { if (world == null) { return; } world.ToggleLayer(selectedForWorld, e.Cell.Checked); world.InvalidateCanvas(); }
private void rackAdvTree_AfterCheck(object sender, AdvTreeCellEventArgs e) { foreach (Node baseNode in rackAdvTree.Nodes) { foreach (Node rootNode in baseNode.Nodes) { Rack rack = (Rack)rootNode.Tag; rack.IsTested = rootNode.Checked; } } testedRacks.SaveThis(); }
/// <summary> /// node点击 /// 2015/05/22(zhugaunjun) /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void advTree1_AfterCheck(object sender, AdvTreeCellEventArgs e) { string text = ""; //显示值 string vall = ""; //实际值 txtDependency.Clear(); foreach (dynamic node in advTree1.Nodes) { if (node.Checked) { text += node.Text + ","; vall += node.Name + ","; } nodetext(node, text, vall); } this.txtDependency.Text = text; this.txtDependency.Tag = vall; }
private void advTree1_AfterCheck(object sender, AdvTreeCellEventArgs e) { //如果通过代码 设置 check 则不执行 鼠标判断 if (e.Action == eTreeAction.Code) { return; } foreach (Node node in advTreeUnSel.Nodes) { if (node.Checked && node.IsMouseOver) { node.Checked = true; } else { node.Checked = false; } } }
private void advTreeTables_AfterCheck(object sender, AdvTreeCellEventArgs e) { if (BusyApplyingCheckStates) { return; } BusyApplyingCheckStates = true; advTreeTables.BeginUpdate(); Node node = e.Cell.Parent; //if (node.Parent == null) // Check for schema nodes - Level 1 if (node.Parent != null && node.Parent.Parent == null) { if ((node.CheckBoxThreeState && node.CheckState != CheckState.Checked) || (!node.CheckBoxThreeState && !node.Checked)) { node.CheckBoxThreeState = false; node.SetChecked(false, eTreeAction.Code); } else { node.CheckBoxThreeState = false; node.SetChecked(true, eTreeAction.Code); } foreach (Node childNode in node.Nodes) { childNode.SetChecked(node.Checked, eTreeAction.Code); } } //else else if (node.Parent != null) { ResetTopLevelNodeCheckState(node); } advTreeTables.EndUpdate(); BusyApplyingCheckStates = false; }
private void advTree1_AfterCheck(object sender, AdvTreeCellEventArgs e) { if (e.Action == eTreeAction.Code) { return; } // HasRootNode if (HasRootNode) { Node rootNodes = advTree1.Nodes[0]; if (rootNodes.IsSelected) { foreach (Node node in rootNodes.Nodes) { node.Checked = rootNodes.Checked; } } return; //不带root 带check } if (HasCheck) { if (MuliteCheck) { return; } foreach (Node node in advTree1.Nodes) { if (node.Checked && node.IsMouseOver) { node.Checked = true; } else { node.Checked = false; } } return; } }
private void advAllDoc_AfterCheck(object sender, AdvTreeCellEventArgs e) { if (advAllDoc.SelectedNode != null) { //子节点全选中父节点自动选中,子节点取消父节点自动取消选中 if (advAllDoc.SelectedNode.Nodes.Count == 0) { Node parentNode = advAllDoc.SelectedNode.Parent; if (parentNode == null) { return; } if (!advAllDoc.SelectedNode.Checked) { parentNode.Checked = false; } else { bool flag = false; for (int i = 0; i < parentNode.Nodes.Count; i++) { if (parentNode.Nodes[i].Checked == false) { flag = true; break; } } if (!parentNode.Checked && !flag) { parentNode.Checked = true; } } } else { SetCheckState(advAllDoc.SelectedNode); } } }
private void advTree_AfterCheck(object sender, AdvTreeCellEventArgs e) { _selectDevices = advTree.GetTypeList <Maticsoft.Model.SMT_FACERECG_DEVICE>(CheckState.Checked); DoSearch(null, null, null); }
private void advTree1_AfterCheck(object sender, AdvTreeCellEventArgs e) { CheckChanged(); }
private void files_Tree_AfterCheck(object sender, AdvTreeCellEventArgs e) { }