protected void ShowSettingsPage(string name, int id) { ViewController match = null; ViewController leftMatch = null; ViewController rightMatch = null; switch (name) { case "Changelog": match = _infoView; leftMatch = null; rightMatch = null; break; case "Clock": match = _clockSettingsInfoView; leftMatch = _clockSettingsPosColView; rightMatch = _clockSettingsFormatView; break; case "Timers": match = _timersSettingsInfoView; leftMatch = null; rightMatch = null; break; case "Breaktime": match = _breaktimeSettingsInfoView; leftMatch = _breaktimeSettingsGlobalView; rightMatch = _breaktimeSettingsProfileView; break; case "Volume": match = _volumeSettingsInfoView; leftMatch = null; rightMatch = null; break; case "Mini Settings": match = _miscSettingsInfoView; leftMatch = _extraTweaksSettingsView; rightMatch = null; break; } if (match != null && match != topViewController) { ViewController.AnimationType slide = _lastId > id ? ViewController.AnimationType.In : ViewController.AnimationType.Out; ReplaceTopViewController(match, animationType: slide, animationDirection: ViewController.AnimationDirection.Horizontal); SetLeftScreenViewController(leftMatch, ViewController.AnimationType.None); SetRightScreenViewController(rightMatch, ViewController.AnimationType.None); _lastId = id; } }
public static void ReplaceTopViewController(ViewController viewController, Action finishedCallback = null, ViewController.AnimationType animationType = ViewController.AnimationType.In, ViewController.AnimationDirection animationDirection = ViewController.AnimationDirection.Horizontal) { _flowCoordinator.InvokeMethod <object, MultiplayerModeSelectionFlowCoordinator>("ReplaceTopViewController", new object[] { viewController, finishedCallback, animationType, animationDirection }); }