tomas/src/Tomas.Kernel/Programs/App.cs
Anthony Foxclaw 1edf3d660f Filesystem and versioning
- Filesystem
- Proper versioning
- Replaced BasicApp with AboutApp
- Removd TerminalCancelEventArgs and everything related to it
2020-02-03 16:51:51 -05:00

30 lines
674 B
C#

// TOMAS is licensed under the MPL 2.0 license.
// See the LICENSE file in the project root for more information.
using sys = Cosmos.System;
namespace Tomas.Kernel.Programs
{
/// <summary>
/// Basic framework for building terminal applications.
/// </summary>
public abstract class App
{
protected App(Kernel system)
{
System = system;
}
Kernel System { get; set; }
/// <summary>
/// Main entry point of the program
/// </summary>
public virtual void Start()
{
System.InApp = true;
var isCKey = sys.KeyboardManager.ReadKey().Key == sys.ConsoleKeyEx.C;
if (sys.KeyboardManager.ControlPressed && isCKey)
System.Restart();
}
}
}