コード例 #1
0
ファイル: LimitedDocument.cs プロジェクト: radtek/Shopdrawing
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (this.textBuffer != null)
         {
             this.textBuffer = (ITextBuffer)null;
         }
         if (this.undoManager != null)
         {
             this.undoManager.TextBufferUndoHistory.UndoRedoHappened         -= new EventHandler <UndoRedoEventArgs>(this.TextBufferUndoHistory_UndoRedoHappened);
             this.undoManager.TextBufferUndoHistory.UndoTransactionCompleted -= new EventHandler <UndoTransactionCompletedEventArgs>(this.TextBufferUndoHistory_UndoTransactionCompleted);
             this.undoManager = (ITextBufferUndoManager)null;
         }
         if (this.topMarker != null)
         {
             this.topMarker = (UndoTransactionMarker)null;
         }
     }
     base.Dispose(disposing);
 }
コード例 #2
0
        internal ITextBufferUndoManager CreateTextBuffer(string contents, string documentType, out UndoTransactionMarker topUndoStackMarker)
        {
            ITextBufferUndoManager textBuffer = this.CreateTextBuffer(contents, documentType);

            topUndoStackMarker = this.undoHistoryRegistry.GetUndoTransactionMarker("TopMarker");
            return(textBuffer);
        }