本文整理匯總了C#中ScintillaNet.ScintillaControl.Focus方法的典型用法代碼示例。如果您正苦於以下問題:C# ScintillaControl.Focus方法的具體用法?C# ScintillaControl.Focus怎麽用?C# ScintillaControl.Focus使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ScintillaNet.ScintillaControl
的用法示例。
在下文中一共展示了ScintillaControl.Focus方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: MakeFileWritable
/// <summary>
/// Makes the read only file writable
/// </summary>
public static void MakeFileWritable(ScintillaControl sci)
{
try
{
String file = sci.FileName;
File.SetAttributes(file, FileAttributes.Normal);
sci.IsReadOnly = false;
sci.Focus();
}
catch (Exception ex)
{
ErrorManager.ShowError(ex);
}
}
示例2: MoveToPosition
/// <summary>
/// Move the document position
/// </summary>
private void MoveToPosition(ScintillaControl sci, Int32 position)
{
try
{
position = sci.MBSafePosition(position); // scintilla indexes are in 8bits
Int32 line = sci.LineFromPosition(position);
sci.EnsureVisible(line);
sci.GotoPos(position);
sci.SetSel(position, sci.LineEndPosition(line));
sci.Focus();
}
catch
{
String message = TextHelper.GetString("Info.InvalidItem");
ErrorManager.ShowInfo(message);
this.RemoveInvalidItems();
this.RefreshProject();
}
}
示例3: MoveToPosition
/// <summary>
/// Move the document position
/// </summary>
/// <param name="sci"></param>
/// <param name="position"></param>
private void MoveToPosition( ScintillaControl sci, int position )
{
int line = sci.LineFromPosition(position);
sci.EnsureVisible( line );
sci.GotoPos(position);
sci.SetSel(position, sci.LineEndPosition(line));
sci.Focus();
}