1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-30 09:40:12 +00:00
msfs-popout-panel-manager/DomainModel/Profile/FloatingPanel.cs

39 lines
1,009 B
C#
Raw Normal View History

2024-03-05 03:01:13 +00:00
using System;
using MSFSPopoutPanelManager.Shared;
2024-03-01 11:28:09 +00:00
using Newtonsoft.Json;
2024-02-29 06:11:56 +00:00
namespace MSFSPopoutPanelManager.DomainModel.Profile
{
public class FloatingPanel : ObservableObject
{
2024-03-05 03:01:13 +00:00
public FloatingPanel()
{
PropertyChanged += FloatingPanel_PropertyChanged; ;
}
private void FloatingPanel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
var arg = e as PropertyChangedExtendedEventArgs;
if (arg?.PropertyName != nameof(IsEnabled) || IsEnabled)
return;
KeyboardBinding = null;
IsHiddenOnStart = false;
}
2024-02-29 06:11:56 +00:00
public bool IsEnabled { get; set; }
2024-03-03 05:02:21 +00:00
public string KeyboardBinding { get; set; }
2024-03-01 11:28:09 +00:00
2024-03-05 03:01:13 +00:00
public bool IsHiddenOnStart { get; set; }
2024-03-01 11:28:09 +00:00
[JsonIgnore]
public bool IsDetectingKeystroke { get; set; }
2024-03-05 03:01:13 +00:00
[JsonIgnore]
public bool HasKeyboardBinding => !string.IsNullOrEmpty(KeyboardBinding);
2024-02-29 06:11:56 +00:00
}
}