private void ffmpegのパスを変更するFToolStripMenuItem_Click(object sender, EventArgs e) { this.mtEnabled = false; string oldFFmpegDir = Gnd.i.ffmpegDir; using (FFmpegDirDlg f = new FFmpegDirDlg()) { f.ShowDialog(); } if (StringTools.equalsIgnoreCase(oldFFmpegDir, Gnd.i.ffmpegDir) == false) { MessageBox.Show( "変更を反映するには、プログラムを再起動して下さい。", "情報", MessageBoxButtons.OK, MessageBoxIcon.Information ); } this.mtEnabled = true; }
private void perform() { if (FFmpeg.isFFmpegDir(Gnd.i.ffmpegDir) == false) { using (FFmpegDirDlg f = new FFmpegDirDlg()) { f.ShowDialog(); } if (Gnd.i.ffmpegDir == "") { throw new Cancelled("ffmpeg のパスが指定されていないため、続行出来ません。"); } if (FFmpeg.isFFmpegDir(Gnd.i.ffmpegDir) == false) { throw new Cancelled("ffmpeg のパスが見つからないため、続行出来ません。"); } } try { BusyDlg.perform(delegate { FFmpegBin.i = new FFmpegBin(FFmpeg.getBinDir()); try { FFmpegBinTester.doTest(); } catch (Exception e) { Gnd.i.ffmpegDir = ""; // 次回起動時に再設定出来るように.. throw new ExceptionCarrier(e); } if (Gnd.i.bootOpenFile != null) { Gnd.i.md = new MediaData(Gnd.i.bootOpenFile); } }); using (MainWin f = new MainWin()) { f.ShowDialog(); } } finally { BusyDlg.perform(delegate { if (Gnd.i.md != null) { Gnd.i.md.Dispose(); Gnd.i.md = null; } if (Gnd.i.qsd != null) { Gnd.i.qsd.Dispose(); Gnd.i.qsd = null; } if (FFmpegBin.i != null) { FFmpegBin.i.Dispose(); FFmpegBin.i = null; } }); } }