mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-21 21:30:12 +00:00
Added keyboard shortcut function for start pop out
This commit is contained in:
parent
859e68893e
commit
ce0365f431
17 changed files with 207 additions and 54 deletions
|
@ -1,4 +1,5 @@
|
||||||
using MSFSPopoutPanelManager.Shared;
|
using MSFSPopoutPanelManager.Shared;
|
||||||
|
using System;
|
||||||
|
|
||||||
namespace MSFSPopoutPanelManager.DomainModel.Setting
|
namespace MSFSPopoutPanelManager.DomainModel.Setting
|
||||||
{
|
{
|
||||||
|
@ -14,8 +15,17 @@ namespace MSFSPopoutPanelManager.DomainModel.Setting
|
||||||
TrackIRSetting = new TrackIRSetting();
|
TrackIRSetting = new TrackIRSetting();
|
||||||
WindowedModeSetting = new WindowedModeSetting();
|
WindowedModeSetting = new WindowedModeSetting();
|
||||||
SystemSetting = new SystemSetting();
|
SystemSetting = new SystemSetting();
|
||||||
|
KeyboardShortcutSetting = new KeyboardShortcutSetting();
|
||||||
|
|
||||||
InitializeChildPropertyChangeBinding();
|
InitializeChildPropertyChangeBinding();
|
||||||
|
|
||||||
|
this.PropertyChanged += (sender, e) =>
|
||||||
|
{
|
||||||
|
var evtArg = e as PropertyChangedExtendedEventArgs;
|
||||||
|
|
||||||
|
if (evtArg.ObjectName == "MSFSPopoutPanelManager.DomainModel.Setting.KeyboardShortcutSetting" && evtArg.PropertyName == "IsEnabled")
|
||||||
|
IsUsedKeyboardShortcutChanged?.Invoke(this, KeyboardShortcutSetting.IsEnabled);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public GeneralSetting GeneralSetting { get; set; }
|
public GeneralSetting GeneralSetting { get; set; }
|
||||||
|
@ -33,5 +43,9 @@ namespace MSFSPopoutPanelManager.DomainModel.Setting
|
||||||
public WindowedModeSetting WindowedModeSetting { get; set; }
|
public WindowedModeSetting WindowedModeSetting { get; set; }
|
||||||
|
|
||||||
public SystemSetting SystemSetting { get; set; }
|
public SystemSetting SystemSetting { get; set; }
|
||||||
|
|
||||||
|
public KeyboardShortcutSetting KeyboardShortcutSetting { get; set; }
|
||||||
|
|
||||||
|
public event EventHandler<bool> IsUsedKeyboardShortcutChanged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,11 +7,8 @@ namespace MSFSPopoutPanelManager.DomainModel.Setting
|
||||||
public AutoPopOutSetting()
|
public AutoPopOutSetting()
|
||||||
{
|
{
|
||||||
IsEnabled = true;
|
IsEnabled = true;
|
||||||
ReadyToFlyDelay = 3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsEnabled { get; set; }
|
public bool IsEnabled { get; set; }
|
||||||
|
|
||||||
public int ReadyToFlyDelay { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
17
DomainModel/Setting/KeyboardShortcutSetting.cs
Normal file
17
DomainModel/Setting/KeyboardShortcutSetting.cs
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
using MSFSPopoutPanelManager.Shared;
|
||||||
|
|
||||||
|
namespace MSFSPopoutPanelManager.DomainModel.Setting
|
||||||
|
{
|
||||||
|
public class KeyboardShortcutSetting : ObservableObject
|
||||||
|
{
|
||||||
|
public KeyboardShortcutSetting()
|
||||||
|
{
|
||||||
|
IsEnabled = true;
|
||||||
|
StartPopOutKeyBinding = "P";
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsEnabled { get; set; }
|
||||||
|
|
||||||
|
public string StartPopOutKeyBinding { get; set; }
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||||
-->
|
-->
|
||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration>Local</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>x64</Platform>
|
<Platform>x64</Platform>
|
||||||
<PublishDir>..\..\..\publish\master</PublishDir>
|
<PublishDir>..\..\..\publish\master</PublishDir>
|
||||||
<PublishProtocol>FileSystem</PublishProtocol>
|
<PublishProtocol>FileSystem</PublishProtocol>
|
||||||
|
|
|
@ -97,6 +97,10 @@
|
||||||
x:Name="CategoryGameRefocusSettings"
|
x:Name="CategoryGameRefocusSettings"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
Header="Game Refocus Settings" />
|
Header="Game Refocus Settings" />
|
||||||
|
<TreeViewItem
|
||||||
|
x:Name="CategoryKeyboardShortcutSettings"
|
||||||
|
Margin="0,0,0,10"
|
||||||
|
Header="Keyboard Shortcut Settings" />
|
||||||
<TreeViewItem
|
<TreeViewItem
|
||||||
x:Name="CategoryTouchSettings"
|
x:Name="CategoryTouchSettings"
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
|
@ -214,30 +218,6 @@
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
<WrapPanel Margin="0,0,20,20" Orientation="Vertical">
|
|
||||||
<TextBlock Style="{StaticResource TextBlockHeading}">Ready to Fly Button Delay</TextBlock>
|
|
||||||
<Line
|
|
||||||
Stretch="Fill"
|
|
||||||
Stroke="Gray"
|
|
||||||
X2="1" />
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<localcontrol:NumericUpDown
|
|
||||||
Width="90"
|
|
||||||
Height="24"
|
|
||||||
FontSize="12"
|
|
||||||
Increment="1"
|
|
||||||
MaxValue="10"
|
|
||||||
MinValue="0"
|
|
||||||
Value="{Binding AppSettingData.ApplicationSetting.AutoPopOutSetting.ReadyToFlyDelay, Mode=TwoWay}" />
|
|
||||||
<TextBlock
|
|
||||||
Width="640"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Style="{StaticResource TextBlockLabel}"
|
|
||||||
TextWrapping="Wrap">
|
|
||||||
Amount of time in seconds to delay auto pop out panels from starting after ready to fly button has been pressed automatically. Extending this delay helps resolve auto pop out failure because cockpit has not been loaded completely yet depending on the speed of your PC.
|
|
||||||
</TextBlock>
|
|
||||||
</StackPanel>
|
|
||||||
</WrapPanel>
|
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
|
|
||||||
<!-- Pop Out Settings -->
|
<!-- Pop Out Settings -->
|
||||||
|
@ -486,6 +466,72 @@
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
|
|
||||||
|
<!-- Keyboard Shortcut Settings -->
|
||||||
|
<WrapPanel Orientation="Vertical" Visibility="{Binding ElementName=CategoryKeyboardShortcutSettings, Path=IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
|
||||||
|
<WrapPanel Margin="0,0,20,0" Orientation="Vertical">
|
||||||
|
<WrapPanel Orientation="Vertical">
|
||||||
|
<TextBlock Style="{StaticResource TextBlockHeading}">Keyboard Shortcuts</TextBlock>
|
||||||
|
<Line
|
||||||
|
Stretch="Fill"
|
||||||
|
Stroke="Gray"
|
||||||
|
X2="1" />
|
||||||
|
<WrapPanel>
|
||||||
|
<ToggleButton IsChecked="{Binding AppSettingData.ApplicationSetting.KeyboardShortcutSetting.IsEnabled, Mode=TwoWay}" Style="{StaticResource ToggleButton}" />
|
||||||
|
<TextBlock Style="{StaticResource TextBlockLabel}">Enable using of keyboard shortcuts to control application.</TextBlock>
|
||||||
|
</WrapPanel>
|
||||||
|
</WrapPanel>
|
||||||
|
<WrapPanel Orientation="Vertical" Visibility="{Binding AppSettingData.ApplicationSetting.KeyboardShortcutSetting.IsEnabled, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
|
||||||
|
<StackPanel
|
||||||
|
Width="Auto"
|
||||||
|
Margin="44,15,0,0"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
<WrapPanel>
|
||||||
|
<Label Content="Ctrl-Shift-" FontSize="14" />
|
||||||
|
<ComboBox
|
||||||
|
Width="40"
|
||||||
|
VerticalAlignment="top"
|
||||||
|
SelectedValue="{Binding AppSettingData.ApplicationSetting.KeyboardShortcutSetting.StartPopOutKeyBinding, Mode=TwoWay}"
|
||||||
|
SelectedValuePath="Tag">
|
||||||
|
<ComboBoxItem Content="A" Tag="A" />
|
||||||
|
<ComboBoxItem Content="B" Tag="B" />
|
||||||
|
<ComboBoxItem Content="C" Tag="C" />
|
||||||
|
<ComboBoxItem Content="D" Tag="D" />
|
||||||
|
<ComboBoxItem Content="E" Tag="E" />
|
||||||
|
<ComboBoxItem Content="F" Tag="F" />
|
||||||
|
<ComboBoxItem Content="G" Tag="G" />
|
||||||
|
<ComboBoxItem Content="H" Tag="H" />
|
||||||
|
<ComboBoxItem Content="I" Tag="I" />
|
||||||
|
<ComboBoxItem Content="J" Tag="J" />
|
||||||
|
<ComboBoxItem Content="K" Tag="K" />
|
||||||
|
<ComboBoxItem Content="L" Tag="L" />
|
||||||
|
<ComboBoxItem Content="M" Tag="M" />
|
||||||
|
<ComboBoxItem Content="N" Tag="N" />
|
||||||
|
<ComboBoxItem Content="O" Tag="O" />
|
||||||
|
<ComboBoxItem Content="P" Tag="P" />
|
||||||
|
<ComboBoxItem Content="Q" Tag="Q" />
|
||||||
|
<ComboBoxItem Content="R" Tag="R" />
|
||||||
|
<ComboBoxItem Content="S" Tag="S" />
|
||||||
|
<ComboBoxItem Content="T" Tag="T" />
|
||||||
|
<ComboBoxItem Content="U" Tag="U" />
|
||||||
|
<ComboBoxItem Content="V" Tag="V" />
|
||||||
|
<ComboBoxItem Content="W" Tag="W" />
|
||||||
|
<ComboBoxItem Content="X" Tag="X" />
|
||||||
|
<ComboBoxItem Content="Y" Tag="Y" />
|
||||||
|
<ComboBoxItem Content="Z" Tag="Z" />
|
||||||
|
</ComboBox>
|
||||||
|
</WrapPanel>
|
||||||
|
<TextBlock
|
||||||
|
Width="600"
|
||||||
|
Margin="10,3,0,0"
|
||||||
|
Style="{StaticResource TextBlockLabel}">
|
||||||
|
Configure key binding to initiate start pop out.
|
||||||
|
</TextBlock>
|
||||||
|
</StackPanel>
|
||||||
|
</WrapPanel>
|
||||||
|
</WrapPanel>
|
||||||
|
</WrapPanel>
|
||||||
|
|
||||||
<!-- Touch Settings -->
|
<!-- Touch Settings -->
|
||||||
<WrapPanel Orientation="Vertical" Visibility="{Binding ElementName=CategoryTouchSettings, Path=IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
|
<WrapPanel Orientation="Vertical" Visibility="{Binding ElementName=CategoryTouchSettings, Path=IsSelected, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
|
||||||
<WrapPanel Margin="0,0,20,20" Orientation="Vertical">
|
<WrapPanel Margin="0,0,20,20" Orientation="Vertical">
|
||||||
|
|
|
@ -17,10 +17,10 @@ namespace MSFSPopoutPanelManager.MainApp.ViewModel
|
||||||
{
|
{
|
||||||
Orchestrator = orchestrator;
|
Orchestrator = orchestrator;
|
||||||
|
|
||||||
Orchestrator.PanelPopOut.OnPopOutStarted += (sender, e) => IsDisabledAppInput = true;
|
Orchestrator.PanelPopOut.OnPopOutStarted += (sender, e) => Orchestrator.PanelPopOut.IsDisabledStartPopOut = true;
|
||||||
Orchestrator.PanelPopOut.OnPopOutCompleted += (sender, e) => IsDisabledAppInput = false;
|
Orchestrator.PanelPopOut.OnPopOutCompleted += (sender, e) => Orchestrator.PanelPopOut.IsDisabledStartPopOut = false;
|
||||||
Orchestrator.PanelSource.OnPanelSourceSelectionStarted += (sender, e) => IsDisabledAppInput = true;
|
Orchestrator.PanelSource.OnPanelSourceSelectionStarted += (sender, e) => Orchestrator.PanelPopOut.IsDisabledStartPopOut = true;
|
||||||
Orchestrator.PanelSource.OnPanelSourceSelectionCompleted += (sender, e) => IsDisabledAppInput = false;
|
Orchestrator.PanelSource.OnPanelSourceSelectionCompleted += (sender, e) => Orchestrator.PanelPopOut.IsDisabledStartPopOut = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppSettingData AppSettingData => Orchestrator.AppSettingData;
|
public AppSettingData AppSettingData => Orchestrator.AppSettingData;
|
||||||
|
@ -29,8 +29,6 @@ namespace MSFSPopoutPanelManager.MainApp.ViewModel
|
||||||
|
|
||||||
public FlightSimData FlightSimData => Orchestrator.FlightSimData;
|
public FlightSimData FlightSimData => Orchestrator.FlightSimData;
|
||||||
|
|
||||||
public bool IsDisabledAppInput { get; set; }
|
|
||||||
|
|
||||||
protected List<Run> FormatStatusMessages(List<StatusMessage> messages)
|
protected List<Run> FormatStatusMessages(List<StatusMessage> messages)
|
||||||
{
|
{
|
||||||
List<Run> runs = new List<Run>();
|
List<Run> runs = new List<Run>();
|
||||||
|
|
|
@ -129,19 +129,25 @@ namespace MSFSPopoutPanelManager.MainApp.ViewModel
|
||||||
if (DataItem.IsEditingPanel)
|
if (DataItem.IsEditingPanel)
|
||||||
{
|
{
|
||||||
ProfileData.ActiveProfile.CurrentMoveResizePanelId = DataItem.Id;
|
ProfileData.ActiveProfile.CurrentMoveResizePanelId = DataItem.Id;
|
||||||
|
|
||||||
|
if (!AppSettingData.ApplicationSetting.KeyboardShortcutSetting.IsEnabled)
|
||||||
InputHookManager.StartKeyboardHook();
|
InputHookManager.StartKeyboardHook();
|
||||||
|
|
||||||
InputHookManager.OnKeyUp -= HandleKeyUpEvent;
|
InputHookManager.OnKeyUp -= HandleKeyUpEvent;
|
||||||
InputHookManager.OnKeyUp += HandleKeyUpEvent;
|
InputHookManager.OnKeyUp += HandleKeyUpEvent;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ProfileData.ActiveProfile.CurrentMoveResizePanelId = Guid.Empty;
|
ProfileData.ActiveProfile.CurrentMoveResizePanelId = Guid.Empty;
|
||||||
InputHookManager.OnKeyUp -= HandleKeyUpEvent;
|
|
||||||
|
if (!AppSettingData.ApplicationSetting.KeyboardShortcutSetting.IsEnabled)
|
||||||
InputHookManager.EndKeyboardHook();
|
InputHookManager.EndKeyboardHook();
|
||||||
|
|
||||||
|
InputHookManager.OnKeyUp -= HandleKeyUpEvent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleKeyUpEvent(object? sender, KeyUpEventArgs e)
|
private void HandleKeyUpEvent(object sender, KeyUpEventArgs e)
|
||||||
{
|
{
|
||||||
PanelConfigPropertyName panelConfigPropertyName = PanelConfigPropertyName.None;
|
PanelConfigPropertyName panelConfigPropertyName = PanelConfigPropertyName.None;
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ namespace MSFSPopoutPanelManager.MainApp.ViewModel
|
||||||
|
|
||||||
private void OnStartPopOut()
|
private void OnStartPopOut()
|
||||||
{
|
{
|
||||||
if (IsDisabledAppInput)
|
if (Orchestrator.PanelPopOut.IsDisabledStartPopOut || !FlightSimData.IsInCockpit)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Orchestrator.PanelPopOut.ManualPopOut();
|
Orchestrator.PanelPopOut.ManualPopOut();
|
||||||
|
|
51
Orchestration/KeyboardOrchestrator.cs
Normal file
51
Orchestration/KeyboardOrchestrator.cs
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
using MSFSPopoutPanelManager.Shared;
|
||||||
|
using MSFSPopoutPanelManager.WindowsAgent;
|
||||||
|
|
||||||
|
namespace MSFSPopoutPanelManager.Orchestration
|
||||||
|
{
|
||||||
|
public class KeyboardOrchestrator : ObservableObject
|
||||||
|
{
|
||||||
|
private AppSettingData _appSettingData;
|
||||||
|
private FlightSimData _flightSimData;
|
||||||
|
|
||||||
|
public KeyboardOrchestrator(AppSettingData appSettingData, FlightSimData flightSimData)
|
||||||
|
{
|
||||||
|
_appSettingData = appSettingData;
|
||||||
|
_flightSimData = flightSimData;
|
||||||
|
}
|
||||||
|
|
||||||
|
internal PanelPopOutOrchestrator PanelPopOutOrchestrator { get; set; }
|
||||||
|
|
||||||
|
public void Initialize()
|
||||||
|
{
|
||||||
|
if (_appSettingData.ApplicationSetting.KeyboardShortcutSetting.IsEnabled)
|
||||||
|
{
|
||||||
|
InputHookManager.StartKeyboardHook();
|
||||||
|
InputHookManager.OnKeyUp -= HandleKeyboardHookKeyUpEvent;
|
||||||
|
InputHookManager.OnKeyUp += HandleKeyboardHookKeyUpEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
_appSettingData.ApplicationSetting.IsUsedKeyboardShortcutChanged += (sender, e) =>
|
||||||
|
{
|
||||||
|
if (e)
|
||||||
|
{
|
||||||
|
InputHookManager.StartKeyboardHook();
|
||||||
|
InputHookManager.OnKeyUp -= HandleKeyboardHookKeyUpEvent;
|
||||||
|
InputHookManager.OnKeyUp += HandleKeyboardHookKeyUpEvent;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
InputHookManager.EndKeyboardHook();
|
||||||
|
InputHookManager.OnKeyUp -= HandleKeyboardHookKeyUpEvent;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public void HandleKeyboardHookKeyUpEvent(object sender, KeyUpEventArgs e)
|
||||||
|
{
|
||||||
|
// Start pop out
|
||||||
|
if (e.IsHoldControl && e.IsHoldShift && e.KeyCode.ToUpper() == _appSettingData.ApplicationSetting.KeyboardShortcutSetting.StartPopOutKeyBinding)
|
||||||
|
PanelPopOutOrchestrator.ManualPopOut();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
using AutoUpdaterDotNET;
|
using AutoUpdaterDotNET;
|
||||||
using MSFSPopoutPanelManager.Shared;
|
using MSFSPopoutPanelManager.Shared;
|
||||||
|
using MSFSPopoutPanelManager.WindowsAgent;
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
@ -24,6 +25,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
PanelConfiguration = new PanelConfigurationOrchestrator(ProfileData, AppSettingData, FlightSimData);
|
PanelConfiguration = new PanelConfigurationOrchestrator(ProfileData, AppSettingData, FlightSimData);
|
||||||
FlightSim = new FlightSimOrchestrator(ProfileData, AppSettingData, FlightSimData);
|
FlightSim = new FlightSimOrchestrator(ProfileData, AppSettingData, FlightSimData);
|
||||||
Help = new HelpOrchestrator();
|
Help = new HelpOrchestrator();
|
||||||
|
Keyboard = new KeyboardOrchestrator(AppSettingData, FlightSimData);
|
||||||
|
|
||||||
PanelSource.FlightSimOrchestrator = FlightSim;
|
PanelSource.FlightSimOrchestrator = FlightSim;
|
||||||
|
|
||||||
|
@ -34,6 +36,8 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
FlightSim.PanelPopOutOrchestrator = PanelPopOut;
|
FlightSim.PanelPopOutOrchestrator = PanelPopOut;
|
||||||
FlightSim.PanelConfigurationOrchestrator = PanelConfiguration;
|
FlightSim.PanelConfigurationOrchestrator = PanelConfiguration;
|
||||||
FlightSim.OnSimulatorExited += (sender, e) => { ApplicationClose(); Environment.Exit(0); };
|
FlightSim.OnSimulatorExited += (sender, e) => { ApplicationClose(); Environment.Exit(0); };
|
||||||
|
|
||||||
|
Keyboard.PanelPopOutOrchestrator = PanelPopOut;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProfileOrchestrator Profile { get; set; }
|
public ProfileOrchestrator Profile { get; set; }
|
||||||
|
@ -54,6 +58,8 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
|
|
||||||
public HelpOrchestrator Help { get; set; }
|
public HelpOrchestrator Help { get; set; }
|
||||||
|
|
||||||
|
public KeyboardOrchestrator Keyboard { get; set; }
|
||||||
|
|
||||||
public IntPtr ApplicationHandle { get; set; }
|
public IntPtr ApplicationHandle { get; set; }
|
||||||
|
|
||||||
public Window ApplicationWindow { get; set; }
|
public Window ApplicationWindow { get; set; }
|
||||||
|
@ -71,6 +77,8 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
ProfileData.SetActiveProfile(AppSettingData.ApplicationSetting.SystemSetting.LastUsedProfileId); // Load last used profile
|
ProfileData.SetActiveProfile(AppSettingData.ApplicationSetting.SystemSetting.LastUsedProfileId); // Load last used profile
|
||||||
|
|
||||||
Task.Run(() => FlightSim.StartSimConnectServer()); // Start the SimConnect server
|
Task.Run(() => FlightSim.StartSimConnectServer()); // Start the SimConnect server
|
||||||
|
|
||||||
|
Keyboard.Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ApplicationClose()
|
public void ApplicationClose()
|
||||||
|
@ -78,6 +86,8 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
// Force unhook all win events
|
// Force unhook all win events
|
||||||
PanelConfiguration.EndConfiguration();
|
PanelConfiguration.EndConfiguration();
|
||||||
PanelConfiguration.EndTouchHook();
|
PanelConfiguration.EndTouchHook();
|
||||||
|
|
||||||
|
InputHookManager.EndKeyboardHook();
|
||||||
FlightSim.EndSimConnectServer(true);
|
FlightSim.EndSimConnectServer(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
_profileData = profileData;
|
_profileData = profileData;
|
||||||
_appSettingData = appSettingData;
|
_appSettingData = appSettingData;
|
||||||
_flightSimData = flightSimData;
|
_flightSimData = flightSimData;
|
||||||
|
IsDisabledStartPopOut = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal FlightSimOrchestrator FlightSimOrchestrator { private get; set; }
|
internal FlightSimOrchestrator FlightSimOrchestrator { private get; set; }
|
||||||
|
@ -35,12 +36,17 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
|
|
||||||
private ApplicationSetting AppSetting { get { return _appSettingData == null ? null : _appSettingData.ApplicationSetting; } }
|
private ApplicationSetting AppSetting { get { return _appSettingData == null ? null : _appSettingData.ApplicationSetting; } }
|
||||||
|
|
||||||
|
public bool IsDisabledStartPopOut { get; set; }
|
||||||
|
|
||||||
public event EventHandler OnPopOutStarted;
|
public event EventHandler OnPopOutStarted;
|
||||||
public event EventHandler OnPopOutCompleted;
|
public event EventHandler OnPopOutCompleted;
|
||||||
public event EventHandler<PanelConfig> OnHudBarOpened;
|
public event EventHandler<PanelConfig> OnHudBarOpened;
|
||||||
|
|
||||||
public async void ManualPopOut()
|
public async void ManualPopOut()
|
||||||
{
|
{
|
||||||
|
if (IsDisabledStartPopOut || !_flightSimData.IsInCockpit)
|
||||||
|
return;
|
||||||
|
|
||||||
await CoreSteps(false);
|
await CoreSteps(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,8 +496,6 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
int retry = 10;
|
int retry = 10;
|
||||||
for (var i = 0; i < retry; i++)
|
for (var i = 0; i < retry; i++)
|
||||||
{
|
{
|
||||||
System.Diagnostics.Debug.WriteLine($"zoom {i}");
|
|
||||||
|
|
||||||
FlightSimOrchestrator.SetCockpitCameraZoomLevel(zoom);
|
FlightSimOrchestrator.SetCockpitCameraZoomLevel(zoom);
|
||||||
Thread.Sleep(500); // wait for flightsimdata to be updated
|
Thread.Sleep(500); // wait for flightsimdata to be updated
|
||||||
|
|
||||||
|
|
|
@ -175,7 +175,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
{
|
{
|
||||||
// Disable hooks if active
|
// Disable hooks if active
|
||||||
InputHookManager.EndMouseHook();
|
InputHookManager.EndMouseHook();
|
||||||
InputHookManager.EndKeyboardHook();
|
//InputHookManager.EndKeyboardHook();
|
||||||
|
|
||||||
_profileData.ActiveProfile.CurrentMoveResizePanelId = Guid.Empty;
|
_profileData.ActiveProfile.CurrentMoveResizePanelId = Guid.Empty;
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@ namespace MSFSPopoutPanelManager.Orchestration
|
||||||
public void ResetActiveProfile()
|
public void ResetActiveProfile()
|
||||||
{
|
{
|
||||||
InputHookManager.EndMouseHook();
|
InputHookManager.EndMouseHook();
|
||||||
InputHookManager.EndKeyboardHook();
|
//InputHookManager.EndKeyboardHook();
|
||||||
|
|
||||||
if (ActiveProfile == null)
|
if (ActiveProfile == null)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
## Version 4.0.2
|
## Version 4.0.2
|
||||||
|
* Added new logic to detect when flight session is ready to initiate pop out process. Ready to Fly delay setting is no longer needed. Please install the updated "ready-to-fly-button-skipper" community plugin to your community folder to shorten the time when pop out process starts. The old version waits 2 seconds before ready to fly button is deactivated and the new version is immediate.
|
||||||
|
|
||||||
|
* Updated logic to load custom camera view when performing pop out. It is now more reliable and reduces unnecessary shifting of camera angle before starting pop out process.
|
||||||
|
|
||||||
* Added workaround for CJ4 CDU panel not popping out because of MSFS bug.
|
* Added workaround for CJ4 CDU panel not popping out because of MSFS bug.
|
||||||
|
|
||||||
* Added workaround fix when using camera zoom setting with value other than 50 in MSFS general options will cause Pop Out Panel Manager pop out to fail. This is an existing MSFS bug where saving and loading of custom camera view is currently broken for zoom level other than 50.
|
* Added workaround fix when using camera zoom setting with value other than 50 in MSFS general options will cause Pop Out Panel Manager pop out to fail. This is an existing MSFS bug where saving and loading of custom camera view is currently broken for zoom level other than 50.
|
||||||
|
|
||||||
|
* Add configurable keyboard shortcut to initiate pop out process (default is Ctrl-Shift-P). This keyboard shortcut can be configured in preference setting. This setting can be disabled to improve computing resource needed to constantly detect keyboard inputs.
|
||||||
|
|
||||||
* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration.
|
* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration.
|
||||||
|
|
||||||
* Updated logic to verify custom camera view has been loaded before starting pop out process.
|
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace MSFSPopoutPanelManager.Shared
|
||||||
hasJsonIgnoreAttribute = Attribute.IsDefined(propertyInfo, typeof(JsonIgnoreAttribute));
|
hasJsonIgnoreAttribute = Attribute.IsDefined(propertyInfo, typeof(JsonIgnoreAttribute));
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyChanged?.Invoke(this, new PropertyChangedExtendedEventArgs(e?.PropertyName, hasJsonIgnoreAttribute));
|
PropertyChanged?.Invoke(this, new PropertyChangedExtendedEventArgs(e?.PropertyName, sender.ToString(), hasJsonIgnoreAttribute));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void InitializeChildPropertyChangeBinding()
|
protected void InitializeChildPropertyChangeBinding()
|
||||||
|
@ -55,9 +55,12 @@ namespace MSFSPopoutPanelManager.Shared
|
||||||
{
|
{
|
||||||
public virtual bool DisableSave { get; private set; }
|
public virtual bool DisableSave { get; private set; }
|
||||||
|
|
||||||
public PropertyChangedExtendedEventArgs(string propertyName, bool disableSave) : base(propertyName)
|
public virtual string ObjectName { get; private set; }
|
||||||
|
|
||||||
|
public PropertyChangedExtendedEventArgs(string propertyName, string objectName, bool disableSave) : base(propertyName)
|
||||||
{
|
{
|
||||||
DisableSave = disableSave;
|
DisableSave = disableSave;
|
||||||
|
ObjectName = objectName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,17 @@
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
## Version 4.0.2
|
## Version 4.0.2
|
||||||
|
* Added new logic to detect when flight session is ready to initiate pop out process. Ready to Fly delay setting is no longer needed. Please install the updated "ready-to-fly-button-skipper" community plugin to your community folder to shorten the time when pop out process starts. The old version waits 2 seconds before ready to fly button is deactivated and the new version is immediate.
|
||||||
|
|
||||||
|
* Updated logic to load custom camera view when performing pop out. It is now more reliable and reduces unnecessary shifting of camera angle before starting pop out process.
|
||||||
|
|
||||||
* Added workaround for CJ4 CDU panel not popping out because of MSFS bug.
|
* Added workaround for CJ4 CDU panel not popping out because of MSFS bug.
|
||||||
|
|
||||||
* Added workaround fix when using camera zoom setting with value other than 50 in MSFS general options will cause Pop Out Panel Manager pop out to fail. This is an existing MSFS bug where saving and loading of custom camera view is currently broken for zoom level other than 50.
|
* Added workaround fix when using camera zoom setting with value other than 50 in MSFS general options will cause Pop Out Panel Manager pop out to fail. This is an existing MSFS bug where saving and loading of custom camera view is currently broken for zoom level other than 50.
|
||||||
|
|
||||||
* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration.
|
* Add configurable keyboard shortcut to initiate pop out process (default is Ctrl-Shift-P). This keyboard shortcut can be configured in preference setting. This setting can be disabled to improve computing resource needed to constantly detect keyboard inputs.
|
||||||
|
|
||||||
* Updated logic to verify custom camera view has been loaded before starting pop out process.
|
* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration.
|
||||||
|
|
||||||
## Version 4.0.1.2
|
## Version 4.0.1.2
|
||||||
* Hotfix - Fixed issue where using touch panel feature may freeze computer and the application.
|
* Hotfix - Fixed issue where using touch panel feature may freeze computer and the application.
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Define ready to fly button skip delay in seconds
|
// Define ready to fly button skip delay in seconds
|
||||||
const READY_TO_FLY_BUTTON_SKIP_DELAY = 2;
|
const READY_TO_FLY_BUTTON_SKIP_DELAY = 0;
|
||||||
|
|
||||||
// Click ready to fly button
|
// Click ready to fly button
|
||||||
Coherent.on("MissionStartup_Step", (step) => {
|
Coherent.on("MissionStartup_Step", (step) => {
|
||||||
|
|
Loading…
Reference in a new issue