diff --git a/SafeExamBrowser.Client/Notifications/AboutNotification.cs b/SafeExamBrowser.Client/Notifications/AboutNotification.cs
index 450820ba..11490edf 100644
--- a/SafeExamBrowser.Client/Notifications/AboutNotification.cs
+++ b/SafeExamBrowser.Client/Notifications/AboutNotification.cs
@@ -24,6 +24,7 @@ namespace SafeExamBrowser.Client.Notifications
private IWindow window;
+ public bool CanActivate { get; }
public string Tooltip { get; }
public IconResource IconResource { get; }
@@ -34,6 +35,7 @@ namespace SafeExamBrowser.Client.Notifications
this.appConfig = appConfig;
this.uiFactory = uiFactory;
+ CanActivate = true;
IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/AboutNotification.xaml") };
Tooltip = text.Get(TextKey.Notification_AboutTooltip);
}
diff --git a/SafeExamBrowser.Client/Notifications/LogNotification.cs b/SafeExamBrowser.Client/Notifications/LogNotification.cs
index 9864f9cd..3a3c37a2 100644
--- a/SafeExamBrowser.Client/Notifications/LogNotification.cs
+++ b/SafeExamBrowser.Client/Notifications/LogNotification.cs
@@ -24,6 +24,7 @@ namespace SafeExamBrowser.Client.Notifications
private IWindow window;
+ public bool CanActivate { get; }
public string Tooltip { get; }
public IconResource IconResource { get; }
@@ -34,6 +35,7 @@ namespace SafeExamBrowser.Client.Notifications
this.logger = logger;
this.uiFactory = uiFactory;
+ CanActivate = true;
IconResource = new BitmapIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/LogNotification.ico") };
Tooltip = text.Get(TextKey.Notification_LogTooltip);
}
diff --git a/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs b/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs
index 1afb16d0..592086f3 100644
--- a/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs
+++ b/SafeExamBrowser.Core.Contracts/Notifications/INotification.cs
@@ -17,15 +17,20 @@ namespace SafeExamBrowser.Core.Contracts.Notifications
public interface INotification
{
///
- /// The tooltip for the notification.
+ /// Determines whether the notification can be activated.
///
- string Tooltip { get; }
+ bool CanActivate { get; }
///
/// The resource providing the notification icon.
///
IconResource IconResource { get; }
+ ///
+ /// The tooltip for the notification.
+ ///
+ string Tooltip { get; }
+
///
/// Event fired when the notification has changed.
///
@@ -35,7 +40,7 @@ namespace SafeExamBrowser.Core.Contracts.Notifications
/// Executes the notification functionality.
///
void Activate();
-
+
///
/// Terminates the notification functionality and release all used resources.
///
diff --git a/SafeExamBrowser.Proctoring/JitsiMeet/JitsiMeetImplementation.cs b/SafeExamBrowser.Proctoring/JitsiMeet/JitsiMeetImplementation.cs
index 83984a88..4bc3f8f5 100644
--- a/SafeExamBrowser.Proctoring/JitsiMeet/JitsiMeetImplementation.cs
+++ b/SafeExamBrowser.Proctoring/JitsiMeet/JitsiMeetImplementation.cs
@@ -245,15 +245,19 @@ namespace SafeExamBrowser.Proctoring.JitsiMeet
private void ShowNotificationActive()
{
- IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/ProctoringNotification_Active.xaml") };
+ CanActivate = true;
+ IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Proctoring_Active.xaml") };
Tooltip = text.Get(TextKey.Notification_ProctoringActiveTooltip);
+
NotificationChanged?.Invoke();
}
private void ShowNotificationInactive()
{
- IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/ProctoringNotification_Inactive.xaml") };
+ CanActivate = false;
+ IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/Proctoring_Inactive.xaml") };
Tooltip = text.Get(TextKey.Notification_ProctoringInactiveTooltip);
+
NotificationChanged?.Invoke();
}
}
diff --git a/SafeExamBrowser.Proctoring/ProctoringImplementation.cs b/SafeExamBrowser.Proctoring/ProctoringImplementation.cs
index 9252c3aa..48e1e7eb 100644
--- a/SafeExamBrowser.Proctoring/ProctoringImplementation.cs
+++ b/SafeExamBrowser.Proctoring/ProctoringImplementation.cs
@@ -17,6 +17,7 @@ namespace SafeExamBrowser.Proctoring
{
internal abstract string Name { get; }
+ public bool CanActivate { get; protected set; }
public string Tooltip { get; protected set; }
public IconResource IconResource { get; protected set; }
diff --git a/SafeExamBrowser.Proctoring/ScreenProctoring/ScreenProctoringImplementation.cs b/SafeExamBrowser.Proctoring/ScreenProctoring/ScreenProctoringImplementation.cs
index b10cdbe7..f09e86a1 100644
--- a/SafeExamBrowser.Proctoring/ScreenProctoring/ScreenProctoringImplementation.cs
+++ b/SafeExamBrowser.Proctoring/ScreenProctoring/ScreenProctoringImplementation.cs
@@ -176,18 +176,16 @@ namespace SafeExamBrowser.Proctoring.ScreenProctoring
private void UpdateNotification(bool live)
{
- // TODO: Replace with actual icon!
- // TODO: Extend INotification with IsEnabled or CanActivate!
- // TODO: Service health, HD space and caching indicators!
+ CanActivate = false;
if (live)
{
- IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/ProctoringNotification_Active.xaml") };
+ IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/ScreenProctoring_Active.xaml") };
Tooltip = text.Get(TextKey.Notification_ProctoringActiveTooltip);
}
else
{
- IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/ProctoringNotification_Inactive.xaml") };
+ IconResource = new XamlIconResource { Uri = new Uri("pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/ScreenProctoring_Inactive.xaml") };
Tooltip = text.Get(TextKey.Notification_ProctoringInactiveTooltip);
}
diff --git a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml
index 1d8cfcc4..345223d6 100644
--- a/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml
+++ b/SafeExamBrowser.UserInterface.Desktop/Controls/ActionCenter/NotificationButton.xaml
@@ -14,7 +14,7 @@
-