2 using System.Collections.Generic;
6 using System.Xml.Serialization;
13 private string _LastRomName =
"";
17 get {
return _LastRomName; }
18 set { _LastRomName = value; }
20 private string _LastTableFilename =
"";
24 get {
return _LastTableFilename; }
25 set { _LastTableFilename = value; }
27 private string _LastGlobalConfigFilename =
"";
31 get {
return _LastGlobalConfigFilename; }
32 set { _LastGlobalConfigFilename = value; }
35 private List<string> _RomNames =
new List<string>();
39 get {
return _RomNames; }
40 set { _RomNames = value; }
44 private List<string> _TableFilenames =
new List<string>();
48 get {
return _TableFilenames; }
49 set { _TableFilenames = value; }
53 private List<string> _GlobalConfigFilenames =
new List<string>();
57 get {
return _GlobalConfigFilenames; }
58 set { _GlobalConfigFilenames = value; }
61 private int _PulseDurationMs = 100;
65 get {
return _PulseDurationMs; }
66 set { _PulseDurationMs = value.Limit(10,5000); }
75 using (MemoryStream ms =
new MemoryStream())
77 new XmlSerializer(typeof(
Settings)).Serialize(ms,
this);
80 using (StreamReader sr =
new StreamReader(ms, Encoding.Default))
87 new DirectoryInfo(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
"config")).CreateDirectoryPath();
88 Xml.WriteToFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
"config",
"DirectOutputTesterSettings.xml"));
101 string SettingsXML =
DirectOutput.
General.
FileReader.ReadFileToString(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
"config",
"DirectOutputTesterSettings.xml"));
103 using (MemoryStream ms =
new MemoryStream(Encoding.Default.GetBytes(SettingsXML)))
List< string > TableFilenames
Static class to read files.
string LastGlobalConfigFilename
List< string > GlobalConfigFilenames
static Settings LoadSettings()
The namespace DirectOutput.General contains classes for general use.