Skip to content

Commit

Permalink
DB更新確認メッセージを削除した
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocelot1210 committed Mar 10, 2024
1 parent bb4b298 commit d51f2bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
1 change: 0 additions & 1 deletion X4_ComplexCalculator/Localization/Lang.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion X4_ComplexCalculator/Localization/Lang.ja-JP.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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ファイルにアクセス可能か確認後、再度実行してください。

Expand Down
33 changes: 14 additions & 19 deletions X4_ComplexCalculator/Main/MainWindowModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,26 +77,21 @@ public void Init()
/// </summary>
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;
}
}

Expand Down

0 comments on commit d51f2bb

Please sign in to comment.