Ejemplo n.º 1
0
 internal void pMgr_PersistProgressChanged(PersistMgr sender, PersistProgressChangedEventArgs ea)
 {
     // TODO
     //Debug.WriteLine(string.Format("Persist progress:  {0}%; >{1}<", ea.ProgressPercentage, ea.Message));
     //Debug.Flush();
 }
Ejemplo n.º 2
0
 internal void SaveWorkSpace(IWorkSpace workSpace, string fileName, WorkSpaceFormats format)
 {
     PersistMgr pMgr = new PersistMgr();
     try
     {
         pMgr.PersistProgressChanged += new PersistProgressChangedEventHandler<PersistMgr, PersistProgressChangedEventArgs>(pMgr_PersistProgressChanged);
         pMgr.PersistCompleted += new PersistCompletedEventHandler<PersistMgr, PersistCompletedEventArgs>(pMgr_PersistCompleted);
         pMgr.WorkSpace = workSpace;
         pMgr.Format = format;
         pMgr.FileName = fileName;
         pMgr.Persist();
     }
     catch (Exception ex)
     {
         _Logger.Fatal(ex.Message, ex);
         throw;
     }
     finally
     {
         if (pMgr != null)
         {
             pMgr.PersistProgressChanged -= pMgr_PersistProgressChanged;
             pMgr.PersistCompleted -= pMgr_PersistCompleted;
             ((IDisposable)pMgr).Dispose();
         }
     }
 }
Ejemplo n.º 3
0
 internal void pMgr_PersistCompleted(PersistMgr sender, PersistCompletedEventArgs ea)
 {
     // TODO
     //Debug.WriteLine(string.Format("Persist Complete:  {0}%; >{1}<", ea.ProgressAtCompletion, ea.Message));
     //Debug.Flush();
 }