From 6997d3a5f5774d662cd4580696f8c58176b50919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Fri, 31 Jul 2020 22:17:10 +0200 Subject: [PATCH] SEBWIN-405: Implemented mobile versions for exam selection and server failure dialog. --- .../Operations/ServerOperation.cs | 4 - ...afeExamBrowser.UserInterface.Mobile.csproj | 14 +++ .../UserInterfaceFactory.cs | 6 +- .../Windows/ExamSelectionDialog.xaml | 61 +++++++++ .../Windows/ExamSelectionDialog.xaml.cs | 111 ++++++++++++++++ .../Windows/ServerFailureDialog.xaml | 45 +++++++ .../Windows/ServerFailureDialog.xaml.cs | 119 ++++++++++++++++++ 7 files changed, 352 insertions(+), 8 deletions(-) create mode 100644 SafeExamBrowser.UserInterface.Mobile/Windows/ExamSelectionDialog.xaml create mode 100644 SafeExamBrowser.UserInterface.Mobile/Windows/ExamSelectionDialog.xaml.cs create mode 100644 SafeExamBrowser.UserInterface.Mobile/Windows/ServerFailureDialog.xaml create mode 100644 SafeExamBrowser.UserInterface.Mobile/Windows/ServerFailureDialog.xaml.cs diff --git a/SafeExamBrowser.Client/Operations/ServerOperation.cs b/SafeExamBrowser.Client/Operations/ServerOperation.cs index 69a07108..f90d6bdf 100644 --- a/SafeExamBrowser.Client/Operations/ServerOperation.cs +++ b/SafeExamBrowser.Client/Operations/ServerOperation.cs @@ -54,8 +54,6 @@ namespace SafeExamBrowser.Client.Operations Context.AppConfig.ServerExamId, Context.AppConfig.ServerOauth2Token, Context.Settings.Server); - - // TODO: Add action center and taskbar notifications } return result; @@ -70,8 +68,6 @@ namespace SafeExamBrowser.Client.Operations logger.Info("Finalizing server..."); StatusChanged?.Invoke(TextKey.OperationStatus_FinalizeServer); - // TODO: Stop action center and taskbar notifications - server.StopConnectivity(); } diff --git a/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj b/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj index 08067dd3..606a9ce4 100644 --- a/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj +++ b/SafeExamBrowser.UserInterface.Mobile/SafeExamBrowser.UserInterface.Mobile.csproj @@ -149,6 +149,9 @@ WindowControl.xaml + + ExamSelectionDialog.xaml + FileSystemDialog.xaml @@ -172,6 +175,9 @@ RuntimeWindow.xaml + + ServerFailureDialog.xaml + SplashScreen.xaml @@ -374,6 +380,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -474,6 +484,10 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + MSBuild:Compile Designer diff --git a/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs b/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs index 6c09dd43..4535b2c9 100644 --- a/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs +++ b/SafeExamBrowser.UserInterface.Mobile/UserInterfaceFactory.cs @@ -84,8 +84,7 @@ namespace SafeExamBrowser.UserInterface.Mobile public IExamSelectionDialog CreateExamSelectionDialog(IEnumerable exams) { - // TODO - throw new System.NotImplementedException(); + return Application.Current.Dispatcher.Invoke(() => new ExamSelectionDialog(exams, text)); } public ISystemControl CreateKeyboardLayoutControl(IKeyboard keyboard, Location location) @@ -170,8 +169,7 @@ namespace SafeExamBrowser.UserInterface.Mobile public IServerFailureDialog CreateServerFailureDialog(string info, bool showFallback) { - // TODO - throw new System.NotImplementedException(); + return Application.Current.Dispatcher.Invoke(() => new ServerFailureDialog(info, showFallback, text)); } public ISplashScreen CreateSplashScreen(AppConfig appConfig = null) diff --git a/SafeExamBrowser.UserInterface.Mobile/Windows/ExamSelectionDialog.xaml b/SafeExamBrowser.UserInterface.Mobile/Windows/ExamSelectionDialog.xaml new file mode 100644 index 00000000..f0742ecd --- /dev/null +++ b/SafeExamBrowser.UserInterface.Mobile/Windows/ExamSelectionDialog.xaml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +