private void BackCommand() { if (_activePanelView.ParentPanel == null) { return; //Already at root; } _activePanelView.ClearSelection(); _activePanelView.SetPanelVisibility(false); _activePanelView = _activePanelView.ParentPanel; _activePanelView.SelectNext(); }
private void SelectCommand() { if (_activePanelView.GetActiveAction() == null) { throw new WarningException("Select command was hit before an item has been selected."); } if (_activePanelView.GetActiveAction().ChildPanel == null) { Deactivate(); _statusesViewController.Activate(_activePanelView.GetActiveAction().Action); return; } _activePanelView = _activePanelView.GetActiveAction().ChildPanel; _activePanelView.SetPanelVisibility(true); _activePanelView.ParentPanel.ClearSelection(); if (_activePanelView.GetActiveAction() == null) { _activePanelView.SelectNext(); //Make sure we select the first item if nothing has been selected yet. } }
private void NextCommand() => _activePanelView?.SelectNext();