コード例 #1
0
ファイル: EntryNameNodeText.cs プロジェクト: yuo123/CK2Editor
        public override void MouseDoubleClick(TreeNodeAdvMouseEventArgs args)
        {
            base.MouseDoubleClick(args);
            Entry ent = args.Node.Tag as Entry;

            ((FileEditorGUI)this.Parent.Model).OnModifyEntry(ent, args.Node);
        }
コード例 #2
0
		public override void MouseDown(TreeNodeAdvMouseEventArgs args)
		{
			if (args.Node != null)
			{
				Tree.ItemDragMode = true;
				Tree.ItemDragStart = args.Location;

				if (args.Button == MouseButtons.Left || args.Button == MouseButtons.Right)
				{
					Tree.BeginUpdate();
					try
					{
						Tree.CurrentNode = args.Node;
						if (args.Node.IsSelected)
							_mouseDownFlag = true;
						else
						{
							_mouseDownFlag = false;
							DoMouseOperation(args);
						}
					}
					finally
					{
						Tree.EndUpdate();
					}
				}

			}
			else
			{
				Tree.ItemDragMode = false;
				MouseDownAtEmptySpace(args);
			}
		}
コード例 #3
0
        public override void MouseDown(TreeNodeAdvMouseEventArgs args)
        {
            // Handling of the right click does not need view update
            if (args.Button != MouseButtons.Right)
            {
                Tree.ChangeInput();
                Tree.UpdateView();
            }

            Tree.OnColumnClicked(Column, args.Button);
        }
コード例 #4
0
        public override void MouseDown(TreeNodeAdvMouseEventArgs args)
        {
            // Handling of the right click does not need view update
            if (args.Button != MouseButtons.Right)
            {
                Tree.ChangeInput();
                Tree.UpdateView();
            }

            Tree.OnColumnClicked(Column, args.Button);
        }
コード例 #5
0
 private void _treeView_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e)
 {
     if (e.Button == System.Windows.Forms.MouseButtons.Left)
     {
         BaseContentInventoryNode node = e.Node.Tag as BaseContentInventoryNode;
         if (node != null)
         {
             e.Handled = true;
             EditNode(node.Content);
         }
     }
 }
コード例 #6
0
 protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
 {
     if (Tree.SelectionMode == TreeSelectionMode.Single)
     {
         base.DoMouseOperation(args);
     }
     else if (CanSelect(args.Node))
     {
         args.Node.IsSelected = !args.Node.IsSelected;
         Tree.SelectionStart = args.Node;
     }
 }
コード例 #7
0
        protected override void OnMouseClick(MouseEventArgs e)
        {
            //TODO: Disable when click on plusminus icon
            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            if (args.Node != null)
            {
                OnNodeMouseClick(args);
            }

            base.OnMouseClick(e);
        }
コード例 #8
0
 protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
 {
     if (Tree.SelectionMode == TreeSelectionMode.Single)
     {
         base.DoMouseOperation(args);
     }
     else if (CanSelect(args.Node))
     {
         args.Node.IsSelected = !args.Node.IsSelected;
         Tree.SelectionStart  = args.Node;
     }
 }
コード例 #9
0
		public override void MouseDown(TreeNodeAdvMouseEventArgs args)
		{
			TreeNode content = ((TreeViewVarNode)args.Node).Content;
			if (content is IContextMenu && args.Button == MouseButtons.Right) {
				ContextMenuStrip menu = ((IContextMenu)content).GetContextMenu();
				if (menu != null) {
					menu.Show(args.Node.Tree, args.Location);
					args.Handled = true;
				}
			} else {
				base.MouseDown(args);
			}
		}
コード例 #10
0
        private TreeNodeAdvMouseEventArgs CreateMouseArgs(MouseEventArgs e)
        {
            TreeNodeAdvMouseEventArgs args = new TreeNodeAdvMouseEventArgs(e);

            args.ViewLocation = new Point(e.X + OffsetX,
                                          e.Y + _rowLayout.GetRowBounds(FirstVisibleRow).Y - ColumnHeaderHeight);
            args.ModifierKeys = ModifierKeys;
            args.Node         = GetNodeAt(e.Location);
            NodeControlInfo info = GetNodeControlInfoAt(args.Node, e.Location);

            args.ControlBounds = info.Bounds;
            args.Control       = info.Control;
            return(args);
        }
