public MouseRenderingDebug() : base(80, 23) { pal = new Palette(new ColorGradient(Color.White, Color.Violet, Color.Black, Color.White).ToColorArray(25)); PaletteSurface surfacePal = new PaletteSurface(5, 5, pal); for (int i = 0; i < 25; i++) { ((CellPalette)surfacePal[i]).BackgroundIndex = i; } Children.Add(surfacePal); surfacePal.Print(0, 0, "Hello from printing!"); timer = new Timer(100, (t, a) => pal.ShiftRight(0, 5)); timer5 = new Timer(2000, (t, a) => pal.ShiftLeft()); }
public MouseRenderingDebug() : base(80, 23) { pal = new Palette(new ColorGradient(Color.White, Color.Violet, Color.Black, Color.White).ToColorArray(25)); PaletteSurface surfacePal = new PaletteSurface(5, 5, pal); for (int i = 0; i < 25; i++) { ((CellPalette)surfacePal[i]).BackgroundIndex = i; } Children.Add(surfacePal); surfacePal.Print(0, 0, "Hello from printing!"); timer = new Timer(TimeSpan.FromMilliseconds(100)); timer.TimerElapsed += (t, e) => pal.ShiftRight(0, 5); timer5 = new Timer(TimeSpan.FromMilliseconds(2000)); timer5.TimerElapsed += (t, e) => pal.ShiftLeft(); Components.Add(timer); Components.Add(timer5); }