Inheritance: System.EventArgs
Esempio n. 1
0
        private void month_MonthSelected(object sender, MonthSelectArgs e)
        {
            Month month = e.Month;

            if (lastMonth != null)
            {
                for (int i = 0; i < Months.Count; i++)
                {
                    if (lastMonth.SelectedDate.Month == Months[i].SelectedDate.Month)
                    {
                        if (lastMonth.SelectedDate.Day == Months[i].SelectedDate.Day)
                        {
                            lastMonth = Months[i];
                            Months.RemoveAt(i);
                            Months.Insert(i, lastMonth);
                        }
                    }
                }
            }
            lastMonth = month;
            DateTime dateTime = DateTime.Now;

            try
            {
                dateTime         = lastMonth.SelectedDate;
                SelectedDateTime = new DateTime(YearTitle, dateTime.Month, dateTime.Day);
            }
            catch (Exception)
            {
                SelectedDateTime = DateTime.Now;
            }
            finally
            {
                UpdateDays(SelectedDateTime);
                semanticzoomDate.ToggleActiveView();
            }

            this.header.MonthTitle = SelectedDateTime.Month.ToString();
            this.header.YearTitle  = SelectedDateTime.Year.ToString();
            this.MonthTitle        = SelectedDateTime.Month;
            this.YearTitle         = SelectedDateTime.Year;
        }
        private void month_MonthSelected(object sender, MonthSelectArgs e)
        {
            Month month = e.Month;
            if (lastMonth != null)
            {
                for (int i = 0; i < Months.Count; i++)
                {
                    if (lastMonth.SelectedDate.Month == Months[i].SelectedDate.Month)
                        if (lastMonth.SelectedDate.Day == Months[i].SelectedDate.Day)
                        {
                            lastMonth = Months[i];
                            Months.RemoveAt(i);
                            Months.Insert(i, lastMonth);
                        }
                }
            }
            lastMonth = month;
            DateTime dateTime = DateTime.Now;
            try
            {
                dateTime = lastMonth.SelectedDate;
                SelectedDateTime = new DateTime(YearTitle, dateTime.Month, dateTime.Day);
            }
            catch (Exception)
            {
                SelectedDateTime = DateTime.Now;
            }
            finally
            {
                UpdateDays(SelectedDateTime);
                semanticzoomDate.ToggleActiveView();
            }

            this.header.MonthTitle = SelectedDateTime.Month.ToString();
            this.header.YearTitle = SelectedDateTime.Year.ToString();
            this.MonthTitle = SelectedDateTime.Month;
            this.YearTitle = SelectedDateTime.Year;
        }