private static void RunCommand(string[] args) { if (args.Length < 2) { return; } var service = OculusUtil.FindOculusService(); if (service == null) { Error(Resources.Error_VR_Service_Not_Found); return; } var oculusService = new OculusService(service); switch (args[1].ToLowerInvariant()) { case OculusService.StartCommand: oculusService.Start(); break; case OculusService.StopCommand: oculusService.Stop(); break; case OculusService.RestartCommand: oculusService.Restart(); break; } }
private static void StartTrayIcon() { var service = OculusUtil.FindOculusService(); if (service == null) { Error(Resources.Error_VR_Service_Not_Found); return; } var clientPath = OculusUtil.GetOculusClientPath(); if (clientPath == null) { Error(Resources.Error_Oculus_Client_Not_Found); return; } using (new OculusTrayIcon(new OculusService(service), clientPath)) { Application.Run(); } }