static void AppointmentFormatStringServiceAction(SchedulerControl scheduler)
 {
     #region #AppointmentFormatStringService
     IAppointmentFormatStringService oldService = scheduler.GetService <IAppointmentFormatStringService>();
     if (oldService != null)
     {
         MyAppointmentFormatStringService newService = new MyAppointmentFormatStringService(oldService);
         scheduler.RemoveService(typeof(IAppointmentFormatStringService));
         scheduler.AddService(typeof(IAppointmentFormatStringService), newService);
     }
     scheduler.ActiveView.LayoutChanged();
     #endregion #AppointmentFormatStringService
 }
        public DragDropResourcesHelper(SchedulerControl scheduler, string fieldName)
        {
            CurrentScheduler = scheduler;
            CustomFieldName  = fieldName;

            CurrentScheduler.Storage.ResourceCollectionLoaded += new EventHandler(Storage_ResourceCollectionLoaded);
            CurrentScheduler.DragOver += new System.Windows.Forms.DragEventHandler(CurrentScheduler_DragOver);
            CurrentScheduler.DragDrop += new System.Windows.Forms.DragEventHandler(CurrentScheduler_DragDrop);

            IMouseHandlerService oldMouseHandler = (IMouseHandlerService)CurrentScheduler.GetService(typeof(IMouseHandlerService));

            if (oldMouseHandler != null)
            {
                DragrDropMouseHandlerService newMouseHandler = new DragrDropMouseHandlerService(CurrentScheduler, oldMouseHandler);
                CurrentScheduler.RemoveService(typeof(IMouseHandlerService));
                CurrentScheduler.AddService(typeof(IMouseHandlerService), newMouseHandler);
            }
        }