SEBWIN-338: Introduced program build version.

This commit is contained in:
dbuechel 2019-08-13 10:02:05 +02:00
parent 6a1632ee48
commit b71529da31
19 changed files with 368 additions and 333 deletions

View file

@ -173,7 +173,7 @@ namespace SafeExamBrowser.Browser
private string InitializeUserAgent() private string InitializeUserAgent()
{ {
var osVersion = $"{Environment.OSVersion.Version.Major}.{Environment.OSVersion.Version.Minor}"; var osVersion = $"{Environment.OSVersion.Version.Major}.{Environment.OSVersion.Version.Minor}";
var sebVersion = $"SEB/{appConfig.ProgramVersion}"; var sebVersion = $"SEB/{appConfig.ProgramInformationalVersion}";
if (settings.UseCustomUserAgent) if (settings.UseCustomUserAgent)
{ {

View file

@ -48,7 +48,7 @@ namespace SafeExamBrowser.Browser.Handlers
var headers = new NameValueCollection(request.Headers); var headers = new NameValueCollection(request.Headers);
var userAgent = request.Headers["User-Agent"]; var userAgent = request.Headers["User-Agent"];
headers["User-Agent"] = $"{userAgent} SEB/{appConfig.ProgramVersion}"; headers["User-Agent"] = $"{userAgent} SEB/{appConfig.ProgramInformationalVersion}";
request.Headers = headers; request.Headers = headers;
} }

View file

@ -56,7 +56,7 @@ namespace SafeExamBrowser.Configuration.UnitTests
fileSaver.Setup(f => f.CanSave(It.IsAny<Uri>())).Returns<Uri>(u => u.IsFile); fileSaver.Setup(f => f.CanSave(It.IsAny<Uri>())).Returns<Uri>(u => u.IsFile);
networkLoader.Setup(n => n.CanLoad(It.IsAny<Uri>())).Returns<Uri>(u => u.Scheme.Equals("http") || u.Scheme.Equals("seb")); networkLoader.Setup(n => n.CanLoad(It.IsAny<Uri>())).Returns<Uri>(u => u.Scheme.Equals("http") || u.Scheme.Equals("seb"));
sut = new ConfigurationRepository(certificateStore.Object, hashAlgorithm.Object, logger.Object, executablePath, string.Empty, string.Empty, string.Empty); sut = new ConfigurationRepository(certificateStore.Object, hashAlgorithm.Object, logger.Object, executablePath, string.Empty, string.Empty, string.Empty, string.Empty);
sut.InitializeAppConfig(); sut.InitializeAppConfig();
} }

View file

@ -20,13 +20,20 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
private AppConfig appConfig; private AppConfig appConfig;
private string executablePath; private string executablePath;
private string programBuild;
private string programCopyright; private string programCopyright;
private string programTitle; private string programTitle;
private string programVersion; private string programVersion;
internal DataValues(string executablePath, string programCopyright, string programTitle, string programVersion) internal DataValues(
string executablePath,
string programBuild,
string programCopyright,
string programTitle,
string programVersion)
{ {
this.executablePath = executablePath ?? string.Empty; this.executablePath = executablePath ?? string.Empty;
this.programBuild = programBuild ?? string.Empty;
this.programCopyright = programCopyright ?? string.Empty; this.programCopyright = programCopyright ?? string.Empty;
this.programTitle = programTitle ?? string.Empty; this.programTitle = programTitle ?? string.Empty;
this.programVersion = programVersion ?? string.Empty; this.programVersion = programVersion ?? string.Empty;
@ -57,10 +64,11 @@ namespace SafeExamBrowser.Configuration.ConfigurationData
appConfig.ClientLogFilePath = Path.Combine(logFolder, $"{logFilePrefix}_Client.log"); appConfig.ClientLogFilePath = Path.Combine(logFolder, $"{logFilePrefix}_Client.log");
appConfig.ConfigurationFileExtension = ".seb"; appConfig.ConfigurationFileExtension = ".seb";
appConfig.DownloadDirectory = Path.Combine(appDataLocalFolder, "Downloads"); appConfig.DownloadDirectory = Path.Combine(appDataLocalFolder, "Downloads");
appConfig.ProgramBuildVersion = programBuild;
appConfig.ProgramCopyright = programCopyright; appConfig.ProgramCopyright = programCopyright;
appConfig.ProgramDataFilePath = Path.Combine(programDataFolder, DEFAULT_CONFIGURATION_NAME); appConfig.ProgramDataFilePath = Path.Combine(programDataFolder, DEFAULT_CONFIGURATION_NAME);
appConfig.ProgramTitle = programTitle; appConfig.ProgramTitle = programTitle;
appConfig.ProgramVersion = programVersion; appConfig.ProgramInformationalVersion = programVersion;
appConfig.RuntimeId = Guid.NewGuid(); appConfig.RuntimeId = Guid.NewGuid();
appConfig.RuntimeAddress = $"{AppConfig.BASE_ADDRESS}/runtime/{Guid.NewGuid()}"; appConfig.RuntimeAddress = $"{AppConfig.BASE_ADDRESS}/runtime/{Guid.NewGuid()}";
appConfig.RuntimeLogFilePath = Path.Combine(logFolder, $"{logFilePrefix}_Runtime.log"); appConfig.RuntimeLogFilePath = Path.Combine(logFolder, $"{logFilePrefix}_Runtime.log");

View file

@ -37,6 +37,7 @@ namespace SafeExamBrowser.Configuration
IHashAlgorithm hashAlgorithm, IHashAlgorithm hashAlgorithm,
IModuleLogger logger, IModuleLogger logger,
string executablePath, string executablePath,
string programBuild,
string programCopyright, string programCopyright,
string programTitle, string programTitle,
string programVersion) string programVersion)
@ -48,7 +49,7 @@ namespace SafeExamBrowser.Configuration
dataParsers = new List<IDataParser>(); dataParsers = new List<IDataParser>();
dataSerializers = new List<IDataSerializer>(); dataSerializers = new List<IDataSerializer>();
dataMapper = new DataMapper(); dataMapper = new DataMapper();
dataValues = new DataValues(executablePath, programCopyright, programTitle, programVersion); dataValues = new DataValues(executablePath, programBuild, programCopyright, programTitle, programVersion);
resourceLoaders = new List<IResourceLoader>(); resourceLoaders = new List<IResourceLoader>();
resourceSavers = new List<IResourceSaver>(); resourceSavers = new List<IResourceSaver>();
} }

