public EplProjectProperties GetProjectProperties() { EplProjectProperties EplProjectProperties = new EplProjectProperties(); try { EplProjectProperties.ProjectName = ProjectSheet.GetCellText("C2"); EplProjectProperties.ProjectTitle = ProjectSheet.GetCellText("C3"); EplProjectProperties.OrderNumber = ProjectSheet.GetCellText("C4"); EplProjectProperties.ProductNumber = ProjectSheet.GetCellText("C5"); EplProjectProperties.Date = ProjectSheet.GetCellText("C6"); EplProjectProperties.Descriptions = ProjectSheet.GetCellText("C7"); EplProjectProperties.CheckPersion = ProjectSheet.GetCellText("C8"); EplProjectProperties.ApprovedPersion = ProjectSheet.GetCellText("C9"); EplProjectProperties.Creator = ProjectSheet.GetCellText("C10"); for (int i = 0; i < 10; i++) { int addr = i * 3 + 13; EplProjectProperties.Revisions[i].Name = ProjectSheet.GetCellText("C", addr); EplProjectProperties.Revisions[i].Description = ProjectSheet.GetCellText("C", addr + 1); EplProjectProperties.Revisions[i].Date = ProjectSheet.GetCellText("C", addr + 2); } EplProjectProperties.PageLayout.Width = ProjectSheet.GetCellValue <double>("F2"); EplProjectProperties.PageLayout.Heigth = ProjectSheet.GetCellValue <double>("F3"); return(EplProjectProperties); } catch (Exception ex) { Logger.WriteLine("Get project properties failed.", ex); return(null); } }
public ExcelConfiguration(string filePath, string basePath) { FilePath = filePath; BasePath = basePath; EplProjectProperties = new EplProjectProperties(); EplPageProperties = new List <EplPageProperties>(); TotalChecking = 20; }