コード例 #1
0
ファイル: MainFacade.cs プロジェクト: orf53975/Cube.Pdf
 /* ----------------------------------------------------------------- */
 ///
 /// Dispose
 ///
 /// <summary>
 /// Releases the unmanaged resources used by the MainFacade
 /// and optionally releases the managed resources.
 /// </summary>
 ///
 /// <param name="disposing">
 /// true to release both managed and unmanaged resources;
 /// false to release only unmanaged resources.
 /// </param>
 ///
 /* ----------------------------------------------------------------- */
 protected override void Dispose(bool disposing)
 {
     Interlocked.Exchange(ref _core, null)?.Clear();
     Bindable.Close();
     if (disposing)
     {
         Bindable.Images.Dispose();
     }
 }
コード例 #2
0
ファイル: MainFacade.cs プロジェクト: orf53975/Cube.Pdf
 /* ----------------------------------------------------------------- */
 ///
 /// Close
 ///
 /// <summary>
 /// Closes the current PDF document.
 /// </summary>
 ///
 /// <param name="save">Save before closing.</param>
 ///
 /* ----------------------------------------------------------------- */
 public void Close(bool save)
 {
     if (save)
     {
         Save(Bindable.Source.Value.FullName, false);
     }
     Invoke(() =>
     {
         _core.Clear();
         Bindable.Close();
     }, "");
 }