View file

@ -97,7 +97,12 @@ namespace SafeExamBrowser.Contracts.Configuration
public string DownloadDirectory { get; set; } public string DownloadDirectory { get; set; }
/// <summary> /// <summary>
/// The copyright information for the application (i.e. the executing assembly). /// The build version of the application.
/// </summary>
public string ProgramBuildVersion { get; set; }
/// <summary>
/// The copyright information for the application.
/// </summary> /// </summary>
public string ProgramCopyright { get; set; } public string ProgramCopyright { get; set; }
@ -107,14 +112,14 @@ namespace SafeExamBrowser.Contracts.Configuration
public string ProgramDataFilePath { get; set; } public string ProgramDataFilePath { get; set; }
/// <summary> /// <summary>
/// The program title of the application (i.e. the executing assembly). /// The program title of the application.
/// </summary> /// </summary>
public string ProgramTitle { get; set; } public string ProgramTitle { get; set; }
/// <summary> /// <summary>
/// The program version of the application (i.e. the executing assembly). /// The informational version of the application.
/// </summary> /// </summary>
public string ProgramVersion { get; set; } public string ProgramInformationalVersion { get; set; }
/// <summary> /// <summary>
/// The communication address of the runtime component. /// The communication address of the runtime component.

View file

@ -16,6 +16,7 @@ namespace SafeExamBrowser.Contracts.I18n
{ {
BrowserWindow_DeveloperConsoleMenuItem, BrowserWindow_DeveloperConsoleMenuItem,
BrowserWindow_ZoomMenuItem, BrowserWindow_ZoomMenuItem,
Build,
LogWindow_Title, LogWindow_Title,
MessageBox_ApplicationError, MessageBox_ApplicationError,
MessageBox_ApplicationErrorTitle, MessageBox_ApplicationErrorTitle,

View file

@ -1,309 +1,312 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<Text> <Text>
<Entry key="BrowserWindow_DeveloperConsoleMenuItem"> <Entry key="BrowserWindow_DeveloperConsoleMenuItem">
Developer Console Developer Console
</Entry> </Entry>
<Entry key="BrowserWindow_ZoomMenuItem"> <Entry key="BrowserWindow_ZoomMenuItem">
Page Zoom Page Zoom
</Entry> </Entry>
<Entry key="LogWindow_Title"> <Entry key="Build">
Application Log Build
</Entry> </Entry>
<Entry key="MessageBox_ApplicationError"> <Entry key="LogWindow_Title">
An unrecoverable error has occurred! Please consult the application log for more information. The application will now shut down... Application Log
</Entry> </Entry>
<Entry key="MessageBox_ApplicationErrorTitle"> <Entry key="MessageBox_ApplicationError">
Application Error An unrecoverable error has occurred! Please consult the application log for more information. The application will now shut down...
</Entry> </Entry>
<Entry key="MessageBox_CancelButton"> <Entry key="MessageBox_ApplicationErrorTitle">
Cancel Application Error
</Entry> </Entry>
<Entry key="MessageBox_ClientConfigurationError"> <Entry key="MessageBox_CancelButton">
The local client configuration has failed! Please consult the application log for more information. The application will now shut down... Cancel
</Entry> </Entry>
<Entry key="MessageBox_ClientConfigurationErrorTitle"> <Entry key="MessageBox_ClientConfigurationError">
Client Configuration Error The local client configuration has failed! Please consult the application log for more information. The application will now shut down...
</Entry> </Entry>
<Entry key="MessageBox_ClientConfigurationQuestion"> <Entry key="MessageBox_ClientConfigurationErrorTitle">
The client configuration has been saved and will be used when you start the application the next time. Do you want to quit for now? Client Configuration Error
</Entry> </Entry>
<Entry key="MessageBox_ClientConfigurationQuestionTitle"> <Entry key="MessageBox_ClientConfigurationQuestion">
Configuration Successful The client configuration has been saved and will be used when you start the application the next time. Do you want to quit for now?
</Entry> </Entry>
<Entry key="MessageBox_ConfigurationDownloadError"> <Entry key="MessageBox_ClientConfigurationQuestionTitle">
Failed to download the new application configuration. Please try again or contact technical support. Configuration Successful
</Entry> </Entry>
<Entry key="MessageBox_ConfigurationDownloadErrorTitle"> <Entry key="MessageBox_ConfigurationDownloadError">
Download Error Failed to download the new application configuration. Please try again or contact technical support.
</Entry> </Entry>
<Entry key="MessageBox_InvalidConfigurationData"> <Entry key="MessageBox_ConfigurationDownloadErrorTitle">
The configuration resource "%%URI%%" contains invalid data! Download Error
</Entry> </Entry>
<Entry key="MessageBox_InvalidConfigurationDataTitle"> <Entry key="MessageBox_InvalidConfigurationData">
Configuration Error The configuration resource "%%URI%%" contains invalid data!
</Entry> </Entry>
<Entry key="MessageBox_InvalidPasswordError"> <Entry key="MessageBox_InvalidConfigurationDataTitle">
You failed to enter the correct password within 5 attempts. The application will now terminate... Configuration Error
</Entry> </Entry>
<Entry key="MessageBox_InvalidPasswordErrorTitle"> <Entry key="MessageBox_InvalidPasswordError">
Invalid Password You failed to enter the correct password within 5 attempts. The application will now terminate...
</Entry> </Entry>
<Entry key="MessageBox_InvalidQuitPassword"> <Entry key="MessageBox_InvalidPasswordErrorTitle">
The application can only be terminated by entering the correct quit password. Invalid Password
</Entry> </Entry>
<Entry key="MessageBox_InvalidQuitPasswordTitle"> <Entry key="MessageBox_InvalidQuitPassword">
Invalid Quit Password The application can only be terminated by entering the correct quit password.
</Entry> </Entry>
<Entry key="MessageBox_NoButton"> <Entry key="MessageBox_InvalidQuitPasswordTitle">
No Invalid Quit Password
</Entry> </Entry>
<Entry key="MessageBox_NotSupportedConfigurationResource"> <Entry key="MessageBox_NoButton">
The configuration resource "%%URI%%" is not supported! No
</Entry> </Entry>
<Entry key="MessageBox_NotSupportedConfigurationResourceTitle"> <Entry key="MessageBox_NotSupportedConfigurationResource">
Configuration Error The configuration resource "%%URI%%" is not supported!
</Entry> </Entry>
<Entry key="MessageBox_OkButton"> <Entry key="MessageBox_NotSupportedConfigurationResourceTitle">
OK Configuration Error
</Entry> </Entry>
<Entry key="MessageBox_Quit"> <Entry key="MessageBox_OkButton">
Do you want to quit the application? OK
</Entry> </Entry>
<Entry key="MessageBox_QuitTitle"> <Entry key="MessageBox_Quit">
Quit? Do you want to quit the application?
</Entry> </Entry>
<Entry key="MessageBox_QuitError"> <Entry key="MessageBox_QuitTitle">
The client failed to communicate the shutdown request to the runtime! Quit?
</Entry> </Entry>
<Entry key="MessageBox_QuitErrorTitle"> <Entry key="MessageBox_QuitError">
Quit Error The client failed to communicate the shutdown request to the runtime!
</Entry> </Entry>
<Entry key="MessageBox_ReconfigurationDenied"> <Entry key="MessageBox_QuitErrorTitle">
You are not allowed to reconfigure the application. Quit Error
</Entry> </Entry>
<Entry key="MessageBox_ReconfigurationDeniedTitle"> <Entry key="MessageBox_ReconfigurationDenied">
Reconfiguration Denied You are not allowed to reconfigure the application.
</Entry> </Entry>
<Entry key="MessageBox_ReconfigurationError"> <Entry key="MessageBox_ReconfigurationDeniedTitle">
The client failed to communicate the reconfiguration request to the runtime! Reconfiguration Denied
</Entry> </Entry>
<Entry key="MessageBox_ReconfigurationErrorTitle"> <Entry key="MessageBox_ReconfigurationError">
Reconfiguration Error The client failed to communicate the reconfiguration request to the runtime!
</Entry> </Entry>
<Entry key="MessageBox_ReconfigurationQuestion"> <Entry key="MessageBox_ReconfigurationErrorTitle">
Would you like to reconfigure the application? Reconfiguration Error
</Entry> </Entry>
<Entry key="MessageBox_ReconfigurationQuestionTitle"> <Entry key="MessageBox_ReconfigurationQuestion">
Configuration Detected Would you like to reconfigure the application?
</Entry> </Entry>
<Entry key="MessageBox_ReloadConfirmation"> <Entry key="MessageBox_ReconfigurationQuestionTitle">
Would you like to reload the current page? Configuration Detected
</Entry> </Entry>
<Entry key="MessageBox_ReloadConfirmationTitle"> <Entry key="MessageBox_ReloadConfirmation">
Reload? Would you like to reload the current page?
</Entry> </Entry>
<Entry key="MessageBox_ServiceUnavailableError"> <Entry key="MessageBox_ReloadConfirmationTitle">
Failed to initialize the SEB service! The application will now terminate since the service is configured to be mandatory. Reload?
</Entry> </Entry>
<Entry key="MessageBox_ServiceUnavailableErrorTitle"> <Entry key="MessageBox_ServiceUnavailableError">
Service Unavailable Failed to initialize the SEB service! The application will now terminate since the service is configured to be mandatory.
</Entry> </Entry>
<Entry key="MessageBox_ServiceUnavailableWarning"> <Entry key="MessageBox_ServiceUnavailableErrorTitle">
Failed to initialize the SEB service. The application will continue initialization since the service is configured to be optional. Service Unavailable
</Entry> </Entry>
<Entry key="MessageBox_ServiceUnavailableWarningTitle"> <Entry key="MessageBox_ServiceUnavailableWarning">
Service Unavailable Failed to initialize the SEB service. The application will continue initialization since the service is configured to be optional.
</Entry> </Entry>
<Entry key="MessageBox_SessionStartError"> <Entry key="MessageBox_ServiceUnavailableWarningTitle">
The application failed to start a new session! Please consult the application log for more information... Service Unavailable
</Entry> </Entry>
<Entry key="MessageBox_SessionStartErrorTitle"> <Entry key="MessageBox_SessionStartError">
Session Start Error The application failed to start a new session! Please consult the application log for more information...
</Entry> </Entry>
<Entry key="MessageBox_ShutdownError"> <Entry key="MessageBox_SessionStartErrorTitle">
An unexpected error occurred during the shutdown procedure! Please consult the application log for more information... Session Start Error
</Entry> </Entry>
<Entry key="MessageBox_ShutdownErrorTitle"> <Entry key="MessageBox_ShutdownError">
Shutdown Error An unexpected error occurred during the shutdown procedure! Please consult the application log for more information...
</Entry> </Entry>
<Entry key="MessageBox_StartupError"> <Entry key="MessageBox_ShutdownErrorTitle">
An unexpected error occurred during the startup procedure! Please consult the application log for more information... Shutdown Error
</Entry> </Entry>
<Entry key="MessageBox_StartupErrorTitle"> <Entry key="MessageBox_StartupError">
Startup Error An unexpected error occurred during the startup procedure! Please consult the application log for more information...
</Entry> </Entry>
<Entry key="MessageBox_UnexpectedConfigurationError"> <Entry key="MessageBox_StartupErrorTitle">
An unexpected error occurred while trying to load configuration resource "%%URI%%"! Please consult the application log for more information... Startup Error
</Entry> </Entry>
<Entry key="MessageBox_UnexpectedConfigurationErrorTitle"> <Entry key="MessageBox_UnexpectedConfigurationError">
Configuration Error An unexpected error occurred while trying to load configuration resource "%%URI%%"! Please consult the application log for more information...
</Entry> </Entry>
<Entry key="MessageBox_YesButton"> <Entry key="MessageBox_UnexpectedConfigurationErrorTitle">
Yes Configuration Error
</Entry> </Entry>
<Entry key="Notification_AboutTooltip"> <Entry key="MessageBox_YesButton">
Information about SEB Yes
</Entry> </Entry>
<Entry key="Notification_LogTooltip"> <Entry key="Notification_AboutTooltip">
Application Log Information about SEB
</Entry> </Entry>
<Entry key="OperationStatus_CloseRuntimeConnection"> <Entry key="Notification_LogTooltip">
Closing runtime connection Application Log
</Entry> </Entry>
<Entry key="OperationStatus_EmptyClipboard"> <Entry key="OperationStatus_CloseRuntimeConnection">
Emptying clipboard Closing runtime connection
</Entry> </Entry>
<Entry key="OperationStatus_FinalizeServiceSession"> <Entry key="OperationStatus_EmptyClipboard">
Finalizing service session Emptying clipboard
</Entry> </Entry>
<Entry key="OperationStatus_InitializeBrowser"> <Entry key="OperationStatus_FinalizeServiceSession">
Initializing browser Finalizing service session
</Entry> </Entry>
<Entry key="OperationStatus_InitializeConfiguration"> <Entry key="OperationStatus_InitializeBrowser">
Initializing application configuration Initializing browser
</Entry> </Entry>
<Entry key="OperationStatus_InitializeKioskMode"> <Entry key="OperationStatus_InitializeConfiguration">
Initializing kiosk mode Initializing application configuration
</Entry> </Entry>
<Entry key="OperationStatus_InitializeProcessMonitoring"> <Entry key="OperationStatus_InitializeKioskMode">
Initializing process monitoring Initializing kiosk mode
</Entry> </Entry>
<Entry key="OperationStatus_InitializeRuntimeConnection"> <Entry key="OperationStatus_InitializeProcessMonitoring">
Initializing runtime connection Initializing process monitoring
</Entry> </Entry>
<Entry key="OperationStatus_InitializeServiceSession"> <Entry key="OperationStatus_InitializeRuntimeConnection">
Initializing service session Initializing runtime connection
</Entry> </Entry>
<Entry key="OperationStatus_InitializeSession"> <Entry key="OperationStatus_InitializeServiceSession">
Initializing new session Initializing service session
</Entry> </Entry>
<Entry key="OperationStatus_InitializeShell"> <Entry key="OperationStatus_InitializeSession">
Initializing user interface Initializing new session
</Entry> </Entry>
<Entry key="OperationStatus_InitializeWindowMonitoring"> <Entry key="OperationStatus_InitializeShell">
Initializing window monitoring Initializing user interface
</Entry> </Entry>
<Entry key="OperationStatus_InitializeWorkingArea"> <Entry key="OperationStatus_InitializeWindowMonitoring">
Initializing working area Initializing window monitoring
</Entry> </Entry>
<Entry key="OperationStatus_RestartCommunicationHost"> <Entry key="OperationStatus_InitializeWorkingArea">
Restarting communication host Initializing working area
</Entry> </Entry>
<Entry key="OperationStatus_RestoreWorkingArea"> <Entry key="OperationStatus_RestartCommunicationHost">
Restoring working area Restarting communication host
</Entry> </Entry>
<Entry key="OperationStatus_RevertKioskMode"> <Entry key="OperationStatus_RestoreWorkingArea">
Reverting kiosk mode Restoring working area
</Entry> </Entry>
<Entry key="OperationStatus_StartClient"> <Entry key="OperationStatus_RevertKioskMode">
Starting client Reverting kiosk mode
</Entry> </Entry>
<Entry key="OperationStatus_StartCommunicationHost"> <Entry key="OperationStatus_StartClient">
Starting communication host Starting client
</Entry> </Entry>
<Entry key="OperationStatus_StartKeyboardInterception"> <Entry key="OperationStatus_StartCommunicationHost">
Starting keyboard interception Starting communication host
</Entry> </Entry>
<Entry key="OperationStatus_StartMouseInterception"> <Entry key="OperationStatus_StartKeyboardInterception">
Starting mouse interception Starting keyboard interception
</Entry> </Entry>
<Entry key="OperationStatus_StopClient"> <Entry key="OperationStatus_StartMouseInterception">
Stopping client Starting mouse interception
</Entry> </Entry>
<Entry key="OperationStatus_StopCommunicationHost"> <Entry key="OperationStatus_StopClient">
Stopping communication host Stopping client
</Entry> </Entry>
<Entry key="OperationStatus_StopKeyboardInterception"> <Entry key="OperationStatus_StopCommunicationHost">
Stopping keyboard interception Stopping communication host
</Entry> </Entry>
<Entry key="OperationStatus_StopMouseInterception"> <Entry key="OperationStatus_StopKeyboardInterception">
Stopping mouse interception Stopping keyboard interception
</Entry> </Entry>
<Entry key="OperationStatus_StopProcessMonitoring"> <Entry key="OperationStatus_StopMouseInterception">
Stopping process monitoring Stopping mouse interception
</Entry> </Entry>
<Entry key="OperationStatus_StopWindowMonitoring"> <Entry key="OperationStatus_StopProcessMonitoring">
Stopping window monitoring Stopping process monitoring
</Entry> </Entry>
<Entry key="OperationStatus_TerminateBrowser"> <Entry key="OperationStatus_StopWindowMonitoring">
Terminating browser Stopping window monitoring
</Entry> </Entry>
<Entry key="OperationStatus_TerminateShell"> <Entry key="OperationStatus_TerminateBrowser">
Terminating user interface Terminating browser
</Entry> </Entry>
<Entry key="OperationStatus_WaitExplorerStartup"> <Entry key="OperationStatus_TerminateShell">
Waiting for Windows explorer to start up Terminating user interface
</Entry> </Entry>
<Entry key="OperationStatus_WaitExplorerTermination"> <Entry key="OperationStatus_WaitExplorerStartup">
Waiting for Windows explorer to shut down Waiting for Windows explorer to start up
</Entry> </Entry>
<Entry key="OperationStatus_WaitRuntimeDisconnection"> <Entry key="OperationStatus_WaitExplorerTermination">
Waiting for the runtime to disconnect Waiting for Windows explorer to shut down
</Entry> </Entry>
<Entry key="PasswordDialog_Cancel"> <Entry key="OperationStatus_WaitRuntimeDisconnection">
Cancel Waiting for the runtime to disconnect
</Entry> </Entry>
<Entry key="PasswordDialog_Confirm"> <Entry key="PasswordDialog_Cancel">
Confirm Cancel
</Entry> </Entry>
<Entry key="PasswordDialog_LocalAdminPasswordRequired"> <Entry key="PasswordDialog_Confirm">
Please enter the administrator password for the local client configuration: Confirm
</Entry> </Entry>
<Entry key="PasswordDialog_LocalAdminPasswordRequiredTitle"> <Entry key="PasswordDialog_LocalAdminPasswordRequired">
Administrator Password Required Please enter the administrator password for the local client configuration:
</Entry> </Entry>
<Entry key="PasswordDialog_LocalSettingsPasswordRequired"> <Entry key="PasswordDialog_LocalAdminPasswordRequiredTitle">
Please enter the settings password for the local client configuration: Administrator Password Required
</Entry> </Entry>
<Entry key="PasswordDialog_LocalSettingsPasswordRequiredTitle"> <Entry key="PasswordDialog_LocalSettingsPasswordRequired">
Settings Password Required Please enter the settings password for the local client configuration:
</Entry> </Entry>
<Entry key="PasswordDialog_QuitPasswordRequired"> <Entry key="PasswordDialog_LocalSettingsPasswordRequiredTitle">
Please enter the quit password in order to terminate the application: Settings Password Required
</Entry> </Entry>
<Entry key="PasswordDialog_QuitPasswordRequiredTitle"> <Entry key="PasswordDialog_QuitPasswordRequired">
Quit Password Required Please enter the quit password in order to terminate the application:
</Entry> </Entry>
<Entry key="PasswordDialog_SettingsPasswordRequired"> <Entry key="PasswordDialog_QuitPasswordRequiredTitle">
Please enter the settings password for the selected application configuration: Quit Password Required
</Entry> </Entry>
<Entry key="PasswordDialog_SettingsPasswordRequiredTitle"> <Entry key="PasswordDialog_SettingsPasswordRequired">
Settings Password Required Please enter the settings password for the selected application configuration:
</Entry> </Entry>
<Entry key="RuntimeWindow_ApplicationRunning"> <Entry key="PasswordDialog_SettingsPasswordRequiredTitle">
The application is running. Settings Password Required
</Entry> </Entry>
<Entry key="Shell_QuitButton"> <Entry key="RuntimeWindow_ApplicationRunning">
Terminate Session The application is running.
</Entry> </Entry>
<Entry key="SystemControl_BatteryCharging"> <Entry key="Shell_QuitButton">
Plugged in, charging... (%%CHARGE%%%) Terminate Session
</Entry> </Entry>
<Entry key="SystemControl_BatteryCharged"> <Entry key="SystemControl_BatteryCharging">
Fully charged (%%CHARGE%%%) Plugged in, charging... (%%CHARGE%%%)
</Entry> </Entry>
<Entry key="SystemControl_BatteryChargeCriticalWarning"> <Entry key="SystemControl_BatteryCharged">
The battery charge is critically low. Please connect your computer to a power supply! Fully charged (%%CHARGE%%%)
</Entry> </Entry>
<Entry key="SystemControl_BatteryChargeLowInfo"> <Entry key="SystemControl_BatteryChargeCriticalWarning">
The battery charge is getting low. Consider connecting your computer to a power supply in time... The battery charge is critically low. Please connect your computer to a power supply!
</Entry> </Entry>
<Entry key="SystemControl_BatteryRemainingCharge"> <Entry key="SystemControl_BatteryChargeLowInfo">
%%HOURS%%h %%MINUTES%%min remaining (%%CHARGE%%%) The battery charge is getting low. Consider connecting your computer to a power supply in time...
</Entry> </Entry>
<Entry key="SystemControl_KeyboardLayoutTooltip"> <Entry key="SystemControl_BatteryRemainingCharge">
The current keyboard layout is "%%LAYOUT%%" %%HOURS%%h %%MINUTES%%min remaining (%%CHARGE%%%)
</Entry> </Entry>
<Entry key="SystemControl_WirelessConnected"> <Entry key="SystemControl_KeyboardLayoutTooltip">
Connected to "%%NAME%%" The current keyboard layout is "%%LAYOUT%%"
</Entry> </Entry>
<Entry key="SystemControl_WirelessDisconnected"> <Entry key="SystemControl_WirelessConnected">
Disconnected Connected to "%%NAME%%"
</Entry> </Entry>
<Entry key="SystemControl_WirelessNotAvailable"> <Entry key="SystemControl_WirelessDisconnected">
No wireless network adapter available or turned on Disconnected
</Entry> </Entry>
<Entry key="Version"> <Entry key="SystemControl_WirelessNotAvailable">
Version No wireless network adapter available or turned on
</Entry> </Entry>
<Entry key="Version">
Version
</Entry>
</Text> </Text>

View file

@ -8,6 +8,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using SafeExamBrowser.Communication.Hosts; using SafeExamBrowser.Communication.Hosts;
@ -106,7 +107,7 @@ namespace SafeExamBrowser.Runtime
internal void LogStartupInformation() internal void LogStartupInformation()
{ {
logger.Log($"/* {appConfig.ProgramTitle}, Version {appConfig.ProgramVersion}"); logger.Log($"/* {appConfig.ProgramTitle}, Version {appConfig.ProgramInformationalVersion}, Build {appConfig.ProgramBuildVersion}");
logger.Log($"/* {appConfig.ProgramCopyright}"); logger.Log($"/* {appConfig.ProgramCopyright}");
logger.Log($"/* "); logger.Log($"/* ");
logger.Log($"/* Please visit https://www.github.com/SafeExamBrowser for more information."); logger.Log($"/* Please visit https://www.github.com/SafeExamBrowser for more information.");
@ -125,6 +126,7 @@ namespace SafeExamBrowser.Runtime
private void InitializeConfiguration() private void InitializeConfiguration()
{ {
var executable = Assembly.GetExecutingAssembly(); var executable = Assembly.GetExecutingAssembly();
var programBuild = FileVersionInfo.GetVersionInfo(executable.Location).FileVersion;
var programCopyright = executable.GetCustomAttribute<AssemblyCopyrightAttribute>().Copyright; var programCopyright = executable.GetCustomAttribute<AssemblyCopyrightAttribute>().Copyright;
var programTitle = executable.GetCustomAttribute<AssemblyTitleAttribute>().Title; var programTitle = executable.GetCustomAttribute<AssemblyTitleAttribute>().Title;
var programVersion = executable.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion; var programVersion = executable.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
@ -143,6 +145,7 @@ namespace SafeExamBrowser.Runtime
new HashAlgorithm(), new HashAlgorithm(),
repositoryLogger, repositoryLogger,
executable.Location, executable.Location,
programBuild,
programCopyright, programCopyright,
programTitle, programTitle,
programVersion); programVersion);

View file

@ -17,7 +17,7 @@
<ColumnDefinition /> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.ColumnSpan="2" Source="pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/SplashScreen.png" Margin="0,5,0,0" /> <Image Grid.ColumnSpan="2" Source="pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/SplashScreen.png" Margin="0,5,0,0" />
<TextBlock x:Name="VersionInfo" Grid.Row="0" Grid.Column="1" Foreground="Gray" Margin="25,75,100,10" TextWrapping="Wrap" /> <TextBlock x:Name="VersionInfo" Grid.Row="0" Grid.Column="1" FontSize="10" Foreground="DimGray" Margin="25,70,100,10" TextWrapping="Wrap" />
<ScrollViewer Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto"> <ScrollViewer Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto">
<TextBlock x:Name="MainText" Margin="10" FontSize="10" TextWrapping="Wrap"> <TextBlock x:Name="MainText" Margin="10" FontSize="10" TextWrapping="Wrap">
This application is subject to the terms of the Mozilla Public License, version 2.0. If a copy of the MPL was not This application is subject to the terms of the Mozilla Public License, version 2.0. If a copy of the MPL was not

View file

@ -8,6 +8,7 @@
using System.Windows; using System.Windows;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Media;
using SafeExamBrowser.Contracts.Configuration; using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.I18n; using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.UserInterface.Windows; using SafeExamBrowser.Contracts.UserInterface.Windows;
@ -44,10 +45,12 @@ namespace SafeExamBrowser.UserInterface.Desktop
private void InitializeAboutWindow() private void InitializeAboutWindow()
{ {
Closing += (o, args) => closing?.Invoke(); Closing += (o, args) => closing?.Invoke();
VersionInfo.Inlines.Add(new Run($"{text.Get(TextKey.Version)} {appConfig.ProgramVersion}") { FontStyle = FontStyles.Italic }); VersionInfo.Inlines.Add(new Run($"{text.Get(TextKey.Version)} {appConfig.ProgramInformationalVersion}") { FontSize = 12 });
VersionInfo.Inlines.Add(new LineBreak());
VersionInfo.Inlines.Add(new Run($"{text.Get(TextKey.Build)} {appConfig.ProgramBuildVersion}") { FontSize = 8, Foreground = Brushes.Gray });
VersionInfo.Inlines.Add(new LineBreak()); VersionInfo.Inlines.Add(new LineBreak());
VersionInfo.Inlines.Add(new LineBreak()); VersionInfo.Inlines.Add(new LineBreak());
VersionInfo.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10 }); VersionInfo.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
} }
} }
} }

