Пример #1
0
        protected void OnNewItemCreating(DateTime dt, NewItemCreatingEventArgs e)
        {
            var temp = NewItemCreating;

            if (temp != null)
            {
                temp(dt, e);
            }
        }
Пример #2
0
        public void NewItem(DateTime dt)
        {
            var result = new NewItemCreatingEventArgs();

            OnNewItemCreating(dt, result);

            if (result.AppointmentViewModel == null)
            {
                // Abort
                return;
            }

            EnsureAppointments();

            var items = CreateCalendarItemViewModel(result.AppointmentViewModel);

            if (items != null && items.Count > 0)
            {
                _allItems.AddRange(items);
                RecreateItems();
                SelectedItem = result.AppointmentViewModel;
            }
        }
Пример #3
0
 protected void OnNewItemCreating(DateTime dt, NewItemCreatingEventArgs e)
 {
     var temp = NewItemCreating;
     if (temp != null)
     {
         temp(dt, e);
     }
 }
Пример #4
0
        public void NewItem(DateTime dt)
        {
            var result = new NewItemCreatingEventArgs();
            OnNewItemCreating(dt, result);

            if (result.AppointmentViewModel == null)
            {
                // Abort
                return;
            }

            EnsureAppointments();

            var items = CreateCalendarItemViewModel(result.AppointmentViewModel);
            if (items != null && items.Count > 0)
            {
                _allItems.AddRange(items);
                RecreateItems();
                SelectedItem = result.AppointmentViewModel;
            }
        }