//This is where the program starts when it is executed static void Main(string[] args) { Console.WriteLine("GathererImageDownloader Version " + GetVersionString()); var options = new CardProcessorOptions(); if (!options.Parse(args)) { ShowUsage(); Pause(); return; } CardProcessor cardImporter; if (File.Exists(cardDataFilename)) { Console.WriteLine("Loading JSON data..."); cardImporter = new CardProcessor(cardDataFilename, options); } else { Console.WriteLine($"ERROR: MTG card data file \"{cardDataFilename}\" is missing."); Pause(); return; } if (File.Exists(mainCardsFilename)) { Console.WriteLine("Processing main card list"); cardImporter.ProcessCardList("Lua/Cards.lua", mainCardsFilename); } else { Console.WriteLine($"\"{otherCardsFilename}\" not found. Skipping main card list."); } if (File.Exists(otherCardsFilename)) { Console.WriteLine("Processing secondary card list"); cardImporter.ProcessCardList("Lua/OtherCards.lua", otherCardsFilename); } else { Console.WriteLine($"\"{otherCardsFilename}\" not found. Skipping secondary card list."); } Console.WriteLine("Process finished."); Pause(); }
}; // EXP is the BFZ Expeditions set /// <summary> /// Constructor of this class /// </summary> /// <param name="jsonFile">JSON file with MTG set data</param> public CardProcessor(string jsonFile, CardProcessorOptions options) { CreateSetList(jsonFile); FilterSetList(); this.options = options; }