예제 #1
0
 private void _systemEvents_SessionLogoff(object sender, EventArgs e)
 {
     if (!_appHost.IsRunningAsService)
     {
         _appHost.Shutdown();
     }
 }
예제 #2
0
 /// <summary>
 /// Posts the specified request.
 /// </summary>
 /// <param name="request">The request.</param>
 public void Post(ShutdownApplication request)
 {
     Task.Run(async() =>
     {
         await Task.Delay(100).ConfigureAwait(false);
         await _appHost.Shutdown().ConfigureAwait(false);
     });
 }
예제 #3
0
 /// <summary>
 /// Posts the specified request.
 /// </summary>
 /// <param name="request">The request.</param>
 public void Post(ShutdownApplication request)
 {
     Task.Run(async() =>
     {
         await Task.Delay(100);
         _appHost.Shutdown();
     });
 }
예제 #4
0
 public ActionResult ShutdownApplication()
 {
     Task.Run(async() =>
     {
         await Task.Delay(100).ConfigureAwait(false);
         await _appHost.Shutdown().ConfigureAwait(false);
     });
     return(NoContent());
 }
 void cmdExit_Click(object sender, EventArgs e)
 {
     _appHost.Shutdown();
 }
예제 #6
0
 private void _systemEvents_SystemShutdown(object sender, EventArgs e)
 {
     _appHost.Shutdown();
 }
예제 #7
0
 /// <summary>
 /// Handles the click event of the cmExit control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
 private async void cmExit_click(object sender, RoutedEventArgs e)
 {
     await _appHost.Shutdown().ConfigureAwait(false);
 }