private static void CreateUIElementCode(string generateDirPath, ElementCodeData elementCodeData) { UIElementCodeTemplate.Generate(generateDirPath + elementCodeData.BehaviourName + "Components.cs", elementCodeData.BehaviourName, GetProjectNamespace(), elementCodeData); foreach (var childElementCodeData in elementCodeData.ElementCodeDatas) { var elementDir = (generateDirPath + elementCodeData.BehaviourName + "/").CreateDirIfNotExists(); CreateUIElementCode(elementDir, childElementCodeData); } }
private static void CreateUIElementCode(string generateDirPath, ElementCodeInfo elementCodeInfo) { var panelFilePathWhithoutExt = generateDirPath + elementCodeInfo.BehaviourName; if (File.Exists(panelFilePathWhithoutExt + ".cs") == false) { UIElementCodeTemplate.Generate(panelFilePathWhithoutExt + ".cs", elementCodeInfo.BehaviourName, UIKitSettingData.GetProjectNamespace(), elementCodeInfo); } UIElementCodeComponentTemplate.Generate(panelFilePathWhithoutExt + ".Designer.cs", elementCodeInfo.BehaviourName, UIKitSettingData.GetProjectNamespace(), elementCodeInfo); foreach (var childElementCodeData in elementCodeInfo.ElementCodeDatas) { var elementDir = (panelFilePathWhithoutExt + "/").CreateDirIfNotExists(); CreateUIElementCode(elementDir, childElementCodeData); } }