當前位置: 首頁>>代碼示例>>C#>>正文


C# TextEditor.DocumentLocationEventArgs類代碼示例

本文整理匯總了C#中Mono.TextEditor.DocumentLocationEventArgs的典型用法代碼示例。如果您正苦於以下問題:C# DocumentLocationEventArgs類的具體用法?C# DocumentLocationEventArgs怎麽用?C# DocumentLocationEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DocumentLocationEventArgs類屬於Mono.TextEditor命名空間,在下文中一共展示了DocumentLocationEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: EditorCarethandlePositionChanged

		void EditorCarethandlePositionChanged (object sender, DocumentLocationEventArgs e)
		{
			if (!editor.GetTextEditorData ().HighlightCaretLine || e.Location.Line == editor.Caret.Line)
				return;
			editor.RedrawMarginLine (this, e.Location.Line);
			editor.RedrawMarginLine (this, editor.Caret.Line);
		}
開發者ID:pabloescribanoloza,項目名稱:monodevelop,代碼行數:7,代碼來源:FoldMarkerMargin.cs

示例2: EditorCarethandlePositionChanged

		void EditorCarethandlePositionChanged (object sender, DocumentLocationEventArgs e)
		{
			if (e.Location.Line == editor.Caret.Line)
				return;
			editor.RedrawMarginLine (this, e.Location.Line);
			editor.RedrawMarginLine (this, editor.Caret.Line);
		}
開發者ID:IBBoard,項目名稱:monodevelop,代碼行數:7,代碼來源:GutterMargin.cs

示例3: HandleTextEditorDataCaretPositionChanged

		void HandleTextEditorDataCaretPositionChanged(object sender, DocumentLocationEventArgs e)
		{
			if (!MonoDevelop.Core.PropertyService.Get<bool>("EnableHighlightUsages"))
				return;
			if (!textEditorData.IsSomethingSelected && markers.Values.Any(m => m.Contains(textEditorData.Caret.Offset)))
				return;
			RemoveMarkers();
			RemoveTimer();
			if (!textEditorData.IsSomethingSelected)
				popupTimer = GLib.Timeout.Add(1000, UpdateMarkers);
		}
開發者ID:rikkimax,項目名稱:Mono-D,代碼行數:11,代碼來源:HighlightUsagesExtension.cs

示例4: HandleEditorCaretPositionChanged

		void HandleEditorCaretPositionChanged (object sender, DocumentLocationEventArgs e)
		{
			if (!IsInCodeFocusMode) 
				return;
			LineSegment lineSegment = editor.Document.GetLine (editor.Caret.Line);
			if (lineSegment == null) {
				RemoveBackgroundRenderer ();
				return;
			}
			
			IEnumerable<FoldSegment> newFoldings = editor.Document.GetFoldingContaining (lineSegment);
			if (newFoldings == null) {
				RemoveBackgroundRenderer ();
				return;
			}
			
			bool areEqual = foldings != null;
			
			if (areEqual && foldings.Count () != newFoldings.Count ())
				areEqual = false;
			if (areEqual) {
				List<FoldSegment> list1 = new List<FoldSegment> (foldings);
				List<FoldSegment> list2 = new List<FoldSegment> (newFoldings);
				for (int i = 0; i < list1.Count; i++) {
					if (list1[i] != list2[i]) {
						areEqual = false;
						break;
					}
				}
			}
			
			if (!areEqual) {
				foldings = newFoldings;
				DelayTimerElapsed (this, null);
			}
		}
開發者ID:transformersprimeabcxyz,項目名稱:monodevelop-1,代碼行數:36,代碼來源:FoldMarkerMargin.cs

示例5: CaretPositionChanged

		void CaretPositionChanged (object o, DocumentLocationEventArgs args)
		{
			UpdateLineCol ();
			LineSegment curLine = TextEditor.Document.GetLine (TextEditor.Caret.Line);
			MonoDevelop.SourceEditor.MessageBubbleTextMarker marker = null;
			if (curLine != null && curLine.Markers.Any (m => m is MonoDevelop.SourceEditor.MessageBubbleTextMarker)) {
				marker = (MonoDevelop.SourceEditor.MessageBubbleTextMarker)curLine.Markers.First (m => m is MonoDevelop.SourceEditor.MessageBubbleTextMarker);
				marker.CollapseExtendedErrors = false;
				if (oldExpandedMarker == null)
					Document.CommitLineToEndUpdate (Document.OffsetToLineNumber (curLine.Offset));
			}
			
			if (oldExpandedMarker != null && oldExpandedMarker != marker) {
				oldExpandedMarker.CollapseExtendedErrors = true;
				int markerOffset = marker != null && marker.LineSegment != null ? marker.LineSegment.Offset : Int32.MaxValue;
				int oldMarkerOffset = oldExpandedMarker.LineSegment != null ? oldExpandedMarker.LineSegment.Offset : Int32.MaxValue;
				Document.CommitLineToEndUpdate (Document.OffsetToLineNumber (Math.Min (markerOffset, oldMarkerOffset)));
			}
			oldExpandedMarker = marker;
		}
開發者ID:silk,項目名稱:monodevelop,代碼行數:20,代碼來源:SourceEditorWidget.cs

