Skip to content

Commit

Permalink
When clicking on the reset board you are now asked if you are sure (#…
Browse files Browse the repository at this point in the history
…1085)

* When clicking on the reset board you are now asked if you are sure you want to reset the config as per request #1084.

* Changes to the text as requested.

* Fixes #1085 When clicking on the reset board you are now asked if you are sure you want to reset the config as per request.
  • Loading branch information
Pitj3 authored Jan 21, 2023
1 parent fd6c296 commit d18bbf2
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ProjectMessages/ProjectMessages.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ProjectMessages/ProjectMessages.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -560,4 +560,10 @@ Please manually flash the boards using "upload firmware" and select the correct
<value>Der Wert muss eine gültige Zahl sein.</value>
<comment>The value must be a valid number.</comment>
</data>
<data name="uiMessageResetConfirm" xml:space="preserve">
<value>Möchtest Du wirklich die MobiFlight Firmware deinstallieren? Alle Deine Daten werden vom Board gelöscht.</value>
</data>
<data name="uiMessageResetHint" xml:space="preserve">
<value>Board zurücksetzen</value>
</data>
</root>
6 changes: 6 additions & 0 deletions ProjectMessages/ProjectMessages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -559,4 +559,10 @@ Check log for more details.</value>
<data name="uiMessageValidationMustBeNumber" xml:space="preserve">
<value>The value must be a valid number.</value>
</data>
<data name="uiMessageResetConfirm" xml:space="preserve">
<value>Do you really want to uninstall the MobiFlight firmware? All your data will be removed from the board.</value>
</data>
<data name="uiMessageResetHint" xml:space="preserve">
<value>Reset Board</value>
</data>
</root>
7 changes: 7 additions & 0 deletions UI/Panels/Settings/MobiFlightPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1406,6 +1406,13 @@ private void removePortFormIgnoreList(string port)

private void resetBoardToolStripMenuItem_Click(object sender, EventArgs e)
{
if (MessageBox.Show(i18n._tr("uiMessageResetConfirm"),
i18n._tr("uiMessageResetHint"),
MessageBoxButtons.OKCancel) != System.Windows.Forms.DialogResult.OK)
{
return;
}

TreeNode moduleNode = getModuleNode();
MobiFlightModule module = moduleNode.Tag as MobiFlightModule;
List<MobiFlightModule> modules = new List<MobiFlightModule>();
Expand Down

0 comments on commit d18bbf2

Please sign in to comment.