public void Dispose() { if (_wd != null) { _wd.Dispose(); _wd = null; } }
public void Dispose() { if (_wd != null) { endProc(); _wd.Dispose(); _wd = null; } }
public static void INIT() { WD = new WorkingDir(); DDMain.Finalizers.Add(() => { UnloadAll(); WD.Dispose(); WD = null; }); }
public void Dispose() { _wd.Dispose(); }
public MediaData(string file) { try { _origFile = file; _ext = Path.GetExtension(file); if (Gnd.i.movieExtensions.contains(_ext) == false) { throw new FailedOperation("指定されたファイルは動画ファイルではありません。"); } // サイズ・チェック { long fileSize = new FileInfo(file).Length; if (Gnd.i.rFileSizeWarning_MB * 1000000L < fileSize) { if (BusyDlg.self == null) { throw null; // never } Gnd.i.mediaDataSync.waitForMillis(0); // clear Gnd.i.mediaDataCancelled = false; BusyDlg.self.BeginInvoke((MethodInvoker) delegate { if (MessageBox.Show( "指定されたファイルは、けっこうデカいようです。\n" + "このソフトは数分~数十分程度の短い動画の編集を想定しています。\n" + "デカすぎる動画ファイルを読み込むと作業ファイルがディスクの空き領域を使い果たしてしまうかもしれません。\n" + "あと、多分もの凄く時間が掛かります。\n" + "続行しますか?", Program.APP_TITLE + " / 警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning ) != DialogResult.OK ) { Gnd.i.mediaDataCancelled = true; } Gnd.i.mediaDataSync.set(); }); Gnd.i.mediaDataSync.waitForMillis(-1); if (Gnd.i.mediaDataCancelled) { throw new Cancelled(); } } } _duplFile = _wd.makePath() + _ext; _imgDir = _wd.makePath(); _wavFile = _wd.makePath() + ".wav"; _wavCsvFile = _wd.makePath() + ".csv"; Directory.CreateDirectory(_imgDir); loadFile(); Gnd.i.lastOpenedFile = file; } catch (Exception e) { _wd.Dispose(); _wd = null; throw new ExceptionCarrier(e); } }
public void Dispose() { _db?.Dispose(); _wd.Dispose(); }