void ReleaseDesignerOutlets() { if (DatePicker != null) { DatePicker.Dispose(); DatePicker = null; } if (DueDateLabel != null) { DueDateLabel.Dispose(); DueDateLabel = null; } if (ReminderSwitch != null) { ReminderSwitch.Dispose(); ReminderSwitch = null; } if (DateView != null) { DateView.Dispose(); DateView = null; } if (TextField != null) { TextField.Dispose(); TextField = null; } }
public DateController(IDateValidation dateValidation, IDateParser dateParser, ICalculateDateRange calculateDateRange, DateView view) { _dateValidation = dateValidation; _dateParser = dateParser; _calculateDateRange = calculateDateRange; _view = view; }
private void _SetCurrentView(DateView view, DateTime date) { // Reset button for the previous view switch (_currentView) { case DateView.Day: //scheduleDay.Visible = false; toolStripButtonDayView.Checked = false; break; case DateView.Week: //scheduleWeek.Visible = false; toolStripButtonWeekView.Checked = false; break; case DateView.Agenda: //scheduleAgenda.Visible = false; toolStripButtonAgendaView.Checked = false; break; } _CurrentDate = date; _currentView = view; // Draw the new view switch (_currentView) { case DateView.Day: //CompileApplicableTimers(date, m_oneDayTimeSpan); //scheduleDay.Visible = true; toolStripButtonDayView.Checked = true; break; case DateView.Week: //CompileApplicableTimers(_currentDate.AddDays(-((int)_currentDate.DayOfWeek)), m_oneWeekTimeSpan); //scheduleWeek.Visible = true; toolStripButtonWeekView.Checked = true; break; case DateView.Agenda: //CompileApplicableTimers(date, m_oneDayTimeSpan); //scheduleAgenda.Visible = true; toolStripButtonAgendaView.Checked = true; break; } }
void ReleaseDesignerOutlets() { if (btnSelectDate != null) { btnSelectDate.Dispose(); btnSelectDate = null; } if (DateView != null) { DateView.Dispose(); DateView = null; } if (FilmsByDateTable != null) { FilmsByDateTable.Dispose(); FilmsByDateTable = null; } if (lblSelectedDate != null) { lblSelectedDate.Dispose(); lblSelectedDate = null; } }
static void Main(string[] args) { //Debug args parameters if (args[0] == "debug") { args = new string[] { "01.01.2000", "01.02.2000" }; } //views initialization var dateView = new DateView(); var programView = new ProgramView(); DateValidation dateValidation; //models initialization var inputValidation = new InputValidation(args); if (args.Length == 3) { dateValidation = new DateValidation(args[2]); } else { dateValidation = new DateValidation(); } var dateParser = new DateParser(); var calculateDateRange = new CalculateDateRange(); //controller initialization var dateController = new DateController(dateValidation, dateParser, calculateDateRange, dateView); var programController = new ProgramController(inputValidation, programView, dateController, args); //Program turn on programController.RunProgram(); }
private void _SetCurrentView(DateView view) { _SetCurrentView(view, _CurrentDate); }