2017-07-06 18:18:39 +02:00
|
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2017 ETH Zürich, Educational Development and Technology (LET)
|
|
|
|
|
*
|
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
2017-07-07 15:46:32 +02:00
|
|
|
|
using System.Reflection;
|
2017-07-06 18:18:39 +02:00
|
|
|
|
using SafeExamBrowser.Contracts.Configuration;
|
|
|
|
|
|
2017-07-20 14:16:47 +02:00
|
|
|
|
namespace SafeExamBrowser.Configuration
|
2017-07-06 18:18:39 +02:00
|
|
|
|
{
|
|
|
|
|
public class Settings : ISettings
|
|
|
|
|
{
|
2017-07-14 10:28:59 +02:00
|
|
|
|
public string LogFolderPath
|
2017-07-10 15:47:12 +02:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2017-07-14 10:28:59 +02:00
|
|
|
|
return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "SafeExamBrowser", "Logs");
|
2017-07-10 15:47:12 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-14 10:28:59 +02:00
|
|
|
|
public string ProgramCopyright
|
2017-07-06 18:18:39 +02:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2017-07-14 10:28:59 +02:00
|
|
|
|
var executable = Assembly.GetEntryAssembly();
|
|
|
|
|
var copyright = executable.GetCustomAttribute<AssemblyCopyrightAttribute>().Copyright;
|
|
|
|
|
|
|
|
|
|
return copyright;
|
2017-07-06 18:18:39 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2017-07-07 15:46:32 +02:00
|
|
|
|
|
2017-07-14 10:28:59 +02:00
|
|
|
|
public string ProgramTitle
|
2017-07-07 15:46:32 +02:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2017-07-10 15:47:12 +02:00
|
|
|
|
var executable = Assembly.GetEntryAssembly();
|
2017-07-07 15:46:32 +02:00
|
|
|
|
var title = executable.GetCustomAttribute<AssemblyTitleAttribute>().Title;
|
|
|
|
|
|
2017-07-14 10:28:59 +02:00
|
|
|
|
return title;
|
2017-07-10 15:47:12 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string ProgramVersion
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
var executable = Assembly.GetEntryAssembly();
|
|
|
|
|
var version = executable.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion;
|
2017-07-07 15:46:32 +02:00
|
|
|
|
|
2017-07-10 15:47:12 +02:00
|
|
|
|
return version;
|
2017-07-07 15:46:32 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
2017-07-06 18:18:39 +02:00
|
|
|
|
}
|
|
|
|
|
}
|