/* * Copyright (c) 2019 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.Reflection; namespace SafeExamBrowser.ResetUtility.Procedure { internal class ShowVersion : ProcedureStep { public ShowVersion(Context context) : base(context) { } internal override ProcedureStepResult Execute() { var executable = Assembly.GetExecutingAssembly(); var build = executable.GetCustomAttribute().Version; var copyright = executable.GetCustomAttribute().Copyright; var version = executable.GetCustomAttribute().InformationalVersion; InitializeConsole(); Console.ForegroundColor = ConsoleColor.DarkBlue; Console.WriteLine($"Safe Exam Browser, Version {version}"); Console.WriteLine($"Build Version {build}"); Console.WriteLine(copyright.Replace("©", "(c)")); Console.WriteLine(); Console.ForegroundColor = ForegroundColor; Console.WriteLine("Press any key to return to the main menu."); Console.ReadKey(); return ProcedureStepResult.Continue; } internal override ProcedureStep GetNextStep() { return new MainMenu(Context); } } }