private void tプレビュー画像_動画の変更() { if (this.avi != null) { this.avi.Dispose(); this.avi = null; } this.pAVIBmp = IntPtr.Zero; this.nAVI再生開始時刻 = -1; if (!CDTXMania.ConfigIni.bストイックモード) { if (this.tプレビュー動画の指定があれば構築する()) { return; } if (this.tプレビュー画像の指定があれば構築する()) { return; } if (this.t背景画像があればその一部からプレビュー画像を構築する()) { return; } } this.r表示するプレビュー画像 = this.txプレビュー画像がないときの画像; this.str現在のファイル名 = ""; }
private bool tプレビュー動画の指定があれば構築する() { Cスコア cスコア = TJAPlayer3.stage選曲.r現在選択中のスコア; if ((TJAPlayer3.ConfigIni.bAVI有効 && (cスコア != null)) && !string.IsNullOrEmpty(cスコア.譜面情報.Premovie)) { string filename = cスコア.ファイル情報.フォルダの絶対パス + cスコア.譜面情報.Premovie; if (filename.Equals(this.str現在のファイル名)) { return(true); } if (this.avi != null) { this.avi.Dispose(); this.avi = null; } this.str現在のファイル名 = filename; if (!File.Exists(this.str現在のファイル名)) { Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { this.str現在のファイル名 }); return(false); } try { this.avi = new CAvi(filename); this.nAVI再生開始時刻 = TJAPlayer3.Timer.n現在時刻; this.n前回描画したフレーム番号 = -1; this.b動画フレームを作成した = false; this.tサーフェイスをクリアする(this.sfAVI画像); Trace.TraceInformation("動画を生成しました。({0})", new object[] { filename }); } catch (Exception e) { Trace.TraceError(e.ToString()); Trace.TraceError("動画の生成に失敗しました。({0})", new object[] { filename }); this.avi = null; this.nAVI再生開始時刻 = -1; } } return(false); }
private bool tプレビュー動画の指定があれば構築する() { CScore cスコア = CDTXMania.stageSongSelection.rSelectedScore; if ((CDTXMania.ConfigIni.bAVIEnabled && (cスコア != null)) && !string.IsNullOrEmpty(cスコア.SongInformation.Premovie)) { string filename = cスコア.FileInformation.AbsoluteFolderPath + cスコア.SongInformation.Premovie; if (filename.Equals(this.str現在のファイル名)) { return(true); } if (this.avi != null) { this.avi.Dispose(); this.avi = null; } this.str現在のファイル名 = filename; if (!File.Exists(this.str現在のファイル名)) { Trace.TraceWarning("ファイルが存在しません。({0})", new object[] { this.str現在のファイル名 }); return(false); } try { this.avi = new CAvi(filename); this.nAVI再生開始時刻 = CDTXMania.Timer.nCurrentTime; this.n前回描画したフレーム番号 = -1; this.b動画フレームを作成した = false; this.tサーフェイスをクリアする(this.sfAVI画像); Trace.TraceInformation("動画を生成しました。({0})", new object[] { filename }); } catch { Trace.TraceError("動画の生成に失敗しました。({0})", new object[] { filename }); this.avi = null; this.nAVI再生開始時刻 = -1; } } return(false); }