void ShowToolInfoInExcel() { ExcelRedactor excelRedactor = new ExcelRedactor(); excelRedactor.Visible = true; int rowIndex = 2; foreach (var currentTool in currentTools) { excelRedactor.SetCellValue("Инструмент:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.SourceToolName, rowIndex, 2); rowIndex++; if (currentTool.CurrentInsert1 != null) { excelRedactor.SetCellValue("Пластина:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.CurrentInsert1, rowIndex, 2); rowIndex++; } if (currentTool.CurrentInsert2 != null) { excelRedactor.SetCellValue("Пластина центр. :", rowIndex, 1); excelRedactor.SetCellValue(currentTool.CurrentInsert2, rowIndex, 2); rowIndex++; } excelRedactor.SetCellValue("Диаметр:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.SourceToolDiametr.ToString(), rowIndex, 2); rowIndex++; excelRedactor.SetCellValue("Длинна инструмента:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.SourceToolLength.ToString(), rowIndex, 2); rowIndex++; excelRedactor.SetCellValue("Длинна режущей части:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.SourceCuttingLength.ToString(), rowIndex, 2); rowIndex++; excelRedactor.SetCellValue("Радиус на кромке:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.SourceCutRadius.ToString(), rowIndex, 2); rowIndex++; excelRedactor.SetCellValue("Угол кромки:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.SourceCutAngle.ToString(), rowIndex, 2); rowIndex++; excelRedactor.SetCellValue("Кол-во зубов:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.SourceNumberOfTeeth.ToString(), rowIndex, 2); rowIndex++; excelRedactor.SetCellValue("Вылет инструмента:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.SourceToolOverhang.ToString(), rowIndex, 2); rowIndex++; excelRedactor.SetCellValue("Оправка:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.SourceHolderName, rowIndex, 2); if (currentTool.CurrentCollet != null) { rowIndex++; excelRedactor.SetCellValue("Цанга:", rowIndex, 1); excelRedactor.SetCellValue(currentTool.CurrentCollet, rowIndex, 2); } rowIndex += 2; } excelRedactor.CellAutoFit(); }
public ExcelToolInfoReader(string excelFilePath) { this.excelRedactor = new ExcelRedactor(excelFilePath); this.excelToolList = new List <ExcelTool>(); this.toolLocationColumnNumber = SetColumnNumbers("Вид хранения"); this.toolQuantityColumnNumber = SetColumnNumbers("Остаток"); this.toolNameColumnNumber = SetColumnNumbers("Наименование"); GetToolInfoFromExcel(); }