private void startMachineController() { _mc = new DefaultMachineController(configureVBoxWrapper()); _mc.AnnounceRemainingTime += new EventHandler <MachineController.AnnounceRemainingTimeEventArgs>(requestAdditionalTime); try { _mc.Start(); } finally { _mc.AnnounceRemainingTime -= requestAdditionalTime; } }
private void requestAdditionalTime(object sender, MachineController.AnnounceRemainingTimeEventArgs args) { this.RequestAdditionalTime((int)args.RemainingTime.TotalMilliseconds); }
private void requestPreshutdownTime(object sender, MachineController.AnnounceRemainingTimeEventArgs args) { _preShutdownEnabler.RequestAdditionalTime((int)args.RemainingTime.TotalMilliseconds); }
private void startMachineController() { _mc = new DefaultMachineController(configureVBoxWrapper()); _mc.AnnounceRemainingTime += new EventHandler<MachineController.AnnounceRemainingTimeEventArgs>(requestAdditionalTime); try { _mc.Start(); } finally { _mc.AnnounceRemainingTime -= requestAdditionalTime; } }