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