public void Popup(IntelliSenseContext ctx) {
     Debug.Assert(_context == null);
     _context = ctx;
     AdjustListBox();
     this.Show(_context.OwnerControl, ToControlPoint(ctx.CommandStartPoint));
     _listBox.Focus();
     _status = ComplementStatus.Selecting;
 }
 //ListBoxからのコールバック系
 public void Cancel()
 {
     if (_status == ComplementStatus.Exiting || _status == ComplementStatus.Hidden)
     {
         return;                                                                       //このExit内でClose()するとLostFocusなどを経由して再帰してくる場合がある
     }
     _status = ComplementStatus.Hidden;
     Exit();
 }
 public void Popup(IntelliSenseContext ctx)
 {
     Debug.Assert(_context == null);
     _context = ctx;
     AdjustListBox();
     this.Show(_context.OwnerControl, ToControlPoint(ctx.CommandStartPoint));
     _listBox.Focus();
     _status = ComplementStatus.Selecting;
 }
        //ここまで

        private void Exit()
        {
            Debug.WriteLineIf(DebugOpt.IntelliSense, "Exit");
            Debug.Assert(_context != null);

            ComplementStatus s = _status;

            _status = ComplementStatus.Exiting;
            this.Hide();
            _context = null;
            _status  = s;
        }
        public void Complement()
        {
            string text = _listBox.Items[_listBox.SelectedIndex].ToString();

            Debug.WriteLineIf(DebugOpt.IntelliSense, "Complement " + text);
            string sendback = FormatSendBackText(text, '\0');

            if (sendback.Length == 0) //既に既存候補を手入力してたときは、確認用Enterは不要。即コマンド確定でよい。
            {
                SendBack('\n');
            }
            else
            {
                SendBack(sendback);
            }
            _status = ComplementStatus.Hidden;
            Exit();
        }
 //ListBoxからのコールバック系
 public void Cancel() {
     if (_status == ComplementStatus.Exiting || _status == ComplementStatus.Hidden)
         return; //このExit内でClose()するとLostFocusなどを経由して再帰してくる場合がある
     _status = ComplementStatus.Hidden;
     Exit();
 }
        //ここまで

        private void Exit() {
            Debug.WriteLineIf(DebugOpt.IntelliSense, "Exit");
            Debug.Assert(_context != null);

            ComplementStatus s = _status;
            _status = ComplementStatus.Exiting;
            this.Hide();
            _context = null;
            _status = s;
        }
 public void Complement() {
     string text = _listBox.Items[_listBox.SelectedIndex].ToString();
     Debug.WriteLineIf(DebugOpt.IntelliSense, "Complement " + text);
     string sendback = FormatSendBackText(text, '\0');
     if (sendback.Length == 0) //既に既存候補を手入力してたときは、確認用Enterは不要。即コマンド確定でよい。
         SendBack('\n');
     else
         SendBack(sendback);
     _status = ComplementStatus.Hidden;
     Exit();
 }
 public void Complement()
 {
     string text = _listBox.Items[_listBox.SelectedIndex].ToString();
     Debug.WriteLineIf(DebugOpt.IntelliSense, "Complement " + text);
     string sendback = FormatSendBackText(text, '\0');
     if (sendback.Length == 0) //���Ɋ����������͂��Ă��Ƃ��́A�m�F�pEnter�͕s�v�B���R�}���h�m��ł悢�B
         SendBack('\n');
     else
         SendBack(sendback);
     _status = ComplementStatus.Hidden;
     Exit();
 }
 //ListBox����̃R�[���o�b�N�n
 public void Cancel()
 {
     if (_status == ComplementStatus.Exiting || _status == ComplementStatus.Hidden)
         return; //����Exit���Close()�����LostFocus�Ȃǂ�o�R���čċA���Ă���ꍇ������
     _status = ComplementStatus.Hidden;
     Exit();
 }