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; } }