Exemple #1
0
 private void CmsTextSelect_Open(MouseEventArgs e, TextBox Tb)
 {
     if (Tb.SelectionLength > 0 && e.Button == MouseButtons.Left)
     {
         TB = Tb;
         CmsTextSelect.Show(Cursor.Position);
     }
 }
Exemple #2
0
        private void CmsTextSelect_Open(MouseEventArgs e, object Obj)
        {
            if (e.Button == MouseButtons.Left)
            {
                switch (Obj)
                {
                case TextBox tb when tb.SelectionLength > 0:
                case RichTextBox rtb when rtb.SelectionLength > 0:
                    OBJ = Obj;
                    CmsTextSelect.Show(Cursor.Position);
                    break;

                default:
                    OBJ = null;
                    break;
                }
            }
        }
Exemple #3
0
 private void CmsTextSelect_Cancel_Click(object sender, EventArgs e)
 {
     CmsTextSelect.Close();
 }