1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-28 00:30:09 +00:00
msfs-popout-panel-manager/MainApp/ViewModel/BaseViewModel.cs
2024-02-27 21:44:21 -05:00

58 lines
1.5 KiB
C#

using System;
using System.Windows;
using MSFSPopoutPanelManager.DomainModel.Profile;
using MSFSPopoutPanelManager.Orchestration;
using MSFSPopoutPanelManager.Shared;
namespace MSFSPopoutPanelManager.MainApp.ViewModel
{
public abstract class BaseViewModel : ObservableObject
{
private SharedStorage SharedStorage { get; }
protected const string ROOT_DIALOG_HOST = "RootDialog";
protected BaseViewModel(SharedStorage sharedStorage)
{
SharedStorage = sharedStorage;
InitializeChildPropertyChangeBinding();
}
public AppSettingData AppSettingData => SharedStorage.AppSettingData;
public ProfileData ProfileData
{
get => SharedStorage.ProfileData;
set => SharedStorage.ProfileData = value;
}
public FlightSimData FlightSimData => SharedStorage.FlightSimData;
public UserProfile ActiveProfile => SharedStorage.ProfileData.ActiveProfile;
public IntPtr ApplicationHandle
{
get => SharedStorage.ApplicationHandle;
set => SharedStorage.ApplicationHandle = value;
}
public Window ApplicationWindow
{
get => SharedStorage.ApplicationWindow;
set => SharedStorage.ApplicationWindow = value;
}
public bool LocalCompileOnly
{
get
{
#if LOCAL
return true;
#endif
return false;
}
}
}
}