/// <summary> /// Launches the Data Source Input File in the associated Application /// </summary> public void PreviewDataSourceFile() { // Check whether preview is enabled or not if (IsPreviewEnabled) { try { switch (DataSourceType) { case DataSourceType.Excel: ExcelParser.OpenWorkSheet(ExcelFilePath, SelectedExcelSheet); break; case DataSourceType.MHT: break; default: throw new InvalidEnumArgumentException("Invalid Enum Value"); } } catch (WorkItemMigratorException te) { MessageHelper.ShowMessageWindow(te.Args); } } }
public void ShowLinkingReport() { if (WizardInfo.LinksManager != null && !string.IsNullOrEmpty(WizardInfo.LinksManager.LinksFilePath)) { string linksReportFilePath = Path.Combine(Path.GetDirectoryName(WizardInfo.LinksManager.LinksFilePath), LinksManager.XLReportFileName); try { if (File.Exists(linksReportFilePath)) { ExcelParser.OpenWorkSheet(linksReportFilePath, "Migration-Summary"); } } catch (WorkItemMigratorException we) { Warning = "Unable to open Linking Report File" + we.Args.Title; } } }
/// <summary> /// Shows Published Report /// </summary> /// <param name="workSheetName"></param> public void ShowReport(string workSheetName) { try { switch (m_wizardInfo.DataSourceType) { case DataSourceType.Excel: ExcelParser.OpenWorkSheet(m_wizardInfo.Reporter.ReportFile, workSheetName); break; case DataSourceType.MHT: Process.Start(m_wizardInfo.Reporter.ReportFile); break; default: throw new InvalidEnumArgumentException("Invalid Enum Value"); } } catch (WorkItemMigratorException te) { // Display Message if some error occured while trying to show the report MessageHelper.ShowMessageWindow(te.Args); } }