• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Forms.QueryContinueDragEventArgs类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Windows.Forms.QueryContinueDragEventArgs的典型用法代码示例。如果您正苦于以下问题:C# QueryContinueDragEventArgs类的具体用法?C# QueryContinueDragEventArgs怎么用?C# QueryContinueDragEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



QueryContinueDragEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了QueryContinueDragEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: listBox1_QueryContinueDrag

 private void listBox1_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
 {
     if (e.EscapePressed)
     {
         e.Action = DragAction.Cancel;
     }
 }
开发者ID:gawallsibya,项目名称:BIT_MFC-CShap-DotNet,代码行数:7,代码来源:Form1.cs


示例2: OleQueryContinueDrag

        public int OleQueryContinueDrag(int fEscapePressed, int grfKeyState)
        {
            QueryContinueDragEventArgs qcdevent = null;
            bool escapePressed = fEscapePressed != 0;
            DragAction cancel = DragAction.Continue;
            if (escapePressed)
            {
                cancel = DragAction.Cancel;
            }
            else if ((((grfKeyState & 1) == 0) && ((grfKeyState & 2) == 0)) && ((grfKeyState & 0x10) == 0))
            {
                cancel = DragAction.Drop;
            }
            qcdevent = new QueryContinueDragEventArgs(grfKeyState, escapePressed, cancel);
            this.peer.OnQueryContinueDrag(qcdevent);
            switch (qcdevent.Action)
            {
                case DragAction.Drop:
                    return 0x40100;

                case DragAction.Cancel:
                    return 0x40101;
            }
            return 0;
        }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:25,代码来源:DropSource.cs


示例3: OleQueryContinueDrag

            public int OleQueryContinueDrag(int fEscapePressed, int grfKeyState) {
                QueryContinueDragEventArgs qcdevent = null;
                bool escapePressed = (fEscapePressed != 0);
                DragAction action = DragAction.Continue;
                if (escapePressed) {
                    action = DragAction.Cancel;
                }
                else if ((grfKeyState & NativeMethods.MK_LBUTTON) == 0
                         && (grfKeyState & NativeMethods.MK_RBUTTON) == 0
                         && (grfKeyState & NativeMethods.MK_MBUTTON) == 0) {
                    action = DragAction.Drop;
                }

                qcdevent = new QueryContinueDragEventArgs(grfKeyState,escapePressed, action);
                peer.OnQueryContinueDrag(qcdevent);

                int hr = 0;

                switch (qcdevent.Action) {
                    case DragAction.Drop:
                        hr = DragDropSDrop;
                        break;
                    case DragAction.Cancel:
                        hr = DragDropSCancel;
                        break;
                }

                return hr;
            }
开发者ID:JianwenSun,项目名称:cc,代码行数:29,代码来源:DropSource.cs


示例4: OnQueryContinueDrag

        protected override void OnQueryContinueDrag(QueryContinueDragEventArgs qcdevent)
        {
            var pos = Parent.PointToClient(MousePosition);

            if (!Bounds.Contains(pos))
            {
                qcdevent.Action = DragAction.Cancel;
                return;
            }

            base.OnQueryContinueDrag(qcdevent);
        }
开发者ID:huipengly,项目名称:WGestures,代码行数:12,代码来源:AlwaysSelectedListView.cs


示例5: OnQueryContinueDrag

        /// <summary>
        /// 
        /// </summary>
        /// <param name="args"></param>
        protected override void OnQueryContinueDrag(QueryContinueDragEventArgs args)
        {
            base.OnQueryContinueDrag(args);

            if (this.DropSink != null)
                this.DropSink.QueryContinue(args);
        }
开发者ID:ZlayaZhaba,项目名称:XervBackup,代码行数:11,代码来源:ObjectListView.cs


示例6: OnQueryContinueDrag_ActionIsNotDropOrCancel

        public void OnQueryContinueDrag_ActionIsNotDropOrCancel()
        {
            //Arrange
            _control.IsMouseDown = true;
            var eventArgs = new QueryContinueDragEventArgs(0, false, DragAction.Continue);

            //Act
            _control.OnQueryContinueDrag(null, eventArgs);

            //Assert
            Assert.IsTrue(_control.IsMouseDown);
        }
开发者ID:aggie0642,项目名称:SWEN-670,代码行数:12,代码来源:NodeListControlTests.cs