示例6: HandlePositionChanged

 void HandlePositionChanged(object sender, DocumentLocationEventArgs e)
 {
     QueueDraw ();
 }
開發者ID:csammis,項目名稱:VimAddin,代碼行數:4,代碼來源:ViStatusArea.cs

示例7: HandleTextEditorDataCaretPositionChanged

		void HandleTextEditorDataCaretPositionChanged (object sender, DocumentLocationEventArgs e)
		{
			if (!textEditorData.IsSomethingSelected && markers.Values.Any (m => m.Contains (textEditorData.Caret.Offset)))
				return;
			RemoveMarkers (textEditorData.IsSomethingSelected);
			RemoveTimer ();
			if (!textEditorData.IsSomethingSelected)
				popupTimer = GLib.Timeout.Add (1000, DelayedTooltipShow);
		}
開發者ID:rohdef,項目名稱:monodevelop,代碼行數:9,代碼來源:HighlightUsagesExtension.cs

示例8: HandleWidgetTextEditorCaretPositionChanged

		void HandleWidgetTextEditorCaretPositionChanged (object sender, DocumentLocationEventArgs e)
		{
			UpdateResultInformLabel ();
		}
開發者ID:RainsSoft,項目名稱:playscript-monodevelop,代碼行數:4,代碼來源:SearchAndReplaceWidget.cs

示例9: HandlePositionChanged

		void HandlePositionChanged (object sender, DocumentLocationEventArgs e)
		{
			OnCaretPositionSet (EventArgs.Empty);
			FireCompletionContextChanged ();
			OnCaretPositionChanged (EventArgs.Empty);
		}
開發者ID:stephenoakman,項目名稱:monodevelop,代碼行數:6,代碼來源:SourceEditorView.cs

示例10: CaretPositionChanged

		void CaretPositionChanged (object sender, DocumentLocationEventArgs args)
		{
			if (!caret.PreserveSelection)
				this.ClearSelection ();
			
			if (Options.RemoveTrailingWhitespaces && args.Location.Line != Caret.Line) {
				LineSegment line = Document.GetLine (args.Location.Line);
				if (line != null && line.WasChanged)
					Document.RemoveTrailingWhitespaces (this, line);
			}
		}
開發者ID:hduregger,項目名稱:monodevelop,代碼行數:11,代碼來源:TextEditorData.cs

示例11: CaretPositionChanged

		void CaretPositionChanged (object sender, DocumentLocationEventArgs args)
		{
			if (!caret.PreserveSelection)
				this.ClearSelection ();
		}
開發者ID:dodev,項目名稱:monodevelop,代碼行數:5,代碼來源:TextEditorData.cs

示例12: CaretPositionChanged

		internal static void CaretPositionChanged (object sender, DocumentLocationEventArgs e)
		{
			Caret caret = (Caret)sender;
			UpdateCaretPosition (caret);
		}
開發者ID:acken,項目名稱:monodevelop,代碼行數:5,代碼來源:ComparisonWidget.cs

示例13: DataCaretPositionChanged

			public void DataCaretPositionChanged (object sender, DocumentLocationEventArgs e)
			{
				data.ExtendSelectionTo (data.Caret.Location);
			}
開發者ID:yayanyang,項目名稱:monodevelop,代碼行數:4,代碼來源:SelectionActions.cs

示例14: HandlePositionChanged

		void HandlePositionChanged (object sender, DocumentLocationEventArgs e)
		{
			var node = unit.GetNodeAt (editor.Caret.Line, editor.Caret.Column);
			if (node == null)
				return;
			TreeIter iter;
			if (!iterDict.TryGetValue (node, out iter))
				return;
			this.treeviewNodes.Selection.Changed -= SelectionChanged;
			treeviewNodes.Selection.SelectIter (iter);
			
			treeviewNodes.ScrollToCell (store.GetPath (iter), null, true, 0, 0);
			this.treeviewNodes.Selection.Changed += SelectionChanged;
		}
開發者ID:Netring,項目名稱:ILSpy,代碼行數:14,代碼來源:MainWindow.cs

示例15: CaretPositionChanged

		void CaretPositionChanged (object o, DocumentLocationEventArgs args)
		{
			UpdateLineCol ();
			DocumentLine curLine = TextEditor.Document.GetLine (TextEditor.Caret.Line);
			MonoDevelop.SourceEditor.MessageBubbleTextMarker marker = null;
			if (curLine != null && curLine.Markers.Any (m => m is MonoDevelop.SourceEditor.MessageBubbleTextMarker)) {
				marker = (MonoDevelop.SourceEditor.MessageBubbleTextMarker)curLine.Markers.First (m => m is MonoDevelop.SourceEditor.MessageBubbleTextMarker);
//				marker.CollapseExtendedErrors = false;
			}
			
			if (oldExpandedMarker != null && oldExpandedMarker != marker) {
//				oldExpandedMarker.CollapseExtendedErrors = true;
			}
			oldExpandedMarker = marker;
		}
開發者ID:telebovich,項目名稱:monodevelop,代碼行數:15,代碼來源:SourceEditorWidget.cs


注:本文中的Mono.TextEditor.DocumentLocationEventArgs類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。