static void Main(string[] args) { MagicImage LImage = new PacMan(); MagicBackground LBackground = new TextBackground(11, LImage.ImageHeight); TextGenerator LGenerator = new TextGenerator(LImage, LBackground); for (int i = 0; i < 300; i++) { Console.WriteLine(LGenerator.GetStereogram()); Console.WriteLine(); System.Threading.Thread.Sleep(new TimeSpan(1000000)); } /* * ANSI Escape Character tests * for (int i = 0; i <= 32; i++) * { * Console.Write(" :"); * Console.Write(i); * Console.Write(": "); * Console.Write((char)i); * Console.Write("[2J"); * * } */ /* 0 non bold * 1 bold * 30-37; * 40-47; * m */ // Console.Write("\27[6;6H"); // Console.Write("\27[6;6H"); Console.ReadLine(); }
protected override void UpdateState() { Action = incompatible.Value ? () => { } : (Action)Active.Toggle; if (incompatible.Value) { Colour4 backgroundColour = ColourProvider.Background5; Colour4 textBackgroundColour = ColourProvider.Background4; Content.TransformTo(nameof(BorderColour), ColourInfo.GradientVertical(backgroundColour, textBackgroundColour), TRANSITION_DURATION, Easing.OutQuint); Background.FadeColour(backgroundColour, TRANSITION_DURATION, Easing.OutQuint); SwitchContainer.ResizeWidthTo(IDLE_SWITCH_WIDTH, TRANSITION_DURATION, Easing.OutQuint); SwitchContainer.FadeColour(Colour4.Gray, TRANSITION_DURATION, Easing.OutQuint); MainContentContainer.TransformTo(nameof(Padding), new MarginPadding { Left = IDLE_SWITCH_WIDTH, Right = CORNER_RADIUS }, TRANSITION_DURATION, Easing.OutQuint); TextBackground.FadeColour(textBackgroundColour, TRANSITION_DURATION, Easing.OutQuint); TextFlow.FadeColour(Colour4.White.Opacity(0.5f), TRANSITION_DURATION, Easing.OutQuint); return; } SwitchContainer.FadeColour(Colour4.White, TRANSITION_DURATION, Easing.OutQuint); base.UpdateState(); }
public Form1() { // // Required for Windows Form Designer support // InitializeComponent(); MagicImage LImage = new PacMan(); MagicBackground LBack = new TextBackground(LImage.ImageHeight, 10); FGenerator = new TextGenerator(LImage, LBack); FTimer = new ObjectTimer(this); FTimer.Interval = 33; // FTimer.Interval = 100; FTimer.Tick += new EventHandler(UpdateData); MagicImage LSampleImage = new PictureGrabber(this.pictureBox1.Image, 5); MagicBackground LBackground = new TextBackground(LSampleImage.ImageHeight, 10); TextGenerator LGenerator = new TextGenerator(LSampleImage, LBackground); // this.Box.Text = FGenerator.GetIntro() + "\r\n" this.Box.Text += LGenerator.GetStereogram(); // UpdateData(FTimer,null); this.Box.Select(0, 0); // FTimer.Start(); this.Width = (int)(FGenerator.Width * (this.Box.Font.Size * 0.75 + 1) + 15); this.Height = (int)(FGenerator.Height * (this.Box.Font.Size * 1.25 + 1) + 40); }