protected virtual IList CreateResourceList()
        {
            CarItemXmlPersistenceHelper helper = new CarItemXmlPersistenceHelper();
            XmlDocument doc = SchedulerDataHelper.LoadXmlDocumentFromResource(SchedulerDataHelper.DefaultResourceXmlSource);

            return(helper.FromXmlNode(doc) as IList);
        }
        protected virtual IList CreateAppointmentList()
        {
            EventItemXmlPersistenceHelper helper = new EventItemXmlPersistenceHelper();
            XmlDocument doc = SchedulerDataHelper.LoadXmlDocumentFromResource(SchedulerDataHelper.DefaultAppointmentXmlSource);

            return(helper.FromXmlNode(doc) as IList);
        }
示例#3
0
 void InitializeSettingsFormViewModel()
 {
     ViewModel.ReportInstance            = new XtraSchedulerReport();
     ViewModel.SchedulerPrintAdapter     = adapter;
     ViewModel.AvailableResources        = GetAvailableResources();
     ViewModel.TimeInterval              = new TimeInterval(scheduler.Start, scheduler.Start.AddDays(7));
     ViewModel.ReportTemplateInfoSource  = SchedulerDataHelper.GetReportTemplateCollection();
     ViewModel.ActiveReportTemplateIndex = 0;
 }
        protected override void RaiseBeforeModuleDisappear()
        {
            SchedulerControl scheduler = FindScheduler();

            if (scheduler != null)
            {
                SchedulerDataHelper.DataUnbind(scheduler);
            }
            base.RaiseBeforeModuleDisappear();
        }
示例#5
0
 public DocumentPreview()
 {
     InitializeComponent();
     SchedulerDataHelper.DataBind(storage);
     SubscribePrintAdapterEvents();
     storage.ResourceStorage.Mappings.Image = "";
     this.DataContext = this;
     UpdateInterval();
     UpdatePreview();
 }
示例#6
0
        void AddResource(int index, string caption)
        {
            Resource r = scheduler.Storage.CreateResource(index.ToString());

            r.Caption = caption;
            string      imageName   = string.Format("tv{0}.png", index + 1);
            BitmapImage bitmapImage = SchedulerDataHelper.GetImageFromResource(imageName);

            r.SetImage(bitmapImage);
            scheduler.Storage.ResourceStorage.Add(r);
        }
        protected void InitializeScheduler(bool bindToDatabase)
        {
            SchedulerControl scheduler = FindScheduler();

            if (scheduler == null)
            {
                return;
            }
            if (bindToDatabase)
            {
                SchedulerDataHelper.DataBindToDatabase(scheduler);
            }
            else
            {
                SchedulerDataHelper.DataBind(scheduler);
            }
            InitializeSchedulerProperties(scheduler);
        }