1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-22 05:40:11 +00:00
msfs-popout-panel-manager/Orchestration/BaseOrchestrator.cs
2024-03-12 09:14:17 -04:00

32 lines
987 B
C#

using MSFSPopoutPanelManager.Shared;
using MSFSPopoutPanelManager.WindowsAgent;
namespace MSFSPopoutPanelManager.Orchestration
{
public abstract class BaseOrchestrator : ObservableObject
{
private readonly SharedStorage _sharedStorage;
protected BaseOrchestrator(SharedStorage sharedStorage)
{
_sharedStorage = sharedStorage;
}
protected ProfileData ProfileData => _sharedStorage.ProfileData;
protected AppSettingData AppSettingData => _sharedStorage.AppSettingData;
protected FlightSimData FlightSimData => _sharedStorage.FlightSimData;
protected void CloseAllPopOuts()
{
foreach (var panelConfig in ProfileData.ActiveProfile.PanelConfigs)
{
if (panelConfig.FloatingPanel.IsEnabled && !panelConfig.IsFloating)
panelConfig.IsFloating = true;
}
WindowActionManager.CloseAllPopOuts();
}
}
}