1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-23 22:30:09 +00:00
msfs-popout-panel-manager/Orchestration/BaseOrchestrator.cs

33 lines
987 B
C#
Raw Normal View History

2024-02-28 02:44:21 +00:00
using MSFSPopoutPanelManager.Shared;
2024-03-12 13:14:17 +00:00
using MSFSPopoutPanelManager.WindowsAgent;
2024-02-28 02:44:21 +00:00
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;
2024-03-12 13:14:17 +00:00
protected void CloseAllPopOuts()
{
foreach (var panelConfig in ProfileData.ActiveProfile.PanelConfigs)
{
if (panelConfig.FloatingPanel.IsEnabled && !panelConfig.IsFloating)
panelConfig.IsFloating = true;
}
WindowActionManager.CloseAllPopOuts();
}
2024-02-28 02:44:21 +00:00
}
}