From d51f2bb8dee76012fa3dc5ab5cb2c6a0a7df3735 Mon Sep 17 00:00:00 2001 From: Ocelot <16898663+Ocelot1210@users.noreply.github.com> Date: Sun, 10 Mar 2024 11:55:20 +0900 Subject: [PATCH] =?UTF-8?q?DB=E6=9B=B4=E6=96=B0=E7=A2=BA=E8=AA=8D=E3=83=A1?= =?UTF-8?q?=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=82=92=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- X4_ComplexCalculator/Localization/Lang.csv | 1 - .../Localization/Lang.ja-JP.csv | 1 - X4_ComplexCalculator/Main/MainWindowModel.cs | 33 ++++++++----------- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/X4_ComplexCalculator/Localization/Lang.csv b/X4_ComplexCalculator/Localization/Lang.csv index 5d3b0183..54f4bc8f 100644 --- a/X4_ComplexCalculator/Localization/Lang.csv +++ b/X4_ComplexCalculator/Localization/Lang.csv @@ -87,7 +87,6 @@ MainWindow_Menu_File_MenuItem_Import_MenuItem_Loadout_Header;Module equipments MainWindow_Menu_File_MenuItem_Export_Header;Export MainWindow_Menu_File_MenuItem_Export_MenuItem_StationCalculator_Header;Station Calculator MainWindow_Menu_File_UpdateDB_Header;Update DB -MainWindow_Menu_File_UpdateDB_DBUpdate_ConfirmationMessage;Do you want to display the DB update screen? MainWindow_Menu_File_UpdateDB_DBUpdate_RestartRequestMessage;Please restart the application to apply the DB update. MainWindow_Menu_File_UpdateDB_DBUpdate_FailureMessage;Failed to update the DB, \r\nplease check if the DB file is accessible and try again. diff --git a/X4_ComplexCalculator/Localization/Lang.ja-JP.csv b/X4_ComplexCalculator/Localization/Lang.ja-JP.csv index 485f6df0..ccd4052e 100644 --- a/X4_ComplexCalculator/Localization/Lang.ja-JP.csv +++ b/X4_ComplexCalculator/Localization/Lang.ja-JP.csv @@ -87,7 +87,6 @@ MainWindow_Menu_File_MenuItem_Import_MenuItem_Loadout_Header;モジュールの MainWindow_Menu_File_MenuItem_Export_Header;エクスポート MainWindow_Menu_File_MenuItem_Export_MenuItem_StationCalculator_Header;Station Calculator MainWindow_Menu_File_UpdateDB_Header;DB更新 -MainWindow_Menu_File_UpdateDB_DBUpdate_ConfirmationMessage;DB更新画面を表示しますか? MainWindow_Menu_File_UpdateDB_DBUpdate_RestartRequestMessage;DBの更新を適用するためには本アプリケーションの再起動を行ってください。 MainWindow_Menu_File_UpdateDB_DBUpdate_FailureMessage;DBの更新に失敗しました。\r\nDBファイルにアクセス可能か確認後、再度実行してください。 diff --git a/X4_ComplexCalculator/Main/MainWindowModel.cs b/X4_ComplexCalculator/Main/MainWindowModel.cs index 3051d869..5e1aa9b2 100644 --- a/X4_ComplexCalculator/Main/MainWindowModel.cs +++ b/X4_ComplexCalculator/Main/MainWindowModel.cs @@ -77,26 +77,21 @@ public void Init() /// public void UpdateDB() { - var result = _localizedMessageBox.YesNo("Lang:MainWindow_Menu_File_UpdateDB_DBUpdate_ConfirmationMessage", "Lang:Common_MessageBoxTitle_Confirmation", LocalizedMessageBoxResult.Yes); - - if (result == LocalizedMessageBoxResult.Yes) + switch (X4Database.UpdateDB()) { - switch (X4Database.UpdateDB()) - { - // DB更新成功 - case X4Database.UpdateDbStatus.Succeeded: - _localizedMessageBox.Ok("Lang:MainWindow_Menu_File_UpdateDB_DBUpdate_RestartRequestMessage", "Lang:Common_MessageBoxTitle_Confirmation"); - break; - - // DB更新失敗 - case X4Database.UpdateDbStatus.Failed: - _localizedMessageBox.Error("Lang:MainWindow_Menu_File_UpdateDB_DBUpdate_FailureMessage", "Lang:Common_MessageBoxTitle_Error"); - break; - - // 更新なし - default: - break; - } + // DB更新成功 + case X4Database.UpdateDbStatus.Succeeded: + _localizedMessageBox.Ok("Lang:MainWindow_Menu_File_UpdateDB_DBUpdate_RestartRequestMessage", "Lang:Common_MessageBoxTitle_Confirmation"); + break; + + // DB更新失敗 + case X4Database.UpdateDbStatus.Failed: + _localizedMessageBox.Error("Lang:MainWindow_Menu_File_UpdateDB_DBUpdate_FailureMessage", "Lang:Common_MessageBoxTitle_Error"); + break; + + // 更新なし + default: + break; } }