public void Restart() { if (OculusUtil.IsElevated) { Stop(); Start(); } else { _temporaryStatus = ServiceControllerStatus.StartPending; OculusUtil.ElevateMe(RestartCommand, true); _temporaryStatus = null; } }
public void Stop() { if (OculusUtil.IsElevated) { _service.Stop(); _service.WaitForStatus(ServiceControllerStatus.Stopped); } else { _temporaryStatus = ServiceControllerStatus.StopPending; OculusUtil.ElevateMe(StopCommand, true); _temporaryStatus = null; } }