当前位置: 首页>>代码示例>>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;未经允许,请勿转载。