本文整理汇总了C#中TextArea.Refresh方法的典型用法代码示例。如果您正苦于以下问题:C# TextArea.Refresh方法的具体用法?C# TextArea.Refresh怎么用?C# TextArea.Refresh使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextArea
的用法示例。
在下文中一共展示了TextArea.Refresh方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override void Execute(TextArea textArea)
{
foreach (FoldMarker fm in textArea.Document.FoldingManager.FoldMarker) {
fm.IsFolded = fm.FoldType == FoldType.MemberBody || fm.FoldType == FoldType.Region;
}
textArea.Refresh();
textArea.Document.FoldingManager.NotifyFoldingsChanged(EventArgs.Empty);
}
示例2: Execute
public override void Execute(TextArea textArea)
{
this.textArea = textArea;
textArea.BeginUpdate();
if (textArea.SelectionManager.HasSomethingSelected) {
foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) {
Convert(textArea.Document, selection.Offset, selection.Length);
}
} else {
Convert(textArea.Document, 0, textArea.Document.TextLength);
}
textArea.Caret.ValidateCaretPos();
textArea.EndUpdate();
textArea.Refresh();
}
示例3: Execute
public override void Execute(TextArea textArea)
{
this.textArea = textArea;
textArea.BeginUpdate();
if (textArea.SelectionManager.HasSomethingSelected) {
foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) {
Convert(textArea.Document, selection.StartPosition.Y, selection.EndPosition.Y);
}
} else {
Convert(textArea.Document, 0, textArea.Document.TotalNumberOfLines - 1);
}
textArea.Caret.ValidateCaretPos();
textArea.EndUpdate();
textArea.Refresh();
}
示例4: Execute
/// <summary>
/// Executes the action on a certain <see cref="TextArea"/>.
/// </summary>
/// <param name="textArea">The text area on which to execute the action.</param>
public override void Execute(TextArea textArea)
{
if (textArea.SelectionManager.SelectionIsReadonly)
return;
_textArea = textArea;
textArea.BeginUpdate();
textArea.Document.UndoStack.StartUndoGroup();
if (textArea.SelectionManager.HasSomethingSelected)
{
foreach (ISelection selection in textArea.SelectionManager.Selections)
Convert(textArea.Document, selection.StartPosition.Y, selection.EndPosition.Y);
}
else
{
Convert(textArea.Document, 0, textArea.Document.TotalNumberOfLines - 1);
}
textArea.Document.UndoStack.EndUndoGroup();
textArea.EndUpdate();
textArea.Refresh();
}
示例5: Execute
/// <remarks>
/// Executes this edit action
/// </remarks>
/// <param name="textArea">The <see cref="ItextArea"/> which is used for callback purposes</param>
public override void Execute(TextArea textArea)
{
if (textArea.Document.ReadOnly) {
return;
}
textArea.BeginUpdate();
if (textArea.SelectionManager.HasSomethingSelected) {
foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) {
textArea.Document.FormattingStrategy.IndentLines(textArea, selection.StartPosition.Y, selection.EndPosition.Y);
}
} else {
textArea.Document.FormattingStrategy.IndentLines(textArea, 0, textArea.Document.TotalNumberOfLines - 1);
}
textArea.EndUpdate();
textArea.Refresh();
}