View file

@ -46,7 +46,7 @@
<ColumnDefinition Width="400" /> <ColumnDefinition Width="400" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Column="0" Grid.ColumnSpan="2" Margin="-25,0,0,0" Source="pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/SplashScreen.png" /> <Image Grid.Column="0" Grid.ColumnSpan="2" Margin="-25,0,0,0" Source="pack://application:,,,/SafeExamBrowser.UserInterface.Desktop;component/Images/SplashScreen.png" />
<TextBlock x:Name="InfoTextBlock" Grid.Column="1" Foreground="Gray" Margin="10,75,225,10" TextWrapping="Wrap" /> <TextBlock x:Name="InfoTextBlock" Grid.Column="1" FontSize="10" Foreground="DimGray" Margin="10,70,225,10" TextWrapping="Wrap" />
</Grid> </Grid>
<ProgressBar x:Name="ProgressBar" Grid.Row="1" Background="WhiteSmoke" BorderThickness="0" Foreground="DodgerBlue" <ProgressBar x:Name="ProgressBar" Grid.Row="1" Background="WhiteSmoke" BorderThickness="0" Foreground="DodgerBlue"
IsIndeterminate="{Binding IsIndeterminate}" Maximum="{Binding MaxProgress}" Value="{Binding CurrentProgress}" IsIndeterminate="{Binding IsIndeterminate}" Maximum="{Binding MaxProgress}" Value="{Binding CurrentProgress}"

View file

@ -8,6 +8,7 @@
using System.Windows; using System.Windows;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Media;
using SafeExamBrowser.Contracts.Configuration; using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.I18n; using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging; using SafeExamBrowser.Contracts.Logging;
@ -130,12 +131,14 @@ namespace SafeExamBrowser.UserInterface.Desktop
private void InitializeRuntimeWindow() private void InitializeRuntimeWindow()
{ {
Title = $"{appConfig.ProgramTitle} - Version {appConfig.ProgramVersion}"; Title = $"{appConfig.ProgramTitle} - Version {appConfig.ProgramInformationalVersion}";
InfoTextBlock.Inlines.Add(new Run($"Version {appConfig.ProgramVersion}") { FontStyle = FontStyles.Italic }); InfoTextBlock.Inlines.Add(new Run($"Version {appConfig.ProgramInformationalVersion}") { FontSize = 12 });
InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new Run($"Build {appConfig.ProgramBuildVersion}") { FontSize = 8, Foreground = Brushes.Gray });
InfoTextBlock.Inlines.Add(new LineBreak()); InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new LineBreak()); InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10 }); InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
model = new RuntimeWindowViewModel(LogTextBlock); model = new RuntimeWindowViewModel(LogTextBlock);
AnimatedBorder.DataContext = model; AnimatedBorder.DataContext = model;

