Ejemplo n.º 1
0
        void OnDecompilerTextViewRemoved(object sender, MainWindow.DecompilerTextViewEventArgs e)
        {
            if (e.DecompilerTextView != decompilerTextView)
            {
                return;
            }

            BookmarkManager.Added           -= OnBookmarkAdded;
            BookmarkManager.Removed         -= OnBookmarkRemoved;
            decompilerTextView.OnShowOutput -= decompilerTextView_OnShowOutput;
            MainWindow.Instance.OnDecompilerTextViewRemoved -= OnDecompilerTextViewRemoved;
        }
Ejemplo n.º 2
0
        void OnDecompilerTextViewRemoved(object sender, MainWindow.DecompilerTextViewEventArgs e)
        {
            if (e.DecompilerTextView != textView)
            {
                return;
            }

            TextView.DocumentChanged -= OnDocumentChanged;
            BookmarkManager.Added    -= BookmarkManager_Added;
            BookmarkManager.Removed  -= BookmarkManager_Removed;
            MainWindow.Instance.OnDecompilerTextViewRemoved -= OnDecompilerTextViewRemoved;
            textView.OnShowOutput -= textView_OnShowOutput;
            foreach (var bm in BookmarkManager.Bookmarks)
            {
                var mbm = bm as MarkerBookmark;
                if (mbm != null)
                {
                    mbm.Markers.Remove(this);
                }
            }
        }