示例7: OnQueryContinueDrag

		protected virtual void OnQueryContinueDrag (QueryContinueDragEventArgs queryContinueDragEvent)
		{
			QueryContinueDragEventHandler eh = (QueryContinueDragEventHandler)(Events[QueryContinueDragEvent]);
			if (eh != null)
				eh (this, queryContinueDragEvent);
		}
开发者ID:Clancey,项目名称:MonoMac.Windows.Form,代码行数:6,代码来源:ToolStripItem.cs


示例8: Form1_QueryContinueDrag

		private void Form1_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
		{
			e.Action = DragAction.Continue;
		}
开发者ID:henke37,项目名称:BizHawk,代码行数:4,代码来源:DiscoHawkDialog.cs


示例9: OnQueryContinueDrag

 bool IWorkflowDesignerMessageSink.OnQueryContinueDrag(QueryContinueDragEventArgs e)
 {
     try
     {
         OnQueryContinueDrag(e);
     }
     catch
     {
     }
     return true;
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:11,代码来源:ActivityDesigner.cs


示例10: OnQueryContinueDrag

		/// <summary>
		/// Check if we should continue dragging
		/// </summary>
		/// <param name="e"></param>
		protected override void OnQueryContinueDrag(QueryContinueDragEventArgs e)
		{
			Rectangle screen = this.Parent.RectangleToScreen(new Rectangle(this.Location.X, this.Location.Y, this.Width, this.Height));
			Point mousePoint = Cursor.Position;

			// if ESC is pressed, always stop
			if (e.EscapePressed == true || ((e.KeyState & 1) == 0 && screen.Contains(mousePoint) == false))
			{
				e.Action = DragAction.Cancel;

				if (_draggedItem != null)
				{
					_draggedItem.Dragging = false;
					this.RefreshItem(_draggedItem);
					_draggedItem = null;
				}
				if (_draggedBitmap != null)
				{
					_draggedBitmap.Dispose();
					_draggedBitmap = null;
					this.Invalidate(_draggedBitmapRect);
				}
				_mouseDownLocation = Point.Empty;
			}
			else
			{
				DateTime now = DateTime.Now;

				// if we are at the top or bottom, scroll every 150ms
				if (mousePoint.Y >= screen.Bottom)
				{
					int visible = this.ClientSize.Height / this.ItemHeight;
					int maxtopindex = Math.Max(this.Items.Count - visible + 1, 0);
					if (this.TopIndex < maxtopindex && now.Subtract(_lastDragScroll).TotalMilliseconds >= 150)
					{
						this.TopIndex++;
						_lastDragScroll = now;
						this.Refresh();
					}
				}
				else if (mousePoint.Y <= screen.Top)
				{
					int visible = this.ClientSize.Height / this.ItemHeight;
					if (this.TopIndex > 0 && now.Subtract(_lastDragScroll).TotalMilliseconds >= 150)
					{
						this.TopIndex--;
						_lastDragScroll = now;
						this.Refresh();
					}
				}
				_lastDragTopIndex = this.TopIndex;

				base.OnQueryContinueDrag(e);
			}
		}
开发者ID:Felluz,项目名称:winauth,代码行数:59,代码来源:AuthenticatorListBox.cs


示例11: label1_QueryContinueDrag

        //private void panel1_DragDrop(object sender, DragEventArgs e)
        //{
        // //   int x = readerx;
        //  //  int y = readery;
        //    try
        //    {
        //        DSSmartCity.Antenna_Row tagrow = (DSSmartCity.Antenna_Row)gridView3.GetFocusedDataRow();
        //        DSSmartCity.ReaderListRow readerrow = (DSSmartCity.ReaderListRow)gridView2.GetFocusedDataRow();
        //        foreach (Control item in panel1.Controls)
        //        {
        //            if (item.ToString()=="RfidTest.UCReader")
        //            {
        //                if (((UCReader)item).labelname== readerrow.name + ":"+tagrow.antennaid.ToString())
        //                {
        //                    MessageBox.Show("This Antenna is already in the map.");
        //                    return;
        //                }
        //            }
        //        }
        //        int x = PointToClient(Cursor.Position).X - this.panel1.Location.X - this.splitContainer1.Panel1.Width;// +scrollx;
        //        int y = PointToClient(Cursor.Position).Y - this.panel1.Location.Y;// +scrolly;
        //        this.panel1.SuspendLayout();
        //        this.SuspendLayout();
        //        // add the selected string to bottom of list
        //        Image im = Image.FromFile(@"photo/light.jpg"); // System.Drawing.Color.Lime;
        //        string readername = rfid1.ReaderList.Select("server='" + tagrow.readerid + "'")[0][1].ToString();
        //        UCReader mytag = new UCReader(im, readername + ":" + tagrow.antennaid);
        //       //  PictureBox mytag = new PictureBox();
        //     //   mytag.Image = im;
        //        mytag.AutoSize = true;
        //        mytag.Tag = "Reader";
        //        mytag.Location = new System.Drawing.Point(x, y);
        //        //  mytag.Name = name.Split(',')[0].ToString();
        //        mytag.Size = new System.Drawing.Size(40, 60);
        //     //   ((DSSmartCity.Antenna_Row)gridView3.GetFocusedDataRow()).x = x+scrollx;
        //      //  ((DSSmartCity.Antenna_Row)gridView3.GetFocusedDataRow()).y = y+scrolly;
        //        mytag.BackColor = Color.White;
        //         mytag.MouseMove += new System.Windows.Forms.MouseEventHandler(this.label1_MouseMove);
        //         //if (rfid1.TagsPosition.Select("tagid='" + tagrow.readerid + "'").Length > 0)
        //         //{
        //         //    MessageBox.Show("The Tag is existing!");
        //         //}
        //         //else
        //         //{
        //         //    this.panel1.Controls.Add(mytag);
        //         //    mytag.BringToFront();
        //         //    this.panel1.PerformLayout();
        //         //    this.ResumeLayout(false);
        //         //    SaveData();
        //         //}
        //        // textBox1.SelectAll();
        //    }
        //    catch (Exception ex)
        //    {
        //        MessageBox.Show(ex.ToString());
        //    }
        //}
        private void label1_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
        {
            screenOffset = SystemInformation.WorkingArea.Location;

            ListBox lb = sender as ListBox;

            if (lb != null)
            {
                Form f = lb.FindForm();
                // Cancel the drag if the mouse moves off the form. The screenOffset
                // takes into account any desktop bands that may be at the top or left
                // side of the screen.
                if (((Control.MousePosition.X - screenOffset.X) < f.DesktopBounds.Left) ||
                    ((Control.MousePosition.X - screenOffset.X) > f.DesktopBounds.Right) ||
                    ((Control.MousePosition.Y - screenOffset.Y) < f.DesktopBounds.Top) ||
                    ((Control.MousePosition.Y - screenOffset.Y) > f.DesktopBounds.Bottom))
                {
                    e.Action = DragAction.Cancel;
                }
            }

            eventCount = eventCount + 1;  // increment event counter
        }
开发者ID:usamshen,项目名称:SmartCity,代码行数:80,代码来源:MapOperation.cs


示例12: pbPreview_QueryContinueDrag

        private void pbPreview_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
        {
            //Trace.WriteLine("QueryContinueDrag...", "PeekPreview.pbPreview_QueryContinueDrag");

            if (e.Action == DragAction.Continue)
            {
                DragThumb.SetDesktopLocation(Cursor.Position.X - DragThumb.Width / 2, Cursor.Position.Y - DragThumb.Height);
            }
            //else
            //{
            //    DragThumb.Close();
            //}
        }
开发者ID:factormystic,项目名称:ProSnap,代码行数:13,代码来源:PeekPreview.cs


示例13: OnSourceListbox_QueryContinueDrag

        //────────────────────────────────────────
        /// <summary>
        /// ドラッグ&ドロップ中に発生します。
        /// ドラッグをキャンセルするのに使います。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void OnSourceListbox_QueryContinueDrag(
            object sender,
            QueryContinueDragEventArgs e,
            Log_Reports log_Reports
            )
        {
            // ドラッグ中にマウスの右ボタンが押されていれば、ドラッグをキャンセルします。

            // "2"は、マウスの右ボタンを表します。何故か定数はないようです。
            if ((e.KeyState & 2) == 2)
            {
                e.Action = DragAction.Cancel;
            }
        }