View file

@ -8,6 +8,7 @@
using System.Windows; using System.Windows;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Media;
using SafeExamBrowser.Contracts.Configuration; using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.I18n; using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.UserInterface.Windows; using SafeExamBrowser.Contracts.UserInterface.Windows;
@ -122,7 +123,7 @@ namespace SafeExamBrowser.UserInterface.Desktop
{ {
if (appConfig != null) if (appConfig != null)
{ {
InfoTextBlock.Inlines.Add(new Run($"Version {appConfig.ProgramVersion}") { FontStyle = FontStyles.Italic }); InfoTextBlock.Inlines.Add(new Run($"Version {appConfig.ProgramInformationalVersion}") { Foreground = Brushes.DimGray });
InfoTextBlock.Inlines.Add(new LineBreak()); InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new LineBreak()); InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10 }); InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10 });

View file

@ -17,7 +17,7 @@
<ColumnDefinition /> <ColumnDefinition />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.ColumnSpan="2" Source="pack://application:,,,/SafeExamBrowser.UserInterface.Mobile;component/Images/SplashScreen.png" Margin="0,5,0,0" /> <Image Grid.ColumnSpan="2" Source="pack://application:,,,/SafeExamBrowser.UserInterface.Mobile;component/Images/SplashScreen.png" Margin="0,5,0,0" />
<TextBlock x:Name="VersionInfo" Grid.Row="0" Grid.Column="1" Foreground="Gray" Margin="25,75,100,10" TextWrapping="Wrap" /> <TextBlock x:Name="VersionInfo" Grid.Row="0" Grid.Column="1" FontSize="10" Foreground="DimGray" Margin="25,70,100,10" TextWrapping="Wrap" />
<ScrollViewer Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto"> <ScrollViewer Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" VerticalScrollBarVisibility="Auto">
<TextBlock x:Name="MainText" Margin="10" FontSize="10" TextWrapping="Wrap"> <TextBlock x:Name="MainText" Margin="10" FontSize="10" TextWrapping="Wrap">
This application is subject to the terms of the Mozilla Public License, version 2.0. If a copy of the MPL was not This application is subject to the terms of the Mozilla Public License, version 2.0. If a copy of the MPL was not

