コード例 #1
0
        public OutliningController(ITextView view, IVsOutliningManager manager)
        {
            this.theView = view;
              this.outliningManager = manager;
              this.currentDispatcher = Dispatcher.CurrentDispatcher;
              this.timer = new DispatcherTimer(DispatcherPriority.Background, this.currentDispatcher);
              this.timer.Tick += OnTimerTick;
              this.timer.Interval = TimeSpan.FromMilliseconds(50);

              this.theView.Closed += OnViewClosed;
        }
コード例 #2
0
        public OutliningController(ITextView view, IVsOutliningManager manager)
        {
            this.theView           = view;
            this.outliningManager  = manager;
            this.currentDispatcher = Dispatcher.CurrentDispatcher;
            this.timer             = new DispatcherTimer(DispatcherPriority.Background, this.currentDispatcher);
            this.timer.Tick       += OnTimerTick;
            this.timer.Interval    = TimeSpan.FromMilliseconds(50);

            this.theView.Closed += OnViewClosed;
        }
コード例 #3
0
 private void OnViewClosed(Object sender, EventArgs e)
 {
     if (this.theView != null)
     {
         this.theView.Closed        -= OnViewClosed;
         this.theView.LayoutChanged -= OnTextViewLayoutChanged;
         this.theView = null;
     }
     if (this.timer != null)
     {
         this.timer.Stop();
         this.timer = null;
     }
     this.outliningManager  = null;
     this.currentDispatcher = null;
 }
コード例 #4
0
 private void OnViewClosed(Object sender, EventArgs e)
 {
     if ( this.theView != null ) {
     this.theView.Closed -= OnViewClosed;
     this.theView.LayoutChanged -= OnTextViewLayoutChanged;
     this.theView = null;
       }
       if ( this.timer != null ) {
     this.timer.Stop();
     this.timer = null;
       }
       this.outliningManager = null;
       this.currentDispatcher = null;
 }