mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-28 00:30:09 +00:00
58 lines
1.5 KiB
C#
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;
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|