public void Create(Model.Appointment.ItemCode itemType)
        {
            Appointment appointment = schedulerStorage.CreateAppointment(AppointmentType.Normal);

            appointment.CustomFields["ItemType"]         = itemType;
            appointment.CustomFields["CompletionStatus"] = (int)Model.Appointment.CompletionCode.NotStarted;
            appointment.Start = DateTime.Now;
            appointment.End   = DateTime.Now;

            using (AppointmentEditor editror = new AppointmentEditor(schedulerControl, appointment)) {
                editror.LookAndFeel.ParentLookAndFeel = this.LookAndFeel.ParentLookAndFeel;

                editror.ShowDialog();
            }

            if (appointment.Type == AppointmentType.Pattern &&

                schedulerControl.SelectedAppointments.Contains(appointment))
            {
                schedulerControl.SelectedAppointments.Remove(appointment);
            }

            schedulerControl.Refresh();
            gridControl.RefreshDataSource();
        }
        void EditAppointmentFormShowing(object sender, AppointmentFormEventArgs e)
        {
            Appointment appointment = e.Appointment;

            using (AppointmentEditor editror = new AppointmentEditor((SchedulerControl)sender, appointment)) {
                editror.LookAndFeel.ParentLookAndFeel = this.LookAndFeel.ParentLookAndFeel;
                e.DialogResult = editror.ShowDialog();
            }

            e.Handled = true;

            if (appointment.Type == AppointmentType.Pattern && schedulerControl.SelectedAppointments.Contains(appointment))
            {
                schedulerControl.SelectedAppointments.Remove(appointment);
            }

            schedulerControl.Refresh();
            gridControl.RefreshDataSource();
        }