キーボードからの入力イベント待受けクラス。
Exemple #1
0
        static string timeFormat = TIME; // 時刻の表示形式。

        static void Main()
        {
            WriteHelp();

            var cts = new CancellationTokenSource();
            eventLoop = new KeyboardEventLoop(code => OnKeyDown(code, cts));

            Task.WhenAll(
                eventLoop.Start(cts.Token),
                TimerLoop(cts.Token)
                ).Wait();
        }
Exemple #2
0
        static string timeFormat = TIME; // 時刻の表示形式。

        static void Main()
        {
            WriteHelp();

            var cts = new CancellationTokenSource();

            eventLoop = new KeyboardEventLoop(code => OnKeyDown(code, cts));

            Task.WhenAll(
                eventLoop.Start(cts.Token),
                TimerLoop(cts.Token)
                ).Wait();
        }