static void OnAdded(BookmarkEventArgs e) { if (Added != null) { Added(null, e); } }
static void OnRemoved(BookmarkEventArgs e) { if (Removed != null) { Removed(null, e); } }
void BookmarkManager_Added(object sender, BookmarkEventArgs e) { if (e.Bookmark is MarkerBookmark) { var bm = (MarkerBookmark)e.Bookmark; // add bookmark for the current type if (bm.LineNumber < codeEditor.Document.LineCount) { DocumentLine line = codeEditor.Document.GetLineByNumber(bm.LineNumber); bm.CreateMarker(this, line.Offset, line.Length); } } }
void BookmarkManager_Removed(object sender, BookmarkEventArgs e) { if (e.Bookmark is BreakpointBookmark) { var bm = (MarkerBookmark)e.Bookmark; Remove(bm.Marker); } if (e.Bookmark is CurrentLineBookmark) { RemoveAll(m => m.Bookmark is CurrentLineBookmark); } }
public void OnBookmarkAdded(object sender, BookmarkEventArgs args) { var breakpoint = args.Bookmark as BreakpointBookmark; if (null == breakpoint) return; var storage = decompilerTextView.CodeMappings; if (storage == null || storage.Count == 0) return; var key = MethodKey.Create(breakpoint.MemberReference); if (key != null && storage.ContainsKey(key.Value)) { // register to show enabled/disabled state breakpoint.ImageChanged += breakpoint_ImageChanged; InvalidateVisual(); } }
static void BookmarkRemoved(object sender, BookmarkEventArgs e) { BreakpointBookmark bb = e.Bookmark as BreakpointBookmark; if (bb != null) { OnBreakPointRemoved(new BreakpointBookmarkEventArgs(bb)); } }
public void OnBookmarkRemoved(object sender, BookmarkEventArgs args) { var breakpoint = args.Bookmark as BreakpointBookmark; if (null == breakpoint) return; var storage = DebugInformation.CodeMappings; if (storage == null || storage.Count == 0) return; var key = breakpoint.MemberReference.MetadataToken.ToInt32(); if (storage.ContainsKey(key)) { breakpoint.ImageChanged -= delegate { InvalidateVisual(); }; InvalidateVisual(); } }
void BookmarkManager_Removed(object sender, BookmarkEventArgs e) { var bpm = e.Bookmark as BreakpointBookmark; if (bpm == null) return; bpm.OnModified += BreakpointBookmark_OnModified; SetItemSource(); }
void BookmarkManager_Removed(object sender, BookmarkEventArgs e) { var bpm = e.Bookmark as BreakpointBookmark; if (bpm == null) return; bpm.IsEnabledChanged -= BreakpointBookmark_OnIsEnabledChanged; Save(); }
void BookmarkManager_Removed(object sender, BookmarkEventArgs e) { if (e.Bookmark is MarkerBookmark) { var mbm = (MarkerBookmark)e.Bookmark; ITextMarker marker; if (mbm.Markers.TryGetValue(this, out marker)) Remove(marker); mbm.Markers.Remove(this); } }
void BookmarkManager_Added(object sender, BookmarkEventArgs e) { CreateMarker(e.Bookmark as MarkerBookmark); }