protected FolderEntity(DirectoryInfo path, string context) { Children = new List<FolderEntity>(); Path = path; ReadMetadata(); if(MetaData == null) MetaData = new MetaFile(); MetaData.Context = context; ReadSubdirectories(); }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.NodeIndexFrom = this.NodeIndexFrom; this.MetaStructure.NodeIndexTo = this.NodeIndexTo; this.MetaStructure.Action = this.Action; this.MetaStructure.NavMode = this.NavMode; this.MetaStructure.NavSpeed = this.NavSpeed; MCScenarioChainingEdge.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
/// <summary> /// Initialization /// </summary> /// <param name="meta">MetaFile to process</param> override public void NewDocument(MetaFile meta) { if (FPDFFile != null) { FPDFFile.Dispose(); FPDFFile = null; } FPDFFile = new PDFFile(); FPDFFile.FileName = FileName; FPDFFile.Compressed = Compressed; FPDFFile.PageWidth = meta.CustomX; FPDFFile.PageHeight = meta.CustomY; FPageWidth = meta.CustomX; FPageHeight = meta.CustomY; FPDFFile.CalculateOnly = CalculateOnly; FPDFFile.BeginDoc(); }
/// <summary> /// Finalization /// </summary> /// <param name="meta">MetaFile to process</param> override public void EndDocument(MetaFile meta) { FPDFFile.EndDoc(); /*if (FileName.Length > 0) * { * FileStream fstream = new FileStream(FileName, System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.None); * try * { * FPDFFile.MainPDF.WriteTo(fstream); * } * finally * { * fstream.Close(); * } * }*/ }
public override void Parse(MetaFile meta, Unk_4023740759 Unk_4023740759) { this.Meta = meta; this.MetaStructure = Unk_4023740759; var Nodes = MetaUtils.ConvertDataArray <CScenarioChainingNode>(meta, Unk_4023740759.Nodes); this.Nodes = Nodes?.Select(e => { var msw = new MCScenarioChainingNode(); msw.Parse(meta, e); return(msw); }).ToList(); var Edges = MetaUtils.ConvertDataArray <CScenarioChainingEdge>(meta, Unk_4023740759.Edges); this.Edges = Edges?.Select(e => { var msw = new MCScenarioChainingEdge(); msw.Parse(meta, e); return(msw); }).ToList(); var Chains = MetaUtils.ConvertDataArray <CScenarioChain>(meta, Unk_4023740759.Chains); this.Chains = Chains?.Select(e => { var msw = new MCScenarioChain(); msw.Parse(meta, e); return(msw); }).ToList(); }
private void UpdateReport() { MetaFile meta = previewmetafile.MetaFile; previewmetafile.MetaFile = null; try { // FReport.BeginPrint(this); FReport.EndPrint(); FReport.MetaFile.Clear(); PreparePrint(meta); } finally { previewmetafile.MetaFile = meta; } }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.Position = this.Position; this.MetaStructure.Unk_2602393771 = this.Unk_2602393771; this.MetaStructure.ScenarioType = this.ScenarioType; this.MetaStructure.Unk_407126079 = this.Unk_407126079; this.MetaStructure.Unk_1308720135 = this.Unk_1308720135; MCScenarioChainingNode.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Parse(MetaFile meta, CCreatureMetaData CCreatureMetaData) { this.Meta = meta; this.MetaStructure = CCreatureMetaData; var shaderVariableComponents = MetaUtils.ConvertDataArray <CShaderVariableComponent>(meta, CCreatureMetaData.shaderVariableComponents); this.ShaderVariableComponents = shaderVariableComponents?.Select(e => { var msw = new MCShaderVariableComponent(); msw.Parse(meta, e); return(msw); }).ToList(); var pedPropExpressions = MetaUtils.ConvertDataArray <CPedPropExpressionData>(meta, CCreatureMetaData.pedPropExpressions); this.PedPropExpressions = pedPropExpressions?.Select(e => { var msw = new MCPedPropExpressionData(); msw.Parse(meta, e); return(msw); }).ToList(); var pedCompExpressions = MetaUtils.ConvertDataArray <CPedCompExpressionData>(meta, CCreatureMetaData.pedCompExpressions); this.PedCompExpressions = pedCompExpressions?.Select(e => { var msw = new MCPedCompExpressionData(); msw.Parse(meta, e); return(msw); }).ToList(); }
public override void Parse(MetaFile meta, CMloRoomDef CMloRoomDef) { this.Meta = meta; this.MetaStructure = CMloRoomDef; this.Name = MetaUtils.GetString(Meta, CMloRoomDef.name); this.BbMin = CMloRoomDef.bbMin; this.BbMax = CMloRoomDef.bbMax; this.Blend = CMloRoomDef.blend; this.TimecycleName = CMloRoomDef.timecycleName; this.SecondaryTimecycleName = CMloRoomDef.secondaryTimecycleName; this.Flags = CMloRoomDef.flags; this.PortalCount = CMloRoomDef.portalCount; this.FloorId = CMloRoomDef.floorId; this.ExteriorVisibiltyDepth = CMloRoomDef.exteriorVisibiltyDepth; this.AttachedObjects = MetaUtils.ConvertDataArray <uint>(meta, CMloRoomDef.attachedObjects.Pointer, CMloRoomDef.attachedObjects.Count1)?.ToList(); }
public override void Parse(MetaFile meta, CExtensionDefSpawnPointOverride CExtensionDefSpawnPointOverride) { this.Meta = meta; this.MetaStructure = CExtensionDefSpawnPointOverride; this.Name = CExtensionDefSpawnPointOverride.name; this.OffsetPosition = CExtensionDefSpawnPointOverride.offsetPosition; this.ScenarioType = CExtensionDefSpawnPointOverride.ScenarioType; this.ITimeStartOverride = CExtensionDefSpawnPointOverride.iTimeStartOverride; this.ITimeEndOverride = CExtensionDefSpawnPointOverride.iTimeEndOverride; this.Group = CExtensionDefSpawnPointOverride.Group; this.ModelSet = CExtensionDefSpawnPointOverride.ModelSet; this.AvailabilityInMpSp = CExtensionDefSpawnPointOverride.AvailabilityInMpSp; this.Flags = CExtensionDefSpawnPointOverride.Flags; this.Radius = CExtensionDefSpawnPointOverride.Radius; this.TimeTillPedLeaves = CExtensionDefSpawnPointOverride.TimeTillPedLeaves; }
public override void Parse(MetaFile meta, rage__fwGrassInstanceListDef rage__fwGrassInstanceListDef) { this.Meta = meta; this.MetaStructure = rage__fwGrassInstanceListDef; this.BatchAABB = new Mrage__spdAABB(); this.BatchAABB.Parse(meta, rage__fwGrassInstanceListDef.BatchAABB); this.ScaleRange = rage__fwGrassInstanceListDef.ScaleRange; this.ArchetypeName = rage__fwGrassInstanceListDef.archetypeName; this.LodDist = rage__fwGrassInstanceListDef.lodDist; this.LodFadeStartDist = rage__fwGrassInstanceListDef.LodFadeStartDist; this.LodInstFadeRange = rage__fwGrassInstanceListDef.LodInstFadeRange; this.OrientToTerrain = rage__fwGrassInstanceListDef.OrientToTerrain; var InstanceList = MetaUtils.ConvertDataArray <rage__fwGrassInstanceListDef__InstanceData>(meta, rage__fwGrassInstanceListDef.InstanceList); this.InstanceList = InstanceList?.Select(e => { var msw = new Mrage__fwGrassInstanceListDef__InstanceData(); msw.Parse(meta, e); return(msw); }).ToList(); }
/// <summary> /// Encode the content using the encoding scheme given /// </summary> /// <param name="content"></param> /// <param name="encoding"></param> /// <returns></returns> public virtual void EncodeInMetafile(MetaFile metafile, int posx, int posy, int modul, String content, Encoding encoding) { bool[][] matrix = calQrcode(encoding.GetBytes(content)); /*int PrintWidth = matrix.Length * qrCodeScale*modul + 1; * int PrintHeight = matrix.Length * qrCodeScale*modul + 1; * MetaObjectDraw metaobj = new MetaObjectDraw(); * metaobj.MetaType = MetaObjectType.Draw; * metaobj.Top = posy; * metaobj.Left = posx; * metaobj.Width = PrintWidth; * metaobj.Height = PrintHeight; * metaobj.DrawStyle = ShapeType.Rectangle; * metaobj.BrushStyle = (int)BrushType.Solid; * metaobj.PenStyle = (int)PenType.Clear; * metaobj.PenWidth = 0; * metaobj.PenColor = GraphicUtils.IntegerFromColor(qrCodeBackgroundColor); * metaobj.BrushColor = GraphicUtils.IntegerFromColor(qrCodeBackgroundColor); * metafile.Pages[metafile.CurrentPage].Objects.Add(metaobj);*/ int bwidth = qrCodeScale * modul; for (int i = 0; i < matrix.Length; i++) { for (int j = 0; j < matrix.Length; j++) { if (matrix[j][i]) { MetaObjectDraw metaobj = new MetaObjectDraw(); metaobj.MetaType = MetaObjectType.Draw; metaobj.Top = posy + i * bwidth; metaobj.Left = posx + j * bwidth; metaobj.Width = bwidth; metaobj.Height = bwidth; metaobj.DrawStyle = ShapeType.Rectangle; metaobj.BrushStyle = (int)BrushType.Solid; metaobj.PenStyle = (int)PenType.Solid; metaobj.PenWidth = 0; metaobj.PenColor = GraphicUtils.IntegerFromColor(qrCodeForegroundColor); metaobj.BrushColor = GraphicUtils.IntegerFromColor(qrCodeForegroundColor); metafile.Pages[metafile.CurrentPage].Objects.Add(metaobj); } } } }
private void TryUpringAddGUID(Upbring upbring, string file, Upset package, InstallSpecType type, string destination) { if (file.EndsWith(".meta")) { return; } string metaPath = Path.Combine(destination, file + ".meta"); if (!File.Exists(metaPath)) { upbring.AddLocation(package, type, Path.Combine(destination, file)); return; } MetaFile meta = MetaFile.FromFile(metaPath); upbring.AddGUID(package, type, meta.Guid); }
// #region public void Save(...); // public void Save() { // if (this.HasChanges) { // // rootmetadata_.ExtendedMetadata.SaveState_toFile( // filenameextendedmetadata_ // ); // for (int i = 0; i < rootmetadata_.SchemaCollection.Count; i++) { // rootmetadata_.SchemaCollection[i].SaveState_toFile( // Path.Combine( // Path.GetDirectoryName(filenameextendedmetadata_), // rootmetadata_.ExtendedMetadata.MetadataIndex[i].XMLFileName // ) // ); // } // // haschanges_ = false; // } // } // #endregion // #region public void Build(...); public void Build(OGen.Libraries.Generator.Build notifyBase_in) { #region string _outputDir = ...; string _outputDir = System.IO.Directory.GetParent( Path.GetDirectoryName(this.filenameextendedmetadata_) ).FullName; #endregion if (notifyBase_in != null) { notifyBase_in("generating...", true); } MetaFile[] _metafiles = new MetaFile[1 + this.rootmetadata_.MetadataFiles.MetadataFiles.Count]; _metafiles[0] = new MetaFile( this.filenameextendedmetadata_, XS__metadata.METADATA ); for (int i = 0; i < this.rootmetadata_.MetadataFiles.MetadataFiles.Count; i++) { _metafiles[1 + i] = new MetaFile( Path.Combine( Path.GetDirectoryName(this.filenameextendedmetadata_), this.rootmetadata_.MetadataFiles.MetadataFiles[i].XMLFileName ), XS__schema.SCHEMA ); } new OGenGenerator( #if !NET_1_1 System.Configuration.ConfigurationManager.AppSettings #else System.Configuration.ConfigurationSettings.AppSettings #endif ["Templates"], _outputDir, _metafiles ).Build( notifyBase_in, this.rootmetadata_ ); if (notifyBase_in != null) { notifyBase_in("...finished", true); } }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.lodDist = this.LodDist; this.MetaStructure.flags = this.Flags; this.MetaStructure.specialAttribute = this.SpecialAttribute; this.MetaStructure.bbMin = this.BbMin; this.MetaStructure.bbMax = this.BbMax; this.MetaStructure.bsCentre = this.BsCentre; this.MetaStructure.bsRadius = this.BsRadius; this.MetaStructure.hdTextureDist = this.HdTextureDist; this.MetaStructure.name = (uint)this.Name; this.MetaStructure.textureDictionary = (uint)this.TextureDictionary; this.MetaStructure.clipDictionary = (uint)this.ClipDictionary; this.MetaStructure.drawableDictionary = (uint)this.DrawableDictionary; this.MetaStructure.physicsDictionary = (uint)this.PhysicsDictionary; this.MetaStructure.assetType = this.AssetType; this.MetaStructure.assetName = (uint)this.AssetName; // Extensions var extPtrs = new List <MetaPOINTER>(); /* * if (this.ExtensionDefLightEffects != null) * this.AddMetaPointers(mb, extPtrs, MetaName.CExtensionDefLightEffect, this.ExtensionDefLightEffects.Select(e => { e.Build(mb); return e.MetaStructure; })); * * if (this.ExtensionDefSpawnPointOverrides != null) * this.AddMetaPointers(mb, extPtrs, MetaName.CExtensionDefSpawnPointOverride, this.ExtensionDefSpawnPointOverrides.Select(e => { e.Build(mb); return e.MetaStructure; })); * * if (this.ExtensionDefDoors != null) * this.AddMetaPointers(mb, extPtrs, MetaName.CExtensionDefDoor, this.ExtensionDefDoors.Select(e => { e.Build(mb); return e.MetaStructure; })); * * if (this.rage__PhVerletClothCustomBounds != null) * this.AddMetaPointers(mb, extPtrs, MetaName.rage__phVerletClothCustomBounds, this.rage__PhVerletClothCustomBounds.Select(e => { e.Build(mb); return e.MetaStructure; })); */ this.MetaStructure.extensions = mb.AddPointerArray(extPtrs.ToArray()); MCBaseArchetypeDef.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.version = this.Version; this.MetaStructure.flags = this.Flags; this.MetaStructure.name = mb.AddStringPtr(this.Name); this.MetaStructure.exportedBy = mb.AddStringPtr("GTAUtil"); this.MetaStructure.owner = mb.AddStringPtr(this.Owner); this.MetaStructure.time = mb.AddStringPtr(this.Time); MCBlockDesc.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Build(MetaBuilder mb, bool isRoot = false) { // this.MetaStructure.TypeNames = this.TypeNames; // this.MetaStructure.PedModelSetNames = this.PedModelSetNames; // this.MetaStructure.VehicleModelSetNames = this.VehicleModelSetNames; // this.MetaStructure.GroupNames = this.GroupNames; // this.MetaStructure.InteriorNames = this.InteriorNames; // this.MetaStructure.RequiredIMapNames = this.RequiredIMapNames; MCScenarioPointLookUps.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.pedcompID = this.PedcompID; this.MetaStructure.maskID = this.MaskID; this.MetaStructure.shaderVariableHashString = this.ShaderVariableHashString; // this.MetaStructure.tracks = this.Tracks; // this.MetaStructure.ids = this.Ids; // this.MetaStructure.components = this.Components; MCShaderVariableComponent.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.Unk_3371516811 = this.Unk_3371516811; if (this.Unk_1756136273 != null) this.MetaStructure.Unk_1756136273 = mb.AddItemArrayPtr((MetaName) (1535046754), this.Unk_1756136273.Select(e => {e.Build(mb); return e.MetaStructure; }).ToArray()); MUnk_1535046754.AddEnumAndStructureInfo(mb); MUnk_3538495220.AddEnumAndStructureInfo(mb); if(isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.name = this.Name; this.MetaStructure.offsetPosition = this.OffsetPosition; this.MetaStructure.Unk_1095612811 = this.Unk_1095612811; this.MetaStructure.expressionName = this.ExpressionName; this.MetaStructure.Unk_2766477159 = this.Unk_2766477159; this.MetaStructure.Unk_1562817888 = this.Unk_1562817888; MCExtensionDefExpression.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Parse(MetaFile meta, CCarGen CCarGen) { this.Meta = meta; this.MetaStructure = CCarGen; this.Position = CCarGen.position; this.OrientX = CCarGen.orientX; this.OrientY = CCarGen.orientY; this.PerpendicularLength = CCarGen.perpendicularLength; this.CarModel = CCarGen.carModel; this.Flags = CCarGen.flags; this.BodyColorRemap1 = CCarGen.bodyColorRemap1; this.BodyColorRemap2 = CCarGen.bodyColorRemap2; this.BodyColorRemap3 = CCarGen.bodyColorRemap3; this.BodyColorRemap4 = CCarGen.bodyColorRemap4; this.PopGroup = CCarGen.popGroup; this.Livery = CCarGen.livery; }
public override void Parse(MetaFile meta, Unk_94549140 Unk_94549140) { this.Meta = meta; this.MetaStructure = Unk_94549140; this.AudioId = Unk_94549140.audioId; this.ExpressionMods = Unk_94549140.expressionMods; var texData = MetaUtils.ConvertDataArray <Unk_254518642>(meta, Unk_94549140.texData); this.TexData = texData?.Select(e => { var msw = new MUnk_254518642(); msw.Parse(meta, e); return(msw); }).ToList(); this.RenderFlags = Unk_94549140.renderFlags; this.PropFlags = Unk_94549140.propFlags; this.Flags = Unk_94549140.flags; this.AnchorId = Unk_94549140.anchorId; //this.PropId = Unk_94549140.propId; this.Unk_2894625425 = Unk_94549140.Unk_2894625425; }
public override void Build(MetaBuilder mb, bool isRoot = false) { // this.MetaStructure.AddList = this.AddList; // this.MetaStructure.RemoveList = this.RemoveList; this.MetaStructure.CamPos = this.CamPos; this.MetaStructure.CamDir = this.CamDir; // this.MetaStructure.Unk_1762439591 = this.Unk_1762439591; this.MetaStructure.Flags = this.Flags; MCStreamingRequestFrame.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.Unk_860552138 = this.Unk_860552138; this.MetaStructure.Unk_3824598937 = this.Unk_3824598937; this.MetaStructure.Unk_496029782 = this.Unk_496029782; this.MetaStructure.Unk_3374647798 = this.Unk_3374647798; this.MetaStructure.Unk_2690909759 = this.Unk_2690909759; this.MetaStructure.Unk_3691675019 = this.Unk_3691675019; Mrage__spdGrid2D.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.inclusions = this.Inclusions; this.MetaStructure.exclusions = this.Exclusions; this.MetaStructure.texId = this.TexId; this.MetaStructure.inclusionId = this.InclusionId; this.MetaStructure.exclusionId = this.ExclusionId; this.MetaStructure.distribution = this.Distribution; MUnk_254518642.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
private MetaFile ReadMetaFile(FileInfo archiveFile) { FileInfo filePath = MetaFilePath(archiveFile); if (!filePath.Exists) { return(null); } string text = File.ReadAllText(filePath.FullName); if (string.IsNullOrWhiteSpace(text)) { return(null); } return(MetaFile.FromJson(text, _logger)); }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.name = this.Name; this.MetaStructure.Unk_173599222 = this.Unk_173599222; this.MetaStructure.Unk_2991454271 = this.Unk_2991454271; this.MetaStructure.Unk_3598106198 = this.Unk_3598106198; this.MetaStructure.Unk_2095974912 = this.Unk_2095974912; this.MetaStructure.Unk_672172037 = this.Unk_672172037; MUnk_253191135.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.name = this.Name; this.MetaStructure.sphere = this.Sphere; this.MetaStructure.percentage = this.Percentage; this.MetaStructure.range = this.Range; this.MetaStructure.startHour = this.StartHour; this.MetaStructure.endHour = this.EndHour; MCMloTimeCycleModifier.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public MetaFile GetMetaFile() { // Execute the report and save the memory stream and // the mimetype on cache string cacheid = GetCacheId(); // Check if there is a metafile MetaFile meta = (MetaFile)Page.Cache[cacheid + "MetaFile"]; PrintOutNet prdriver = (PrintOutNet)Page.Cache[cacheid + "PrintOut"]; if (prdriver == null) { meta = null; } if (meta == null) { Report rp = (Report)Page.Cache[cacheid + "Report"]; if (rp == null) { string filename = ReportFileName; if (filename != "") { rp = new Report(); // Async execution rp.AsyncExecution = AsyncExecution; rp.AsyncPriority = AsyncPriority; ReportReader reader = new ReportReader(rp); reader.LoadFromFile(Page.Server.MapPath(filename)); meta = rp.MetaFile; meta.ForwardOnly = false; prdriver = new PrintOutNet(); prdriver.OptimizeWMF = WMFOptimization.Gdiplus; Page.Cache.Insert(cacheid + "Report", rp, null, DateTime.Now.AddMinutes(30), TimeSpan.Zero); Page.Cache.Insert(cacheid + "MetaFile", meta, null, DateTime.Now.AddMinutes(30), TimeSpan.Zero); Page.Cache.Insert(cacheid + "PrintOut", prdriver, null, DateTime.Now.AddMinutes(30), TimeSpan.Zero); // Assign parameters to the report here rp.BeginPrint(prdriver); } } } return(meta); }
public override void Build(MetaBuilder mb, bool isRoot = false) { this.MetaStructure.Position = this.Position; this.MetaStructure.NormalX = this.NormalX; this.MetaStructure.NormalY = this.NormalY; this.MetaStructure.Color = this.Color; this.MetaStructure.Scale = this.Scale; this.MetaStructure.Ao = this.Ao; this.MetaStructure.Pad = this.Pad; Mrage__fwGrassInstanceListDef__InstanceData.AddEnumAndStructureInfo(mb); if (isRoot) { mb.AddItem(this.MetaName, this.MetaStructure); this.Meta = mb.GetMeta(); } }
public MetaCont(MetaFile meta) { Meta = meta; if (meta.StructureInfos != null) { foreach (var si in meta.StructureInfos) { structInfos[(MetaName)si.StructureNameHash] = si; } } if (meta.EnumInfos != null) { foreach (var ei in meta.EnumInfos) { enumInfos[(MetaName)ei.EnumNameHash] = ei; } } }
public void Build( OGen.Libraries.Generator.Build notifyBase_in, Statistics statistics_in, params string[] templateTypes_in ) { #region string _outputDir = ...; string _outputDir = this.ParentDirectoryname; #endregion if (notifyBase_in != null) notifyBase_in("generating...", true); // ToDos: now! need to save MetadataDB to xml file MetaFile[] _metafiles = new MetaFile[this.metadata_.MetadataFiles.MetadataFiles.Count]; for (int i = 0; i < this.metadata_.MetadataFiles.MetadataFiles.Count; i++) { _metafiles[i] = new MetaFile( Path.Combine( this.Directoryname, this.metadata_.MetadataFiles.MetadataFiles[i].XMLFileName ), this.metadata_.MetadataFiles.MetadataFiles[i].XMLFileType ); } new OGenGenerator( #if !NET_1_1 System.Configuration.ConfigurationManager.AppSettings #else System.Configuration.ConfigurationSettings.AppSettings #endif ["Templates"], this.metadata_dbconnectionstrings(), _outputDir, _metafiles ).Build( notifyBase_in, this.metadata_, statistics_in, templateTypes_in ); if (notifyBase_in != null) notifyBase_in("...finished", true); }
// #region public void Save(...); // public void Save() { // if (this.HasChanges) { // // metadata_.SaveState_toFile( // filename_ // ); // // haschanges_ = false; // } // } // #endregion #region public void Build(...); public void Build(OGen.Libraries.Generator.Build notifyBase_in) { #region string _outputDir = ...; string _outputDir = System.IO.Directory.GetParent( Path.GetDirectoryName(this.filename_) ).FullName; #endregion if (notifyBase_in != null) notifyBase_in("generating...", true); MetaFile[] _metafiles = new MetaFile[this.rootmetadata_.MetadataFiles.MetadataFiles.Count]; for (int i = 0; i < this.rootmetadata_.MetadataFiles.MetadataFiles.Count; i++) { _metafiles[i] = new MetaFile( Path.Combine( Path.GetDirectoryName(this.filename_), this.rootmetadata_.MetadataFiles.MetadataFiles[i].XMLFileName ), XS__documentation.DOCUMENTATION ); } new OGenGenerator( #if !NET_1_1 System.Configuration.ConfigurationManager.AppSettings #else System.Configuration.ConfigurationSettings.AppSettings #endif ["Templates"], _outputDir, _metafiles ).Build( notifyBase_in, this.rootmetadata_ ); if (notifyBase_in != null) notifyBase_in("...finished", true); }