File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -380,6 +380,11 @@ int IVsWindowFrameNotify3.OnClose(ref uint pgrfSaveOptions)
380380 {
381381 WindowFrameCloseEventArgs e = new ( ( FrameCloseOption ) pgrfSaveOptions ) ;
382382 OnClose ( this , e ) ;
383+
384+ if ( e . Cancel )
385+ {
386+ return VSConstants . E_ABORT ;
387+ }
383388 }
384389 InvokeStatusChanged ( ) ;
385390 return VSConstants . S_OK ;
@@ -492,6 +497,11 @@ public class WindowFrameCloseEventArgs : EventArgs
492497 /// </summary>
493498 public FrameCloseOption CloseOption { get ; private set ; }
494499
500+ /// <summary>
501+ /// Gets or sets a value indicating whether the event should be canceled.
502+ /// </summary>
503+ public bool Cancel { get ; set ; }
504+
495505 /// <summary>
496506 /// Creates an event argument instance with the initial close option.
497507 /// </summary>
You can’t perform that action at this time.
0 commit comments