當前位置: 首頁>>代碼示例>>C#>>正文


C# Xwt.ButtonEventArgs類代碼示例

本文整理匯總了C#中Xwt.ButtonEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# ButtonEventArgs類的具體用法?C# ButtonEventArgs怎麽用?C# ButtonEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ButtonEventArgs類屬於Xwt命名空間,在下文中一共展示了ButtonEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: HandleButtonPressed

 private void HandleButtonPressed(object sender, ButtonEventArgs e)
 {
     if(!e.Handled)
     {
         handler.ButtonPressed(e.Button);
         e.Handled = true;
     }
 }
開發者ID:rte-se,項目名稱:emul8,代碼行數:8,代碼來源:XWTEventSource.cs

示例2: OnButtonPressed

        protected override void OnButtonPressed(ButtonEventArgs args)
        {
            base.OnButtonPressed(args);

            if (args.Button == PointerButton.Left)
                mDown = true;

            QueueDraw();
        }
開發者ID:fourtf,項目名稱:4Plug,代碼行數:9,代碼來源:ImageButton.cs

示例3: OnButtonReleased

        protected override void OnButtonReleased(ButtonEventArgs args)
        {
            if (args.X > 16)
                base.OnButtonReleased(args);

            if (args.Button == PointerButton.Left)
            {
                mDown = false;
                QueueDraw();
            }
        }
開發者ID:fourtf,項目名稱:4Plug,代碼行數:11,代碼來源:PluginImageButton.cs

示例4: OnButtonPressed

 protected override void OnButtonPressed(ButtonEventArgs args)
 {
     GradientButton B = Buttons.FirstOrDefault(X => CheckIfIn(args.Position, X));
     try
     {
         B.ButtonPressed();
     }
     catch (Exception e)
     {
         Xwt.MessageDialog.ShowError(String.Format("Не удается выполнить {0}: {1}", B.Text, e.Message));
     }
 }
開發者ID:ksigne,項目名稱:xwt-extensions,代碼行數:12,代碼來源:CarouselTable.cs

示例5: OnButtonReleased

        protected override void OnButtonReleased(ButtonEventArgs args)
        {
            base.OnButtonReleased(args);

            if (args.Button == PointerButton.Left)
            {
                if (Click != null)
                    Click(this, EventArgs.Empty);

                mDown = false;
                QueueDraw();
            }
        }
開發者ID:fourtf,項目名稱:4Plug,代碼行數:13,代碼來源:ImageButton.cs

示例6: OnButtonPressed

        protected override void OnButtonPressed(ButtonEventArgs args)
        {
            base.OnButtonPressed(args);

            if (PluginType == FPlug.PluginType.Hud)
            {
                new Task(() =>
                    {
                        System.Threading.Thread.Sleep(50);
                        Application.Invoke(() =>
                            {
                                var d = new HudsTFDisplay();
                                d.Show();
                                d.Present();
                            });
                    }).Start();
            }
        }
開發者ID:fourtf,項目名稱:4Plug,代碼行數:18,代碼來源:AddPluginWidget.cs

示例7: OnButtonPressed

        /// <summary>
        /// OnButtonPressed method for AxisDrag interaction
        /// </summary>
        public override bool OnButtonPressed(ButtonEventArgs args, PlotCanvas pc)
        {
            // if the mouse is inside the plot area (the tick marks may be here,
            // and are counted as part of the axis), then *don't* invoke scaling
            if (pc.PlotAreaBoundingBoxCache.Contains(args.X, args.Y)) {
                return false;
            }

            if (args.Button == PointerButton.Left) {
                // see if hit with axis. NB Only one axis object will be returned
                ArrayList objects = pc.HitTest (new Point(args.X, args.Y));
                foreach (object o in objects) {
                    if (o is Axis) {
                        dragging = true;
                        Axis axis = (Axis)o;
                        if (pc.PhysicalXAxis1Cache.Axis == axis) {
                            physicalAxis = pc.PhysicalXAxis1Cache;
                            translateX = true;
                        }
                        else if (pc.PhysicalXAxis2Cache.Axis == axis) {
                            physicalAxis = pc.PhysicalXAxis2Cache;
                            translateX = true;
                        }
                        else if (pc.PhysicalYAxis1Cache.Axis == axis) {
                            physicalAxis = pc.PhysicalYAxis1Cache;
                            translateY = true;
                        }
                        else if (pc.PhysicalYAxis2Cache.Axis == axis) {
                            physicalAxis = pc.PhysicalYAxis2Cache;
                            translateY = true;
                        }
                        lastPoint = new Point (args.X, args.Y);
                        return false;
                    }
                }
            }
            return false;
        }
