private void btnCancle_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBoxTool.ShowAskMsgBox("确定取消吗?") == MessageBoxResult.Yes)
     {
         cancled = true;
     }
 }
Beispiel #2
0
 private bool ConfirmCancleBackup()
 {
     if (MessageBoxTool.ShowAskMsgBox("正在进行备份,确定要取消吗?") == MessageBoxResult.Yes)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Beispiel #3
0
        //还原
        private void btnRestore_Click(object sender, RoutedEventArgs e)
        {
            if (MessageBoxTool.ShowAskMsgBox("还原数据库会把现有的数据库删除,且不可恢复,确定要还原吗?") == MessageBoxResult.Yes)
            {
                OpenFileDialog ofd = new OpenFileDialog();
                ofd.Title  = "还原数据库";
                ofd.Filter = "压缩文件(*.zip)|*.zip";
                if (ofd.ShowDialog() == true)
                {
                    ExtractProgressWindow extractWindow = new ExtractProgressWindow();
                    extractWindow.BackupFile = ofd.FileName;
                    extractWindow.Owner      = Application.Current.MainWindow;
                    extractWindow.ShowDialog();

                    ReloadData();
                    DSJL.Tools.DBUpgrade.Upgrade();
                    MessageBoxTool.ShowConfirmMsgBox("还原成功!");
                }
            }
        }