private void OnButtonRelease(object o, ButtonReleaseEventArgs args) { if (args.Event.Button == 3) { ShowPopup(); } }
private void WavesTree_ButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { TreePath path; TreeViewColumn column; int x = Convert.ToInt32(args.Event.X); int y = Convert.ToInt32(args.Event.Y); if (!WavesTree.GetPathAtPos(x, y, out path, out column)) { throw new Exception("Could not find WaveModel at " + x + "," + y.ToString()); } TreeIter iter; if (!WavesModel.GetIter(out iter, path)) { throw new Exception("Could not find WaveModel at " + x + "," + y.ToString()); } int row = (int)WavesModel.GetValue(iter, 0); if (column == SaveSolutionColumn) { SaveSolutionClicked(iter); } else if (column == LoadSolutionColumn) { LoadSolutionClicked(iter); } }
void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (moveTimerID != 0) { GLib.Source.Remove(moveTimerID); moveTimerID = 0; } if (ButtonReleasedEvent != null) { ButtonType bt; ButtonModifier bm; bt = ParseButtonType(args.Event.Button); bm = ParseButtonModifier(args.Event.State); ButtonReleasedEvent(new Point(args.Event.X, args.Event.Y), bt, bm); } inButtonPress = false; /* Grab the focus if it's required */ if (widget.CanFocus && !widget.HasFocus) { widget.GrabFocus(); } }
void OnYtreeviewAddressesButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (args.Event.Button == 3) { ConfigureMenu(); } }
protected void OnTabButtonRelease(object sender, ButtonReleaseEventArgs args) { TimerTab b = sender as TimerTab; timerIndex = b.position; if (timers[timerIndex].enabled) { UpdateTime(timers[timerIndex].secondsRemaining, false); } else { UpdateTime(timers[timerIndex].totalSeconds, false); } foreach (var tab in tabs) { tab.selected = false; } Remove(tabs[timerIndex]); tabs[timerIndex].Destroy(); tabs[timerIndex].Dispose(); tabs[timerIndex] = new TimerTab(timerIndex); tabs[timerIndex].text = "Timer " + (timerIndex + 1).ToString(); tabs[timerIndex].ButtonReleaseEvent += OnTabButtonRelease; Put(tabs[timerIndex], 90 * timerIndex, 0); tabs[timerIndex].Show(); tabs[timerIndex].selected = true; }
private void YtreeviewOrdersAllocate_ButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (args.Event.Button == 3) { ConfigureMenu(); } }
public void ActionChangeReader(object sender, ButtonReleaseEventArgs args) { string newReader = ((AccelLabel)(((RadioMenuItem)(sender)).Children[0])).Text; log.Info("Changing reader to " + newReader); UpdateSelectedReader(newReader); }
protected void OnForceRelease(object sender, ButtonReleaseEventArgs args) { var d = sender as AnalogChannelDisplay; var ic = IndividualControl.Empty; ic.Group = card; ic.Individual = Driver.AnalogInput.GetChannelIndex(card, d.label.text); Mode m = Driver.AnalogInput.GetChannelMode(ic); if (m == Mode.Auto) { Driver.AnalogInput.SetChannelMode(ic, Mode.Manual); d.progressBar.enableTouch = true; d.textBox.enableTouch = true; d.forceButton.buttonColor = "pri"; } else { Driver.AnalogInput.SetChannelMode(ic, Mode.Auto); d.progressBar.enableTouch = false; d.textBox.enableTouch = false; d.forceButton.buttonColor = "grey4"; } d.QueueDraw(); }
/// <summary> /// Displays the popup menu when the right mouse button is released /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnButtonUp(object sender, ButtonReleaseEventArgs e) { if (e.Event.Button == 3) { Popup.Popup(); } }
private void item1_ButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (args.Event.Button == 1u) { this.OpenFile(); } }
private void KeystrokeHandler(object o, ButtonReleaseEventArgs args) { if (args.Event.Button == 3 && !ViewModel.ReadOnly && ytreeviewFiles.GetSelectedObject() != null) { _menu.Popup(); } }
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); } }
private void OnTreeClicked(object sender, ButtonReleaseEventArgs e) { try { if (e.Event.Button == 1) // left click { Changed?.Invoke(sender, new EventArgs()); } else if (e.Event.Button == 3) // right click { TreePath path; tree.GetPathAtPos((int)e.Event.X, (int)e.Event.Y, out path); // By default, Gtk will un-select the selected rows when a normal (non-shift/ctrl) click is registered. // Setting e.Retval to true will stop the default Gtk ButtonPress event handler from being called after // we return from this handler, which in turn means that the rows will not be deselected. e.RetVal = tree.Selection.GetSelectedRows().Contains(path); if (contextMenu != null) { contextMenu.ShowAll(); contextMenu.Popup(); } } } catch (Exception err) { ShowError(err); } }
//----------------------------------------------------------------------- // This catches mouse clicks on the probe window and passes the X/Y coordinates to the // probe class to update the measurement list of the probe. public void ClickSDG(object o, ButtonReleaseEventArgs args) { // This is evoked when someone clicks on the SDG window to update the active measurement list of the probe. // The actual update is handled by the CProbe class allowing it to be reused if (data.data == null) { return; } double x = args.Event.X; double y = args.Event.Y; int width, height; this.drawingareaSDG.GdkWindow.GetSize(out width, out height); // the reset flag controls if the measurement is expanded from the existing // channels shown or if the list is reset. bool reset = true; if (args.Event.Button == 3) { reset = false; // right clicked } // This NIRSdotNET toolbox updateML function handles changing the measurement Active list data.probe.updateML((int)x, (int)y, reset, width, height); // update the active measurement list // update the probe and the data on the the next cycle this.drawingareaSDG.QueueDraw(); this.drawingarea_main.QueueDraw(); }
void HandleValueTreeButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (mousePressed) { mousePressed = false; } }
void OnButtonRelease(object o, ButtonReleaseEventArgs args) { Preview.ButtonReleaseEvent -= OnButtonRelease; Preview.MotionNotifyEvent -= OnMotionNotify; OnRelease(); }
void Tableview_ButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (args.Event.Button == 3 && ViewModel.PopupActions.Any()) { var selected = GetSelectedItems(); Menu popupMenu = new Menu(); foreach (var popupAction in ViewModel.PopupActions) { var item = new MenuItem(popupAction.Title); item.Sensitive = popupAction.GetSensitivity(selected); item.Visible = popupAction.GetVisibility(selected); item.Activated += (sender, e) => { popupAction.ExecuteAction(selected); }; if (popupAction.ChildActions.Any()) { foreach (var childAction in popupAction.ChildActions) { item.Add(CreatePopupMenuItem(childAction)); } } popupMenu.Add(item); } if (popupMenu.Children.Length == 0) { return; } popupMenu.Show(); popupMenu.Popup(); } }
protected override void OnMouseUp(DrawingArea canvas, ButtonReleaseEventArgs args, Cairo.PointD point) { // If the user didn't move the mouse, they want to deselect int tolerance = 0; if (Math.Abs(reset_origin.X - args.Event.X) <= tolerance && Math.Abs(reset_origin.Y - args.Event.Y) <= tolerance) { PintaCore.Actions.Edit.Deselect.Activate(); hist.Dispose(); hist = null; handler_active = false; Document doc = PintaCore.Workspace.ActiveDocument; doc.ToolLayer.Clear(); } else { if (hist != null) { PintaCore.Workspace.ActiveDocument.History.PushNewItem(hist); } handler_active = true; hist = null; } is_drawing = false; }
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); } }
protected void KeystrokeHandler(object o, ButtonReleaseEventArgs args) { if (args.Event.Button == 3) { ConfigureMenu(); } }
protected void OnClearButtonRelease(object sender, ButtonReleaseEventArgs args) { var parent = Toplevel as Window; var ms = new TouchDialog("Save events before clearing", parent); ms.Response += (o, a) => { if (a.ResponseId == ResponseType.Yes) { SaveEvents(); buffer.Clear(); } else if (a.ResponseId == ResponseType.No) { ms.Destroy(); var parent2 = Toplevel as Window; var d = new TouchDialog("Are you sure you want to clear all the contents of the event logger", parent2); d.Response += (obj, arg) => { if (arg.ResponseId == ResponseType.Yes) { buffer.Clear(); } }; d.Run(); d.Destroy(); } }; ms.Run(); ms.Destroy(); }
void TheButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (args.Event.Button == LEFT_MOUSE_BUTTON && DragGripper >= 0) { DragGripper = -1; } }
void OnButtonRelease(object obj, ButtonReleaseEventArgs args) { int tab = FindTabAtPosition(args.Event.XRoot, args.Event.YRoot); if (tab < 0) { return; } if (args.Event.Button == 3) { Menu popupMenu = (Menu)MainClass.MainWindow.ActionUiManager.GetWidget("/netbookPagePopup"); if (popupMenu != null) { popupMenu.ShowAll(); popupMenu.Popup(); } } if (args.Event.Button == 2) { IEditor ie = FindEditor(tab); if (ie != null) { this.ClosePage(ie); } } }
protected void OnForceRelease(object sender, ButtonReleaseEventArgs args) { var d = sender as DigitalDisplay; var ic = IndividualControl.Empty; ic.Group = card; ic.Individual = Driver.DigitalInput.GetChannelIndex(card, d.label.text); Mode m = Driver.DigitalInput.GetChannelMode(ic); if (m == Mode.Auto) { Driver.DigitalInput.SetChannelMode(ic, Mode.Manual); d.selector.Visible = true; d.button.buttonColor = "pri"; } else { Driver.DigitalInput.SetChannelMode(ic, Mode.Auto); d.selector.Visible = false; d.button.buttonColor = "grey4"; } d.QueueDraw(); }
/* * Evento producido cuando pulsas en los vecinos * */ protected void OnTreeviewNeighboursButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { TreeIter t; if (treeviewNeighbours.Selection.GetSelectedRows().Length > 0) { TreePath p = treeviewNeighbours.Selection.GetSelectedRows()[0]; this._infoNeighboursView.GetIter(out t, p); string vecino = (string)this._infoNeighboursView.GetValue(t, 0); if (!this._messages.ContainsKey(vecino)) { this.connectionPng.Sensitive = true; } else { this.connectionPng.Sensitive = false; } BotoneraConexiones(false); connectionPng.Sensitive = true; } }
protected void OnFixtureSettingsButtonReleased(object sender, ButtonReleaseEventArgs args) { var parent = Toplevel as Window; var s = new FixtureSettings(Devices.Lighting.GetGadgetSettings(fixtureName) as LightingFixtureSettings, parent); s.Run(); var newFixtureName = s.fixtureName; var outcome = s.outcome; if ((outcome == TouchSettingsOutcome.Modified) && (newFixtureName != fixtureName)) { var index = combo.comboList.IndexOf(fixtureName); combo.comboList[index] = newFixtureName; fixtureName = newFixtureName; } else if (outcome == TouchSettingsOutcome.Added) { combo.comboList.Insert(combo.comboList.Count - 1, newFixtureName); combo.activeText = newFixtureName; fixtureName = newFixtureName; } else if (outcome == TouchSettingsOutcome.Deleted) { combo.comboList.Remove(fixtureName); fixtureName = Devices.Lighting.defaultGadget; combo.activeText = fixtureName; } combo.QueueDraw(); GetFixtureData(); lightingStateWidget.SetStates(fixtureName); lightingStateWidget.QueueDraw(); }
void OnMainViewportVideoDragStoppedEvent(object o, ButtonReleaseEventArgs args) { if (ViewModel.Zoom == 1) { return; } if (dragTimerID != 0) { GLib.Source.Remove(dragTimerID); dragTimerID = 0; } mainviewport.VideoDragged -= OnMainViewportVideoDraggedEvent; moveStart = null; ChangeCursor(null); // If we actually dragged the ROI we don't want the default button release handler // to be called as this would toggle play pause. On the other hand if the ROI was // unchanged, the user expects the normal behaviour of play/pause when clicking the video. if (roiMoved == true) { args.RetVal = true; } if (wasPlaying == true) { playerVM.PlayCommand.Execute(); } }
/// <summary> /// Displays the popup menu when the right mouse button is released /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnButtonUp(object sender, ButtonReleaseEventArgs e) { if (e.Event.Button == 3 && ContextMenu != null) { ContextMenu.Show(); } }
public void OnVideoSetSubtitleStartEndButtonRelease(object o, ButtonReleaseEventArgs args) { if (args.Event.Button != 1) { return; } if (Base.TimingMode == TimingMode.Times) { TimeSpan time = Base.Ui.Video.Position.CurrentTime; if (Base.Ui.Video.IsStatePlaying && Base.Config.VideoApplyReactionDelay) { time -= TimeSpan.FromMilliseconds(Base.Config.VideoReactionDelay); } Base.CommandManager.Execute(new VideoSetSubtitleEndCommand(time)); Base.Ui.View.SelectNextSubtitle(); } else { int frames = Base.Ui.Video.Position.CurrentFrames; if (Base.Ui.Video.IsStatePlaying && Base.Config.VideoApplyReactionDelay) { frames -= (int)TimingUtil.TimeMillisecondsToFrames(Base.Config.VideoReactionDelay, Base.Ui.Video.FrameRate); } Base.CommandManager.Execute(new VideoSetSubtitleEndCommand(frames)); Base.Ui.View.SelectNextSubtitle(); } }
protected void OnButtonRelease(object sender, ButtonReleaseEventArgs args) { if ((args.Event.X >= 0.0) && (args.Event.X <= 250.0)) { AquaPicGui.AquaPicUserInterface.ChangeScreens("Alarms", Toplevel, AquaPicGui.AquaPicUserInterface.currentScene); } }
protected virtual void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (args.Event.Source!=this) button.State = 0; else button.State &= 1; Clutter.Ungrab.Pointer (); InvokeSliderHasChanged (); args.RetVal = true; }
protected void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (o is AlphabetButton) { InvokeLetterClicked ((o as AlphabetButton).Letter); } }
protected virtual void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { State &= ~2; args.RetVal = !BubbleEvents; }
protected virtual void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { if (args.Event.Button == 3) { SlideIn (); } else { if (Index>=0 && Opacity > 0) { if (CoverManager.CurrentCover==this || args.Event.ClickCount==3) { CreateClickClone (); CoverManager.InvokeActorActivated (this); } else GLib.Timeout.Add ((uint) (CoverManager.DoubleClickTime*0.75), new GLib.TimeoutHandler ( delegate { CoverManager.TargetIndex = Index; return false; })); } } args.RetVal = true; }
protected override void HandleButtonReleaseEvent(object o, ButtonReleaseEventArgs args) { State = (state^4) & ~2; freeze_state = true; //freeze the state untill after the event has finished handling InvokeToggled (); freeze_state = false; //thaw the state args.RetVal = !bubble; }