mirror of
https://github.com/tonytins/tomas.git
synced 2025-03-15 04:11:24 +00:00
Moved Terminal stuff to kernel project
This commit is contained in:
parent
f8a919ba3a
commit
972948948f
6 changed files with 17 additions and 41 deletions
|
@ -1,6 +1,6 @@
|
|||
# TOMAS
|
||||
|
||||
TOMAS, an abbreviation of **To**ny's **Ma**naged Operating **S**ystem is a operating system written in C# using the [COSMOS](https://github.com/CosmosOS/Cosmos) framework.
|
||||
TOMAS, an abbreviation of **To**ny's **Ma**naged Operating **S**ystem, is a operating system written in C# using the [COSMOS](https://github.com/CosmosOS/Cosmos) framework.
|
||||
|
||||
## Requirements
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// See the LICENSE file in the project root for more information.
|
||||
using System;
|
||||
|
||||
namespace Tomas.Common
|
||||
namespace Tomas.Kernel
|
||||
{
|
||||
internal class EasterEggs
|
||||
{
|
|
@ -1,7 +1,6 @@
|
|||
// TOMAS is licensed under the MPL 2.0 license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
using System;
|
||||
using Tomas.Common;
|
||||
using Tomas.Kernel.Programs;
|
||||
using Sys = Cosmos.System;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// TOMAS is licensed under the MPL 2.0 license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
namespace Tomas.Common
|
||||
namespace Tomas.Kernel
|
||||
{
|
||||
public struct OSConsts
|
||||
{
|
|
@ -2,48 +2,14 @@
|
|||
// See the LICENSE file in the project root for more information.
|
||||
using System;
|
||||
|
||||
namespace Tomas.Common
|
||||
|
||||
namespace Tomas.Kernel
|
||||
{
|
||||
public class Terminal
|
||||
{
|
||||
const char SYMBOL = '$';
|
||||
|
||||
public static bool IsCancelKey
|
||||
{
|
||||
get
|
||||
{
|
||||
var keys = Console.ReadKey();
|
||||
if (keys.Modifiers == ConsoleModifiers.Control &&
|
||||
keys.Key == ConsoleKey.C)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsHelpKey
|
||||
{
|
||||
get
|
||||
{
|
||||
var keys = Console.ReadKey();
|
||||
if (keys.Modifiers == ConsoleModifiers.Control &&
|
||||
keys.Key == ConsoleKey.H)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsEscapeKey
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Console.ReadKey().Key == ConsoleKey.Escape)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static TerminalCancelEventHandler CancelKeyHandler;
|
||||
|
||||
static void Commands(string command)
|
||||
{
|
11
src/Tomas.Kernel/TerminalCancelEventArgs.cs
Normal file
11
src/Tomas.Kernel/TerminalCancelEventArgs.cs
Normal file
|
@ -0,0 +1,11 @@
|
|||
using System;
|
||||
|
||||
namespace Tomas.Kernel
|
||||
{
|
||||
public delegate void TerminalCancelEventHandler(object sender, TerminalCancelEventArgs e);
|
||||
|
||||
public sealed class TerminalCancelEventArgs : EventArgs
|
||||
{
|
||||
public bool Cancel { get; set; }
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue