예제 #1
0
        /*
         * // ToDo: Not implemented in SystemConfigurator.
         * private async void OnCheckForUpdates(object sender, RoutedEventArgs e)
         * {
         *  bool updatesAvailable = await deviceManagementClient.CheckForUpdatesAsync();
         *  if (updatesAvailable)
         *  {
         *      System.Diagnostics.Debug.WriteLine("updates available");
         *      var dlg = new UserDialog("Updates available. Install?");
         *      await dlg.ShowAsync();
         *      // Don't do anything yet
         *  }
         * }
         */
        private async void RestartSystem()
        {
            bool success = true;

            try
            {
                await deviceManagementClient.RebootAsync();
            }
            catch (Exception)
            {
                success = false;
            }

            StatusText.Text = success?  "Operation completed" : "Operation  failed";
        }