public void RunExportAsync(Stream exportStream, ISpreadExportRenderer exportRenderer) { this.spreadExportRenderer = exportRenderer; if (this.GetWorker().IsBusy) { throw new Exception("There is an export operation that has not yet finished."); } List <PropertyGridSpreadExportRow> exportRows = (List <PropertyGridSpreadExportRow>)null; if (this.propertyGrid.InvokeRequired) { this.propertyGrid.Invoke((Delegate)(() => { PropertyGridExportState state = this.SavePropertyGridState(); exportRows = this.GetPropertyGridDataSnapshot(); this.RestorePropertyGridState(state); })); } else { PropertyGridExportState state = this.SavePropertyGridState(); exportRows = this.GetPropertyGridDataSnapshot(); this.RestorePropertyGridState(state); } this.GetWorker().RunWorkerAsync((object)new List <object>(2) { (object)new PropertyGridSpreadExportDataSnapshot(string.Empty, exportRows), (object)exportStream }); }
public void RunExportAsync(string fileName, ISpreadExportRenderer exportRenderer) { this.spreadExportRenderer = exportRenderer; if (this.GetWorker().IsBusy) { throw new Exception("There is an export operation that has not yet finished."); } List <TreeViewSpreadExportRow> exportRows = (List <TreeViewSpreadExportRow>)null; if (this.treeView.InvokeRequired) { this.treeView.Invoke((Delegate)(() => { TreeViewExportState state = this.SaveTreeViewState(); exportRows = this.GetTreeViewDataSnapshot(); this.RestoreTreeViewState(state); })); } else { TreeViewExportState state = this.SaveTreeViewState(); exportRows = this.GetTreeViewDataSnapshot(); this.RestoreTreeViewState(state); } this.GetWorker().RunWorkerAsync((object)new TreeViewSpreadExportDataSnapshot(fileName, exportRows)); }
public void RunExportAsync( Stream exportStream, ISpreadExportRenderer exportRenderer, string sheetName) { this.SheetName = sheetName; this.RunExportAsync(exportStream, exportRenderer); }
public void RunExportAsync( string fileName, ISpreadExportRenderer exportRenderer, string sheetName) { this.SheetName = sheetName; this.RunExportAsync(fileName, exportRenderer); }
public void RunExport(Stream exportStream, ISpreadExportRenderer exportRenderer) { this.spreadExportRenderer = exportRenderer; this.spreadExportRenderer.RegisterFormatProvider(this.ExportFormat); if (this.propertyGrid.InvokeRequired) { this.applicationDoEvents = true; this.propertyGrid.Invoke((Delegate) new PropertyGridSpreadExport.RunExportToStreamCallback(this.RunExportCall), (object)exportStream); } else { this.RunExportCall(exportStream); } }
public void RunExport(string fileName, ISpreadExportRenderer exportRenderer) { this.spreadExportRenderer = exportRenderer; this.spreadExportRenderer.RegisterFormatProvider(this.ExportFormat); if (this.treeView.InvokeRequired) { this.applicationDoEvents = true; this.treeView.Invoke((Delegate) new TreeViewSpreadExport.RunExportCallback(this.RunExportCall), (object)fileName); } else { this.RunExportCall(fileName); } }