private void IconsBox_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { RightClickMenu.Show(this, e.Location); } }
private void TasView_MouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right && !TasView.IsPointingAtColumnHeader && !_supressContextMenu) { RightClickMenu.Show(TasView, e.X, e.Y); } else if (e.Button == MouseButtons.Left) { ClearLeftMouseStates(); } if (e.Button == System.Windows.Forms.MouseButtons.Right) { if (_rightClickFrame != -1) { _rightClickInput = null; _rightClickOverInput = null; _rightClickFrame = -1; CurrentTasMovie.ChangeLog.EndBatch(); } } _supressContextMenu = false; DoTriggeredAutoRestoreIfNeeded(); }
private void pictureBox1_MouseClick(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { RightClickMenu.Show(Cursor.Position); } }
private void HistoryView_MouseUp(object sender, MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Right) { RightClickMenu.Show(HistoryView, e.X, e.Y); } else if (e.Button == System.Windows.Forms.MouseButtons.Left) { if (HistoryView.selectedItem == -1) { HistoryView.SelectItem(_hackSelect, true); } } }
private void PrvwBtn_Click(object sender, EventArgs e) { if (!IsPreviewEnabled) { RightClickMenu.Show(PrvwBtn, new System.Drawing.Point(1, 20)); } else { IsPreviewEnabled = false; StartNormalPrvw1.Enabled = true; StartNormalPrvw2.Enabled = true; StartNormalPrvw3.Enabled = true; StartCustomPrvw.Enabled = true; } }
private void TasView_MouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right && !TasView.IsPointingAtColumnHeader && !_supressContextMenu) { RightClickMenu.Show(TasView, e.X, e.Y); } else if (e.Button == MouseButtons.Left) { CurrentTasMovie.SupressGreenzonging = false; _startMarkerDrag = false; _startFrameDrag = false; _startBoolDrawColumn = string.Empty; _startFloatDrawColumn = string.Empty; // Exit float editing if value was changed with cursor if (_floatEditRow != -1 && _floatPaintState != CurrentTasMovie.GetFloatState(_floatEditRow, _floatEditColumn)) { _floatEditRow = -1; RefreshDialog(); } _floatPaintState = 0; _floatEditYPos = -1; _leftButtonHeld = false; if (_floatEditRow == -1) { CurrentTasMovie.ChangeLog.EndBatch(); } } if (e.Button == System.Windows.Forms.MouseButtons.Right) { if (_rightClickFrame != -1) { _rightClickInput = null; _rightClickFrame = -1; CurrentTasMovie.ChangeLog.EndBatch(); } } _supressContextMenu = false; DoTriggeredAutoRestoreIfNeeded(); }
private void ObjectGrid_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e) { if (e.ColumnIndex == 0 && e.RowIndex != -1) { DataGridViewCheckBoxCell cell = ObjectGrid.Rows[e.RowIndex].Cells[0] as DataGridViewCheckBoxCell; if ((bool)cell.EditingCellFormattedValue) { ObjectGrid.Rows[e.RowIndex].ReadOnly = false; } else { ObjectGrid.Rows[e.RowIndex].ReadOnly = true; ObjectGrid.Rows[e.RowIndex].Cells[0].ReadOnly = false; } } if (e.Button == MouseButtons.Right) { RightClickMenu.Show(Cursor.Position.X, Cursor.Position.Y); currentCell = new Tuple <int, int>(e.RowIndex, e.ColumnIndex); } }
private void TasView_MouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right && !TasView.IsPointingAtColumnHeader && !_supressContextMenu && TasView.SelectedRows.Any()) { if (Global.MovieSession.Movie.FrameCount < TasView.SelectedRows.Max()) { // trying to be smart here // if a loaded branch log is shorter than selection, keep selection until you attempt to call context menu // you might need it when you load again the branch where this frame exists TasView.DeselectAll(); RefreshTasView(); } else { RightClickMenu.Show(TasView, e.X, e.Y); } } else if (e.Button == MouseButtons.Left) { ClearLeftMouseStates(); } if (e.Button == System.Windows.Forms.MouseButtons.Right) { if (_rightClickFrame != -1) { _rightClickInput = null; _rightClickOverInput = null; _rightClickFrame = -1; CurrentTasMovie.ChangeLog.EndBatch(); } } _supressContextMenu = false; DoTriggeredAutoRestoreIfNeeded(); }
protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); if (e.Button == System.Windows.Forms.MouseButtons.Left) { mouseDown = false; oldXLocation = -1; bool ignoreClick = false; if (Math.Abs(offset) > 5) { TabOffset += offset; ignoreClick = true; } offset = 0; if (tabRects == null) { UpdateTabRects(); } if (!ignoreClick) { for (int i = 0; i < tabRects.Count; i++) { if (tabRects[i].XButtonRect.Contains(e.Location)) { if (baseTabControl.TabCount > 1 && i == BaseTabControl.SelectedIndex) { if (i == 0) { baseTabControl.SelectTab(1); } else { baseTabControl.SelectTab(i - 1); } Application.DoEvents(); } baseTabControl.TabPages.RemoveAt(i); previousSelectedTabIndex = -1; UpdateTabRects(); return; } else if (tabRects[i].TabRect.Contains(e.Location)) { baseTabControl.SelectedIndex = i; } } } animationSource = e.Location; UpdateTabRects(); Invalidate(); } else { RightClickLocation = e.Location; RightClickMenu.Show(PointToScreen(e.Location)); } }