public static void SetupApplicationInformation() { var versionAttribute = typeof(Startup).Assembly.GetCustomAttribute <AssemblyInformationalVersionAttribute>(); Console.SetWindowSize(120, 25); Console.Title = $"{nameof(Rhapsody)} v{versionAttribute?.InformationalVersion}"; const string TITLE = @" _ _ _ _ _ _ _ _ _/\\___ _/\\___ __/\\__ _/\\___ /\\__ __/\\___ __/\\___ _ /\\ (_ _ ))(_ __ __)) (_ ____)(_ _ _)) / \\(_ _))(_ ____)) /\\ / // / |))// / |_| \\ / _ \\ / |))\\ _\ \_// / _ \\ / _ \\ \ \/ // /:. \\ /:. _ \\/:./_\ \\/:. ___//// \:.\ /:.(_)) \\/:. |_\ \\ _\:.// \___| // \___| | //\ _ //\_ \\ \\__ / \ _____//\ _____//(_ _)) \// \// \// \// \// \\/ \// \// \// "; Console.WriteWithGradient(TITLE, Color.DarkOrange, Color.SlateBlue); Console.ReplaceAllColorsWithDefaults(); const string LOG_MESSAGE = "-> Version: {0}\n-> Framework: {1}\n-> OS Arch: {2}\n-> Process Arch: {3}\n-> OS: {4}"; var formatters = new[] { new Formatter(versionAttribute?.InformationalVersion.Trim(), Color.Gold), new Formatter(RuntimeInformation.FrameworkDescription, Color.Aqua), new Formatter(RuntimeInformation.OSArchitecture, Color.Gold), new Formatter(RuntimeInformation.ProcessArchitecture, Color.LawnGreen), new Formatter(RuntimeInformation.OSDescription, Color.HotPink) }; Console.WriteLineFormatted(LOG_MESSAGE, Color.White, formatters); Console.WriteLine(new string('-', 100), Color.Gray); }
public static void SetWindowSize() { //Console.SetWindowSize(120, 60); for (int i = 1; i < 80; i++) { Console.SetWindowSize(50, i); Thread.Sleep(50); } }
public static void window_jump() { while (true) { ConsoleB.SetWindowSize(105, 32); ConsoleB.SetBufferSize(105, 32); Thread.Sleep(150); ConsoleB.SetWindowSize(110, 35); ConsoleB.SetBufferSize(110, 35); Thread.Sleep(100); } }
public async Task WindowTransition() { await Task.Run(() => { for (int i = 4; i < 160; i += 4) { Console.SetWindowSize(i, i / 4); Thread.Sleep(2); } Console.SetBufferSize(160, 39); }); }
static void Main(string[] args) { Console.SetWindowSize(35, 35); FigletFont font = FigletFont.Load("slant.flf"); Figlet figlet = new Figlet(font); Console.WriteLine(figlet.ToAscii("Github"), ColorTranslator.FromHtml("#8AFFEF")); var content = @".------------------------------------------------------------------------------. | .mmMMMMMMMMMMMMMmm. | | .mMMMMMMMMMMMMMMMMMMMMMMMm. | | .mMMMMMMMMMMMMMMMMMMMMMMMMMMMMMm. | | .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM. | | .MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM. | | MMMMMMMM' `""MMMMM""""""""""""""MMMM""""` 'MMMMMMMM | | MMMMMMMMM MMMMMMMMM | | MMMMMMMMMM: :MMMMMMMMMM | | .MMMMMMMMMM MMMMMMMMMM. | | MMMMMMMMM"" ""MMMMMMMMM | | MMMMMMMMM MMMMMMMMM | | MMMMMMMMM MMMMMMMMM | | MMMMMMMMMM MMMMMMMMMM | | `MMMMMMMMMM MMMMMMMMMM` | | MMMMMMMMMMMM. .MMMMMMMMMMMM | | MMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMM | | MMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM | | `MMMMMMMMMMMMMM MMMMMMMMMMMMMM` | | `MMMMMMMMMMMM MMMMMMMMMMMM` | | `""MMMMMMMMM MMMMMMMMM""` | | `""MMMMMM MMMMMM""` | | `""""M M""""` | '------------------------------------------------------------------------------'"; var lines = content.Split(new [] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); int r = 225; int g = 255; int b = 250; for (int i = 0; i < lines.Length; i++) { Console.WriteLine(lines[i], Color.FromArgb(r, g, b)); r -= 8; b -= 4; } Console.ReadLine(); }
// ========================================== MAIN FUNC =============================================== // static void Main(string[] args) { Console.Title = "URLbliss"; Console.OutputEncoding = Encoding.UTF8; Helpers.BACKUP(urlblissFileName); // Set windows size relative to the screen, setting is for visualization Console.SetWindowSize(Console.LargestWindowWidth / 2, Console.LargestWindowHeight - 1); while (true) { //makeChoice(); makeChoice2(); Console.ReadLine(); Console.Clear(); } }
public static void draw() { // set the console size ConsoleB.SetWindowSize(110, 35); ConsoleB.SetBufferSize(110, 35); // Clear the screen ConsoleB.BackgroundColor = _back; ConsoleB.Clear(); //Console.Clear(); //Console.BackgroundColor = ConsoleColor.DarkCyan; //ConsoleB.BackgroundColor = Color.DarkCyan; //ConsoleB.Clear(); ConsoleB.CursorVisible = false; // draw outline //origRow = 0; //origCol = 0; //Console.BackgroundColor = ConsoleColor.White; // if this line is above console.clear() the whole background will be white // use for loop to decrease the byte of the program for (int i = 0; i < 31; ++i) { WriteAt(" ", 0, i, back: Color.White, fore: Color.White); WriteAt(" ", 108, i, back: Color.White, fore: Color.White); WriteAt(" ", 2, i, back: _back, fore: _back); WriteAt(" ", 107, i, back: _back, fore: _back); Thread.Sleep(15); } for (int i = 0; i < 110; ++i) { WriteAt(" ", i, 0, back: Color.White, fore: Color.White); WriteAt(" ", i, 30, back: Color.White, fore: Color.White); Thread.Sleep(15); } ConsoleB.BackgroundColor = _back; ConsoleB.ForegroundColor = Color.White; WriteAt("craft by @ sher", 94, 34, back: _back, fore: Color.White); }
public static void Main(string[] args) { // Set console size. Console.SetWindowSize(60, 60); // Setup Pane Sizes and Hotkeys here. PaneSizes = new PaneSizeValues(); HotKeys = new PaneHotKeys(PaneSizes); Sender = new KeySender(HotKeys); ConsoleResizer = new ConsoleResizeChecker(PaneSizes, Sender); // Get DelayTime if (!int.TryParse(ConfigurationManager.AppSettings.Get("DelayTime"), out DelayTime)) { DelayTime = 1000; } // Run switcher here. while (true) { RunSwitcher(); } }
static void Main() { Console.OutputEncoding = System.Text.Encoding.UTF8; Console.SetWindowSize(70, 45); Console.SetBufferSize(70, 45); Sudoku.DrawGrid(); var s = new Sudoku(Sudoku.Medium); bool complete; do { if (!s.SetPossible()) { Console.WriteLine("I dunno!"); break; } complete = s.FindSingles(); s.Show(); //Console.ReadLine(); } while (!complete); }
/// <summary> /// Entry point. /// </summary> /// <param name="args"></param> static void Main(string[] args) { // setup vars bool show_help = false; string path = null; string sid = null; var p = new OptionSet() { { "s|sid=", "SID windows security identifier (whoami /user)", v => sid = v }, { "p|path=", "path to Xshell sessions folder.", v => path = v }, { "h|help", "show this message and exit", v => show_help = v != null }, }; // clear console and setup stylesheets, i gots to look swag! Console.Clear(); Console.SetWindowSize(120, 25); Console.Title = "xDecrypt - synmuffin"; Console.BackgroundColor = Color.Black; Console.ForegroundColor = Color.White; styleSheet.AddStyle("Xshell", Color.Tomato); styleSheet.AddStyle("Error", Color.Red); // display our header ShowHeader(); List <string> extra = new List <string>(); try { extra = p.Parse(args); } catch (OptionException e) { Console.Write("xdec: "); Console.WriteLine(e.Message); Console.WriteLine("Try `xdec --help' for more information."); exit(); } // if we are dispaying help we do so here and end. if (show_help || string.IsNullOrEmpty(sid)) { ShowHelp(p); exit(); } try { // at this point we can only take one agument or - // we are given a path to the Xshell session folder. if (!string.IsNullOrEmpty(path)) { if (!Directory.Exists(path)) { Console.WriteLine("ERROR: Unable to find {0}.", path); exit(); } foreach (string file in Directory.GetFiles(path, "*.xsh", SearchOption.AllDirectories)) { string passwd = readPassFromFile(file); if (!string.IsNullOrEmpty(passwd)) { string passwd_dec = decryptPass(sid, passwd); Console.WriteLine($": {file} -> {passwd_dec}"); } } } else { if (extra.Count() < 1) { ShowHelp(p); exit(); } if (!string.IsNullOrEmpty(extra[0])) { string passwd_dec = decryptPass(sid, extra[0]); Console.WriteLine($": {extra[0]} -> {passwd_dec}"); } } } catch (Exception ex) { Console.WriteLineStyled("Error: " + ex.Message, styleSheet); } exit(); }
static void ErrorMessage() { Console.SetWindowSize(Console.LargestWindowWidth, Console.LargestWindowHeight); var errorImg = new[] { @"***********************************************************************************************************************", "For Technical Assistance please call 614 - 565 - 8382", "Anything worth doing has at least three ways of doing it!" , "Alas, this is not one of those ways.", "Please try again!", "***********************************************************************************************************************", //ascii image created with https://manytools.org/hacker-tools/convert-images-to-ascii-art/go @"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@(*,,,,..,,,,*/(%&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#*,,,,,,,,,,,,,,,.,,,,,**,,,,,.,,,#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@/,,,,,,,,,,,,,,,,,,,,,,,,,,,**,,,,,,.,....../@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#,,,,,,,,,,,,,,,,,,,,,,,,,,,....,***,,,,,,,,........,.(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@******,**,,*,,,,,,,,,,,,,,,,.......,***,*,,,.,.........,..,,/@@@@@@@@@@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@@@@@@@,************,,,,,,/(((((((((#(,,,,,,,,***,*,,,...........,,,,,,,,*@@@@@@@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@@@@*,..****,,,,,,,,,,,#%#%%%&&%###%&&&&&/,,,,,**,*,,,.,.........,,,,**,****(@@@@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@&***,.,****,,,,,,,,,(%&&&@@@@@@@@@@@@@@@@&(,,,****,,,........,,****,******%&@@@@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@%************,*,,,,,*&&&@@@@@@@@@@@@@@@@@@@@@%,,*******,.........****,******&@@@@#%@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@%,,(***,*****,*,******#@@&&&@@@@@@@@@@@@@@@@@@@%*,*******...........,**********///****%@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@&/(,*(***********,,,,,,,#&&&&&&@@@@@@@@@@@@@@@&&&%(,***/**********.....*,,*******/****//**&@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@***,,*(***,,,,,,,,,,,,,,,%&&&&&&&@@@@@@@@@@@@@&&&&%#****//(#(,,,,,/.....,,,**********,***////@@@@@@@@@@@@@", @"@@@@@@@@@@@@%%%%%#//***,,,,,,,,,,,,,,,(%##%&&&&&&&&&&((((#%%/%***/,,,,,,,,,/.....,,,********,,,****////%@@@@@@@@@@@@@@@", @"@@@@@@@@@@%######(/****,,,,,,,,,,,,,,,(#####(%###(/(#%%%%&&&%&%&****,,,,,,,,,/.....,,,********,,,**//////((@@@@@@@@@@@@", @"@@@@@@@@@########(/**,,,,,,,,,,,,,,,,,(#///((/##%%%/&@&&&&&&%&&&&@****/((/,,,,,/.....,,,*********,,**/////((((@@@@@@@@@", @"@@@@@@@&%%%%#%####//*,,,,,,,,,,,,,,,,,//###%%%%%&&%%&@@&%&&&&&&&/***,,,,,,,,,*......,**********,,*//////((((#&@@@@@@@@@", @"@@@@@@&%%%%%%%%%%#//*,,,,,,,,,,,,,,,,,,#/####%%&&%(/,//(%&%(#%&&&*****/**,...........,,**********,,,,,*////(((((%@@@@@@", @"@@@@@&%%%%%%%%%%%#//*,,,,,,,,,,,,,,,,,,,####(((((((##%&%##%%@&&&&****////*.........,*,*********/*,,,,,*//((((((((@@@@@@", @"@@@@@%%%%%%%%%%%%%//*,,,,,,,,,,,,,,,,,,,,*####%%&&%%%&&&@@@@&&&%(,***////*,.........,,********//*,,,,,*/((((((((*,@@@@@", @"@@@@%%%%%%%%%%%%#%//*,,,,,,,,,,,,,,,,,,,,,*(#%%&%&&&&&@@@@@&%&%(,/(**////*,,.........,,******////,,,,,*/////((((*,,@@@@", @"@@@&&&&&&&&&&&&&&&(/*,,,,,,,,,,,,,,,,,,,,,,*/((#%#(((#(/(//####%.*%@(,,,,,,*,,,,.....,,*****/////,,*////////((((,,,*@@@", @"@@@&&&&&&&&&&&&&&&(/*,,*,,,,,,,,,,,,,,,,,,,%%((((((((///(%%%%%#%(,%&@@@*,,,,,,,,,,,,.,,*****/////,,*/////(((//((*,*,%@@", @"@@%&&&&&&&&&&&&&&&(/*,,**,,,,,,,,,,,,,,,. %&%%#///(((((/(#%%##%*#@&&@@@,,,,,,,,,,,,,,/****/////,,*////////**//,,,,,@@@@", @"@&%&&&&&&&&&&&&&&&(/*,,*,,,,,,,,,,,*,,,,,%&&&%%%/*////((((##%%&/ .%@@*.,,,,,,,.,,*****/////,,,////////*//(*,,,,#@@@@@", @"@%%&&&&&&&&&&&&&&/*,,,,,,,,,,*,,,,,,,,*@@@@@@@@&*/////((#%%&&% . ..,,,,,,,.,,,****/////,,,///////**//(****,,@@@@@", @"@%%&&&&&&&&&&&&&&/*,,,,,,,,,,,,,,,,,,,(@@@@&* .*/%(((((#%&&&&* ...........,,,,,,..,..,***/////,,,///////*,,*(*,,,,,&@@", @"&%%%%%%%%%#########/*,,,,,,,,,,,.,,,,,..#( .. .,#%##%&,...............,,,,,.....,,**//*//,,,////////***(*,,,,.(", @"%############%#####/**,,,,..,..........................,,...............,..............,..,*/////,,,///////////*,,,,,.*", @"%%%#%#%#%%%%%%%%%%%//*,,,,..................................,...........,................,,,*///*,.......,.............", @"%%%%%%%%%%%%%%%%%%#//*,.................,,.........................,..,..................,,,,,.......,,,,,,,,,,,,,,,***", @"%%%%%%%%%%%%%%%%%%%//................. ..,,........................,,,,...................,,,,,******,,,,,,,,,,,,,,,,,,", @"%%%%%%%%%%%%%%%%%%%*......... ......... ...,...........................,,,..............,...,,,,,,..,***/*****,...... .", @"%%%%%%%%%&&&%%&&&....... . .. . . ...,,................................... ............,,,..**********,........ ", @"#%%%%%%%%%%&%%%(... .... . . ....,.................................. ...........,,,,,,,**.,.,**,,,.,.,. / ", @"@##%%%%%%%%%%%%%%,. ..... .. . ...,...........,...................... . ..........,.,,,**,..,..,.,..,...&", @"@##%%%%%%%%%%%%%*...... ... ..................................... ........ ........,*...............@", @"@%%%%%%%%%%%#....... .... .................,.................. .. ...........,****,,,,......(@@@", @"@@%%%%%%%%%%%*...... .. ......... .......................... ..........,.,,.,***,.,.......@@", @"@@&%%%######,.,,. ......... ...,.... ....................... ... .....,,**,,.......#@@", @"@@@########,,...,...... ..,... ................. . . ... .. ..,..........,@@@", @"@@@@#####(,,..... .. ...,.. ............ .............. .,.........@@@@", @"@@@@@####,,,,.... ...... ....... ..... ..... .......... ....*((##%%%&@@@@@", @"@@@@@(.. . ................... . .. ......,,,,,,.,,................. ..... ..#&&&&&&&@@@@@@@@", @"@@@@@@&/ ...........................,(//(#%&%(/*... ,,,,,,,,........,,...................,%%%%%%%&@@@@@@", @"@@@@@@@&/..... ....................,@&@@@@@@@@@@@@@@,...... .,,,,,,,,,,,,,,,,,,,,,,,...............#%%%%%%@@@@@@@@@@", @"@@@@@@@@@%.. ......................,&%%%&&&&&@@@%###%&&@@@& .,,,...............,,,,,,,,,,,,......../%%%%%%%@@@@@@@@@", @"@@@@@@@@@@%(,. .............#%*/(##%%%&&@@@%/*.*/**...,,................... .,,,,,,,,,,,,,..(%%%%%@@@@@@@@@@", @"@@@@@@@@@@@@&&&%%%#, . */(,,//((##&%&&@@@@@&%%&&&&&........................ .,,,,,,,,,,,,,,*&@@@@@@@@@@@", @"@@@@@@@@@@@@@%%%####/*,... ../,...////(((((##%&&&&&%%,.......................... .,,,,,,,,,,@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@%#####(**,,,........,((. . (#%&@&@@@&(***(%(.... ... ... ............ ..,,,,&@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@#####***,,..,.....*((..... (//(####(((((/.... . . ..... .... .#@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@###(****,**,,..../(*..... .((//(%&&@@@&.... . ..... .. (@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@@####/***//*,,,..,((..... ,/(/*****, ... . .. . .%@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@@@@##(**////*,,,,.*(*..... ,**. . . ,@@@@@@@@@@@@@@@@@@@@@@@", @"@@@@@@@@@@@@@@@@@@@@@@@@@@(//////*,,,,,*(...... . . .@@@@@@@@@@@@@@@@@@@@@@@@@@", }; var maxLength = errorImg.Aggregate(0, (max, line) => Math.Max(max, line.Length)); var x = Console.BufferWidth / 2 - maxLength / 2; for (int y = -errorImg.Length; y < Console.WindowHeight + -errorImg.Length; y++) { ConsoleDraw(errorImg, x, y); Thread.Sleep(100); } Console.ReadLine(); Console.Clear(); } //ErrorMessage
static void Main(string[] args) { System.Console.OutputEncoding = Encoding.Unicode; //System.Console.WriteLine("\u2665"); //System.Console.WriteLine("\uF496"); //System.Console.Write('\u003A'); //System.Console.WriteLine('\u0029');// //System.Console.Write('\u263A'); //System.Console.Write('♥'); //System.Console.Write('♡'); //System.Console.WriteLine('\u263B'); //System.Console.Read(); Console.SetWindowSize(120, 35); Console.CursorVisible = false; var world = new World(); var health = new HealthComponent(world) { Health = new RegenAttribute { Current = 50, Max = 100, Name = "Health", RegenRatePerSecond = 1 } }; var mana = new ManaComponent(world) { Mana = new RegenAttribute { Current = 30, Max = 60, Name = "Mana", RegenRatePerSecond = 0.2 } }; var fpsCounter = new FramesPerSecondCounter(world); var fpsWriter = new FpsRenderer(world); var inputSystem = new ConsoleInputSystem(world); var playerRenderSystem = new PlayerRenderSystem(world); var monsterRenderSystem = new MonsterRenderSystem(world); var playerMovement = new PlayerMovementSystem(world); var monsterMovement = new MonsterMovementSystem(world); //Initialize Player position var initialPlayerPosition = new PlayerPosition(); initialPlayerPosition.MoveTo(10, 10); world.Set(initialPlayerPosition); //initializ monster/s var initialMonsterPosition = new MonsterPosition(); initialMonsterPosition.MoveTo(12, 12); world.Set(initialMonsterPosition); var updateSystems = new IUpdate[] { inputSystem, fpsCounter, playerMovement, monsterMovement, health, mana }; //Order is important! var renderSystems = new IRender[] { playerRenderSystem, monsterRenderSystem, health, mana, fpsWriter, fpsCounter }; GameEngine gameEngine = new GameEngine(updateSystems, renderSystems); gameEngine.Start(); }