mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-24 23:00:12 +00:00
68 lines
1.8 KiB
C#
68 lines
1.8 KiB
C#
using MSFSPopoutPanelManager.DomainModel.SimConnect;
|
|
using MSFSPopoutPanelManager.Shared;
|
|
using System;
|
|
using System.ComponentModel;
|
|
|
|
namespace MSFSPopoutPanelManager.Orchestration
|
|
{
|
|
public class FlightSimData : ObservableObject
|
|
{
|
|
public FlightSimData()
|
|
{
|
|
Setup();
|
|
InitializeChildPropertyChangeBinding();
|
|
}
|
|
|
|
public string AircraftName { get; set; }
|
|
|
|
public bool HasAircraftName
|
|
{
|
|
get { return !String.IsNullOrEmpty(AircraftName); }
|
|
}
|
|
|
|
public bool ElectricalMasterBatteryStatus { get; set; }
|
|
|
|
public bool AvionicsMasterSwitchStatus { get; set; }
|
|
|
|
public bool TrackIRStatus { get; set; }
|
|
|
|
public int CameraState { get; set; }
|
|
|
|
public bool PlaneInParkingSpot { get; set; }
|
|
|
|
public bool IsSimulatorStarted { get; set; }
|
|
|
|
public bool IsInCockpit { get; set; }
|
|
|
|
public IHudBarData HudBarData { get; set; }
|
|
|
|
[IgnorePropertyChanged]
|
|
internal ProfileData ProfileDataRef { get; set; }
|
|
|
|
public new void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
|
|
{
|
|
base.OnPropertyChanged(this, new PropertyChangedEventArgs(e.PropertyName));
|
|
|
|
// Automatic switching of active profile when SimConnect active aircraft change
|
|
if (e.PropertyName == "AircraftName")
|
|
ProfileDataRef.AutoSwitchProfile();
|
|
}
|
|
|
|
public void Reset()
|
|
{
|
|
Setup();
|
|
}
|
|
|
|
private void Setup()
|
|
{
|
|
AircraftName = null;
|
|
ElectricalMasterBatteryStatus = false;
|
|
AvionicsMasterSwitchStatus = false;
|
|
TrackIRStatus = false;
|
|
IsInCockpit = false;
|
|
PlaneInParkingSpot = false;
|
|
CameraState = -1;
|
|
IsSimulatorStarted = false;
|
|
}
|
|
}
|
|
}
|