예제 #1
0
 private void CmsTextSelect_Open(MouseEventArgs e, TextBox Tb)
 {
     if (Tb.SelectionLength > 0 && e.Button == MouseButtons.Left)
     {
         TB = Tb;
         CmsTextSelect.Show(Cursor.Position);
     }
 }
예제 #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;
                }
            }
        }