本文整理汇总了C#中Gtk.ButtonReleaseEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# ButtonReleaseEventArgs类的具体用法?C# ButtonReleaseEventArgs怎么用?C# ButtonReleaseEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ButtonReleaseEventArgs类属于Gtk命名空间,在下文中一共展示了ButtonReleaseEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnGraphEventsButtonReleaseEvent
protected void OnGraphEventsButtonReleaseEvent(object o, ButtonReleaseEventArgs args)
{
try
{
GCurves.GCurve tmp;
AllCurves.Curves.TryGetValue(CurveSelectBox.ActiveText, out tmp);
double x = args.Event.X;
double y = args.Event.Y;
if (MovePoint.Value == true)
{
ProjectSaved = false;
if (y < 0 || GraphArea.Allocation.Height - y < GrBor || x < GrBor || x > GraphArea.Allocation.Width)
{
if (MovePoint.Key != 0 && MovePoint.Key != tmp.Points.Count - 1)
{
tmp.RemovePoint(MovePoint.Key);
}
RefreshGraph(false);
}
}
MovePoint = new KeyValuePair<int, bool>(MovePoint.Key, false);
//Fill the Valueboxes with the current value
XValBox.Text = (tmp.Points[tmp.SelectedPoint].Value.X + 1).ToString();
YValBox.Text = tmp.Points[tmp.SelectedPoint].Value.Y.ToString();
}
catch (Exception ex) { ReportError("Graph Mouse Up", ex); }
}
示例2: onDAButtonRelease
protected void onDAButtonRelease(object o, ButtonReleaseEventArgs args)
{
if (circuit == null)
return;
linkingCells = false;
circuit.stopLinking();
}
示例3: ProcessReleaseEvent
public void ProcessReleaseEvent(ButtonReleaseEventArgs args)
{
if (swiping) {
swiping = false;
swipeTest = new Point((int) args.Event.X, (int) args.Event.Y);
if (((swipeTest.X - swipeStart.X) < maxError) && ((swipeTest.X - swipeStart.X) > -maxError)) {
if (swipeTest.Y - swipeStart.Y > minSwipeLength) { // swipe down
if (SwipeDetected != null) {
SwipeDetected(this, SwipeDirection.Down);
}
} else if (swipeTest.Y - swipeStart.Y < -minSwipeLength) { // swipe up
if (SwipeDetected != null) {
SwipeDetected(this, SwipeDirection.Up);
}
}
} else if (((swipeTest.Y - swipeStart.Y) < maxError) && ((swipeTest.Y - swipeStart.Y) > -maxError)) {
if (swipeTest.X - swipeStart.X > minSwipeLength) { // swipe right
if (SwipeDetected != null) {
SwipeDetected(this, SwipeDirection.Right);
}
} else if (swipeTest.X - swipeStart.X < -minSwipeLength) { // swipe left
if (SwipeDetected != null) {
SwipeDetected(this, SwipeDirection.Left);
}
}
}
}
}
示例4: ButtonReleaseHandler
public static void ButtonReleaseHandler(object o, ButtonReleaseEventArgs args)
{
upx = args.Event.X;
upy = args.Event.Y;
completecrop(configpath + finalString);
args.RetVal = true;
}
示例5: HandleButtonReleaseEvent
void HandleButtonReleaseEvent (object o, ButtonReleaseEventArgs args)
{
var document = IdeApp.Workbench.ActiveDocument;
if (IdeApp.Workspace == null)
return;
if (document == null)
return;
if (document.ParsedDocument == null)
return;
if (args.Event.Button == LEFT_BUTTON)
{
if ((args.Event.State & ModifierType.ControlMask) == ModifierType.ControlMask)
{
if ((args.Event.State & ModifierType.ShiftMask) == ModifierType.ShiftMask)
{
RemoveMarker (document.Editor.Document);
JumpToImplementation ();
}
else
{
RemoveMarker (document.Editor.Document);
JumpToDefinition (document);
}
}
}
}
示例6: OnBtnReleaseEvent
protected void OnBtnReleaseEvent(object sender, ButtonReleaseEventArgs e)
{
Gdk.EventButton evnt = e.Event;
//right click
if (evnt.Button == 3) {
menu.ShowAll();
menu.Popup (null, null, null, 3, Gtk.Global.CurrentEventTime);
}
}
示例7: BindedWidget_ButtonReleaseEvent
protected override void BindedWidget_ButtonReleaseEvent(object sender, ButtonReleaseEventArgs evnt)
{
base.BindedWidget_ButtonReleaseEvent (sender, evnt);
if(Value)
{
int x, y;
ParentWindow.GetOrigin (out x, out y);
x += Allocation.X;
y += Allocation.Bottom;
ShowAt (x, y);
}
else
{
KillMenu (true);
}
}
示例8: HandleButtonReleaseEvent
void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args)
{
var doc = IdeApp.Workbench.ActiveDocument;
if (args.Event.Button != 1
|| !IsCtrlPush(args.Event.State)
|| doc == null)
return;
ResolveResult resolveResult;
var item = CurrentRefactoryOperationsHandler.GetItem(doc, out resolveResult);
if (item == null)
return;
if (item is INamedElement)
IdeApp.ProjectOperations.JumpToDeclaration((INamedElement)item);
else if (item is IVariable)
IdeApp.ProjectOperations.JumpToDeclaration((IVariable)item);
}
示例9: OnMouseUp
protected override void OnMouseUp(DrawingArea canvas, ButtonReleaseEventArgs args, Cairo.PointD point)
{
double x = point.X;
double y = point.Y;
// If the user didn't move the mouse, they want to deselect
int tolerance = 2;
if (Math.Abs (shape_origin.X - x) <= tolerance && Math.Abs (shape_origin.Y - y) <= tolerance) {
PintaCore.Actions.Edit.Deselect.Activate ();
hist.Dispose ();
hist = null;
} else {
if (hist != null)
PintaCore.History.PushNewItem (hist);
hist = null;
}
is_drawing = false;
}
示例10: OnButtonReleaseEvent
private void OnButtonReleaseEvent(object o, ButtonReleaseEventArgs args)
{
if(args.Event.Button != 1) {
return;
}
entry.HasFocus = true;
if(o == filter_button) {
ShowMenu(args.Event.Time);
}
}
示例11: OnButtonUp
private void OnButtonUp(object sender, ButtonReleaseEventArgs e)
{
if (e.Event.Button == 3)
Popup.Popup();
}
示例12: track_clicked
//a track was selected
private void track_clicked(object o, ButtonReleaseEventArgs args)
{
LinkLabel label = (LinkLabel)o;
QueryInfo query = new QueryInfo (Key.Artist(main.Artist), Key.Title(label.Link));
main.LoadContent (query, typeof (SimilarTracks));
}
示例13: tree_ButtonReleaseEvent
void tree_ButtonReleaseEvent(object o, ButtonReleaseEventArgs args)
{
string formToOpen="";
TreeSelection selection = (o as TreeView).Selection;
TreeModel model;
if(selection.GetSelected(out model, out iter))
{
formToOpen=model.GetValue(iter,1).ToString();
//Console.WriteLine(formToOpen);
}
}
示例14: BindedWidget_ButtonReleaseEvent
protected override void BindedWidget_ButtonReleaseEvent(object sender, ButtonReleaseEventArgs evnt)
{
ProcessEvent (evnt.Event);
Click ();
}
示例15: OnButtonRelease
void OnButtonRelease(object obj, ButtonReleaseEventArgs args)
{
}