3 using com.andoutomo.kybernetes.control;
\r
4 using com.andoutomo.kybernetes.data.connection;
\r
6 namespace com.andoutomo.kybernetes.command.system
\r
8 class DmpCommand:AbCommand
\r
10 protected override bool execute()
\r
12 string maindb = System.AppDomain.CurrentDomain.BaseDirectory + TaskDBConnection.Connection.targetDbFile();
\r
13 string filePath = form.invokeDmpDialog();
\r
16 File.Copy(maindb, filePath, true);
\r
19 catch (FileNotFoundException fnfe)
\r
21 message = "対象ファイルがありません。";
\r
22 throw new KybernetesApplicationException(fnfe);
\r
24 catch (DirectoryNotFoundException dnfe)
\r
26 message = "保存対象ディレクトリがありません。ディレクトリ作成後に出力してください。";
\r
27 KybernetesLogger.Log.debug(dnfe.StackTrace);
\r
29 catch (UnauthorizedAccessException uaae)
\r
31 message = "書き込みに失敗しました。保存先の権限、現在使用中でないかどうか等を確認して下さい。";
\r
32 KybernetesLogger.Log.debug(uaae.StackTrace);
\r
37 protected override string turnMessage()
\r
39 return "DBのエクスポートに成功しました。";
\r
42 protected override string turnErrorMessage()
\r
47 protected override string turnSplitErrorMessage()
\r
49 return base.DefaultSplitErrorMessage;
\r