Esempio n. 1
0
        private void DocGrid_MouseUp(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (hederClick)
            {
                hederClick = false;
                return;
            }

            if (!IsFine)
            {
                return;
            }

            if (e.Button != MouseButtons.Right)
            {
                return;
            }
            Console.WriteLine("{0}: try to build ContextMenu", DateTime.Now.ToString("HH:mm:ss fff"));
            ContextMenu contextMenu = Style.BuildContextMenu();

            if (contextMenu != null && contextMenu.MenuItems.Count > 0)
            {
                contextMenu.Show(this, PointToClient(Cursor.Position));
            }
        }