Esempio n. 1
0
 private void PictureBox_MouseClick(object sender, MouseEventArgs e)
 {
     if (sender is PictureBox && ((PictureBox)sender).Image is object)
     {
         if (e.Button == MouseButtons.Right)
         {
             ButtonItem1.Popup(Cursor.Position);
         }
     }
 }
        private void TextBoxX_Input_MouseClick(object sender, MouseEventArgs e)
        {
            activeTextBox = (TextBoxX)sender;
            activeTextBox.ShortcutsEnabled = false;
            bool isEnabled = !activeTextBox.ReadOnly;

            ButtonItem_Remove.Enabled = isEnabled;
            ButtonItem_cut.Enabled    = isEnabled;
            ButtonItem_Paste.Enabled  = isEnabled;
            if (e.Button == MouseButtons.Right)
            {
                ButtonItem1.Popup(Cursor.Position);
            }
        }