Esempio n. 1
0
 public void addSubMenu(MenuItem item, int id)
 {
     int temp = id / 10;
     m_menuList.Add(id, item);
     m_subMenuCount[temp]++;
 }
Esempio n. 2
0
 public void addMenu(MenuItem item, int id)
 {
     m_menuList.Add(id, item);
     m_menuCount++;
 }
Esempio n. 3
0
 public void SelectPrev()
 {
     if (_selected != null)
         _selected = _items.FirstOrDefault() != _selected
             ? _items[_items.FindIndex(x => x == _selected) - 1]
             : null;
 }
Esempio n. 4
0
 public void SelectNext()
 {
     if (_items.LastOrDefault() != _selected)
         _selected = _items[_items.FindIndex(x => x == _selected) + 1];
 }
Esempio n. 5
0
 public void ResetSelected()
 {
     _selected = null;
 }
Esempio n. 6
0
 public SubMenu(string text = "")
 {
     _items = new List<MenuItem>();
     Text = text;
     _selected = null;
 }