Esempio n. 1
0
 private void dayViewBtn_Click(object sender, EventArgs e)
 {
     /*ACTION LISTENER FOR DAY VIEW*/
     this.Controls.Remove(currentPanel);
     this.currentView  = subViews.GenerateSubView(controller, SubView.CALENDAR_VIEW);
     this.currentPanel = this.currentView.GetPanel();
     this.Controls.Add(currentPanel);
     this.currentPanel.Show();
     this.currentView.Update(doctors, dates, false);
 }
Esempio n. 2
0
 void ListView.InitializeView()
 {
     this.subViews     = new SubViewList();
     this.doctors      = new List <String>();
     this.dates        = new List <DateTime>();
     this.currentView  = subViews.GenerateSubView(controller, SubView.CALENDAR_VIEW);
     this.currentPanel = this.currentView.GetPanel();
     this.Controls.Add(currentPanel);
     addDelete();
     this.currentPanel.Show();
     dayRadioBtn.Checked = true;
     dateLabel.Text      = monthCalendar.SelectionRange.Start.ToString("MMM d, yyyy");
     InitializeDoctors();
 }
Esempio n. 3
0
        private void calendarViewBtn_Click(object sender, EventArgs e)
        {
            dayBtn.BackColor    = Color.LightBlue;
            agendaBtn.BackColor = Color.White;
            dayBtn.Enabled      = false;
            agendaBtn.Enabled   = true;

            /*ACTION LISTENER FOR DAY VIEW*/
            this.Controls.Remove(currentPanel);
            this.currentView  = this.currentView = subViews.GenerateSubView(controller, SubView.CALENDAR_VIEW);
            this.currentPanel = this.currentView.GetPanel();
            this.Controls.Add(currentPanel);
            this.currentPanel.Show();
            this.currentView.Update(doctors, dates, false);
        }
Esempio n. 4
0
 private void agendaViewBtn_Click(object sender, EventArgs e)
 {
     /*ACTION LISTENER FOR AGENDA VIEW*/
     this.Controls.Remove(currentPanel);
     this.currentView  = subViews.GenerateSubView(controller, SubView.AGENDA_VIEW);
     this.currentPanel = this.currentView.GetPanel();
     this.Controls.Add(currentPanel);
     if (!deleteAdded)
     {
         addDelete();
         deleteAdded = true;
     }
     this.currentPanel.Show();
     this.currentView.Update(doctors, dates, false);
 }
Esempio n. 5
0
        public SubView GenerateSubView(ListController c, String subView)
        {
            if (subViews.Count == 0)
            {
                subViews.Add(SubView.MakeView(c, subView));
                return(subViews[0]);
            }
            else
            {
                if (subView.Equals(SubView.AGENDA_VIEW))
                {
                    foreach (SubView s in subViews)
                    {
                        if (s is AgendaView)
                        {
                            return(s);
                        }
                    }
                    subViews.Add(SubView.MakeView(c, SubView.AGENDA_VIEW));
                    return(subViews[subViews.Count - 1]);
                }
                else if (subView.Equals(SubView.CALENDAR_VIEW))
                {
                    foreach (SubView s in subViews)
                    {
                        if (s is CalendarView)
                        {
                            return(s);
                        }
                    }
                    subViews.Add(SubView.MakeView(c, SubView.CALENDAR_VIEW));
                    return(subViews[subViews.Count - 1]);
                }
            }

            return(null);
        }
Esempio n. 6
0
 public void Add(SubView subView)
 {
     this.subViews.Add(subView);
 }