SelectPrevItem() public method

public SelectPrevItem ( ) : void
return void
		protected override bool ProcessTextAreaKey(Keys keyData)
		{
			if (!Visible) {
				return false;
			}
			
			switch (keyData) {
				case Keys.Home:
					codeCompletionListView.SelectIndex(0);
					return true;
				case Keys.End:
					codeCompletionListView.SelectIndex(completionData.Length-1);
					return true;
				case Keys.PageDown:
					codeCompletionListView.PageDown();
					return true;
				case Keys.PageUp:
					codeCompletionListView.PageUp();
					return true;
				case Keys.Down:
					codeCompletionListView.SelectNextItem();
					return true;
				case Keys.Up:
					codeCompletionListView.SelectPrevItem();
					return true;
				case Keys.Tab:
					InsertSelectedItem('\t');
					return true;
				case Keys.Return:
					InsertSelectedItem('\n');
					return true;
			}
			return base.ProcessTextAreaKey(keyData);
		}
Ejemplo n.º 2
0
        protected override bool ProcessTextAreaKey(Keys keyData)
        {
            if (!Visible)
            {
                return(false);
            }

            switch (keyData)
            {
            case Keys.Back:
                --endOffset;
                if (endOffset < startOffset)
                {
                    Close();
                }
                return(false);

            case Keys.Delete:
                if (control.ActiveTextAreaControl.Caret.Offset <= endOffset)
                {
                    --endOffset;
                }
                if (endOffset < startOffset)
                {
                    Close();
                }
                return(false);

            case Keys.Home:
                codeCompletionListView.SelectIndex(0);
                return(true);

            case Keys.End:
                codeCompletionListView.SelectIndex(completionData.Length - 1);
                return(true);

            case Keys.PageDown:
                codeCompletionListView.PageDown();
                return(true);

            case Keys.PageUp:
                codeCompletionListView.PageUp();
                return(true);

            case Keys.Down:
                codeCompletionListView.SelectNextItem();
                return(true);

            case Keys.Up:
                codeCompletionListView.SelectPrevItem();
                return(true);

            case Keys.Tab:
            case Keys.Return:
                InsertSelectedItem('\0');
                return(true);
            }
            return(base.ProcessTextAreaKey(keyData));
        }
Ejemplo n.º 3
0
        protected override bool ProcessTextAreaKey(Keys keyData)
        {
            if (keyData == Keys.Back)
            {
                return(false);                                  //DC: don't process backspace
            }
            if (!Visible || codeCompletionListView == null)
            {
                return(false);
            }

            switch (keyData)
            {
            case Keys.Home:
                codeCompletionListView.SelectIndex(0);
                return(true);

            case Keys.End:
                codeCompletionListView.SelectIndex(completionData.Length - 1);
                return(true);

            case Keys.PageDown:
                codeCompletionListView.PageDown();
                return(true);

            case Keys.PageUp:
                codeCompletionListView.PageUp();
                return(true);

            case Keys.Down:
                codeCompletionListView.SelectNextItem();
                return(true);

            case Keys.Up:
                codeCompletionListView.SelectPrevItem();
                return(true);

            case Keys.Tab:
                InsertSelectedItem('\t');
                return(true);

            case Keys.Return:
                InsertSelectedItem('\n');
                return(true);
            }
            this.AfterKeyPress.invoke(keyData);
            return(base.ProcessTextAreaKey(keyData));
        }