public PrintPreviewWindow(string companyName, string xamlPath, object data, IDocumentRender renderer = null) { InitializeComponent(); _companyName = companyName; _doc = LoadDocumentAndRender(xamlPath, data, renderer); Dispatcher.BeginInvoke(new LoadXpsMethod(LoadXps), DispatcherPriority.ApplicationIdle); }
public void saveAll(IDocumentRender render) { foreach (KeyValuePair <string, reportOutputUnit> pair in this) { var format = pair.Value.fileformat; } }
public RenderViewModel(DFile file, IRepository repository, IDocumentRender documentRender, IStore store) { _file = file; _repository = repository; _documentRender = documentRender; _store = store; }
/// <summary> /// 构造初始化对象 /// </summary> public PrintPreWindow(string strTemlName, Object data, IDocumentRender render = null) { InitializeComponent(); //初始化的时候调用对象 _objectData = data; _flowDocument = LoadDocumentAndRender(strTemlName, data, render); Dispatcher.BeginInvoke(new LoadXpsMethod(LoadXps), DispatcherPriority.ApplicationIdle); }
public void prepareOperation(IRenderExecutionContext context) { outputRender.Clear(); if (outputRender is IDocumentRender) { IDocumentRender outputRender_IDocumentRender = (IDocumentRender)outputRender; outputRender_IDocumentRender.setContext(context); } }
public FilesController( IContextService contextService, IDocumentRender documentRender, IFilesStorage filesStorage, IFileSaver fileSaver, IFilesOperationService filesOperationService) { _contextService = contextService; _documentRender = documentRender; _filesStorage = filesStorage; _fileSaver = fileSaver; _filesOperationService = filesOperationService; }
/// <summary> /// 提供给需要打印预览和打印按钮调用的方法 /// </summary> /// <param name="strTemlName">打印模板的路径</param> /// <param name="data">需要打印的内容</param> /// <param name="documentRender">实现打印的模板赋值文件</param> public static FlowDocument LoadDocumentAndRender(string strTemlName, object data, IDocumentRender documentRender = null) { var flowDocument = (FlowDocument) Application.LoadComponent(new Uri(strTemlName, UriKind.RelativeOrAbsolute)); flowDocument.PagePadding = new Thickness(); flowDocument.DataContext = data; if (documentRender != null) { documentRender.Render(flowDocument, data); } return flowDocument; }
/// <summary> /// 提供给需要打印预览和打印按钮调用的方法 /// </summary> /// <param name="strTemlName">打印模板的路径</param> /// <param name="data">需要打印的内容</param> /// <param name="documentRender">实现打印的模板赋值文件</param> public static FlowDocument LoadDocumentAndRender(string strTemlName, object data, IDocumentRender documentRender = null) { var flowDocument = (FlowDocument)Application.LoadComponent(new Uri(strTemlName, UriKind.RelativeOrAbsolute)); flowDocument.PagePadding = new Thickness(); flowDocument.DataContext = data; if (documentRender != null) { documentRender.Render(flowDocument, data); } return(flowDocument); }
public FilesController( IContextService contextService, IDocumentRender documentRender, IFilesStorage filesStorage, IFileSaver fileSaver, IFilesOperationService filesOperationService, IFileStorageProvider fileStorageProvider, IOptions <AppSettings> options) { _contextService = contextService; _documentRender = documentRender; _fileStorageProvider = fileStorageProvider; _options = options; _filesStorage = filesStorage; _fileSaver = fileSaver; _filesOperationService = filesOperationService; }
public void execute(ITextRender render, Int32 maxSteps = 1, ILogBuilder loger = null) { Int32 step = 0; if (!this.Any()) { // loger.log("-- areaStyleInstructionStack is empty -- execute halted"); return; } List <areaStyleInstruction> waiting = new List <areaStyleInstruction>(); while (Count > 0 && step < maxSteps) { if (!this.Any()) { // loger.log("-- areaStyleInstructionStack became empty -- execute broke at "+step.ToString() + " step"); return; } areaStyleInstruction ins = this.Pop(); step++; if (ins.resolveAreaPaths(pathResolver, ins.doAllowUnclosed)) { if (render is IDocumentRender) { IDocumentRender render_IDocumentRender = (IDocumentRender)render; render_IDocumentRender.ApplyStyle(ins); } //render.ApplyStyle(ins); break; } else { waiting.Add(ins); } } // loger.log(waiting.Count() + " Instructions is waiting for associated _area_ or _areas_ to be closed"); }
public FilesController(IContextHolder contextHolder, IStore store, IDocumentRender render) { _contextHolder = contextHolder; _store = store; _render = render; }
public static FlowDocument LoadDocumentAndRender(string xamlPath, object data, IDocumentRender renderer = null) { var stream = Application.GetResourceStream(new Uri(xamlPath, UriKind.RelativeOrAbsolute))?.Stream; if (stream != null) { var doc = XamlReader.Load(stream) as FlowDocument; stream.Dispose(); if (doc != null) { doc.PagePadding = new Thickness(50); doc.DataContext = data; if (renderer != null) { renderer.Render(doc, data); } return(doc); } } return(new FlowDocument()); }
public FileDetailsViewComponent(IContextHolder contextHolder, IDocumentRender render, IStore store) { _contextHolder = contextHolder; _render = render; _store = store; }