开发者ID:muzudho,项目名称:CSVExE,代码行数:21,代码来源:DragsTextlistboxToImgImpl.cs


示例14: Set_OnQueryContinueDragEventArgs

 protected void Set_OnQueryContinueDragEventArgs(
     Expression_Node_Function expr_Func,
     object prm_Sender,
     QueryContinueDragEventArgs prm_E
     )
 {
     if (null != expr_Func)//暫定
     {
         expr_Func.EnumEventhandler = EnumEventhandler.O_Qcdea;
         expr_Func.Functionparameterset.Sender = prm_Sender;
         expr_Func.Functionparameterset.QueryContinueDragEventArgs = prm_E;
     }
 }
开发者ID:muzudho,项目名称:CSVExE,代码行数:13,代码来源:Expression_Node_FunctionImpl.cs


示例15: Execute4_OnQueryContinueDragEventArgs

        //────────────────────────────────────────
        /// <summary>
        /// ドラッグ&ドロップ用アクション実行。
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void Execute4_OnQueryContinueDragEventArgs(
            object prm_Sender,
            QueryContinueDragEventArgs prm_E
            )
        {
            Log_Method log_Method = new Log_MethodImpl(0, Log_ReportsImpl.BDebugmode_Static);
            Log_Reports log_Reports_Master = new Log_ReportsImpl(log_Method);
            log_Method.BeginMethod(Info_Expr.Name_Library, this, "Execute4_OnQueryContinueDragEventArgs", log_Reports_Master);
            //
            //

            // イベントハンドラー引数の設定
            this.Set_OnQueryContinueDragEventArgs(
                this,
                prm_Sender,
                prm_E
            );

            this.Execute5_Main(log_Reports_Master);

            log_Method.EndMethod(log_Reports_Master);
        }
开发者ID:muzudho,项目名称:CSVExE,代码行数:28,代码来源:Expression_Node_FunctionImpl.cs


示例16: QueryContinue

		private bool QueryContinue (bool escape, DragAction action)
		{
			QueryContinueDragEventArgs qce = new QueryContinueDragEventArgs ((int) XplatUI.State.ModifierKeys,
					escape, action);

			Control c = MwfWindow (source);
			
			if (c == null) {
				tracking = false;
				return false;
			}
			
			c.DndContinueDrag (qce);

			switch (qce.Action) {
			case DragAction.Continue:
				return true;
			case DragAction.Drop:
				SendDrop (drag_data.LastTopLevel, source, IntPtr.Zero);
				tracking = false;
				return true;
			case DragAction.Cancel:
				drag_data.Reset ();
				c.InternalCapture = false;
				break;
			}

			SendLeave (drag_data.LastTopLevel, toplevel);

			RestoreDefaultCursor ();
			tracking = false;
			return false;
		}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:33,代码来源:X11Dnd.cs


示例17: OnQueryContinueDrag

		protected override void OnQueryContinueDrag(QueryContinueDragEventArgs qcdevent)
		{
			if (qcdevent != null && ((qcdevent.KeyState & 2) > 0 || (qcdevent.KeyState & 16) > 0))
				qcdevent.Action = DragAction.Cancel;
			base.OnQueryContinueDrag(qcdevent);
		}
开发者ID:kavenblog,项目名称:Comical,代码行数:6,代码来源:DraggableDataGridView.cs


示例18: treeViewChannel_QueryContinueDrag

        private void treeViewChannel_QueryContinueDrag(object sender, QueryContinueDragEventArgs e)
        {
            if (e.EscapePressed)
            {
                // Reset the drag rectangle when the mouse button is raised.
                this.dragBoxFromMouseDown = Rectangle.Empty;

                e.Action = DragAction.Cancel;
            }
        }
开发者ID:dgis,项目名称:CodeTV,代码行数:10,代码来源:PanelChannel.cs


示例19: OnQueryContinueDrag

 protected override void OnQueryContinueDrag(QueryContinueDragEventArgs qcdevent)
 {
     base.OnQueryContinueDrag(qcdevent);
     using (WorkflowMessageDispatchData data = new WorkflowMessageDispatchData(this, qcdevent))
     {
         foreach (WorkflowDesignerMessageFilter filter in data.Filters)
         {
             if (((IWorkflowDesignerMessageSink) filter).OnQueryContinueDrag(qcdevent))
             {
                 return;
             }
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:14,代码来源:WorkflowView.cs


示例20: LbObjectsQueryContinueDrag

 private void LbObjectsQueryContinueDrag(object sender, QueryContinueDragEventArgs e)
 {
 }
开发者ID:rickyHong,项目名称:IPCameraCtl,代码行数:3,代码来源:AddFloorPlan.cs



注:本文中的System.Windows.Forms.QueryContinueDragEventArgs类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Forms.RECT类代码示例发布时间:2022-05-26
下一篇:
C# Forms.PropertyValueChangedEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap