| 1 | using System; |
| 2 | using System.Collections.Generic; |
| 3 | using System.Text; |
| 4 | |
| 5 | namespace CecConfigGui |
| 6 | { |
| 7 | class CecButtonConfigItem |
| 8 | { |
| 9 | public CecButtonConfigItem(string name, CecSharp.CecKeypress key, string playerButton) |
| 10 | { |
| 11 | CecButtonName = name; |
| 12 | Key = key; |
| 13 | PlayerButton = playerButton; |
| 14 | _enabled = false; |
| 15 | } |
| 16 | |
| 17 | public string PlayerButton { get; set; } |
| 18 | private bool _enabled; |
| 19 | |
| 20 | public bool Enabled |
| 21 | { |
| 22 | get |
| 23 | { |
| 24 | return _enabled || PlayerButton.Length > 0; |
| 25 | } |
| 26 | set |
| 27 | { |
| 28 | _enabled = value; |
| 29 | } |
| 30 | } |
| 31 | public string CecButtonName { get; private set; } |
| 32 | public CecSharp.CecKeypress Key { get; private set; } |
| 33 | } |
| 34 | |
| 35 | class CecButtonConfig : List<CecButtonConfigItem> |
| 36 | { |
| 37 | } |
| 38 | } |