Esempio n. 1
0
 /* ----------------------------------------------------------------- */
 ///
 /// 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();
     }
 }
Esempio n. 2
0
 /* ----------------------------------------------------------------- */
 ///
 /// 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();
     }, "");
 }