Exemplo n.º 1
0
        }//end constructor

        /// <summary>
        /// Method triggered when date value is changed in the Form's dateTimePicked.
        /// Refreshes content to represent the data of the new Date's daily tracker.
        /// </summary>
        /// <param name="date">date to switch to</param>
        private void ChangeFormContentByDate(DateTime date)
        {
            bool dateExists   = false;
            Date selectedDate = null;

            foreach (Date d in DateCollection.GetCalendar())
            {
                if (d.DoDatesMatch(date))
                {
                    selectedDate = d;
                    dateExists   = true;
                    break;
                }
            }//end loop


            if (!dateExists)
            {
                Date d = new Date(date.Year, date.Month, date.Day);
                DateCollection.GetCalendar().Add(d);
                selectedDate = d;
            }

            if (selectedDate != null)
            {
                this.tracker = selectedDate.GetDailyTracker();
                UpdateProgress();
            }
        }//end method
Exemplo n.º 2
0
        static void Main()
        {
            Date currentDate = new Date(DateTime.Now);

            DateCollection.GetCalendar().Add(currentDate);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm(currentDate));
        } //end Main()