Example #1
0
        private void UpdateConsole(object state)
        {
            Console.SetCursorPosition(0, 0);
            ConsoleTables tables = new ConsoleTables();

            tables.AddTable(GetCurrentStats());
            tables.AddTable(GetTableStats());

            string output = tables.ToString();

            Console.Write(output);

            timer.Change(250, Timeout.Infinite);
        }
        private void UpdateConsole(object state)
        {
            if (taskManager.exception == null)
            {
                Console.SetCursorPosition(0, 0);
                ConsoleTables tables = new ConsoleTables();
                tables.AddTable(GetOverallStatsTable());
                tables.AddTable(GetDownloadStatsTable());
                tables.AddTable(GetPocessedStatsTable());

                string output = tables.ToString();

                Console.Write(tables);
                timer.Change(250, Timeout.Infinite);
            }
            else
            {
                WriteException();
            }
        }