public void ActivateView(MobileControlView nextView) { // Disable current view: MobileControlView curView = GetCurrentView(); if (curView != null) { curView.DisableView(); } // Enable the next one: nextView.EnableView(); }
public void ActivateNextView() { // Disable current view: MobileControlView curView = GetCurrentView(); curView.DisableView(); int curIndex = _viewList.IndexOf(curView); curIndex = (curIndex + 1) % _viewList.Count; // Enable the next one: MobileControlView nextView = _viewList[curIndex]; nextView.EnableView(); }
public void ActivatePreviousView() { // Disable current view: MobileControlView curView = GetCurrentView(); curView.DisableView(); int curIndex = _viewList.IndexOf(curView); curIndex--; if (curIndex < 0) { curIndex += _viewList.Count; } // Enable the next one: MobileControlView previousView = _viewList[curIndex]; previousView.EnableView(); }