Example #1
0
        }     //close method update_display_page_events()...

        /// <summary>
        /// this method is used to update the main screen of the interface to show the event/image information associated with this day
        /// </summary>
        /// <param name="day_to_display"></param>
        private void update_interface_with_information_on_day(DateTime day_to_display)
        {
            //firstly let's update the overall interface variable on what day it is...
            current_day_on_display = day_to_display;

            //let's update the UI with what day and day this data is relating to
            txtDayDisplay.Text  = day_to_display.DayOfWeek.ToString();
            txtDateDisplay.Text = day_to_display.ToLongDateString();


            //now display the time span of the events of this day
            DateTime day_startTime = new DateTime();
            DateTime day_endTime   = day_startTime;

            Image_Rep.GetDayStartEndTime(Window1.OVERALL_userID, day_to_display, ref day_startTime, ref day_endTime); //firstly we get start/end time data directly from the database

            if (day_startTime != day_endTime)                                                                         //if the start time isn't equal to the end time, it means that we've successfully retrieved information from the database...
            {
                txtTimeFrame.Text  = "(" + day_startTime.ToString("HH:mm tt") + " - ";
                txtTimeFrame.Text += day_endTime.ToString("HH:mm tt") + ")";
            }     //close if(day_startTime != day_endTime)...
            else
            {
                txtTimeFrame.Text = " - ";      //if no data has been retrieved, well then we've no information to show...
            }
            //and also let's display the number of images associated with this day...
            txtImageNumber.Text = Image_Rep.GetNumImagesInDay(Window1.OVERALL_userID, day_to_display).ToString() + " Photos";


            //finally give a breakdown of the amount of time spent on various activities...
            lstDailyActivitySummary.ItemsSource = Daily_Annotation_Summary.getDayAnnotationSummary(Window1.OVERALL_userID, day_to_display);

            //and also a breakdown of the individual annotated events...
            lstIndividual_Journeys.ItemsSource = Interface_Code.Event_Activity_Annotation.getAnnotatedEventsDay(Window1.OVERALL_userID, day_to_display);
        }     //end method display_days_events_on_interface()