Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     _braille = new List <char>();
     foreach (var chr in "⠀⠁⠂⠃⠄⠅⠆⠇⠈⠉⠊⠋⠌⠍⠎⠏⠐⠑⠒⠓⠔⠕⠖⠗⠘⠙⠚⠛⠜⠝⠞⠟⠠⠡⠢⠣⠤⠥⠦⠧⠨⠩⠪⠫⠬⠭⠮⠯⠰⠱⠲⠳⠴⠵⠶⠷⠸⠹⠺⠻⠼⠽⠾⠿⡀⡁⡂⡃⡄⡅⡆⡇⡈⡉⡊⡋⡌⡍⡎⡏⡐⡑⡒⡓⡔⡕⡖" +
              "⡗⡘⡙⡚⡛⡜⡝⡞⡟⡠⡡⡢⡣⡤⡥⡦⡧⡨⡩⡪⡫⡬⡭⡮⡯⡰⡱⡲⡳⡴⡵⡶⡷⡸⡹⡺⡻⡼⡽⡾⡿⢀⢁⢂⢃⢄⢅⢆⢇⢈⢉⢊⢋⢌⢍⢎⢏⢐⢑⢒⢓⢔⢕⢖⢗⢘⢙⢚⢛⢜⢝⢞⢟⢠⢡⢢⢣⢤⢥⢦⢧⢨⢩⢪⢫⢬⢭" +
              "⢮⢯⢰⢱⢲⢳⢴⢵⢶⢷⢸⢹⢺⢻⢼⢽⢾⢿⣀⣁⣂⣃⣄⣅⣆⣇⣈⣉⣊⣋⣌⣍⣎⣏⣐⣑⣒⣓⣔⣕⣖⣗⣘⣙⣚⣛⣜⣝⣞⣟⣠⣡⣢⣣⣤⣥⣦⣧⣨⣩⣪⣫⣬⣭⣮⣯⣰⣱⣲⣳⣴⣵⣶⣷⣸⣹⣺⣻⣼⣽⣾⣿")
     {
         _braille.Add(chr);
     }
     endToken = new CancellationTokenSource();
     Console.CancelKeyPress += (object sender, ConsoleCancelEventArgs e) =>
     {
         Console.WriteLine("[Console:CancelKeyPress]");
         Thread.Sleep(1000);
         Program.Close(0);
         Thread.Sleep(2500);
         Environment.Exit(0);
     };
     AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) =>
     {
         Console.WriteLine("[ProcessExit]");
         Program.Close(1);
     };
     Program.MainAsync().GetAwaiter().GetResult();
 }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            if (Environment.UserInteractive)
            {
                var x = new Program();
                x.MainAsync().GetAwaiter().GetResult();
            }
            else
            {
                using (var service = new ServiceBase())
                {
                    var x = new Program();
                    x.MainAsync().GetAwaiter().GetResult();

                    ServiceBase.Run(service);
                }
            }
        }
Ejemplo n.º 3
0
        public static void Main(string[] args)
        {
            var prog = new Program();

            prog.MainAsync(args).ConfigureAwait(false).GetAwaiter().GetResult();
        }
Ejemplo n.º 4
0
        protected override void OnStart(string[] args)
        {
            var program = new DiscordBot.Program();

            program.MainAsync();
        }