コード例 #11
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            if (!Focused)
            {
                Focus();
            }

            Search.EndSearch();
            if (e.Button == MouseButtons.Left)
            {
                TreeColumn c;
                c = GetColumnAt(e.Location, true);
                if (c != null)
                {
                    Input = new ResizeColumnState(this, c, e.Location);
                    return;
                }
                c = GetColumnAt(e.Location, false);
                if (c != null)
                {
                    Input = new ClickColumnState(this, c, e.Location);
                    UpdateView();
                    return;
                }
            }

            ChangeInput();
            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            if (args.Node != null && args.Control != null)
            {
                args.Control.MouseDown(args);
            }

            // [xiperware] toggle on single click
            if (!args.Handled)
            {
                if (args.Node != null && args.Button == MouseButtons.Left)
                {
                    args.Node.IsExpanded = !args.Node.IsExpanded;
                }
            }

            if (!args.Handled)
            {
                Input.MouseDown(args);
            }

            base.OnMouseDown(e);
        }
コード例 #12
0
        protected override void OnMouseClick(MouseEventArgs e)
        {
            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            if (args.Node != null)
            {
                OnNodeMouseClick(args);
            }

            base.OnMouseClick(e);

            this.FullUpdate();
            this.Invalidate();
        }
コード例 #13
0
 public override void MouseUp(TreeNodeAdvMouseEventArgs args)
 {
     Tree.ItemDragMode = false;
     if (/*_mouseDownFlag && */ args.Node != null)
     {
         if (args.Button == MouseButtons.Left && !(this is InputWithControl))
         {
             DoMouseOperation(args, false);
         }
         else if (args.Button == MouseButtons.Right)
         {
             Tree.CurrentNode = args.Node;
         }
     }
     _mouseDownFlag = false;
 }
コード例 #14
0
 public override void MouseUp(TreeNodeAdvMouseEventArgs args)
 {
     Tree.ItemDragMode = false;
     if (_mouseDownFlag)
     {
         if (args.Button == MouseButtons.Left)
         {
             DoMouseOperation(args);
         }
         else if (args.Button == MouseButtons.Right)
         {
             Tree.CurrentNode = args.Node;
         }
     }
     _mouseDownFlag = false;
 }
コード例 #15
0
        private string GetNodeToolTip(TreeNodeAdvMouseEventArgs args)
        {
            string msg = null;

            BaseTextControl btc = args.Control as BaseTextControl;

            if (btc != null && btc.DisplayHiddenContentInToolTip)
            {
                Size ms = btc.MeasureSize(args.Node, _measureContext);
                if (ms.Width > args.ControlBounds.Size.Width || ms.Height > args.ControlBounds.Size.Height)
                {
                    // [xiperware] || args.ControlBounds.Right - OffsetX > DisplayRectangle.Width)
                    msg = btc.GetLabel(args.Node);
                }
            }

            if (String.IsNullOrEmpty(msg))
            {
                msg = args.Control.GetToolTip(args.Node);
            }

            if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null)
            {
                msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control);
            }

            return(msg);

            /*  [xiperware]  give displayhiddencontent higher priority than custom tooltip
             *
             * string msg = args.Control.GetToolTip(args.Node);
             *
             *                BaseTextControl btc = args.Control as BaseTextControl;
             *                if (btc != null && btc.DisplayHiddenContentInToolTip && String.IsNullOrEmpty(msg))
             *                {
             *                        Size ms = btc.MeasureSize(args.Node, _measureContext);
             *                        if (ms.Width > args.ControlBounds.Size.Width || ms.Height > args.ControlBounds.Size.Height
             || args.ControlBounds.Right - OffsetX > DisplayRectangle.Width)
             ||                               msg = btc.GetLabel(args.Node);
             ||               }
             ||
             ||               if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null)
             ||                       msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control);
             ||
             ||               return msg;
             */
        }
