internal static Stream BuildRomFS(string outfile, string infile, string _patchDir) { OutFile = outfile; ROOT_DIR = infile; if (outfile != null) { if (File.Exists(TempFile)) { File.Delete(TempFile); } } FileNameTable FNT = new FileNameTable(ROOT_DIR); RomfsFile[] RomFiles = new RomfsFile[FNT.NumFiles]; LayoutManager.Input[] In = new LayoutManager.Input[FNT.NumFiles]; updateTB("Creating Layout..."); for (int i = 0; i < FNT.NumFiles; i++) { In[i] = new LayoutManager.Input { FilePath = FNT.NameEntryTable[i].FullName, AlignmentSize = 0x10 }; } String[] _relativePaths = new String[FNT.NumFiles]; for (int i = 0; i < _relativePaths.Length; ++i) { _relativePaths[i] = makePathRelative(In[i].FilePath, ROOT_DIR); } if (_patchDir != null) { string[] _altFiles = Directory.GetFiles(_patchDir, "*", SearchOption.AllDirectories); for (int i = 0; i < _altFiles.Length; ++i) { string _stippedStart = makePathRelative(_altFiles[i], _patchDir); int j; for (j = 0; j < In.Length; ++j) { if (_relativePaths[j] == _stippedStart) { In[j].FilePath = _altFiles[i]; break; } } } } LayoutManager.Output[] Out = LayoutManager.Create(In); for (int i = 0; i < Out.Length; i++) { RomFiles[i] = new RomfsFile { Offset = Out[i].Offset, PathName = _relativePaths[i], FullName = FNT.NameEntryTable[i].FullName, realFilePath = In[i].FilePath, Size = Out[i].Size }; } Stream _possibleRetStream; using (MemoryStream memoryStream = new MemoryStream()) { updateTB("Creating RomFS MetaData..."); BuildRomFSHeader(memoryStream, RomFiles, ROOT_DIR); _possibleRetStream = MakeRomFSData(RomFiles, memoryStream, outfile != null ? outfile : null); } if (outfile != null) { return(null); } else { return(_possibleRetStream); } }
public Task <TillLayout> GetTillLayout() { return(Task.Run(() => LayoutManager.Create(CommerceRuntimeManager.Runtime).GetTillLayout())); }
internal static LayoutManager CreateLayoutManager(this DataSet dataSet, Action <DataPresenter.TemplateBuilder> buildTemplateAction) { return(dataSet.CreateManager(buildTemplateAction, (t, d) => LayoutManager.Create(null, t, d, d.GetRowMatchColumns()))); }
public Task <PagedResult <ButtonGrid> > GetButtonGridsByIds(GetButtonGridsByIdsCriteria getButtonGridsByIdsCriteria, QueryResultSettings queryResultSettings) { return(Task.Run(() => LayoutManager.Create(CommerceRuntimeManager.Runtime).GetButtonGridsByIds(getButtonGridsByIdsCriteria.ButtonGridIds, queryResultSettings))); }
public Task <ButtonGrid> GetButtonGridById(string buttonGridId) { return(Task.Run(() => LayoutManager.Create(CommerceRuntimeManager.Runtime).GetButtonGridById(buttonGridId))); }
public Task <PagedResult <ButtonGrid> > GetButtonGrids(QueryResultSettings queryResultSettings) { return(Task.Run(() => LayoutManager.Create(CommerceRuntimeManager.Runtime).GetButtonGrids(queryResultSettings))); }