Ejemplo n.º 1
0
 private void ShowDateOnHomePageGroupBoxes()
 {
     grbDayOne.Text   = _date.ToString("dddd d") + CalendarUtility.AddDateSuffix(_date.Day);
     grbDayTwo.Text   = _date.AddDays(1).ToString("dddd d") + CalendarUtility.AddDateSuffix(_date.AddDays(1).Day);
     grbDayThree.Text = _date.AddDays(2).ToString("dddd d") + CalendarUtility.AddDateSuffix(_date.AddDays(2).Day);
     grbDayFour.Text  = _date.AddDays(3).ToString("dddd d") + CalendarUtility.AddDateSuffix(_date.AddDays(3).Day);
     grbDayFive.Text  = _date.AddDays(4).ToString("dddd d") + CalendarUtility.AddDateSuffix(_date.AddDays(4).Day);
     grbDaySix.Text   = _date.AddDays(5).ToString("dddd d") + CalendarUtility.AddDateSuffix(_date.AddDays(5).Day);
     grbDaySeven.Text = _date.AddDays(6).ToString("dddd d") + CalendarUtility.AddDateSuffix(_date.AddDays(6).Day);
 }
 public GroupBox AddDayOfTheMonthGroupBoxes(int date, DateTime currentlySelectedDate)
 {
     _dayOfTheMonthGroupBox = new GroupBox
     {
         Name      = "box" + date,
         Text      = date + CalendarUtility.AddDateSuffix(date),
         BackColor = SystemColors.Control,
         ForeColor = SystemColors.ControlDarkDark,
         Font      = new Font("Segoe UI", 8.25F),
         Margin    = new Padding(5)
     };
     _dayOfTheMonthGroupBox.Controls.Add(AddDayOfTheMonthLabels(_dayOfTheMonthGroupBox));
     _selectedDate = currentlySelectedDate;
     return(_dayOfTheMonthGroupBox);
 }
Ejemplo n.º 3
0
 private void GetExistingShoppingListFromFile()
 {
     _shoppingListDisplayInstance = new ShoppingListDisplay(CalendarUtility.DateNextSunday(_date));
     if (_shoppingListDisplayInstance.ShoppingListObject != null)
     {
         txtShopping.Text = _shoppingListDisplayInstance.ShoppingListObject.shoppingList;
         grbShopping.Text = @"Shopping List For" + CalendarUtility.DateNextSunday(_date).ToString(" d") + CalendarUtility.AddDateSuffix(CalendarUtility.DateNextSunday(_date).Day) + CalendarUtility.DateNextSunday(_date).ToString(" MMMM");
     }
     else
     {
         grbShopping.Text = @"Shopping List For" + CalendarUtility.DateNextSunday(_date).ToString(" d") + CalendarUtility.AddDateSuffix(CalendarUtility.DateNextSunday(_date).Day) + CalendarUtility.DateNextSunday(_date).ToString(" MMMM");
     }
 }