コード例 #16
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            if (CurrentEditorOwner != null)
            {
                CurrentEditorOwner.EndEdit(true);
                return;
            }

            if (!Focused)
            {
                Focus();
            }

            _search.EndSearch();
            if (e.Button == MouseButtons.Left)
            {
                TreeColumn c;
                c = GetColumnDividerAt(e.Location);
                if (c != null)
                {
                    Input = new ResizeColumnState(this, c, e.Location);
                    return;
                }
                c = GetColumnAt(e.Location);
                if (c != null)
                {
                    Input = new ClickColumnState(this, c, e.Location);
                    UpdateView();
                    return;
                }
            }

            ChangeInput();
            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            if (args.Node != null && args.Control != null)
            {
                args.Control.MouseDown(args);
            }

            if (!args.Handled)
            {
                Input.MouseDown(args);
            }

            base.OnMouseDown(e);
        }
コード例 #17
0
        protected override void OnMouseDown(MouseEventArgs e)
        {
            _dragEscaped = false;

            if (CurrentEditorOwner != null)
            {
                CurrentEditorOwner.EndEdit(true);
                return;
            }

            if (!Focused && this.GetStyle(ControlStyles.Selectable))
            {
                Focus();
            }

            //_search?.EndSearch();
            if (e.Button == MouseButtons.Left)
            {
                TreeColumn c;
                c = GetColumnDividerAt(e.Location);
                if (c != null)
                {
                    Input = new ResizeColumnState(this, c, e.Location);
                    return;
                }
                c = GetColumnAt(e.Location);
                if (c != null)
                {
                    Input = new ClickColumnState(this, c, e.Location);
                    UpdateView();
                    return;
                }
            }

            ChangeInput();
            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            args.Control?.MouseDown(args);

            if (!args.Handled)
            {
                Input.MouseDown(args);
            }

            base.OnMouseDown(e);
        }
コード例 #18
0
        protected override void OnMouseClick(MouseEventArgs e)
        {
            if (_dragEscaped)
            {
                return;
            }
            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            if (args.Node != null)
            {
                if (!(args.Control is NodePlusMinus))
                {
                    OnNodeMouseClick(args);
                }
            }
            base.OnMouseClick(e);
        }
コード例 #19
0
ファイル: InputWithShift.cs プロジェクト: alexfordc/Au
 protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
 {
     if (Tree.SelectionMode == TreeSelectionMode.Single || Tree.SelectionStart == null)
     {
         base.DoMouseOperation(args);
     }
     else if (CanSelect(args.Node))
     {
         Tree.SuspendSelectionEvent(SelectionReason.Multi);
         try {
             SelectAllFromStart(args.Node);
         }
         finally {
             Tree.ResumeSelectionEvent();
         }
     }
 }
コード例 #20
0
        public override void MouseUp(TreeNodeAdvMouseEventArgs args)
        {
            Tree.ItemDragMode = false;
            if (_mouseDownFlag && args.Node != null)
            {
                if (_mouseDownFlag && args.Button == MouseButtons.Left)
                {
                    DoMouseOperation(args, false);
                }

                _mouseDownFlag = false;
            }
            else
            {
                base.MouseUp(args);
            }
        }
コード例 #21
0
        public override void MouseUp(TreeNodeAdvMouseEventArgs args)
        {
            if (_mouseDownFlag)
            {
                switch (args.Button)
                {
                case MouseButtons.Left:
                    this.DoMouseOperation(args);
                    break;

                case MouseButtons.Right:
                    this.Tree.CurrentNode = args.Node;
                    break;
                }
            }
            _mouseDownFlag = false;
        }
コード例 #22
0
 protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
 {
     Tree.SuspendSelectionEvent = true;
     try
     {
         Tree.ClearSelection();
         if (args.Node != null)
         {
             args.Node.IsSelected = true;
         }
         Tree.SelectionStart = args.Node;
     }
     finally
     {
         Tree.SuspendSelectionEvent = false;
     }
 }