View file

@ -8,6 +8,7 @@
using System.Windows; using System.Windows;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Media;
using SafeExamBrowser.Contracts.Configuration; using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.I18n; using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.UserInterface.Windows; using SafeExamBrowser.Contracts.UserInterface.Windows;
@ -44,10 +45,12 @@ namespace SafeExamBrowser.UserInterface.Mobile
private void InitializeAboutWindow() private void InitializeAboutWindow()
{ {
Closing += (o, args) => closing?.Invoke(); Closing += (o, args) => closing?.Invoke();
VersionInfo.Inlines.Add(new Run($"{text.Get(TextKey.Version)} {appConfig.ProgramVersion}") { FontStyle = FontStyles.Italic }); VersionInfo.Inlines.Add(new Run($"{text.Get(TextKey.Version)} {appConfig.ProgramInformationalVersion}") { FontSize = 12 });
VersionInfo.Inlines.Add(new LineBreak());
VersionInfo.Inlines.Add(new Run($"{text.Get(TextKey.Build)} {appConfig.ProgramBuildVersion}") { FontSize = 8, Foreground = Brushes.Gray });
VersionInfo.Inlines.Add(new LineBreak()); VersionInfo.Inlines.Add(new LineBreak());
VersionInfo.Inlines.Add(new LineBreak()); VersionInfo.Inlines.Add(new LineBreak());
VersionInfo.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10 }); VersionInfo.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
} }
} }
} }