開發者ID:hwthomas,項目名稱:XwPlot,代碼行數:41,代碼來源:AxisDrag.cs

示例8: HandleButtonPressed

		void HandleButtonPressed (object sender, ButtonEventArgs e)
		{
			if (e.Button != PointerButton.Right)
				return;

			var rows = view.SelectedRows;
			if (rows.Length > 1) {
				// this is a multiple selection
				// waiting in this case means the selection disappears
				ShowBatchFixContextMenu (e.X, e.Y, rows);

				// Don't let the selection be reset
				e.Handled = true;
				handledByPress = true;
			} else {
				handledByPress = false;
			}
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:18,代碼來源:CodeIssuePad.cs

示例9: HandleButtonReleased

		// Event handling of right click on the TreeView is split in two parts
		// This is because no single handler can support intuitive behavior regarding
		// what happens to the selection when the right mouse button is pressed:
		// if only a single row is selected: change the selection and then show menu
		// if multiple rows are selected: show the menu directly

		void HandleButtonReleased (object sender, ButtonEventArgs e)
		{
			if (e.Button != PointerButton.Right || handledByPress)
				return;

			var rows = view.SelectedRows;
			if (rows.Length <= 1) {
				// Single row or no row
				ShowBatchFixContextMenu (e.X, e.Y, view.SelectedRows);
			}
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:17,代碼來源:CodeIssuePad.cs

示例10: HandleButtonReleaseEvent

 void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args)
 {
     var a = new ButtonEventArgs ();
     a.X = args.Event.X;
     a.Y = args.Event.Y;
     a.Button = (PointerButton) args.Event.Button;
     ApplicationContext.InvokeUserCode (delegate {
         EventSink.OnButtonReleased (a);
     });
     if (a.Handled)
         args.RetVal = true;
 }
開發者ID:KonajuGames,項目名稱:xwt,代碼行數:12,代碼來源:WidgetBackend.cs

示例11: HandleButtonPressEvent

        void HandleButtonPressEvent(object o, Gtk.ButtonPressEventArgs args)
        {
            var a = new ButtonEventArgs ();
            a.X = args.Event.X;
            a.Y = args.Event.Y;

            a.Button = (PointerButton) args.Event.Button;
            if (args.Event.Type == Gdk.EventType.TwoButtonPress)
                a.MultiplePress = 2;
            else if (args.Event.Type == Gdk.EventType.ThreeButtonPress)
                a.MultiplePress = 3;
            else
                a.MultiplePress = 1;
            ApplicationContext.InvokeUserCode (delegate {
                EventSink.OnButtonPressed (a);
            });
            if (a.Handled)
                args.RetVal = true;
        }
開發者ID:KonajuGames,項目名稱:xwt,代碼行數:19,代碼來源:WidgetBackend.cs

示例12: HandleButtonReleaseEvent

 void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args)
 {
     var sc = ConvertToScreenCoordinates (new Point (0, 0));
     var a = new ButtonEventArgs ();
     a.X = args.Event.XRoot - sc.X;
     a.Y = args.Event.YRoot - sc.Y;
     a.Button = (PointerButton) args.Event.Button;
     ApplicationContext.InvokeUserCode (delegate {
         EventSink.OnButtonReleased (a);
     });
     if (a.Handled)
         args.RetVal = true;
 }
開發者ID:vladimirvaragic,項目名稱:xwt,代碼行數:13,代碼來源:WidgetBackend.cs

示例13: HandleButtonPressed

		void HandleButtonPressed (object sender, ButtonEventArgs e)
		{
			if (e.Button == PointerButton.Right)
				menu.Popup ();
		}
開發者ID:StEvUgnIn,項目名稱:xwt,代碼行數:5,代碼來源:MenuSamples.cs

示例14: HandleButtonReleaseEvent

 void HandleButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args)
 {
     var a = new ButtonEventArgs ();
     a.X = args.Event.X;
     a.Y = args.Event.Y;
     a.Button = (PointerButton) args.Event.Button;
     Toolkit.Invoke (delegate {
         EventSink.OnButtonReleased (a);
     });
 }
開發者ID:sandeep-datta,項目名稱:xwt,代碼行數:10,代碼來源:WidgetBackend.cs

示例15: OnButtonReleased

 public void OnButtonReleased(ButtonEventArgs args)
 {
     Parent.OnButtonReleased (args);
 }
開發者ID:joncham,項目名稱:xwt,代碼行數:4,代碼來源:Widget.cs


注:本文中的Xwt.ButtonEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。