mirror of
https://github.com/hawkeye-stan/msfs-popout-panel-manager.git
synced 2024-11-24 23:00:12 +00:00
38 lines
1,009 B
C#
38 lines
1,009 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);
|
|
}
|
|
}
|