1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-22 05:40:11 +00:00
msfs-popout-panel-manager/MainApp/ViewModel/BaseViewModel.cs
2024-07-27 20:12:07 -04:00

45 lines
1.3 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;
}
}
}