// Token: 0x0600002B RID: 43 RVA: 0x000038DC File Offset: 0x00001ADC private static CNCProjectData.ProjectDescriptionClass GetProjectDescription(ItCfgNode descriptionNode) { return(new CNCProjectData.ProjectDescriptionClass { Line1 = (descriptionNode["Line1"].value ?? string.Empty), Line2 = (descriptionNode["Line2"].value ?? string.Empty), Line3 = (descriptionNode["Line3"].value ?? string.Empty), Line4 = (descriptionNode["Line4"].value ?? string.Empty) }); }
// Token: 0x0600002C RID: 44 RVA: 0x00003974 File Offset: 0x00001B74 private static CNCProjectData.Address GetAddress(ItCfgNode node) { ItCfgNode itCfgNode = node["Name"]; string name = ((itCfgNode != null) ? itCfgNode.value : null) ?? string.Empty; ItCfgNode itCfgNode2 = node["Street"]; string street = ((itCfgNode2 != null) ? itCfgNode2.value : null) ?? string.Empty; ItCfgNode itCfgNode3 = node["PostCode"]; string zipCode = ((itCfgNode3 != null) ? itCfgNode3.value : null) ?? string.Empty; ItCfgNode itCfgNode4 = node["Place"]; string place = ((itCfgNode4 != null) ? itCfgNode4.value : null) ?? string.Empty; return(new CNCProjectData.Address(name, street, zipCode, place)); }
// Token: 0x0600002A RID: 42 RVA: 0x00003834 File Offset: 0x00001A34 private static CNCProjectData.GeneralDataClass GetGeneralData(ItCfgNode node) { ItCfgNode itCfgNode = node["OrderNumber"]; string orderNumber = ((itCfgNode != null) ? itCfgNode.value : null) ?? string.Empty; ItCfgNode itCfgNode2 = node["Component"]; string component = ((itCfgNode2 != null) ? itCfgNode2.value : null) ?? string.Empty; ItCfgNode itCfgNode3 = node["Storey"]; string storey = ((itCfgNode3 != null) ? itCfgNode3.value : null) ?? string.Empty; ItCfgNode itCfgNode4 = node["DrawingNumber"]; string drawingNumber = ((itCfgNode4 != null) ? itCfgNode4.value : null) ?? string.Empty; return(new CNCProjectData.GeneralDataClass(orderNumber, component, storey, drawingNumber)); }
// Token: 0x06000026 RID: 38 RVA: 0x00003554 File Offset: 0x00001754 public static CNCProjectData Create(Document doc, ItCfgNode node) { CNCProjectData.GeneralDataClass generalData = CNCProjectData.GetGeneralData(node); CNCProjectData.ProjectDescriptionClass projectDescription = CNCProjectData.GetProjectDescription(node["ProjectDescription"]); CNCProjectData.Address address = CNCProjectData.GetAddress(node["BuildingSite"]); CNCProjectData.Address address2 = CNCProjectData.GetAddress(node["BuildingOwner"]); CNCProjectData.DrawingDataClass drawingData = CNCProjectData.GetDrawingData(node); CNCProjectData.GenericOrderInfoClass genericOrderInfo = CNCProjectData.GetGenericOrderInfo(node); ItCfgNode itCfgNode = node["Comment"]; string commentPxml = ((itCfgNode != null) ? itCfgNode.value : null) ?? string.Empty; string docId = CNCProjectData.GetDocId(doc); return(new CNCProjectData(generalData, projectDescription, address, address2, drawingData, genericOrderInfo, commentPxml, docId)); }
// Token: 0x06000029 RID: 41 RVA: 0x00003780 File Offset: 0x00001980 private static CNCProjectData.DrawingDataClass GetDrawingData(ItCfgNode node) { ItCfgNode itCfgNode = node["DrawingDate"]; string text = ((itCfgNode != null) ? itCfgNode.value : null) ?? string.Empty; bool flag = string.IsNullOrEmpty(text); if (flag) { text = DateTime.Now.ToString("dd.MM.yyyy"); } DateTime date = DateTime.ParseExact(text, "dd.MM.yyyy", CultureInfo.InvariantCulture); ItCfgNode itCfgNode2 = node["DrawingRevision"]; string revision = ((itCfgNode2 != null) ? itCfgNode2.value : null) ?? string.Empty; ItCfgNode itCfgNode3 = node["DrawingAuthor"]; string author = ((itCfgNode3 != null) ? itCfgNode3.value : null) ?? string.Empty; return(new CNCProjectData.DrawingDataClass(date, revision, author)); }
// Token: 0x06000006 RID: 6 RVA: 0x00002514 File Offset: 0x00000714 private static CNCProjectData GetCNCProjectData(Document document, FileFormat format) { ItXmlConfig configData = new ItConfig(document).getConfigData(); string formatNodeName = CamExporter.GetFormatNodeName(format); bool flag = string.IsNullOrEmpty(formatNodeName); CNCProjectData result; if (flag) { result = null; } else { ItCfgNode node = configData.CamRootNode[formatNodeName]; CNCProjectData cncprojectData = CNCProjectData.Create(document, node); result = cncprojectData; } return(result); }
// Token: 0x06000028 RID: 40 RVA: 0x00003648 File Offset: 0x00001848 private static CNCProjectData.GenericOrderInfoClass GetGenericOrderInfo(ItCfgNode node) { ItCfgNode itCfgNode = node["GenericOrderInfo13"]; string line = ((itCfgNode != null) ? itCfgNode.value : null) ?? string.Empty; ItCfgNode itCfgNode2 = node["GenericOrderInfo14"]; string line2 = ((itCfgNode2 != null) ? itCfgNode2.value : null) ?? string.Empty; ItCfgNode itCfgNode3 = node["GenericOrderInfo15"]; string line3 = ((itCfgNode3 != null) ? itCfgNode3.value : null) ?? string.Empty; ItCfgNode itCfgNode4 = node["GenericOrderInfo16"]; string line4 = ((itCfgNode4 != null) ? itCfgNode4.value : null) ?? string.Empty; ItCfgNode itCfgNode5 = node["GenericOrderInfo17"]; string line5 = ((itCfgNode5 != null) ? itCfgNode5.value : null) ?? string.Empty; ItCfgNode itCfgNode6 = node["GenericOrderInfo18"]; string line6 = ((itCfgNode6 != null) ? itCfgNode6.value : null) ?? string.Empty; ItCfgNode itCfgNode7 = node["GenericOrderInfo19"]; string line7 = ((itCfgNode7 != null) ? itCfgNode7.value : null) ?? string.Empty; ItCfgNode itCfgNode8 = node["GenericOrderInfo20"]; string line8 = ((itCfgNode8 != null) ? itCfgNode8.value : null) ?? string.Empty; return(new CNCProjectData.GenericOrderInfoClass(line, line2, line3, line4, line5, line6, line7, line8)); }
// Token: 0x06000061 RID: 97 RVA: 0x00004C64 File Offset: 0x00002E64 public static string GetFileName(AssemblyInstance instance, CNCProjectData projectData, ICamExportIntOptions options, ItDocument cncDoc) { bool flag = cncDoc != null && options.MultipleElementsInOneFile; string result; if (flag) { result = Path.Combine(cncDoc.FilePath, cncDoc.FileName); } else { ItCfgNode itCfgNode; if (instance == null) { itCfgNode = null; } else { Document document = instance.Document; if (document == null) { itCfgNode = null; } else { ItXmlConfig config = document.getConfig(); itCfgNode = ((config != null) ? config.CamRootNode : null); } } ItCfgNode itCfgNode2 = itCfgNode; string text; if (itCfgNode2 == null) { text = null; } else { ItCfgNode itCfgNode3 = itCfgNode2["PXML"]; text = ((itCfgNode3 != null) ? itCfgNode3["FileNameRules"].value : null); } string text2 = text; bool flag2 = string.IsNullOrWhiteSpace(text2); if (flag2) { text2 = "Element_\"ProdNo\".pxml"; } bool flag3 = projectData.isNull(); if (flag3) { result = text2; } else { ProductType productType = (instance != null) ? instance.productType() : ProductType.None; DirectoryInfo directoryInfo = options.TargetDirectory; bool subdirectoryPerProductType = options.SubdirectoryPerProductType; if (subdirectoryPerProductType) { directoryInfo = directoryInfo.CreateSubdirectory(productType.ToString()); } string path = CNCFileNameParser.Parse(text2, instance, projectData, true); string text3 = Path.Combine(directoryInfo.FullName, path); result = text3; } } return(result); }