Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show all connected devices in the status bar #1888

Merged
merged 8 commits into from
Jan 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions MobiFlight/ExecutionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class ExecutionManager
public event EventHandler OnModuleCacheAvailable;
public event EventHandler OnShutdown;
public event EventHandler OnInitialModuleLookupFinished;
public event EventHandler OnJoystickConnectedFinished;
public event EventHandler OnMidiBoardConnectedFinished;

/// <summary>
/// a semaphore to prevent multiple execution of timer callback
Expand Down Expand Up @@ -142,14 +144,20 @@ public ExecutionManager(DataGridView dataGridViewConfig, DataGridView inputsData
#endif
joystickManager.SetHandle(handle);
joystickManager.OnButtonPressed += new ButtonEventHandler(mobiFlightCache_OnButtonPressed);
joystickManager.Connected += (o, e) => { joystickManager.Startup(); };
joystickManager.Connected += (sender, e) => {
joystickManager.Startup();
OnJoystickConnectedFinished?.Invoke(sender, e);
};
if (Properties.Settings.Default.EnableJoystickSupport)
{
joystickManager.Connect();
}

midiBoardManager.OnButtonPressed += new ButtonEventHandler(mobiFlightCache_OnButtonPressed);
midiBoardManager.Connected += (o, e) => { midiBoardManager.Startup(); };
midiBoardManager.Connected += (sender, e) => {
midiBoardManager.Startup();
OnMidiBoardConnectedFinished?.Invoke(sender, e);
};
if (Properties.Settings.Default.EnableMidiSupport)
{
midiBoardManager.Connect();
Expand Down
9 changes: 9 additions & 0 deletions ProjectMessages/ProjectMessages.Designer.cs

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

3 changes: 3 additions & 0 deletions ProjectMessages/ProjectMessages.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -685,4 +685,7 @@ Tip: Save the file after opening to update the associated board for future use.<

Schließe MSFS und führe die Installation erneut aus: "Extras" &gt; "Microsoft Flight Simulator" &gt; "Install WASM module".</value>
</data>
<data name="uiNone" xml:space="preserve">
<value>Keine</value>
</data>
</root>
4 changes: 4 additions & 0 deletions ProjectMessages/ProjectMessages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -649,4 +649,8 @@ Tip: Save the file after opening to update the associated board for future use.<

Close MSFS and install the WASM module via menu "Extras" &gt; "Microsoft Flight Simulator" &gt; "Install WASM module"</value>
</data>
<data name="uiNone" xml:space="preserve">
<value>None</value>
<comment>Used in the connected devices menu to indicate no connected devices found.</comment>
</data>
</root>
116 changes: 79 additions & 37 deletions UI/MainForm.Designer.cs

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

Loading