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

@ -6,6 +6,9 @@
<Entry key="BrowserWindow_ZoomMenuItem"> <Entry key="BrowserWindow_ZoomMenuItem">
Page Zoom Page Zoom
</Entry> </Entry>
<Entry key="Build">
Build
</Entry>
<Entry key="LogWindow_Title"> <Entry key="LogWindow_Title">
Application Log Application Log
</Entry> </Entry>

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 });