2024-07-28 00:12:07 +00:00
|
|
|
|
using System;
|
|
|
|
|
using MSFSPopoutPanelManager.Shared;
|
2023-07-12 22:41:31 +00:00
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace MSFSPopoutPanelManager.DomainModel.Setting
|
|
|
|
|
{
|
|
|
|
|
public class GeneralSetting : ObservableObject
|
|
|
|
|
{
|
|
|
|
|
public GeneralSetting()
|
|
|
|
|
{
|
|
|
|
|
InitializeChildPropertyChangeBinding();
|
2024-07-28 00:12:07 +00:00
|
|
|
|
|
|
|
|
|
PropertyChanged += (_, e) =>
|
|
|
|
|
{
|
|
|
|
|
if (e.PropertyName == "UseApplicationDataPath")
|
|
|
|
|
{
|
|
|
|
|
OnApplicationDataPathUpdated?.Invoke(this, UseApplicationDataPath);
|
|
|
|
|
ApplicationDataPath = FileIo.GetUserDataFilePath(UseApplicationDataPath);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ApplicationDataPath = FileIo.GetUserDataFilePath(UseApplicationDataPath);
|
2023-07-12 22:41:31 +00:00
|
|
|
|
}
|
|
|
|
|
|
2024-02-28 02:44:21 +00:00
|
|
|
|
public bool AlwaysOnTop { get; set; } = true;
|
2023-07-12 22:41:31 +00:00
|
|
|
|
|
2024-02-28 02:44:21 +00:00
|
|
|
|
public bool AutoClose { get; set; } = true;
|
2023-07-12 22:41:31 +00:00
|
|
|
|
|
2024-02-28 02:44:21 +00:00
|
|
|
|
public bool MinimizeToTray { get; set; } = false;
|
2023-07-12 22:41:31 +00:00
|
|
|
|
|
2024-02-28 02:44:21 +00:00
|
|
|
|
public bool StartMinimized { get; set; } = false;
|
2023-07-12 22:41:31 +00:00
|
|
|
|
|
2024-02-28 02:44:21 +00:00
|
|
|
|
public bool CheckForUpdate { get; set; } = true;
|
2023-07-12 22:41:31 +00:00
|
|
|
|
|
2024-02-28 02:44:21 +00:00
|
|
|
|
public bool TurboMode { get; set; } = false;
|
2023-09-29 06:15:02 +00:00
|
|
|
|
|
2024-07-28 00:12:07 +00:00
|
|
|
|
public bool UseApplicationDataPath { get; set; } = false;
|
|
|
|
|
|
2023-07-12 22:41:31 +00:00
|
|
|
|
[JsonIgnore, IgnorePropertyChanged]
|
|
|
|
|
public bool AutoStart
|
|
|
|
|
{
|
2024-02-28 02:44:21 +00:00
|
|
|
|
get => AppAutoStart.CheckIsAutoStart();
|
2023-07-12 22:41:31 +00:00
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
if (value)
|
|
|
|
|
AppAutoStart.Activate();
|
|
|
|
|
else
|
|
|
|
|
AppAutoStart.Deactivate();
|
|
|
|
|
}
|
|
|
|
|
}
|
2024-07-28 00:12:07 +00:00
|
|
|
|
|
|
|
|
|
[JsonIgnore]
|
|
|
|
|
public string ApplicationDataPath { get; set; }
|
|
|
|
|
|
|
|
|
|
public event EventHandler<bool> OnApplicationDataPathUpdated;
|
2023-07-12 22:41:31 +00:00
|
|
|
|
}
|
|
|
|
|
}
|