本文整理汇总了C#中Mono.TextEditor.LineEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# LineEventArgs类的具体用法?C# LineEventArgs怎么用?C# LineEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LineEventArgs类属于Mono.TextEditor命名空间,在下文中一共展示了LineEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UpdateWidth
void UpdateWidth (object sender, LineEventArgs args)
{
int currentLineCountLog10 = (int)System.Math.Log10 (editor.Document.LineCount);
if (oldLineCountLog10 != currentLineCountLog10) {
CalculateWidth ();
oldLineCountLog10 = currentLineCountLog10;
editor.Document.CommitUpdateAll ();
}
}
示例2: HandleLineInserted
void HandleLineInserted (object sender, LineEventArgs e)
{
if (lineStates == null)
return;
try {
lineStates.Insert(e.Line.LineNumber, new LineChangeInfo (Mono.TextEditor.TextDocument.LineState.Dirty));
} catch (Exception ex) {
Console.WriteLine ("error while DiffTracker.HandleLineInserted:" + ex);
}
}
示例3: HandleLineRemoved
void HandleLineRemoved (object sender, LineEventArgs e)
{
if (lineStates == null)
return;
try {
lineStates.RemoveAt (e.LineNumber);
} catch (Exception ex) {
Console.WriteLine ("error while DiffTracker.HandleLineRemoved:" + ex);
}
}
示例4: HandleDocLineChanged
void HandleDocLineChanged (object sender, LineEventArgs e)
{
e.Line.WasChanged = true;
}
示例5: SplitterLineSegmentTreeLineChanged
void SplitterLineSegmentTreeLineChanged (object sender, LineEventArgs e)
{
if (LineChanged != null)
LineChanged (this, e);
}
示例6: HandleSplitterLineSegmentTreeLineRemoved
void HandleSplitterLineSegmentTreeLineRemoved (object sender, LineEventArgs e)
{
foreach (TextLineMarker marker in e.Line.Markers) {
if (marker is IExtendingTextLineMarker) {
lock (extendingTextMarkers) {
HeightChanged = true;
extendingTextMarkers.Remove (marker);
}
UnRegisterVirtualTextMarker ((IExtendingTextLineMarker)marker);
}
}
}
示例7: HandleLineRemoved
void HandleLineRemoved (object sender, LineEventArgs e)
{
Rebuild ();
OnLineUpdateFrom (new HeightChangedEventArgs (e.Line.LineNumber - 1));
//RemoveLine (e.Line.LineNumber);
}
示例8: OnHoveredLineChanged
protected virtual void OnHoveredLineChanged (LineEventArgs e)
{
EventHandler<LineEventArgs> handler = this.HoveredLineChanged;
if (handler != null)
handler (this, e);
}
示例9: EditorDocumentLineChanged
/// <summary>
/// Marks a line as locally modified
/// </summary>
private void EditorDocumentLineChanged (object sender, LineEventArgs e)
{
int startLine = editor.Document.OffsetToLineNumber (e.Line.Offset),
endLine = editor.Document.OffsetToLineNumber (e.Line.EndOffset);
if (startLine == endLine) {
SetAnnotation (startLine, locallyModified);
}
for (int i=startLine; i<endLine; ++i) {
SetAnnotation (i, locallyModified);
}
}
示例10: HandleLineRemoved
void HandleLineRemoved (object sender, LineEventArgs e)
{
RemoveLine (e.Line.LineNumber);
}
示例11: HandleLineRemoved
void HandleLineRemoved (object sender, LineEventArgs e)
{
RemoveLine (editor.OffsetToLineNumber (e.Line.Offset));
}
示例12: HandleLineInserted
void HandleLineInserted (object sender, LineEventArgs e)
{
InsertLine (editor.OffsetToLineNumber (e.Line.Offset));
}
示例13: OnLineInserted
protected virtual void OnLineInserted (LineEventArgs e)
{
EventHandler<LineEventArgs> handler = this.LineInserted;
if (handler != null)
handler (this, e);
}
示例14: HandleLineChanged
void HandleLineChanged (object sender, LineEventArgs e)
{
var lineNumber = e.Line.LineNumber;
try {
if (lineStates [lineNumber].state == Mono.TextEditor.TextDocument.LineState.Dirty)
return;
lineStates [lineNumber] = new LineChangeInfo (Mono.TextEditor.TextDocument.LineState.Dirty);
if (trackDocument != null)
trackDocument.CommitLineUpdate (lineNumber);
} catch (Exception ex) {
Console.WriteLine ("error while DiffTracker.HandleLineChanged:" + ex);
}
}
示例15: HandleDocumentsplitterhandleLineInserted
void HandleDocumentsplitterhandleLineInserted (object sender, LineEventArgs e)
{
heightTree.InsertLine (OffsetToLineNumber (e.Line.Offset));
}