Example #1
0
        private void addBtn_Click(object sender, RoutedEventArgs e)
        {
            DateInfo info = new DateInfo();
            info.EventTitle = titleTb.Text;
            info.EventDescription = descriptionTb.Text;

            int hour=int.Parse(hourComboBox.SelectionBoxItem.ToString());
            int minute=int.Parse(minComboBox.SelectionBoxItem.ToString());
            String amPm=amPmComboBox.SelectionBoxItem.ToString();

            if(hour==12)
            {
                if(amPm=="AM")
                    hour=0;
            }
            else if(amPm=="PM")
                hour+=12;

            info.CalendarItemDate = new DateTime(selectedDate.Date.Year, selectedDate.Date.Month, selectedDate.Date.Day, hour, minute, 00);

            if(this.addEventRequested!=null)
            {
                addEventRequested(this, info);
            }
        }
Example #2
0
 private void OnaddEventRequested(object sender, DateInfo e)
 {
     CalDates.Add(e);
     popup.IsOpen = false;
     getEventList();
 }