Beispiel #1
0
 private async void InitializeThings()
 {
     if (!BackendConctroller.Initialized)
     {
         try
         {
             await BackendConctroller.Initialize(Window.Current.Dispatcher, DatabaseAccessService.DatabaseFilePath);
         }
         catch (BackendControllerInitializationException exception)
         {
             var messageDialog = new MessageDialog("Error establishing connection with python: " + exception.Message);
             messageDialog.Commands.Add(new UICommand("Close"));
             messageDialog.DefaultCommandIndex = 0;
             messageDialog.CancelCommandIndex  = 0;
             await messageDialog.ShowAsync();
         }
     }
 }
Beispiel #2
0
 private void App_CloseRequested(object sender, SystemNavigationCloseRequestedPreviewEventArgs e)
 {
     BackendConctroller.SendCloseApp();
 }