1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2025-02-16 16:34:28 +01:00
msfs-popout-panel-manager/MainApp/ViewModel/BaseViewModel.cs

46 lines
1.3 KiB
C#
Raw Permalink Normal View History

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