コード例 #1
0
 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);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: frmMonitorView.cs プロジェクト: gofixiao/Midea
 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;
     }
 }
コード例 #4
0
        /// <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;
        }
コード例 #5
0
 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;
     }
 }
コード例 #6
0
ファイル: EditModel.cs プロジェクト: uQr/Visual-NHibernate
        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);
            }
        }
コード例 #7
0
ファイル: ComboTree.cs プロジェクト: huamanhtuyen/VNACCS
 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;
     }
 }
コード例 #8
0
ファイル: BehaviorForm.cs プロジェクト: civicacid/myevo
 private void BePrePullRulesNodeDoubleClick(object sender, TreeNodeMouseEventArgs e)
 {
     EditRule(e.Node);
 }
コード例 #9
0
ファイル: ComboBoxEx.cs プロジェクト: huamanhtuyen/VNACCS
 private void TreeNodeMouseDown(object sender, TreeNodeMouseEventArgs e)
 {
     if (this.SelectionClosesPopup && e.Button == MouseButtons.Left && e.Node != null &&
         e.Node.IsSelected && _DroppedDown)
     {
         CloseMultiColumnDropDown();
     }
 }
コード例 #10
0
 private void treeBizdef_NodeDoubleClick(object sender, DevComponents.AdvTree.TreeNodeMouseEventArgs e)
 {
     SelectNode();
 }
コード例 #11
0
ファイル: ucFunctions.cs プロジェクト: uQr/Visual-NHibernate
 private void treeFunctions_NodeClick(object sender, TreeNodeMouseEventArgs e)
 {
     if (e.Node.Tag != null)
     {
         ShowFunction((FunctionInfo)e.Node.Tag, null);
     }
 }
コード例 #12
0
ファイル: MainForm.cs プロジェクト: viticm/pap2
 /// <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);
     }            
 }
コード例 #13
0
        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();
            }
        }
コード例 #14
0
        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, "");
                    }
                }
            }
        }
コード例 #15
0
 private void Tree_NodeDoubleClick(object sender, TreeNodeMouseEventArgs e)
 {
     SetListPanel(e.Node as KeyNode);
 }
コード例 #16
0
ファイル: RuleEditor.cs プロジェクト: civicacid/myevo
 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();
     }
 }
コード例 #17
0
ファイル: RuleEditor.cs プロジェクト: civicacid/myevo
 private void ConditionEditor_NodeClick(object sender, TreeNodeMouseEventArgs e)
 {
     if (selected != null)
     {
         selected.NodeClick(e.Node);
     }
 }
コード例 #18
0
 private void BeComRulesNodeClick(object sender, TreeNodeMouseEventArgs e)
 {
     _selected = e.Node;
     _selectedTree = BeRotations;
 }
コード例 #19
0
ファイル: PathControl.cs プロジェクト: civicacid/myevo
 private void ListSubProfilesNodeClick(object sender, TreeNodeMouseEventArgs e)
 {
     Node node = e.Node;
     if (node.Tag is SubProfile)
     {
         SelectNode(node);
     }
 }
コード例 #20
0
ファイル: BehaviorForm.cs プロジェクト: civicacid/myevo
 private void BePrePullRulesNodeClick(object sender, TreeNodeMouseEventArgs e)
 {
     _selected = e.Node;
     _selectedTree = BePrePullRules;
 }
コード例 #21
0
 /// <summary>
 /// 點下節點
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void treeWho_NodeClick(object sender, TreeNodeMouseEventArgs e)
 {
 }
コード例 #22
0
ファイル: usrClassList.cs プロジェクト: KunHsiang/ischedule
        /// <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;
                }
            }
        }
コード例 #23
0
ファイル: EditModel.cs プロジェクト: uQr/Visual-NHibernate
        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));
            }
        }