private void treeSqlSchema_NodeClick(object sender, DevComponents.AdvTree.TreeNodeMouseEventArgs e) { try { Node nodeSelect = treeSqlSchema.SelectedNode; if (nodeSelect != null) { if (nodeSelect.Name.IndexOf("TABLE_") > -1) { SqlSchemaEntity sqlSchemaEntity = (SqlSchemaEntity)nodeSelect.Parent.Tag; _mSqlSchemaId = sqlSchemaEntity.ID; TableEntity tableEntity = (TableEntity)nodeSelect.Tag; _mTableSpaceName = tableEntity.TableSpaceName; _mTableName = tableEntity.TableName; DataTable dt = SqlConfig.LoadSchemaTableColumns(_mSqlSchemaId, tableEntity.TableSpaceName, tableEntity.TableName); dgvColumns.DataSource = dt; if (dt.Rows.Count > 0) { dgvColumns.Rows[0].Selected = false; dgvColumns.CurrentCell = null; } } } } catch (Exception er) { MessageBox.Show(er.Message, "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void channel_list_NodeClick(object sender, DevComponents.AdvTree.TreeNodeMouseEventArgs e) { DevComponents.AdvTree.AdvTree tn = (DevComponents.AdvTree.AdvTree)sender; bool isbreak = false; foreach (DevComponents.AdvTree.Node item in tn.Nodes) { if (item.HasChildNodes) { foreach (DevComponents.AdvTree.Node n in item.Nodes) { if (n.IsSelected) { //active_ch = n.Cells[n.Cells.Count-1].Text; active_ch = n.Tag.ToString(); isbreak = true; break; } } if (isbreak) { isbreak = false; break; } } } ac_ch(active_ch); }
private void advTree1_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { try { if (e.Node.Parent != null && !string.IsNullOrEmpty(e.Node.Parent.Text)) { //string str = e.Node.Text + "," + e.Node.Parent.Text; //MessageBox.Show(str); frmMaterialList MaterialList = new frmMaterialList(); MaterialList.DiscreteJobsId = e.Node.Text; MaterialList.GetMaterialTaskId = e.Node.Parent.Text; MaterialList.ShowDialog(); } } catch (Exception ex) { throw ex; } }
/// <summary> /// Node被點擊 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void advTree1_NodeClick(object sender, DevComponents.AdvTree.TreeNodeMouseEventArgs e) { if (!(e.Node.Tag is SubjectTableItem)) { // 假如使用者點到母節點, 清掉選擇選項, 以免有問題 _SelectItem = null; this.subjectTableEditor1.Visible = false; BtnEnabled(false); return; } if (_SelectItem != null) { _SelectItem.Checked = false; } _SelectItem = e.Node; subjectTableEditor1.Content = ((SubjectTableItem)_SelectItem.Tag).Content; _SelectItem.Checked = true; BtnEnabled(true); this.subjectTableEditor1.Visible = true; }
private void PartCategories_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { if (CurrentWeaponParts.SelectedItem != null && PartCategories.SelectedNode.HasChildNodes == false) { CurrentWeaponParts.Items[CurrentWeaponParts.SelectedIndex] = PartCategories.SelectedNode.Parent.Text + "." + PartCategories.SelectedNode.Text; } }
private void treeList_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { Node treeListNode = e.Node; if (treeListNode == null || treeListNode.Tag == null || treeListNode.Text == "Relationships") { return; } if (BLL.Helper.GetBaseType(treeListNode.Tag) == typeof (Array)) { toolStripMenuItemTreeViewAdd_Click(null, null); } if (BLL.Helper.GetBaseType(treeListNode.Tag) == typeof (ScriptBase)) { toolStripMenuItemTreeViewEdit_Click(null, null); } }
void TreeNodeMouseDown(object sender, TreeNodeMouseEventArgs e) { if (this.SelectionClosesPopup && e.Button == MouseButtons.Left && e.Node != null && e.Node.IsSelected && this.IsPopupOpen && !e.Node.ExpandPartRectangle.Contains(e.X, e.Y)) { this.IsPopupOpen = false; } }
private void BePrePullRulesNodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { EditRule(e.Node); }
private void TreeNodeMouseDown(object sender, TreeNodeMouseEventArgs e) { if (this.SelectionClosesPopup && e.Button == MouseButtons.Left && e.Node != null && e.Node.IsSelected && _DroppedDown) { CloseMultiColumnDropDown(); } }
private void treeBizdef_NodeDoubleClick(object sender, DevComponents.AdvTree.TreeNodeMouseEventArgs e) { SelectNode(); }
private void treeFunctions_NodeClick(object sender, TreeNodeMouseEventArgs e) { if (e.Node.Tag != null) { ShowFunction((FunctionInfo)e.Node.Tag, null); } }
/// <summary> /// 帮会树鼠标按下 /// </summary> /// <param name="sender">事件发送者</param> /// <param name="e">事件参数</param> private void tongTree_NodeMouseDown(object sender, TreeNodeMouseEventArgs e) { if (e.Button == MouseButtons.Right && e.Node != null && e.Node.Level == 0) { Point location = new Point(e.X, e.Y) + new Size(tongTree.RectangleToScreen(tongTree.ClientRectangle).Location) - new Size(tongTree.AutoScrollOffset); // 坐标转换,处理滚动条滚动的情况 bTong.Popup(location); } }
private void advTreeGroup_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { if (e.Node.Parent != null) { //Double click discretejob, pop-up dialog frmMaterialListDialog frmMaterialListDialog = new frmMaterialListDialog(); if (e.Node.Parent.Tag as AscmGetMaterialTask != null) frmMaterialListDialog.taskId = ((AscmGetMaterialTask)e.Node.Parent.Tag).id; else frmMaterialListDialog.taskId = 0; if (e.Node.Tag as AscmWipDiscreteJobs != null) frmMaterialListDialog.jobId = ((AscmWipDiscreteJobs)e.Node.Tag).wipEntityId; else frmMaterialListDialog.jobId = 0; frmMaterialListDialog.ShowDialog(); } }
private void advTreeGroup_NodeClick(object sender, TreeNodeMouseEventArgs e) { e.Node.Checked = !e.Node.Checked; if (!string.IsNullOrEmpty(releaseHeaderIds)) releaseHeaderIds += ","; if (e.Node.Parent != null) { //Select discretejob to get data, and then excuted mark operation //if (e.Node.Parent.Tag as AscmWipDiscreteJobs != null) // this.taskId = ((AscmWipDiscreteJobs)e.Node.Parent.Tag).wipEntityId.ToString(); if (e.Node.Tag as AscmWipRequirementOperations != null) this.jobId = ((AscmWipRequirementOperations)e.Node.Tag).id.ToString(); //Confirmed tasks Id or discrete jobs Id string getMaterialId = "[" + this.jobId + "]"; if (e.Node.Checked) { releaseHeaderIds += getMaterialId; } else { if (!string.IsNullOrEmpty(releaseHeaderIds)) releaseHeaderIds = releaseHeaderIds.Replace(getMaterialId, ""); } } else { //Select task's details if (e.Node.Tag as AscmWipDiscreteJobs != null) this.taskDetails = (AscmWipDiscreteJobs)e.Node.Tag; //Select the job associated with the selected task if (e.Node.Expanded) { foreach (Node node in e.Node.Nodes) { node.Checked = e.Node.Checked; } } //Confirmed tasks Id or discrete jobs Id string getMaterialId = this.taskDetails.wipEntityId.ToString(); if (!string.IsNullOrEmpty(this.taskDetails.mtlCategoryStatus)) { getMaterialId = getMaterialId + ":" + this.taskDetails.mtlCategoryStatus; } if (e.Node.Checked) { releaseHeaderIds += getMaterialId; } else { if (!string.IsNullOrEmpty(releaseHeaderIds)) { string[] arr = releaseHeaderIds.Split(','); releaseHeaderIds = ""; foreach (string s in arr) { if (s != getMaterialId&&!string.IsNullOrEmpty(s)) { if (!string.IsNullOrEmpty(releaseHeaderIds)) releaseHeaderIds += ","; releaseHeaderIds += s; } } //releaseHeaderIds = releaseHeaderIds.Replace(getMaterialId, ""); } } } }
private void Tree_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e) { SetListPanel(e.Node as KeyNode); }
private void AllConditions_NodeClick(object sender, TreeNodeMouseEventArgs e) { Node node = e.Node; if (node.Tag is AbstractCondition) { AllConditions.BeginUpdate(); selected = (AbstractCondition) node.Tag; ConditionEditor.Nodes.Clear(); foreach (Node conNode in selected.GetNodes()) { ConditionEditor.Nodes.Add(conNode); } AllConditions.EndUpdate(); } }
private void ConditionEditor_NodeClick(object sender, TreeNodeMouseEventArgs e) { if (selected != null) { selected.NodeClick(e.Node); } }
private void BeComRulesNodeClick(object sender, TreeNodeMouseEventArgs e) { _selected = e.Node; _selectedTree = BeRotations; }
private void ListSubProfilesNodeClick(object sender, TreeNodeMouseEventArgs e) { Node node = e.Node; if (node.Tag is SubProfile) { SelectNode(node); } }
private void BePrePullRulesNodeClick(object sender, TreeNodeMouseEventArgs e) { _selected = e.Node; _selectedTree = BePrePullRules; }
/// <summary> /// 點下節點 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void treeWho_NodeClick(object sender, TreeNodeMouseEventArgs e) { }
/// <summary> /// 處理點選右鍵 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void treeWho_NodeMouseDown(object sender, TreeNodeMouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Right) { string TagString = e.Node.TagString; if (e.Node.Text.StartsWith("所有")) { menuExpand.Visible = true; menuCollapse.Visible = true; menuOpenNewLPView.Visible = false; } else if (!string.IsNullOrEmpty(TagString)) { menuExpand.Visible = false; menuCollapse.Visible = false; menuOpenNewLPView.Visible = true; } else { menuExpand.Visible = false; menuCollapse.Visible = false; menuOpenNewLPView.Visible = false; } } }
private void treeList_NodeClick(object sender, TreeNodeMouseEventArgs e) { if (e.Button == MouseButtons.Right) { HideAllMenuItems(contextMenuStripTreeView); Node treeListNode = e.Node; treeList.SelectedNode = treeListNode; Type tagBaseType = BLL.Helper.GetBaseType(treeListNode.Tag); Type tagType = treeListNode.Tag.GetType(); if (treeListNode == null || treeListNode.Tag == null || tagType == typeof (Model.Database) || treeListNode.Text == "Tables" || treeListNode.Text == "Views" || treeListNode.Text == "Stored Procedures") { refreshToolStripMenuItem.Visible = true; } if (treeListNode == null || treeListNode.Tag == null || tagType == typeof (Model.Database) || treeListNode.Text == "Relationships" || treeListNode.Text == "Parameters" || treeListNode.Parent.Text == "Parameters") { return; } else if (tagBaseType == typeof (Array)) { toolStripMenuItemTreeViewAdd.Visible = true; toolStripMenuItemTreeViewEdit.Visible = true; toolStripMenuItemTreeViewDelete.Visible = true; toolStripMenuItemTreeViewAdd.Enabled = true; toolStripMenuItemTreeViewEdit.Enabled = false; toolStripMenuItemTreeViewDelete.Enabled = false; } else if (tagBaseType == typeof (ScriptBase)) { toolStripMenuItemTreeViewAdd.Visible = true; toolStripMenuItemTreeViewEdit.Visible = true; toolStripMenuItemTreeViewDelete.Visible = true; toolStripMenuItemTreeViewAdd.Enabled = false; toolStripMenuItemTreeViewEdit.Enabled = true; ScriptBase scriptBase = (ScriptBase) treeListNode.Tag; if (ModelTypes.MapColumn.IsInstanceOfType(scriptBase)) { toolStripMenuItemTreeViewDelete.Enabled = true; } else { toolStripMenuItemTreeViewDelete.Enabled = scriptBase.IsUserDefined; } } else if (tagType == typeof (List<Association>)) { toolStripMenuItemTreeViewAdd.Visible = true; toolStripMenuItemTreeViewEdit.Visible = true; toolStripMenuItemTreeViewDelete.Visible = true; toolStripMenuItemTreeViewAdd.Enabled = true; toolStripMenuItemTreeViewEdit.Enabled = false; toolStripMenuItemTreeViewDelete.Enabled = false; } // Map Columns if (tagType == typeof (Column[])) { toolStripMenuItemTreeViewAddMapColumn.Enabled = true; toolStripMenuItemTreeViewAddMapColumn.Visible = true; } // Stored Procedure Execute else if (tagType == typeof (StoredProcedure)) { toolStripMenuItemTreeViewExecuteStoredProcedure.Enabled = true; toolStripMenuItemTreeViewExecuteStoredProcedure.Visible = true; } else if (tagType == typeof (Option)) { toolStripMenuItemTreeViewEdit.Enabled = true; toolStripMenuItemTreeViewEdit.Visible = true; } else if (tagType == typeof (Association)) { toolStripMenuItemTreeViewEdit.Enabled = true; toolStripMenuItemTreeViewEdit.Visible = true; toolStripMenuItemTreeViewDelete.Enabled = true; toolStripMenuItemTreeViewDelete.Visible = true; } contextMenuStripTreeView.Show(treeList, new Point(e.X, e.Y)); } }