1 using System.Collections.Generic;
3 using DirectOutput.Cab;
4 using DirectOutput.Cab.Toys;
5 using DirectOutput.GlobalConfiguration;
6 using DirectOutput.Table;
7 using DirectOutput.Cab.Toys.LWEquivalent;
9 namespace DirectOutput.LedControl.Loader
22 public Dictionary<int, TableConfig> GetTableConfigDictonary(
string RomName)
24 Dictionary<int, TableConfig> D =
new Dictionary<int, TableConfig>();
26 bool FoundMatch =
false;
41 if (FoundMatch)
return D;
48 if (RomName.ToUpper().StartsWith(
"{0}_".Build(TC.
ShortRomName.ToUpper())))
57 if (FoundMatch)
return D;
83 public bool ContainsConfig(
string RomName)
85 return GetTableConfigDictonary(RomName).Count > 0;
95 public void LoadLedControlFiles(IList<string> LedControlFilenames,
bool ThrowExceptions =
false)
97 for (
int i = 0; i < LedControlFilenames.Count; i++)
99 LoadLedControlFile(LedControlFilenames[i], i + 1, ThrowExceptions);
108 public void LoadLedControlFiles(Dictionary<int, FileInfo> LedControlIniFiles,
bool ThrowExceptions =
false)
110 foreach (KeyValuePair<int,FileInfo> F
in LedControlIniFiles)
112 LoadLedControlFile(F.Value.FullName, F.Key, ThrowExceptions);
123 public void LoadLedControlFile(
string LedControlFilename,
int LedWizNumber,
bool ThrowExceptions =
false)
125 Log.
Write(
"Loading LedControl file {0}".Build(LedControlFilename));
144 LoadLedControlFiles(LedControlFilenames, ThrowExceptions);