Ejemplo n.º 1
0
        private void 匯出個人資料壓縮檔ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var outputPath      = FileUtils.createDirectoryIfNotExists("output");
            var defaultFileName = "個人系統壓縮檔" + DateTime.Now.ToString("yyyyMMddHHMMss") + ".exe";
            var chosenPath      = DialogUtils.createAndShowDialogForChoosingFilePath(outputPath, defaultFileName);

            if (chosenPath != null)
            {
                using (var dialog = new ExportingMcrInstallerDialog(chosenPath))
                {
                    McrInstallerFactory.execute(() => onMcrInstallerExecutionFinished(dialog),
                                                () => onMcrInstallerExecutionError(dialog),
                                                chosenPath);
                    dialog.ShowDialog();
                    addNewLog("個人系統壓縮檔案正在生成...");
                }
            }
        }
Ejemplo n.º 2
0
 private void onMcrInstallerExecutionError(ExportingMcrInstallerDialog dialog)
 {
     invokeOnMainThread(dialog.Close);
     MessageBox.Show("個人系統壓縮檔失敗,請再嘗試一次!");
 }
Ejemplo n.º 3
0
 private void onMcrInstallerExecutionFinished(ExportingMcrInstallerDialog dialog)
 {
     invokeOnMainThread(dialog.Close);
     MessageBox.Show("個人系統壓縮檔產生完畢!(請勿更改此壓縮檔檔名!)");
 }