View file

@ -46,7 +46,7 @@
<ColumnDefinition Width="400" /> <ColumnDefinition Width="400" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Column="0" Grid.ColumnSpan="2" Margin="-25,0,0,0" Source="pack://application:,,,/SafeExamBrowser.UserInterface.Mobile;component/Images/SplashScreen.png" /> <Image Grid.Column="0" Grid.ColumnSpan="2" Margin="-25,0,0,0" Source="pack://application:,,,/SafeExamBrowser.UserInterface.Mobile;component/Images/SplashScreen.png" />
<TextBlock x:Name="InfoTextBlock" Grid.Column="1" Foreground="Gray" Margin="10,75,225,10" TextWrapping="Wrap" /> <TextBlock x:Name="InfoTextBlock" Grid.Column="1" FontSize="10" Foreground="DimGray" Margin="10,70,225,10" TextWrapping="Wrap" />
</Grid> </Grid>
<ProgressBar x:Name="ProgressBar" Grid.Row="1" Background="WhiteSmoke" BorderThickness="0" Foreground="DodgerBlue" <ProgressBar x:Name="ProgressBar" Grid.Row="1" Background="WhiteSmoke" BorderThickness="0" Foreground="DodgerBlue"
IsIndeterminate="{Binding IsIndeterminate}" Maximum="{Binding MaxProgress}" Value="{Binding CurrentProgress}" IsIndeterminate="{Binding IsIndeterminate}" Maximum="{Binding MaxProgress}" Value="{Binding CurrentProgress}"

