示例#1
0
文件: SubMenu.cs 项目: CAHbl4/csharp
 public void SelectPrev()
 {
     if (_selected != null)
         _selected = _items.FirstOrDefault() != _selected
             ? _items[_items.FindIndex(x => x == _selected) - 1]
             : null;
 }
示例#2
0
文件: SubMenu.cs 项目: CAHbl4/csharp
 public void SelectNext()
 {
     if (_items.LastOrDefault() != _selected)
         _selected = _items[_items.FindIndex(x => x == _selected) + 1];
 }
示例#3
0
文件: SubMenu.cs 项目: CAHbl4/csharp
 public void Deselect()
 {
     _selected = null;
 }
示例#4
0
文件: SubMenu.cs 项目: CAHbl4/csharp
 public void Reset()
 {
     _selected = null;
 }
示例#5
0
文件: SubMenu.cs 项目: CAHbl4/csharp
 public void AddItem(MenuItem item)
 {
     _items.Add(item);
 }