mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-24 14:50:10 +00:00
38 lines
1,007 B
C#
38 lines
1,007 B
C#
using System;
|
|
using MSFSPopoutPanelManager.Shared;
|
|
using Newtonsoft.Json;
|
|
|
|
namespace MSFSPopoutPanelManager.DomainModel.Profile
|
|
{
|
|
public class FloatingPanel : ObservableObject
|
|
{
|
|
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;
|
|
}
|
|
|
|
public bool IsEnabled { get; set; }
|
|
|
|
public string KeyboardBinding { get; set; }
|
|
|
|
public bool IsHiddenOnStart { get; set; }
|
|
|
|
[JsonIgnore]
|
|
public bool IsDetectingKeystroke { get; set; }
|
|
|
|
|
|
[JsonIgnore]
|
|
public bool HasKeyboardBinding => !string.IsNullOrEmpty(KeyboardBinding);
|
|
}
|
|
}
|