本文整理汇总了C#中ButtonPressEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ButtonPressEventArgs类的具体用法?C# ButtonPressEventArgs怎么用?C# ButtonPressEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ButtonPressEventArgs类属于命名空间,在下文中一共展示了ButtonPressEventArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: MemoContentPressHandler
public void MemoContentPressHandler(object obj, ButtonPressEventArgs args)
{
if (args.Event.Type == EventType.ButtonPress) {
this.SwitchContentView(true);
}
if (args.Event.Type == EventType.TwoButtonPress) {
this.SwitchContentView(false);
}
}
开发者ID:tomgud,项目名称:Memorize,代码行数:9,代码来源:MemoItemDisplay.cs
示例17: OnButtonDragPress
public static void OnButtonDragPress(object o, ButtonPressEventArgs args)
{
Gdk.Window w = ((Gtk.Widget)o).GdkWindow.Toplevel;
if (((Gdk.EventButton)args.Event).Type == Gdk.EventType.TwoButtonPress) {
} else {
int x, y;
Gdk.Display.Default.GetPointer (out x, out y);
w.BeginMoveDrag (1, x, y, 0);
}
}
开发者ID:niwakazoider,项目名称:unicast,代码行数:10,代码来源:WindowController.cs
示例18: OnMouseDown
protected override void OnMouseDown(DrawingArea canvas, ButtonPressEventArgs args, Cairo.PointD point)
{
// Ignore extra button clicks while drawing
if (is_drawing)
return;
shape_origin = point;
is_drawing = true;
hist = new SelectionHistoryItem (Icon, Name);
hist.TakeSnapshot ();
}
开发者ID:RodH257,项目名称:Pinta,代码行数:12,代码来源:SelectTool.cs
示例19: onTileClicked
// Method that describe the reaction of a tile when it is clicked
private void onTileClicked(object obj, ButtonPressEventArgs args)
{
TileWidget tile = (TileWidget)obj;
bool found = false;
for (int i = 0; i < ((HBox)tile.Parent).Children.Length && !found; i++) {
if (((HBox)tile.Parent).Children [i].Equals (tile)) {
found = true;
this.callback (this.figures [i], tile.position);
}
}
close ();
}
开发者ID:jsparber,项目名称:chess,代码行数:13,代码来源:Popup.cs
示例20: OnScheduleButtonPress
void OnScheduleButtonPress(object o, ButtonPressEventArgs args)
{
if ( args.Event.Type == EventType.TwoButtonPress )
{
ScheduleItem si = sg.GetItemAtPosition( args.Event.X, args.Event.Y );
DateTime dtClicked = sg.GetTimeAtPosition( args.Event.X, args.Event.Y );
ScheduleItemWindow siw = new ScheduleItemWindow( si, dtClicked );
siw.Show();
}
}
开发者ID:akusebi,项目名称:inicial,代码行数:12,代码来源:ScheduleWindow.cs
注:本文中的ButtonPressEventArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论