1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-25 23:30:10 +00:00
msfs-popout-panel-manager/MainApp/ViewModel/BaseViewModel.cs

46 lines
1.3 KiB
C#
Raw Normal View History

2024-02-28 02:44:21 +00:00
using System;
using System.Windows;
using MSFSPopoutPanelManager.DomainModel.Profile;
using MSFSPopoutPanelManager.Orchestration;
2023-07-12 22:41:31 +00:00
using MSFSPopoutPanelManager.Shared;
namespace MSFSPopoutPanelManager.MainApp.ViewModel
{
public abstract class BaseViewModel : ObservableObject
{
2024-02-28 02:44:21 +00:00
private SharedStorage SharedStorage { get; }
2023-07-12 22:41:31 +00:00
2024-02-28 02:44:21 +00:00
protected const string ROOT_DIALOG_HOST = "RootDialog";
2023-07-12 22:41:31 +00:00
2024-02-28 02:44:21 +00:00
protected BaseViewModel(SharedStorage sharedStorage)
2023-07-12 22:41:31 +00:00
{
2024-02-28 02:44:21 +00:00
SharedStorage = sharedStorage;
InitializeChildPropertyChangeBinding();
}
2023-07-12 22:41:31 +00:00
2024-02-28 02:44:21 +00:00
public AppSettingData AppSettingData => SharedStorage.AppSettingData;
public ProfileData ProfileData
{
get => SharedStorage.ProfileData;
set => SharedStorage.ProfileData = value;
2023-07-12 22:41:31 +00:00
}
2024-02-28 02:44:21 +00:00
public FlightSimData FlightSimData => SharedStorage.FlightSimData;
2023-07-12 22:41:31 +00:00
2024-02-28 02:44:21 +00:00
public UserProfile ActiveProfile => SharedStorage.ProfileData.ActiveProfile;
2023-07-12 22:41:31 +00:00
2024-02-28 02:44:21 +00:00
public IntPtr ApplicationHandle
{
get => SharedStorage.ApplicationHandle;
set => SharedStorage.ApplicationHandle = value;
}
2023-07-12 22:41:31 +00:00
2024-02-28 02:44:21 +00:00
public Window ApplicationWindow
2023-07-12 22:41:31 +00:00
{
2024-02-28 02:44:21 +00:00
get => SharedStorage.ApplicationWindow;
set => SharedStorage.ApplicationWindow = value;
}
2023-07-12 22:41:31 +00:00
}
}