Example #1
0
        public PersonalWeekPage(STDWeek week)
        {
            int CurrentWeekDay = DateTime.Today.Subtract(new DateTime(2020, 8, 31, 0, 0, 0)).Days % 7;

            string[] days = new string[6];
            days[0] = "пн";
            days[1] = "вт";
            days[2] = "ср";
            days[3] = "чт";
            days[4] = "пт";
            days[5] = "сб";
            for (int i = 0; i < 6; i++)
            {
                PersonalDayPage day = new PersonalDayPage(week.Days[i])
                {
                    Title = days[i]
                };
                Children.Add(day);
            }
            if (CurrentWeekDay == 6)
            {
                CurrentWeekDay = 5;
            }
            CurrentPage = Children[CurrentWeekDay];
        }
Example #2
0
 public Idiot(string name)
 {
     Name     = name;
     UniPairs = new UNIWeek();
     STDWeeks = new STDWeek[4];
     for (int i = 0; i < 4; i++)
     {
         STDWeeks[i] = new STDWeek();
     }
 }