コード例 #23
0
        private string GetNodeToolTip(TreeNodeAdvMouseEventArgs args)
        {
            string msg = args.Control.GetToolTip(args.Node);

            if (args.Control is BaseTextControl btc && btc.DisplayHiddenContentInToolTip && String.IsNullOrEmpty(msg))
            {
                Size ms = btc.GetActualSize(args.Node, _measureContext);
                //if (ms.Width > args.ControlBounds.Size.Width || ms.Height > args.ControlBounds.Size.Height || args.ControlBounds.Right - OffsetX > DisplayRectangle.Width)
                msg = btc.GetLabel(args.Node);
            }

            if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null)
            {
                msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control);
            }

            return(msg);
        }
コード例 #24
0
 protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
 {
     if (this.Tree.SelectionMode == TreeSelectionMode.Single || this.Tree.SelectionStart == null)
     {
         base.DoMouseOperation(args);
     }
     else if (CanSelect(args.Node))
     {
         this.Tree.SuspendSelectionEvent = true;
         try
         {
             SelectAllFromStart(args.Node);
         }
         finally
         {
             this.Tree.SuspendSelectionEvent = false;
         }
     }
 }
コード例 #25
0
 protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
 {
     if (Tree.SelectionMode == TreeSelectionMode.Single || Tree.SelectionStart == null)
     {
         base.DoMouseOperation(args);
     }
     else if (CanSelect(args.Node))
     {
         Tree.SuspendSelectionEvent = true;
         try
         {
             SelectAllFromStart(args.Node);
         }
         finally
         {
             Tree.SuspendSelectionEvent = false;
         }
     }
 }
コード例 #26
0
        protected override void OnMouseDoubleClick(MouseEventArgs e)
        {
            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            if (args.Node != null && args.Control != null)
            {
                args.Control.MouseDoubleClick(args);
            }

            if (!args.Handled)
            {
                if (args.Node != null)
                {
                    OnNodeMouseDoubleClick(args);
                }
            }

            base.OnMouseDoubleClick(e);
        }
コード例 #27
0
        protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
        {
            if (Tree.SelectedNodes.Count == 1 && args.Node != null && args.Node.IsSelected)
            {
                return;
            }

            Tree.SuspendSelectionEvent(args.Button == MouseButtons.Left ? SelectionReason.LeftClick : SelectionReason.RightClick);
            try {
                Tree.ClearSelectionInternal();
                if (args.Node != null)
                {
                    args.Node.IsSelected = true;
                }
                Tree.SelectionStart = args.Node;
            }
            finally {
                Tree.ResumeSelectionEvent();
            }
        }
コード例 #28
0
        public override void MouseDown(TreeNodeAdvMouseEventArgs args)
        {
            if (args.Node != null)
            {
                if (args.Button == MouseButtons.Left || args.Button == MouseButtons.Right)
                {
                    if (args.Node.IsSelected)
                    {
                        _mouseDownFlag = true;
                        return;
                    }
                    else
                    {
                        _mouseDownFlag = false;
                    }
                }
            }

            base.MouseDown(args);
        }
コード例 #29
0
        protected override void OnMouseUp(MouseEventArgs e)
        {
            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            if (Input is ResizeColumnState)
            {
                Input.MouseUp(args);
            }
            else
            {
                if (args.Node != null && args.Control != null)
                {
                    args.Control.MouseUp(args);
                }
                if (!args.Handled)
                {
                    Input.MouseUp(args);
                }

                base.OnMouseUp(e);
            }
        }
コード例 #30
0
        protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
        {
            if (Tree.SelectedNodes.Count == 1 && args.Node != null && args.Node.IsSelected)
            {
                return;
            }

            Tree.SuspendSelectionEvent = true;
            try
            {
                Tree.ClearSelectionInternal();
                if (args.Node != null)
                {
                    args.Node.IsSelected = true;
                }
                Tree.SelectionStart = args.Node;
            }
            finally
            {
                Tree.SuspendSelectionEvent = false;
            }
        }
