상속: System.Windows.Forms.ContextMenu
예제 #1
0
        private void tableTester_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Right)
            {
                return;
            }

            int rowIndex = tableTester.RowIndexAt(e.X, e.Y);

            if (rowIndex == -1)
            {
                return;
            }

            Row    row    = tableTester.TableModel.Rows[rowIndex];
            string path   = row.Cells[0].Text;
            string reason = row.Cells[1].Text;

            MatchReason.Status status = (MatchReason.Status)row.Cells[0].Tag;

            FilterMenu menu = new FilterMenu(this, path, reason, status);

            menu.Show(tableTester, new Point(e.X, e.Y));
        }
예제 #2
0
        private void tableTester_MouseClick(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Right) return;

            int rowIndex = tableTester.RowIndexAt(e.X, e.Y);
            if (rowIndex == -1) return;

            Row row = tableTester.TableModel.Rows[rowIndex];
            string path = row.Cells[0].Text;
            string reason = row.Cells[1].Text;
            MatchReason.Status status = (MatchReason.Status)row.Cells[0].Tag;

            FilterMenu menu = new FilterMenu(this, path, reason, status);
            menu.Show(tableTester, new Point(e.X, e.Y));
        }