1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-25 07:10:10 +00:00
msfs-popout-panel-manager/Orchestration/ProfileOrchestrator.cs

42 lines
1.3 KiB
C#
Raw Normal View History

2022-07-23 19:23:32 +00:00
using MSFSPopoutPanelManager.Shared;
namespace MSFSPopoutPanelManager.Orchestration
{
public class ProfileOrchestrator : ObservableObject
{
internal ProfileData ProfileData { get; set; }
public void AddProfile(string profileName, int copyProfileId)
{
if (copyProfileId == -1)
ProfileData.AddProfile(profileName);
else
ProfileData.AddProfile(profileName, copyProfileId);
}
public void DeleteActiveProfile()
{
if (ProfileData.ActiveProfile != null)
ProfileData.DeleteProfile(ProfileData.ActiveProfile.ProfileId);
}
public void ChangeProfile(int profileId)
{
if (ProfileData != null)
ProfileData.UpdateActiveProfile(profileId);
}
public void AddProfileBinding(string bindingLiveryName)
{
if (ProfileData.ActiveProfile != null)
ProfileData.AddProfileBinding(bindingLiveryName, ProfileData.ActiveProfile.ProfileId);
}
public void DeleteProfileBinding(string bindingLiveryName)
{
if (ProfileData.ActiveProfile != null)
ProfileData.DeleteProfileBinding(bindingLiveryName, ProfileData.ActiveProfile.ProfileId);
}
}
}