mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-22 05:40:11 +00:00
45 lines
1.3 KiB
C#
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;
|
|
}
|
|
}
|
|
}
|