当前位置: 首页>>代码示例>>C#>>正文


C# ButtonPressEventArgs类代码示例

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


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

示例1: menu_IM_ButtonPressEvent

        void menu_IM_ButtonPressEvent(object o, ButtonPressEventArgs args)
        {
            Gtk.TreeModel mod;
            Gtk.TreeIter iter;

            TreePath[] paths = treeview_members.Selection.GetSelectedRows(out mod);

            if (paths.Length == 1)
            {
                store.GetIter(out iter,paths[0]);
                UUID target = ((ChatSessionMember)store.GetValue(iter, 1)).AvatarKey;
                MainClass.win.startIM(target);
            }
            else if (paths.Length > 1)
            {
                List <UUID> targets=new List<UUID>();
                foreach(Gtk.TreePath path in paths)
                {
                      store.GetIter(out iter,path);
                      UUID target=((ChatSessionMember)store.GetValue(iter,1)).AvatarKey;
                      targets.Add(target);
                }

                MainClass.win.startConfrenceIM(targets);
            }
        }
开发者ID:robincornelius,项目名称:omvviewer-light,代码行数:26,代码来源:GroupChatList.cs

示例2: OnUpEventboxButtonPressEvent

	protected void OnUpEventboxButtonPressEvent (object o, ButtonPressEventArgs args)
	{
		upImage.Pixbuf = new global::Gdk.Pixbuf (global::System.IO.Path.Combine (global::System.AppDomain.CurrentDomain.BaseDirectory, "./Images/EV3-multibrick_11_P.png"));
		upImageSmall1.Pixbuf = new global::Gdk.Pixbuf (global::System.IO.Path.Combine (global::System.AppDomain.CurrentDomain.BaseDirectory, "./Images/EV3-multibrick_16_P.png"));
		upImageSmall2.Pixbuf = new global::Gdk.Pixbuf (global::System.IO.Path.Combine (global::System.AppDomain.CurrentDomain.BaseDirectory, "./Images/EV3-multibrick_18_P.png"));
		buttonsStub.UpPressed ();
	}
开发者ID:tudor-olariu,项目名称:monoev3,代码行数:7,代码来源:MainWindow.cs

示例3: onButtonPress

 public void onButtonPress(object o, ButtonPressEventArgs args)
 {
     if (state == MyState.AddingPoints){
         demo.points.Add(new PointD (args.Event.X, args.Event.Y));
         Logger.Log ("Added point in keypress ");
     }
 }
开发者ID:latestversion,项目名称:projects,代码行数:7,代码来源:DemoLogic.cs

示例4: OnUpdateClicked

		void OnUpdateClicked (object s, ButtonPressEventArgs args)
		{
			if (args.Event.Button == 1) {
				HideAlert ();
				AddinManagerWindow.Run (IdeApp.Workbench.RootWindow);
			}
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:7,代码来源:AddinsUpdateHandler.cs

示例5: HandleButtonPress

    static void HandleButtonPress(object o, ButtonPressEventArgs args)
    {
        Actor c = (Stage.Default as Stage).GetActorAtPos (args.Event.X, args.Event.Y);

         	if (c != null)
         	 	c.Hide ();
    }
开发者ID:abock,项目名称:clutter-sharp,代码行数:7,代码来源:test-actors.cs

示例6: OnMouseDown

		protected override void OnMouseDown (DrawingArea canvas, ButtonPressEventArgs args, Cairo.PointD point)
		{
			// Ignore extra button clicks while drawing
			if (is_drawing)
				return;

			Document doc = PintaCore.Workspace.ActiveDocument;
			hist = new SelectionHistoryItem(Icon, Name);
			hist.TakeSnapshot();

			reset_origin = args.Event.GetPoint();

            active_control = HandleResize (point);
			if (!active_control.HasValue)
			{
				combine_mode = PintaCore.Workspace.SelectionHandler.DetermineCombineMode(args);

				double x = Utility.Clamp(point.X, 0, doc.ImageSize.Width - 1);
				double y = Utility.Clamp(point.Y, 0, doc.ImageSize.Height - 1);
				shape_origin = new PointD(x, y);

                doc.PreviousSelection.Dispose ();
				doc.PreviousSelection = doc.Selection.Clone();
				doc.Selection.SelectionPolygons.Clear();

                // The bottom right corner should be selected.
                active_control = 3;
			}

            is_drawing = true;
		}
开发者ID:msiyer,项目名称:Pinta,代码行数:31,代码来源:SelectTool.cs

示例7: onTileClicked

        // Method that describe what happen when a tile is clicked
        private void onTileClicked(object obj, ButtonPressEventArgs args)
        {
            if (((Gdk.EventButton)args.Event).Type == Gdk.EventType.ButtonPress) {
            TileWidget tile = (TileWidget)obj;
            //Console.WriteLine (tile.position.x + ", " + tile.position.y + " " + tile.color + " " + tile.figure);
            if (!this.clicked) {
              this.clickedPosition = new coord (tile.position.x, tile.position.y);

              if (this.callback (this.clickedPosition, this.clickedPosition)) {
            this.clicked = true;
            Fixed f = (Fixed)(tile.Child);
            Image circle = tile.loadCircle (this.tileSize);
            f.Add (circle);
            f.ShowAll ();
              }
            } else {
              //remove the ring whenn the user clicks agen on the same tile
              if (this.callback (this.clickedPosition, tile.position) &&
              this.clickedPosition.Equals (tile.position)) {
            Fixed f = (Fixed)(tile.Child);
            if (f.Children.Length > 1)
              f.Remove (f.Children [1]);
              }
              this.clicked = false;
            }
              }
        }
开发者ID:jsparber,项目名称:chess,代码行数:28,代码来源:GridWidget.cs

示例8: ButtonPress

 void ButtonPress(object o, ButtonPressEventArgs args)
 {
     CanvasItem item = CreateItem();
     args.View.Canvas.Root.Add (item);
     MoveItem (args.View, args.Button, item);
     //GrabHandle (args.View, args.Button, item);
 }
开发者ID:mono,项目名称:diacanvas-sharp,代码行数:7,代码来源:PlacementTool.cs

示例9: OnButtonPressed

    private void OnButtonPressed(object o, ButtonPressEventArgs args)
    {
        TreePath path;
        if(!GetPathAtPos((int) args.Event.X, (int) args.Event.Y, out path))
            return;

        TreeIter iter;
        if(!Model.GetIter(out iter, path))
            return;

        object obj = Model.GetValue(iter, 0);
        if(obj is Tilemap) {
            if(obj != currentTilemap) {
                currentTilemap = (Tilemap) obj;
                application.EditProperties(currentTilemap, "Tilemap (" + currentTilemap.ZPos + ")");
                application.ChangeCurrentTilemap(currentTilemap);
            }
        } else {
            currentTilemap = null;
        // TODO: clear properties window?
            application.ChangeCurrentTilemap(currentTilemap);
        }

        if((args.Event.Button == 3) && (obj is Tilemap)) {
            ShowPopupMenu();
        }
    }
开发者ID:BackupTheBerlios,项目名称:supertux-svn,代码行数:27,代码来源:LayerListWidget.cs

示例10: Popup

 public void Popup(ButtonPressEventArgs args)
 {
     if (args != null)
         Popup (null, null, null, args.Event.Button, args.Event.Time);
     else
         Popup (null, null, null, 0, Gtk.Global.CurrentEventTime);
 }
开发者ID:GNOME,项目名称:mistelix,代码行数:7,代码来源:ExtendedMenu.cs

示例11: OnButtonPress

        public void OnButtonPress(object o, ButtonPressEventArgs args)
        {
            Preview.ButtonReleaseEvent += OnButtonRelease;
              Preview.MotionNotifyEvent += OnMotionNotify;

              OnPress(new IntCoordinate((int) args.Event.X, (int) args.Event.Y));
        }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:7,代码来源:MouseFunc.cs

示例12: OnMouseDown

        protected override void OnMouseDown(DrawingArea canvas, ButtonPressEventArgs args, Cairo.PointD point)
        {
            shape_origin = point;
            is_drawing = true;

            hist = new SelectionHistoryItem (Icon, Name);
            hist.TakeSnapshot ();
        }
开发者ID:joehillen,项目名称:Pinta,代码行数:8,代码来源:SelectTool.cs

示例13: ProcessPressEvent

 public void ProcessPressEvent(ButtonPressEventArgs args)
 {
     if (args.Event.Button == 1) {
         swiping = true;
         swipeStart = new Point((int) args.Event.X, (int) args.Event.Y);
         swipeTest = swipeStart;
     }
 }
开发者ID:peter-gregory,项目名称:ClockRadio,代码行数:8,代码来源:GestureDetector.cs

示例14: TIconClicked

 private void TIconClicked(object sender, ButtonPressEventArgs args)
 {
     Gdk.EventButton eb = args.Event;
     if (eb.Button == 3)
     {
     menu.ShowAll ();
     menu.Popup (null, null, null, IntPtr.Zero, args.Event.Button, args.Event.Time);
     }
 }
开发者ID:elnomade,项目名称:hathi,代码行数:9,代码来源:TIcon.cs

示例15: ButtonPressEvent

		static void ButtonPressEvent (object obj, ButtonPressEventArgs args)
		{
			Gdk.EventButton ev = args.Event;
			if (ev.Button == 1 && pixmap != null)
				DrawBrush (ev.X, ev.Y, true);
			else if (ev.Button == 3 && pixmap != null)
				DrawBrush (ev.X, ev.Y, false);
			args.RetVal = true;
		}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:9,代码来源:Scribble.cs


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