예제 #1
0
    public void RunEvents()
    {
        Writter.WriteOutputs();

        if (_stateLog.Count != 0)
        {
            Color tmp = _screen.GetFontColor();
            _screen.SetFontColor(Typer.errorColor);
            foreach (string error in _stateLog)
            {
                Typer.Print(error);
                Typer.Cursor.NextLine();
            }
            _screen.SetFontColor(tmp);
            _stateLog.Clear();
            _screen.Apply();
        }
    }
예제 #2
0
    public void DrawBorder()
    {
        Color tmp = Screen.GetFontColor();

        Screen.SetFontColor(borderColor);
        for (int i = 0; i < DisplaySystem.COLS; i++)
        {
            for (int j = 0; j < borderHeight; j++)
            {
                Screen.TypeChar(1, i, j);
                Screen.TypeChar(1, i, DisplaySystem.LINES - 1 - j);
            }
        }
        for (int i = 0; i < DisplaySystem.LINES; i++)
        {
            for (int j = 0; j < borderWidth; j++)
            {
                Screen.TypeChar(1, j, i);
                Screen.TypeChar(1, DisplaySystem.COLS - 1 - j, i);
            }
        }
        Screen.SetFontColor(tmp);
    }
예제 #3
0
 void DrawPixel(int x, int y)
 {
     _console.Invoker.Add(() => _display.DrawPixel(x, y, _display.GetFontColor()));
 }