コード例 #31
0
        protected override void OnMouseDoubleClick(MouseEventArgs e)
        {
            TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e);

            if (args.Node != null && args.Control != null)
            {
                args.Control.MouseDoubleClick(args);
            }

            if (!args.Handled)
            {
                // disabled by wj32 - I think this behaviour sucks.
                //if (args.Node != null && args.Button == MouseButtons.Left)
                //    args.Node.IsExpanded = !args.Node.IsExpanded;

                if (args.Node != null)
                {
                    OnNodeMouseDoubleClick(args);
                }
            }

            base.OnMouseDoubleClick(e);
        }
コード例 #32
0
        protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
        {
            if (Tree.SelectedNodes.Count == 1 && args.Node.IsSelected && Tree.ColumnSelectionMode == ColumnSelectionMode.All)
            {
                return;
            }

            Tree.SuspendSelectionEvent = true;
            try
            {
                Tree.ClearSelectionInternal();
                if (args.Node != null)
                {
                    args.Node.IsSelected     = true;
                    Tree.SelectedColumnIndex = ((args.Control != null) && (args.Control.ParentColumn != null)) ? args.Control.ParentColumn.Index : -1;
                }
                Tree.SelectionStart = args.Node;
            }
            finally
            {
                Tree.SuspendSelectionEvent = false;
            }
        }
コード例 #33
0
        private string GetNodeToolTip(TreeNodeAdvMouseEventArgs args)
        {
            string msg = args.Control.GetToolTip(args.Node);

            BaseTextControl btc = args.Control as BaseTextControl;

            if (btc != null && btc.DisplayHiddenContentInToolTip && String.IsNullOrEmpty(msg))
            {
                //SHOULDDO: now no tooltip for multiline when TrimMultiLine true
                Size ms = btc.GetActualSize(args.Node, _measureContext);
                if (ms.Width > args.ControlBounds.Width || ms.Height > args.ControlBounds.Height ||
                    args.ControlBounds.Right - OffsetX > DisplayRectangle.Width)
                {
                    msg = btc.GetLabel(args.Node);
                }
            }

            if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null)
            {
                msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control);
            }

            return(msg);
        }
コード例 #34
0
ファイル: NormalInputState.cs プロジェクト: redoz/bitdiffer
        protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
        {
            if (Tree.SelectedNodes.Count == 1 && args.Node.IsSelected && Tree.ColumnSelectionMode == ColumnSelectionMode.All)
                return;

            Tree.SuspendSelectionEvent = true;
            try
            {
                Tree.ClearSelectionInternal();
                if (args.Node != null)
                {
                    args.Node.IsSelected = true;
                    Tree.SelectedColumnIndex = ((args.Control != null) && (args.Control.ParentColumn != null)) ? args.Control.ParentColumn.Index : -1;
                }
                Tree.SelectionStart = args.Node;
            }
            finally
            {
                Tree.SuspendSelectionEvent = false;
            }
        }
コード例 #35
0
 private void folderView_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e)
 {
     if (e.Node == null) return;
     this.OpenResource(e.Node);
 }
コード例 #36
0
 private void treeView_NodeMouseDoubleClick(object sender, 
     TreeNodeAdvMouseEventArgs e)
 {
     SensorNode node = e.Node.Tag as SensorNode;
       if (node != null && node.Sensor != null &&
     node.Sensor.Parameters.Length > 0) {
     ShowParameterForm(node.Sensor);
       }
 }
コード例 #37
0
		protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
		{
			if (Tree.SelectedNodes.Count == 1 && args.Node != null && args.Node.IsSelected)
				return;

			Tree.SuspendSelectionEvent = true;
			try
			{
				Tree.ClearSelectionInternal();
				if (args.Node != null)
					args.Node.IsSelected = true;
				Tree.SelectionStart = args.Node;
			}
			finally
			{
				Tree.SuspendSelectionEvent = false;
			}
		}
コード例 #38
0
 public override void MouseUp(TreeNodeAdvMouseEventArgs args) {
     //Workaround of specific ComboBox control behaviour
     if (args.Node != null && args.Node.IsSelected) {
         base.MouseUp(args);
     }
 }
コード例 #39
0
 public override void MouseUp(TreeNodeAdvMouseEventArgs args)
 {
     this.Tree.ChangeInput();
     this.Tree.UpdateView();
     this.Tree.OnColumnClicked(this.Column);
 }
コード例 #40
0
ファイル: SceneView.cs プロジェクト: ChrisLakeZA/duality
 private void objectView_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e)
 {
     e.Handled = this.OpenResource(e.Node);
 }
コード例 #41
0
 private void OnPreviewNode(object sender, TreeNodeAdvMouseEventArgs e)
 {
     SetSelectedObject(e.Node);
     UpdatePreview();
 }
コード例 #42
0
 void _tree_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e)
 {
     DataNode node = e.Node.Tag as DataNode;
     if (node.Text == "..." && node.Variable == null)
     {
         e.Handled = true;
         _tree.BeginUpdate();
         (node.Parent as DataNode).ChildrenShowLimit += 500;
         TreeNodeAdv parent = e.Node.Parent;
         int ind = e.Node.Index;
         parent.Collapse(true);
         node.Parent.Nodes.Clear();
         parent.Expand(true);
         _tree.EndUpdate();
         if (parent.Children.Count>ind) _tree.ScrollTo(parent.Children[ind]);
     }
 }
コード例 #43
0
ファイル: TreeViewAdv.Input.cs プロジェクト: redoz/bitdiffer
 private TreeNodeAdvMouseEventArgs CreateMouseArgs(MouseEventArgs e)
 {
     TreeNodeAdvMouseEventArgs args = new TreeNodeAdvMouseEventArgs(e);
     args.ViewLocation = new Point(e.X + OffsetX,
         e.Y + _rowLayout.GetRowBounds(FirstVisibleRow).Y - ColumnHeaderHeight);
     args.ModifierKeys = ModifierKeys;
     args.Node = GetNodeAt(e.Location);
     NodeControlInfo info = GetNodeControlInfoAt(args.Node, e.Location);
     args.ControlBounds = info.Bounds;
     args.Control = info.Control;
     return args;
 }
コード例 #44
0
 private void treeProcesses_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e)
 {
     propertiesProcessMenuItem_Click(null, null);
 }
コード例 #45
0
		public override void MouseUp(TreeNodeAdvMouseEventArgs args)
		{
			FinishResize();
		}