View file

@ -8,6 +8,7 @@
using System.Windows; using System.Windows;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Media;
using SafeExamBrowser.Contracts.Configuration; using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.I18n; using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.Logging; using SafeExamBrowser.Contracts.Logging;
@ -130,12 +131,14 @@ namespace SafeExamBrowser.UserInterface.Mobile
private void InitializeRuntimeWindow() private void InitializeRuntimeWindow()
{ {
Title = $"{appConfig.ProgramTitle} - Version {appConfig.ProgramVersion}"; Title = $"{appConfig.ProgramTitle} - Version {appConfig.ProgramInformationalVersion}";
InfoTextBlock.Inlines.Add(new Run($"Version {appConfig.ProgramVersion}") { FontStyle = FontStyles.Italic }); InfoTextBlock.Inlines.Add(new Run($"Version {appConfig.ProgramInformationalVersion}") { FontSize = 12 });
InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new Run($"Build {appConfig.ProgramBuildVersion}") { FontSize = 8, Foreground = Brushes.Gray });
InfoTextBlock.Inlines.Add(new LineBreak()); InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new LineBreak()); InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10 }); InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 10, Foreground = Brushes.Gray });
model = new RuntimeWindowViewModel(LogTextBlock); model = new RuntimeWindowViewModel(LogTextBlock);
AnimatedBorder.DataContext = model; AnimatedBorder.DataContext = model;

View file

@ -8,6 +8,7 @@
using System.Windows; using System.Windows;
using System.Windows.Documents; using System.Windows.Documents;
using System.Windows.Media;
using SafeExamBrowser.Contracts.Configuration; using SafeExamBrowser.Contracts.Configuration;
using SafeExamBrowser.Contracts.I18n; using SafeExamBrowser.Contracts.I18n;
using SafeExamBrowser.Contracts.UserInterface.Windows; using SafeExamBrowser.Contracts.UserInterface.Windows;
@ -122,7 +123,7 @@ namespace SafeExamBrowser.UserInterface.Mobile
{ {
if (appConfig != null) if (appConfig != null)
{ {
InfoTextBlock.Inlines.Add(new Run($"Version {appConfig.ProgramVersion}") { FontStyle = FontStyles.Italic }); InfoTextBlock.Inlines.Add(new Run($"Version {appConfig.ProgramInformationalVersion}") { Foreground = Brushes.DimGray });
InfoTextBlock.Inlines.Add(new LineBreak()); InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new LineBreak()); InfoTextBlock.Inlines.Add(new LineBreak());
InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 12 }); InfoTextBlock.Inlines.Add(new Run(appConfig.ProgramCopyright) { FontSize = 12 });