Exemplo n.º 1
0
        void ReplaceDb()
        {
            var pw = new BlowTrial.View.PleaseWait();

            pw.Show();
            string currentPath = TrialDataContext.GetDbPath();

            if (_repository != null)
            {
                _repository.Dispose();
                _repository = null;
            }
            System.IO.File.Move(currentPath, currentPath.InsertDateStampToFileName());
            TransferFile.AllowUpdate(_transferLog, fi =>
            {
                fi.MoveTo(currentPath);
            });
            pw.Close();
        }
 void OnFinishedTransfer()
 {
     _pleaseWait.Close();
     MessageBox.Show("Update to site database successful");
 }