1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-10-16 06:00:45 +00:00

Version 3.4.5 Release

This commit is contained in:
Stanley 2022-10-16 09:11:01 -04:00
parent 56c4b15648
commit c6c584e768
23 changed files with 195 additions and 58 deletions

View file

@ -10,9 +10,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.ArduinoAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.1011</Version>
<AssemblyVersion>3.4.4.1011</AssemblyVersion>
<FileVersion>3.4.4.1011</FileVersion>
<Version>3.4.5.0</Version>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<FileVersion>3.4.5.0</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -9,12 +9,11 @@ namespace MSFSPopoutPanelManager.Orchestration
{
public class MainOrchestrator : ObservableObject
{
private IntPtr _msfsGameWindowHandle;
private const int MSFS_GAME_EXIT_DETECTION_INTERVAL = 3000;
private System.Timers.Timer _msfsGameExitDetectionTimer;
public MainOrchestrator()
{
_msfsGameWindowHandle = IntPtr.Zero;
Profile = new ProfileOrchestrator();
PanelSource = new PanelSourceOrchestrator();
PanelPopOut = new PanelPopOutOrchestrator();
@ -94,6 +93,7 @@ namespace MSFSPopoutPanelManager.Orchestration
FlightSim.AppSettingData = AppSettingData;
FlightSim.FlightSimData = FlightSimData;
FlightSim.OnFlightStartedForAutoPopOut += (sender, e) => PanelPopOut.AutoPopOut();
FlightSim.OnSimulatorStarted += (sender, e) => DetectMsfsExit();
TouchPanel.ProfileData = ProfileData;
TouchPanel.AppSettingData = AppSettingData;
@ -137,5 +137,20 @@ namespace MSFSPopoutPanelManager.Orchestration
AutoUpdater.UpdateFormSize = new System.Drawing.Size(930, 675);
AutoUpdater.Start(AppSettingData.AppSetting.AutoUpdaterUrl);
}
private void DetectMsfsExit()
{
_msfsGameExitDetectionTimer = new System.Timers.Timer();
_msfsGameExitDetectionTimer.Interval = MSFS_GAME_EXIT_DETECTION_INTERVAL;
_msfsGameExitDetectionTimer.Enabled = true;
_msfsGameExitDetectionTimer.Elapsed += async (source, e) =>
{
if (WindowsAgent.WindowProcessManager.GetSimulatorProcess() == null)
{
await ApplicationClose();
Environment.Exit(0);
}
};
}
}
}

View file

@ -10,9 +10,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.Orchestration</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.1011</Version>
<AssemblyVersion>3.4.4.1011</AssemblyVersion>
<FileVersion>3.4.4.1011</FileVersion>
<Version>3.4.5.0</Version>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<FileVersion>3.4.5.0</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -3,6 +3,7 @@ using MSFSPopoutPanelManager.UserDataAgent;
using MSFSPopoutPanelManager.WindowsAgent;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Drawing;
using System.Linq;
using System.Threading;
@ -77,6 +78,7 @@ namespace MSFSPopoutPanelManager.Orchestration
Thread.Sleep(2000);
_builtInPanelConfigDelay = 4000;
CorePopOutSteps();
}
}
@ -484,24 +486,30 @@ namespace MSFSPopoutPanelManager.Orchestration
// If profile is unlocked, add any new panel into profile
if (!ActiveProfile.IsLocked)
{
// Need this to fix collectionview modification thread issue
var finalPanelConfigs = ActiveProfile.PanelConfigs.ToList();
var isAdded = false;
panelResults.ForEach(panel =>
foreach (var panel in panelResults)
{
if (panel.PanelType == PanelType.BuiltInPopout && !ActiveProfile.PanelConfigs.Any(s => s.PanelName == panel.PanelName))
if ((panel.PanelType == PanelType.BuiltInPopout || panel.PanelType == PanelType.MSFSTouchPanel) && !ActiveProfile.PanelConfigs.Any(s => s.PanelName == panel.PanelName))
{
ActiveProfile.PanelConfigs.Add(panel);
finalPanelConfigs.Add(panel);
isAdded = true;
}
else if (panel.PanelType == PanelType.CustomPopout && !ActiveProfile.PanelConfigs.Any(s => s.PanelIndex == panel.PanelIndex))
{
ActiveProfile.PanelConfigs.Add(panel);
finalPanelConfigs.Add(panel);
isAdded = true;
}
});
}
if (isAdded)
{
ActiveProfile.PanelConfigs = new ObservableCollection<PanelConfig>(finalPanelConfigs);
ProfileData.WriteProfiles();
}
}
// Apply full screen (cannot combine with always on top or hide title bar)

View file

