Exemplo n.º 1
0
 /// <summary>
 /// Maps the definition from arguments.
 /// </summary>
 /// <param name="args">The arguments.</param>
 protected virtual void MapDefinitionFromArgs(ParsingArgs args)
 {
     args.Definition.ContentSHA   = args.Args.ContentSHA;
     args.Definition.Dependencies = args.Args.ModDependencies;
     args.Definition.ModName      = args.Args.ModName;
     args.Definition.File         = args.Args.File;
     args.Definition.Type         = FormatType(args.Args.File, args.TypeOverride);
 }
Exemplo n.º 2
0
 private void ParseSingleFile(string fileName)
 {
     formDialog.CurrentBook = Book.Open(fileName);
     formDialog.PageNum     = 0;
     foreach (string key in formDialog.CurrentBook.Pages.Keys)
     {
         TableParserBase tableParser = TableReaderApp.SelectParserObjectFromAvailableModules
                                           (formDialog.CurrentBook.Pages[key], Application.StartupPath + "\\Modules");
         if (tableParser != null)
         {
             tableParser.SetProgressValue += new TableParserBase.SetProgressValueHandler(bgPriceWorker.ReportProgress);
             formDialog.CurrentPage        = formDialog.CurrentBook.Pages[key];
             formDialog.PageNum++;
             string      templateFile = (txtResultFile.Text.Length > 0) ? txtResultFile.Text : null;
             ParsingArgs args         = new ParsingArgs(templateFile,
                                                        Application.StartupPath + "\\Result", TableReaderApp.WorkerArgs, 500, 2);
             tableParser.DoParsingWithDivisionVolumesOfIncomingPage
                 (formDialog.CurrentBook.Name, formDialog.CurrentBook.Pages[key], args);
         }
     }
     formDialog.CurrentBook.Close();
 }