当前位置: 首页>>代码示例>>C#>>正文


C# ScintillaControl.LineDown方法代码示例

本文整理汇总了C#中ScintillaNet.ScintillaControl.LineDown方法的典型用法代码示例。如果您正苦于以下问题:C# ScintillaControl.LineDown方法的具体用法?C# ScintillaControl.LineDown怎么用?C# ScintillaControl.LineDown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ScintillaNet.ScintillaControl的用法示例。


在下文中一共展示了ScintillaControl.LineDown方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SkipMethod

 private static void SkipMethod(ScintillaControl sci)
 {
     do
     {
         sci.LineDown();
         sci.LineEnd();
     }
     while (sci.CurrentLine < sci.LineCount && !IsMethodBodyStart(sci));
 }
开发者ID:elsassph,项目名称:fdMacros,代码行数:9,代码来源:Trace.cs

示例2: HandleKeys

        public static bool HandleKeys(ScintillaControl sci, Keys key)
        {
            int index;
            switch (key)
            {
                case Keys.Back:
                    if (word.Length >= MinWordLength)
                    {
                        word = word.Substring(0, word.Length - 1);
                        currentPos = sci.CurrentPos - 1;
                        lastIndex = 0;
                        FindWordStartingWith(word);
                    }
                    else CompletionList.Hide((char)8);
                    return false;

                case Keys.Enter:
                    if (noAutoInsert || !ReplaceText(sci, '\n'))
                    {
                        CompletionList.Hide();
                        return false;
                    }
                    return true;

                case Keys.Tab:
                    if (!ReplaceText(sci, '\t'))
                    {
                        CompletionList.Hide();
                        return false;
                    }
                    return true;

                case Keys.Space:
                    if (noAutoInsert) CompletionList.Hide();
                    return false;

                case Keys.Up:
                    noAutoInsert = false;
                    // the list was hidden and it should not appear
                    if (!completionList.Visible)
                    {
                        CompletionList.Hide();
                        if (key == Keys.Up) sci.LineUp();
                        else sci.CharLeft();
                        return false;
                    }
                    // go up the list
                    if (completionList.SelectedIndex > 0)
                    {
                        RefreshTip();
                        index = completionList.SelectedIndex-1;
                        completionList.SelectedIndex = index;
                    }
                    // wrap
                    else if (PluginBase.MainForm.Settings.WrapList)
                    {
                        RefreshTip();
                        index = completionList.Items.Count-1;
                        completionList.SelectedIndex = index;
                    }
                    break;

                case Keys.Down:
                    noAutoInsert = false;
                    // the list was hidden and it should not appear
                    if (!completionList.Visible)
                    {
                        CompletionList.Hide();
                        if (key == Keys.Down) sci.LineDown();
                        else sci.CharRight();
                        return false;
                    }
                    // go down the list
                    if (completionList.SelectedIndex < completionList.Items.Count-1)
                    {
                        RefreshTip();
                        index = completionList.SelectedIndex+1;
                        completionList.SelectedIndex = index;
                    }
                    // wrap
                    else if (PluginBase.MainForm.Settings.WrapList)
                    {
                        RefreshTip();
                        index = 0;
                        completionList.SelectedIndex = index;
                    }
                    break;

                case Keys.PageUp:
                    noAutoInsert = false;
                    // the list was hidden and it should not appear
                    if (!completionList.Visible)
                    {
                        CompletionList.Hide();
                        sci.PageUp();
                        return false;
                    }
                    // go up the list
                    if (completionList.SelectedIndex > 0)
                    {
//.........这里部分代码省略.........
开发者ID:xeronith,项目名称:flashdevelop,代码行数:101,代码来源:CompletionList.cs

示例3: HandleKeys

        public bool HandleKeys(ScintillaControl sci, Keys key)
        {
            switch (key)
            {
                case Keys.Multiply:
                case Keys.Subtract:
                case Keys.Divide:
                case Keys.Decimal:
                case Keys.Add:
                    return false;

                case Keys.Up:
                    if (!CompletionList.Active) sci.LineUp();
                    return false;
                case Keys.Down:
                    if (!CompletionList.Active) sci.LineDown();
                    return false;
                case Keys.Up | Keys.Shift:
                    sci.LineUpExtend();
                    return false;
                case Keys.Down | Keys.Shift:
                    sci.LineDownExtend();
                    return false;
                case Keys.Left | Keys.Shift:
                    sci.CharLeftExtend();
                    return false;
                case Keys.Right | Keys.Shift:
                    sci.CharRightExtend();
                    return false;

                case Keys.Right:
                    if (!CompletionList.Active)
                    {
                        sci.CharRight();
                        currentPos = sci.CurrentPos;
                        if (sci.LineFromPosition(sci.CurrentPos) != currentLine) Hide();
                        else if (OnUpdateCallTip != null) OnUpdateCallTip(sci, currentPos);
                    }
                    return true;

                case Keys.Left:
                    if (!CompletionList.Active)
                    {
                        sci.CharLeft();
                        currentPos = sci.CurrentPos;
                        if (currentPos < startPos) Hide();
                        else
                        {
                            if (sci.LineFromPosition(sci.CurrentPos) != currentLine) Hide();
                            else if (OnUpdateCallTip != null) OnUpdateCallTip(sci, currentPos);
                        }
                    }
                    return true;

                case Keys.Back:
                    sci.DeleteBack();
                    currentPos = sci.CurrentPos;
					if (currentPos + deltaPos < startPos) Hide();
                    else if (OnUpdateCallTip != null) OnUpdateCallTip(sci, currentPos);
                    return true;

                case Keys.Tab:
                case Keys.Space:
                    return false;

                default:
                    if (!CompletionList.Active) Hide();
                    return false;
            }
        }
开发者ID:heon21st,项目名称:flashdevelop,代码行数:70,代码来源:MethodCallTip.cs

示例4: HandleKeys

		static public bool HandleKeys(ScintillaControl sci, Keys key)
		{
			int index;
			switch (key)
			{
				case Keys.Back:
					sci.DeleteBack();
					if (word.Length > 0)
					{
						word = word.Substring(0, word.Length-1);
						currentPos = sci.CurrentPos;
						lastIndex = 0;
						FindWordStartingWith(word);
					}
					else CompletionList.Hide();
					return true;
					
				case Keys.Enter:
				case Keys.Tab:
					ReplaceText(sci);
					return true;
					
				case Keys.Space:
					return false;
					
				case Keys.Up:	
				case Keys.Left:
					// the list was hidden and it should not appear
					if (!completionList.Visible)
					{
						CompletionList.Hide();
						if (key == Keys.Up) sci.LineUp(); 
						else sci.CharLeft();
						return false;
					}
					// go up the list
					else if (completionList.SelectedIndex > 0)
					{
						index = completionList.SelectedIndex-1;
						completionList.SelectedIndex = index;
					}
					// wrap
					else if (wrapList)
					{
						index = completionList.Items.Count-1;
						completionList.SelectedIndex = index;
					}
					break;
					
				case Keys.Down:	
				case Keys.Right:
					// the list was hidden and it should not appear
					if (!completionList.Visible)
					{
						CompletionList.Hide();
						if (key == Keys.Down) sci.LineDown(); 
						else sci.CharRight();
						return false;
					}
					// go down the list
					else if (completionList.SelectedIndex < completionList.Items.Count-1)
					{
						index = completionList.SelectedIndex+1;
						completionList.SelectedIndex = index;
					}
					// wrap
					else if (wrapList)
					{
						index = 0;
						completionList.SelectedIndex = index;
					}
					break;
					
				case Keys.PageUp:
					// the list was hidden and it should not appear
					if (!completionList.Visible)
					{
						CompletionList.Hide();
						sci.PageUp();
						return false;
					}
					// go up the list
					else if (completionList.SelectedIndex > 0)
					{
						index = completionList.SelectedIndex-completionList.Height/completionList.ItemHeight;
						if (index < 0) index = 0;
						completionList.SelectedIndex = index;
					}
					break;
					
				case Keys.PageDown:
					// the list was hidden and it should not appear
					if (!completionList.Visible)
					{
						CompletionList.Hide();
						sci.PageDown();
						return false;
					}
					// go down the list
					else if (completionList.SelectedIndex < completionList.Items.Count-1)
//.........这里部分代码省略.........
开发者ID:heon21st,项目名称:flashdevelop,代码行数:101,代码来源:CompletionList.cs


注:本文中的ScintillaNet.ScintillaControl.LineDown方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。