using SCI.CursesWrapper; namespace Fahrplan.Screens; public class IntroScreen : Window { /// /// Pass class constructor through to inherited constructor /// /// Parent window of this window object public IntroScreen (Window parentWindow) : base ( 0, 0, parentWindow.GetUsableWidth (), parentWindow.GetUsableHeight (), parentWindow ) { string asciiArt = SCI.AsciiArt.Generator.FromImage ( "res" + Path.DirectorySeparatorChar + "38c3.jpg", GetUsableWidth () ).Result; string asciiArtPlusText = "Press F1 for a quick start guide or simply press Enter\n" + "to see upcoming events\n" + asciiArt + "38C3 Fahrplan in your terminal!"; AsciiArt.ShowCentered (WindowId, asciiArtPlusText); // Close intro screen on any keypress OnKeyPress += (object sender, NCursesKeyPressEventArgs e) => { ((Window) sender).Destroy (); }; } }