Пример #1
0
 public void Count(Budget budget)
 {
     this.PrintLine(53);
     Painter.BlueWhite();
     Console.WriteLine(string.Format("|{0, -53}|", $"COUNT: {budget.Count}"));
     Painter.BlackGray();
     this.PrintLine(53);
 }
Пример #2
0
        public void AveragePerDay(Budget expensesVariable)
        {
            int     daysInMonth   = DateTime.DaysInMonth(2019, DateTime.Now.Month);
            decimal averagePerDay = expensesVariable.Total() / daysInMonth;

            this.PrintLine(53);
            Painter.BlueWhite();
            Console.WriteLine(string.Format("|{0, -53}|", $"AVERAGE PER DAY: {averagePerDay:F1} lv."));
            Painter.BlackGray();
            this.PrintLine(53);
        }
Пример #3
0
        private void PrintTitle()
        {
            int year  = DateTime.Now.Year;
            int month = DateTime.Now.Month;
            int day   = DateTime.Now.Day;

            this.PrintLine(53);
            Painter.BlueWhite();
            Console.WriteLine(string.Format("|{0,18}{1,-17}{2,18}|", string.Empty, $"BUDGET {year}-{month}-{day}", string.Empty));
            Painter.BlackGray();
        }
Пример #4
0
        private void Balance(decimal balance, decimal incomesTotal)
        {
            this.PrintLine(53);
            Painter.BlueWhite();

            if (incomesTotal > 0)
            {
                Console.WriteLine(string.Format(
                                      "|{0,-43}{1,-10}|",
                                      $"TOTAL BALANCE: {balance.ToString("+#;-#;0")} lv.",
                                      $"({balance / incomesTotal:P1})"));
            }
            else
            {
                Console.WriteLine(string.Format(
                                      "|{0,-43}{1,-10}|",
                                      $"TOTAL BALANCE: {balance.ToString("+#;-#;0")} lv.",
                                      "(N/A %)"));
            }

            Painter.BlackGray();
            this.PrintLine(53);
        }