public static void 最新版にバージョンアップする() { using var _ = new LogBlock(Log.現在のメソッド名); // DBのバージョンを取得。 using var db = new ScorePropertiesDB(); int version = (int)db.UserVersion; while (version < ScorePropertiesDBRecord.VERSION) { switch (version) { case 0: case 1: { #region " 0, 1 → 最新版 " //---------------- // 最新バージョンのテーブルを作成する。内容は空。 using var cmdCreate = new SqliteCommand(ScorePropertiesDBRecord.GetCreateTableSQL(), db.Connection); cmdCreate.ExecuteNonQuery(); version = ScorePropertiesDBRecord.VERSION; db.UserVersion = version; Log.Info($"ScorePropertiesDB バージョン {version} を生成しました。"); //---------------- #endregion break; } } } }
private void _進行描画のメインループを実行する(App app, IntPtr hWindow) { try { #region " 初期化 " //---------------- this._パイプラインサーバを起動する(); UserConfig.最新版にバージョンアップする(); ScoreDB.最新版にバージョンアップする(); RecordDB.最新版にバージョンアップする(); ScorePropertiesDB.最新版にバージョンアップする(); Global.生成する( app, hWindow, 設計画面サイズ: new SharpDX.Size2F(1920f, 1080f), 物理画面サイズ: new SharpDX.Size2F(this.ClientSize.Width, this.ClientSize.Height)); 画像.全インスタンスで共有するリソースを作成する(Global.GraphicResources.D3D11Device1, @"$(Images)\TextureVS.cso", @"$(Images)\TexturePS.cso"); this.システムサウンド = new システムサウンド(this.サウンドデバイス); // 個々のサウンドの生成は後工程で。 this.ドラムサウンド = new ドラムサウンド(this.サウンドデバイス); // 〃 this.WAVキャッシュ = new CacheStore <CSCore.ISampleSource>() { ファイルからデータを生成する = (path) => SampleSourceFactory.Create(this.サウンドデバイス, path, this.ログオン中のユーザ.再生速度), }; this._ユーザリストにユーザを登録する(); this.アイキャッチ管理 = new アイキャッチ管理(); this.ドラム入力 = new ドラム入力(this.KeyboardHID, this.GameControllersHID, this.MidiIns); // 最初のステージを生成する。 Log.Header("起動ステージ"); this.ステージ = new 起動.起動ステージ(); //---------------- #endregion var スワップチェーン表示タスク = new PresentSwapChainVSync(); var tick = new ManualResetEvent(false); TaskMessage?終了指示メッセージ = null; while (true) { tick.WaitOne(1); #region " 自分宛のメッセージが届いていたら、すべて処理する。" //---------------- foreach (var msg in Global.TaskMessageQueue.Get(TaskMessage.タスク名.進行描画)) { switch (msg.内容) { case TaskMessage.内容名.終了指示: 終了指示メッセージ = msg; break; case TaskMessage.内容名.サイズ変更: { var newSize = (System.Drawing.Size)msg.引数 ![0];