static void Main(string[] args) { Console.ForegroundColor = ConsoleColor.White; Console.WindowWidth = 120; Console.WindowHeight = 55; ConsoleHelper.SetConsoleFont(8); Console.WriteLine("Beispiele 1...9"); ConsoleKeyInfo example = Console.ReadKey(); do { Console.Clear(); Console.WriteLine("Beispiel {0}", example.KeyChar); Console.WriteLine(); if (example.Key != ConsoleKey.End && example.Key != ConsoleKey.Enter) { try { typeof(Examples).GetMethod("Example" + example.KeyChar).Invoke(null, null); } catch (Exception ex) { Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine(ex.Message); Console.ForegroundColor = ConsoleColor.White; } } example = Console.ReadKey(); } while (example.Key != ConsoleKey.End); }
static void Main(string[] args) { ConsoleHelper.SetConsoleFont(5); Console.WriteLine("liczymy"); var t = SystemIcons.Information; var lit = "abcdqepolsrc"; var licznik = 0; var hsx = ""; var znak = ""; //zaq = document.getElementById('haslo').value; for (int i = 1; i <= 5; i += 2) { licznik++; if ((licznik % 2) == 0) { znak = "_"; } else { znak = "x"; } hsx += lit.Substring(i, 1) + znak; } hsx += hsx.Substring(hsx.Length - 3);//, hsx.Length); Console.WriteLine(hsx); //for(int sek = 0; sek <= 60; sek++) //{ // for(int pomoc = 0; pomoc <= 500; pomoc++) // { // int ile= ((sek * (sek - 1)) / 2) * (pomoc % 2); // if (ile==861) // { // Console.WriteLine("sek: " + sek + " pomoc: " + pomoc); // } // } //} Console.Read(); }