コード例 #46
0
        private void columnsTreeView_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e)
        {
            if (e.Node != null && e.Node.Tag != null)
              {
            GrtListNode node = e.Node.Tag as GrtListNode;

            if (node != null && e.Control == columnIconNodeControl)
            {
              int isPk;

              columnsListModel.GrtList.get_field(node.NodeId,
            (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsPK, out isPk);

              columnsListModel.GrtList.set_field(node.NodeId,
            (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsPK, (isPk + 1) % 2);
            }
            else if (e.Control is AdvNodeTextBox)
            {
              AdvNodeTextBox tbox = e.Control as AdvNodeTextBox;
              tbox.BeginEdit();
            }
            else if (e.Control is AdvNodeComboBox)
            {
              AdvNodeComboBox tbox = e.Control as AdvNodeComboBox;
              tbox.BeginEdit();
            }
              }
        }
コード例 #47
0
 public override void MouseDown(TreeNodeAdvMouseEventArgs args)
 {
 }
コード例 #48
0
ファイル: TreeViewAdv.cs プロジェクト: RoDaniel/featurehouse
 private void OnNodeMouseDoubleClick(TreeNodeAdvMouseEventArgs args)
 {
     if (NodeMouseDoubleClick != null)
     NodeMouseDoubleClick(this, args);
 }
コード例 #49
0
        private void OnSelectNode(object sender, TreeNodeAdvMouseEventArgs e)
        {
            SetSelectedObject(e.Node);

            DialogResult = DialogResult.OK;
            Close();
        }
コード例 #50
0
ファイル: DicomDumpForm.cs プロジェクト: vigilant/mdcm
        private void treeDump_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e)
        {
            if (e.Node.Tag is DicomNode) {
                DicomNode dn = e.Node.Tag as DicomNode;

                if (dn.VR != "SQ" || e.Button == MouseButtons.Right) {
                    DicomDictionaryForm ddf = new DicomDictionaryForm(dn.ElementTag.Substring(1, 9));
                    ddf.ShowDialog(this);
                }
            }
        }
コード例 #51
0
		public override void MouseDown(TreeNodeAdvMouseEventArgs args)
		{
		}
コード例 #52
0
 public override void MouseUp(TreeNodeAdvMouseEventArgs args)
 {
     FinishResize();
 }
コード例 #53
0
ファイル: NormalInputState.cs プロジェクト: redoz/bitdiffer
 public override void MouseUp(TreeNodeAdvMouseEventArgs args)
 {
     Tree.ItemDragMode = false;
     if (_mouseDownFlag)
     {
         if (args.Button == MouseButtons.Left)
             DoMouseOperation(args);
         else if (args.Button == MouseButtons.Right)
             Tree.CurrentNode = args.Node;
     }
     _mouseDownFlag = false;
 }
コード例 #54
0
		public override void MouseUp(TreeNodeAdvMouseEventArgs args)
		{
			if (_mouseDownFlag)
			{
				switch (args.Button)
				{
				    case MouseButtons.Left:
				        this.DoMouseOperation(args);
				        break;
				    case MouseButtons.Right:
				        this.Tree.CurrentNode = args.Node;
				        break;
				}
			}
			_mouseDownFlag = false;
		}
コード例 #55
0
ファイル: NormalInputState.cs プロジェクト: redoz/bitdiffer
 protected virtual void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
 {
     Tree.ClearSelectionInternal();
 }
コード例 #56
0
		protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
		{
			this.Tree.SuspendSelectionEvent = true;
			try
			{
				this.Tree.ClearSelectionInternal();
				if (args.Node != null)
					args.Node.IsSelected = true;
				this.Tree.SelectionStart = args.Node;
			}
			finally
			{
				this.Tree.SuspendSelectionEvent = false;
			}
		}
コード例 #57
0
 protected override void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
 {
 }
コード例 #58
0
ファイル: Form1.cs プロジェクト: daniellm/ElasticSearch.Net
		private void treeViewAdv1_NodeMouseClick(object sender, TreeNodeAdvMouseEventArgs e)
		{
			if (treeViewAdv1.SelectedNodes.Count == 1)
			{
			    if (treeViewAdv1.SelectedNode != null)
			    {
			        if (treeViewAdv1.SelectedNode.Tag != null)
			        {
			            var tempNode = (ElasticNode)treeViewAdv1.SelectedNode.Tag;
			            if (tempNode != null && tempNode.IndexStatus != null)
			            {
			                toolStripStatusLabel1.Text = tempNode.IndexStatus.ToString();
			            }
			            else if(treeViewAdv1.SelectedNode.Level==4)
			            {
			                WriteLog("\r\n-----\r\n");
			                WriteLog("\r\n");
			                var type = (treeViewAdv1.SelectedNode.Tag as ElasticNode).Tag as TypeSetting;
			                WriteLog(JsonSerializer.Get(type,true));
			            }
			        }
			    }
			}
		}
コード例 #59
0
ファイル: TreeViewAdv.Input.cs プロジェクト: redoz/bitdiffer
        private string GetNodeToolTip(TreeNodeAdvMouseEventArgs args)
        {
            string msg = args.Control.GetToolTip(args.Node);

            BaseTextControl btc = args.Control as BaseTextControl;
            if (btc != null && btc.DisplayHiddenContentInToolTip && String.IsNullOrEmpty(msg))
            {
                Size ms = btc.GetActualSize(args.Node, _measureContext);
                if (ms.Width > args.ControlBounds.Size.Width || ms.Height > args.ControlBounds.Size.Height
                    || args.ControlBounds.Right - OffsetX > DisplayRectangle.Width)
                    msg = btc.GetLabel(args.Node);
            }

            if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null)
                msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control);

            return msg;
        }
コード例 #60
0
 void Tree_NameNodeMouseClick(object sender, TreeNodeAdvMouseEventArgs e)
 {
     if (e.Node.Level == 1 && e.Control == NameNodeTextBox && !e.Node.CanExpand && (Tree.SelectedNode == null || Tree.SelectedNode == e.Node))
     {
         NameNodeTextBox.BeginEdit();
         e.Handled = true;
     }
 }