예제 #1
0
        public void Set(ProChar symbol)
        {
            Copy(ref originalScreen, ref screen);
            Copy(ref proposedScreen, ref screen);
            proposedScreen[symbol.X, symbol.Y] = symbol;

            screenState = ScreenState.Changed;
        }
예제 #2
0
        public Screen(int width, int height, ConsoleColor foreColor, ConsoleColor backColor)
        {
            this.width  = width;
            this.height = height;

            this.foreColor = foreColor;
            this.backColor = backColor;

            screen = new ProChar[width, height];
            Copy(ref proposedScreen, ref screen);
            Copy(ref originalScreen, ref screen);

            for (int x = 0; x < width; x++)
            {
                for (int y = 0; y < height; y++)
                {
                    screen[x, y] = new ProChar(' ', x, y, foreColor, backColor);
                }
            }

            screenState = ScreenState.Normal;
        }
예제 #3
0
        protected void loadTitle()
        {
            int leftMagrin = 2;

            for (int fx = leftMagrin; fx < this.finalTitle.Length + leftMagrin + 4; fx++)
            {
                window[fx, 0].CopySymbol(Borders[22]);
                if (fx > 3 && fx < finalTitle.Length - 1 + leftMagrin + 3)
                {
                    window[fx, 0].CopySymbol(new ProChar(Char.Parse(finalTitle[fx - leftMagrin - 2].ToString()), ConsoleColor.White, ConsoleColor.Black));
                    window[fx, 0].ForeColor = titleColor;
                    window[fx, 0].BackColor = ProChar.GetInvertedColor(titleColor);
                }
                if (fx == 0 + leftMagrin)
                {
                    window[fx, 0].CopySymbol(Borders[7 + 11]);
                }
                if (fx == finalTitle.Length - 1 + leftMagrin + 4)
                {
                    window[fx, 0].CopySymbol(Borders[6 + 11]);
                }
            }
        }
예제 #4
0
 public void CopySymbol(ProChar source)
 {
     this = new ProChar(source.Character, this.X, this.Y, this.ForeColor, this.BackColor);
 }
예제 #5
0
 public void CopyChar(ProChar source)
 {
     this = source;
 }