SEBWIN-104: Made about notification configurable and removed it and log notification from taskbar by default.

This commit is contained in:
dbuechel 2019-05-08 10:12:22 +02:00
parent 137b463044
commit 305110f239
5 changed files with 27 additions and 7 deletions

View file

@ -146,8 +146,10 @@ namespace SafeExamBrowser.Client.UnitTests.Operations
public void Perform_MustInitializeNotifications()
{
actionCenterSettings.EnableActionCenter = true;
actionCenterSettings.ShowApplicationInfo = true;
actionCenterSettings.ShowApplicationLog = true;
taskbarSettings.EnableTaskbar = true;
taskbarSettings.ShowApplicationInfo = true;
taskbarSettings.ShowApplicationLog = true;
sut.Perform();

View file

@ -169,18 +169,24 @@ namespace SafeExamBrowser.Client.Operations
private void InitializeAboutNotificationForActionCenter()
{
var notification = uiFactory.CreateNotificationControl(aboutInfo, Location.ActionCenter);
if (actionCenterSettings.ShowApplicationInfo)
{
var notification = uiFactory.CreateNotificationControl(aboutInfo, Location.ActionCenter);
aboutController.RegisterNotification(notification);
actionCenter.AddNotificationControl(notification);
aboutController.RegisterNotification(notification);
actionCenter.AddNotificationControl(notification);
}
}
private void InitializeAboutNotificationForTaskbar()
{
var notification = uiFactory.CreateNotificationControl(aboutInfo, Location.Taskbar);
if (taskbarSettings.ShowApplicationInfo)
{
var notification = uiFactory.CreateNotificationControl(aboutInfo, Location.Taskbar);
aboutController.RegisterNotification(notification);
taskbar.AddNotificationControl(notification);
aboutController.RegisterNotification(notification);
taskbar.AddNotificationControl(notification);
}
}
private void InitializeClockForActionCenter()

View file

@ -89,6 +89,7 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
var settings = new Settings();
settings.ActionCenter.EnableActionCenter = true;
settings.ActionCenter.ShowApplicationInfo = true;
settings.ActionCenter.ShowApplicationLog = false;
settings.ActionCenter.ShowKeyboardLayout = true;
settings.ActionCenter.ShowWirelessNetwork = false;
@ -142,10 +143,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
settings.ServicePolicy = ServicePolicy.Optional;
settings.Taskbar.EnableTaskbar = true;
settings.Taskbar.ShowApplicationInfo = false;
settings.Taskbar.ShowApplicationLog = false;
settings.Taskbar.ShowKeyboardLayout = true;
settings.Taskbar.ShowWirelessNetwork = false;
settings.Taskbar.EnableTaskbar = true;
settings.Taskbar.ShowClock = true;
settings.UserInterfaceMode = UserInterfaceMode.Desktop;

View file

@ -21,6 +21,11 @@ namespace SafeExamBrowser.Contracts.Configuration.Settings
/// </summary>
public bool EnableActionCenter { get; set; }
/// <summary>
/// Determines whether the about window is accessible via the action center.
/// </summary>
public bool ShowApplicationInfo { get; set; }
/// <summary>
/// Determines whether the application log is accessible via the action center.
/// </summary>

View file

@ -21,6 +21,11 @@ namespace SafeExamBrowser.Contracts.Configuration.Settings
/// </summary>
public bool EnableTaskbar { get; set; }
/// <summary>
/// Determines whether the about window is accessible via the taskbar.
/// </summary>
public bool ShowApplicationInfo { get; set; }
/// <summary>
/// Determines whether the application log is accessible via the taskbar.
/// </summary>