本文整理汇总了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);
}
}
示例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 ();
}
示例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 ");
}
}
示例4: OnUpdateClicked
void OnUpdateClicked (object s, ButtonPressEventArgs args)
{
if (args.Event.Button == 1) {
HideAlert ();
AddinManagerWindow.Run (IdeApp.Workbench.RootWindow);
}
}
示例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 ();
}
示例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;
}
示例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;
}
}
}
示例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);
}
示例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();
}
}
示例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);
}
示例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));
}
示例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 ();
}
示例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;
}
}
示例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);
}
}
示例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;
}