@ -9,7 +9,7 @@
"rootPath": "kodiak",
"panelSize": {
"width": 2458,
"height": 1310
"height": 1280
},
"showMenuBar": true,
"enableMap": true,
@ -29,7 +29,7 @@
"definitions": "KODIAK_ELECTRICAL_DEF",
"rootPath": "electrical",
"left": 0,
"top": 915,
"top": 910,
"scale": 1
},
{
@ -38,7 +38,7 @@
"definitions": "KODIAK_LIGHTS_DEF",
"rootPath": "lights",
"left": 830,
"top": 915,
"top": 910,
"scale": 1
},
{
@ -46,7 +46,7 @@
"name": "Fuel",
"definitions": "KODIAK_FUEL_DEF",
"rootPath": "fuel",
"left": 1770,
"left": 1765,
"top": 980,
"scale": 1
},
@ -55,12 +55,61 @@
"name": "Oxygen",
"definitions": "KODIAK_OXYGEN_DEF",
"rootPath": "oxygen",
"left": 2230,
"left": 2215,
"top": 985,
"scale": 1
}
]
},
{
"panelId": "kodiak-wo-pfd-mfd",
"name": "Kodiak Full Instrumentation without PFD/MFD",
"rootPath": "kodiak",
"panelSize": {
"width": 2458,
"height": 380
},
"showMenuBar": false,
"enableMap": false,
"subPanels": [
{
"panelId": "electrical",
"name": "Electrical",
"definitions": "KODIAK_ELECTRICAL_DEF",
"rootPath": "electrical",
"left": 0,
"top": 0,
"scale": 0.8
},
{
"panelId": "lights",
"name": "Lights",
"definitions": "KODIAK_LIGHTS_DEF",
"rootPath": "lights",
"left": 850,
"top": 0,
"scale": 0.8
},
{
"panelId": "fuel",
"name": "Fuel",
"definitions": "KODIAK_FUEL_DEF",
"rootPath": "fuel",
"left": 1825,
"top": 75,
"scale": 0.8
},
{
"panelId": "oxygen",
"name": "Oxygen",
"definitions": "KODIAK_OXYGEN_DEF",
"rootPath": "oxygen",
"left": 2350,
"top": 75,
"scale": 0.8
}
]
},
{
"panelId": "kodiak-pfd",
"name": "Kodiak PFD",
@ -249,6 +298,46 @@
}
]
},
{
"panelId": "pmdg-737-700-full-instrumentation-no-mcp",
"name": "PMDG 737 Full Instrumentation without MCP",
"rootPath": "pmdg-737-700",
"panelSize": {
"width": 1920,
"height": 900
},
"showMenuBar": false,
"enableMap": false,
"subPanels": [
{
"panelId": "radio",
"name": "Radio",
"rootPath": "radio",
"definitions": "PMDG_737_700_RADIO_DEF",
"left": 200,
"top": 25,
"scale": 1.4
},
{
"panelId": "efis-cpt",
"name": "EFIS-CPT",
"rootPath": "efis-cpt",
"definitions": "PMDG_737_700_EFIS_CPT_DEF",
"left": 100,
"top": 525,
"scale": 1.2
},
{
"panelId": "xpndr",
"name": "XPNDR",
"rootPath": "xpndr",
"definitions": "PMDG_737_700_XPNDR_DEF",
"left": 750,
"top": 550,
"scale": 1.4
}
]
},
{
"panelId": "pmdg-737-700-mcp",
"name": "PMDG 737 MCP",

View file

@ -29,8 +29,8 @@ const useStyles = makeStyles(() => ({
alignItems: 'center',
},
menuButton: {
marginRight: '0.5em',
marginLeft: '0.5em'
marginRight: '0.25em',
marginLeft: '0.25em'
},
networkConnected: {
color: 'lightgreen'

View file

@ -18,6 +18,7 @@ const useStyles = makeStyles((theme) => ({
backgroundColor: theme.palette.background,
backgroundImage: (props) => `url(/config/profiles/${props.parentRootPath}/${props.rootPath}/img/${props.backgroundImage})`,
aspectRatio: (props) => `${props.panelSize.width}/${props.panelSize.height}`,
width: (props) => `calc(${props.panelSize.width} / ${props.parentPanelSize.width} * ${props.scale} * 100vw)`,
backgroundRepeat: 'no-repeat',
backgroundSize: '100% 100%',
zIndex: 1000

View file

@ -22,9 +22,8 @@ const useStyles = makeStyles((theme) => ({
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
paddingLeft: '30px',
paddingRight: '30px',
justifyContent: 'space-around',
minHeight: '1.5em',
borderLeft: '1px solid gray',
borderRight: '1px solid gray',
@ -72,7 +71,7 @@ const Telemetry = () => {
<Grid container className={classes.root}>
<Grid item xs={5} className={classes.sectionTelemetry}>
<Grid item xs={4} className={classes.sectionSmall}>
<Typography variant='body1'>Elevator Trim:</Typography>
<Typography variant='body1'>Elev Trim:</Typography>
<Typography variant='body1' className={classes.dataLabel}>{ELEVATOR_TRIM === undefined ? 0 : ELEVATOR_TRIM}</Typography>
</Grid>
<Grid item xs={4} className={classes.sectionSmall}>

View file

@ -57,9 +57,8 @@ const useStyles = props => makeStyles((theme) => ({
position: 'absolute',
backgroundRepeat: 'no-repeat',
backgroundSize: '100%',
width: '80%',
height: '80%',
width: '100%',
height: '100%'
},
}));
@ -97,6 +96,10 @@ const WebPanel = ({ planeId, panelId }) => {
styleClasses.push(classes.subPanelBase);
return styleClasses;
}
// const setupSubPanelLocationStyle = (subPanel) => {
// return { left: subPanel.left + '%', top: subPanel.top + '%' };
// }
const setupSubPanelLocationStyle = (subPanel) => {
return { left: (subPanel.left / panelProfile.panelSize.width * 100.0) + '%', top: (subPanel.top / panelProfile.panelSize.height * 100.0) + '%' };

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.Shared</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.1011</Version>
<AssemblyVersion>3.4.4.1011</AssemblyVersion>
<FileVersion>3.4.4.1011</FileVersion>
<Version>3.4.5.0</Version>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<FileVersion>3.4.5.0</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.SimConnectAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.1011</Version>
<AssemblyVersion>3.4.4.1011</AssemblyVersion>
<FileVersion>3.4.4.1011</FileVersion>
<Version>3.4.5.0</Version>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<FileVersion>3.4.5.0</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -111,7 +111,7 @@ namespace MSFSPopoutPanelManager.SimConnectAgent.TouchPanel
Thread.Sleep(500);
if (!_isExecutingCommand)
{
InputEmulationManager.RefocusGameWindow();
InputEmulationManager.RefocusGameWindow(PanelType.MSFSTouchPanel);
}
});
}

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.TouchPanelAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.1011</Version>
<AssemblyVersion>3.4.4.1011</AssemblyVersion>
<FileVersion>3.4.4.1011</FileVersion>
<Version>3.4.5.0</Version>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<FileVersion>3.4.5.0</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -15,6 +15,7 @@ namespace MSFSPopoutPanelManager.UserDataAgent
AlwaysOnTop = true;
MinimizeToTray = false;
StartMinimized = false;
AutoClose = true;
AutoPopOutPanels = true;
@ -58,6 +59,8 @@ namespace MSFSPopoutPanelManager.UserDataAgent
public bool AlwaysOnTop { get; set; }
public bool AutoClose { get; set; }
public bool UseAutoPanning { get; set; }
public bool MinimizeAfterPopOut { get; set; }

View file

@ -10,9 +10,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.UserDataAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.1011</Version>
<AssemblyVersion>3.4.4.1011</AssemblyVersion>
<FileVersion>3.4.4.1011</FileVersion>
<Version>3.4.5.0</Version>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<FileVersion>3.4.5.0</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -1,6 +1,11 @@
# Version History
<hr/>
## Version 3.4.5
* Added new preference option by default to auto close MSFS Pop Out Manager when MSFS exits.
* Fixed an issue when using "Power on required to pop out panels for cold start" for G1000 and G3000 equipped aircraft, the pop out process gets stuck during the final step after panels have been popped out but before battery and avionics are to be turned off.
## Version 3.4.4.1011
* Hot fix: Reverted to previous implementation of touch setting's mouse cursor automatic refocus to center of MSFS game screen instead to the upper left corner of the pop out panel where it is being touched.

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.WebServer</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.1011</Version>
<AssemblyVersion>3.4.4.1011</AssemblyVersion>
<FileVersion>3.4.4.1011</FileVersion>
<Version>3.4.5.0</Version>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<FileVersion>3.4.5.0</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -1,4 +1,5 @@
using System;
using MSFSPopoutPanelManager.Shared;
using System;
using System.Drawing;
using System.Threading;
using WindowsInput;
@ -194,7 +195,7 @@ namespace MSFSPopoutPanelManager.WindowsAgent
PInvoke.keybd_event(Convert.ToByte(VK_RMENU), 0, KEYEVENTF_KEYUP, 0);
}
public static void RefocusGameWindow()
public static void RefocusGameWindow(PanelType panelType)
{
var simualatorProcess = WindowProcessManager.GetSimulatorProcess();
if (simualatorProcess == null)
@ -203,7 +204,10 @@ namespace MSFSPopoutPanelManager.WindowsAgent
var rectangle = WindowActionManager.GetWindowRect(simualatorProcess.Handle);
var clientRectangle = WindowActionManager.GetClientRect(simualatorProcess.Handle);
PInvoke.SetCursorPos(rectangle.X + clientRectangle.Width / 2, rectangle.Y + clientRectangle.Height / 2);
if (panelType == PanelType.MSFSTouchPanel)
InputEmulationManager.LeftClick(rectangle.X + clientRectangle.Width / 2, rectangle.Y + clientRectangle.Height / 2);
else
PInvoke.SetCursorPos(rectangle.X + clientRectangle.Width / 2, rectangle.Y + clientRectangle.Height / 2);
}
}

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.WindowsAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>3.4.4.1011</Version>
<AssemblyVersion>3.4.4.1011</AssemblyVersion>
<FileVersion>3.4.4.1011</FileVersion>
<Version>3.4.5.0</Version>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<FileVersion>3.4.5.0</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;DebugTouchPanel;ReleaseTouchPanel</Configurations>

View file

@ -97,6 +97,13 @@
<AccessText TextWrapping="Wrap">Start the application in minimized mode in system tray.</AccessText>
</CheckBox>
</WrapPanel>
<WrapPanel Orientation="Vertical" Margin="0,0,20,20">
<TextBlock Style="{StaticResource TextBlockHeading}">Auto Close When Exiting MSFS</TextBlock>
<Line Stretch="Fill" Stroke="Gray" X2="1"/>
<CheckBox IsChecked="{Binding AppSettingData.AppSetting.AutoClose, Mode=TwoWay}" >
<AccessText TextWrapping="Wrap">Automatically close the application when exiting MSFS.</AccessText>
</CheckBox>
</WrapPanel>
</WrapPanel>
</ScrollViewer>

View file

@ -76,7 +76,7 @@
<Button Content="+" ToolTip="Add Binding" Margin="10,0,0,0" Width="40" Command="{Binding AddProfileBindingCommand}"/>
<Button Content="-" ToolTip="Delete Binding" Margin="10,0,0,0" Width="40" Command="{Binding DeleteProfileBindingCommand}"/>
</WrapPanel>
<CheckBox Margin="10,5,0,0" Content="Power on required to pop out panels on cold start (G1000 / NXi Only)" IsChecked="{Binding ProfileData.ActiveProfile.PowerOnRequiredForColdStart}" Command="{Binding SetPowerOnRequiredCommand}" />
<CheckBox Margin="10,5,0,0" Content="Power on required to pop out panels on cold start (G1000/G3000)" IsChecked="{Binding ProfileData.ActiveProfile.PowerOnRequiredForColdStart}" Command="{Binding SetPowerOnRequiredCommand}" />
<CheckBox Margin="10,5,0,0" Content="Include in-game menu bar panels (VFR Map, Checklist, ATC, etc)" IsChecked="{Binding ProfileData.ActiveProfile.IncludeInGamePanels}" Command="{Binding SetIncludeInGamePanelsCommand}" />
<WrapPanel Orientation="Horizontal" Visibility="{Binding AppSettingData.AppSetting.TouchScreenSettings.RealSimGearGTN750Gen1Override, Converter={StaticResource VisibleIfTrueConverter}, Mode=OneWay}" >
<CheckBox Margin="10,5,0,0" Content="Use with RealSimGear GTN750 Gen1 Display Panel" IsChecked="{Binding ProfileData.ActiveProfile.RealSimGearGTN750Gen1Override}" Command="{Binding SetIncludeInGamePanelsCommand}" />

View file

@ -14,9 +14,9 @@
<RootNamespace>MSFSPopoutPanelManager.WpfApp</RootNamespace>
<ApplicationIcon>logo.ico</ApplicationIcon>
<Platforms>x64</Platforms>
<Version>3.4.4.1011</Version>
<AssemblyVersion>3.4.4.1011</AssemblyVersion>
<FileVersion>3.4.4.1011</FileVersion>
<Version>3.4.5.0</Version>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<FileVersion>3.4.5.0</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>embedded</DebugType>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>

View file

@ -1,9 +1,12 @@
Version 3.4.4.1011
Version 3.4.5.0
This release is optional and please feel to skip this update.
Change Log:
* Hot fix: Reverted to previous implementation of touch setting's mouse cursor automatic
refocus to center of MSFS game screen instead to the upper left corner of the pop out panel
where it is being touched.
* Added new preference option by default to auto close MSFS Pop Out Manager when MSFS
exits.
* Fixed an issue when using "Power on required to pop out panels for cold start" for G1000
and G3000 equipped aircraft, the pop out process gets stuck during the final step after
panels have been popped out but before battery and avionics are to be turned off.