public Form1() { InitializeComponent(); basePath = Directory.GetCurrentDirectory() + @"\..\..\TestDocs\"; // Custom IUriStreamProvider registration IUriStreamService uriStreamService = richEditControl1.GetService <IUriStreamService>(); uriStreamService.RegisterProvider(new CustomUriStreamProvider(basePath, "bmp")); }
public MergeDatabaseRecords() { InitializeComponent(); RtfLoadHelper.Load("MailMerge.rtf", richEdit); this.ds = CreateDataSource(); IUriStreamService uriService = (IUriStreamService)richEdit.GetService(typeof(IUriStreamService)); uriService.RegisterProvider(new DBUriStreamProviderBase <DevExpress.DemoData.Models.Employee>(NWindContext.Create().Employees.ToList(), (es, id) => es.First(e => e.EmployeeID == id).Photo)); richEdit.Loaded += richEdit_Loaded; gridControl1.Loaded += gridControl1_Loaded; gridControl1.View.FocusedRowHandleChanged += View_FocusedRowChanged; }
public TableOfContents() { InitializeComponent(); ribbon.SelectedPage = pageReferences; isFirstLoad = true; OpenXmlLoadHelper.Load("TableOfContents.docx", sourceRichEditControl); NWind = Resources["NWindDataLoader"] as NWindDataLoader; this.ds = NWindContext.Create().Employees.ToList(); IUriStreamService uriService = (IUriStreamService)sourceRichEditControl.GetService(typeof(IUriStreamService)); uriService.RegisterProvider(new DBUriStreamProviderBase <DevExpress.DemoData.Models.Employee>(NWindContext.Create().Employees.ToList(), (es, id) => es.First(e => e.EmployeeID == id).Photo)); }
public MasterDetailMailMerge() { InitializeComponent(); RtfLoadHelper.Load("MasterDetailMailMergeTemplate.rtf", templateRichEditControl); RtfLoadHelper.Load("MasterDetailMailMergeMaster.rtf", masterRichEditControl); RtfLoadHelper.Load("MasterDetailMailMergeDetail.rtf", detailRichEditControl); dataSetCategories = NWindContext.Create().Categories.ToList(); dataSetProducts = NWindContext.Create().Products.ToList(); dataSetOrderDetails = NWindContext.Create().OrderDetails.ToList(); IUriStreamService uriService = (IUriStreamService)masterRichEditControl.GetService(typeof(IUriStreamService)); uriService.RegisterProvider(new DBUriStreamProviderBase <Category>(NWindContext.Create().Categories.ToList(), (cs, id) => cs.First(c => c.CategoryID == id).Picture)); cultureInfo = new CultureInfo("en-US"); }
private void btnLoadHTMLStorage_Click(object sender, RoutedEventArgs e) { #region #loadhtmlstorage IUriStreamService uriService = richEditControl1.GetService <IUriStreamService>(); uriService.RegisterProvider(new IsolatedStorageStreamProvider("HTMLFiles\\")); try { using (IsolatedStorageFile store = IsolatedStorageFile.GetUserStoreForApplication()) { if (!store.FileExists("HTMLFiles\\test.html")) { return; } using (IsolatedStorageFileStream fstream = store.OpenFile("HTMLFiles\\test.html", FileMode.Open)) { richEditControl1.LoadDocument(fstream, DocumentFormat.Html); } } } catch (Exception ex) { MessageBox.Show(string.Format("Error saving file.{0}{1}", Environment.NewLine, ex.Message)); } #endregion #loadhtmlstorage }
private void RegisterUriStreamService(RichEditControl richEditControl) { IUriStreamService uriStreamService = richEditControl.GetService <IUriStreamService>(); uriStreamService.RegisterProvider(new ImageStreamProvider(NorthwindDataProvider.Categories, "Picture")); }