public static void WriteXmlConfig(string inPath) { string filename = inPath + "\\ConfigFiles\\Settings\\MidiSettings.xmc"; string filenamexml = inPath + "\\ConfigFiles\\Settings\\" + Path.GetFileNameWithoutExtension(filename) + ".xml"; if (File.Exists(filename)) { // convert to xml file.. later try away again! SettingsEncrypt.Decrypt(filename, filenamexml); } // read the xml file with all defaults....... m_profile = new Xml(); m_profile.Name = filenamexml; //m_profile.Name = inPath + "\\ConfigFiles\\MidiSettings.xml"; foreach (RaidTheCagesModes val in Enum.GetValues(typeof(RaidTheCagesModes))) { m_profile.SetValue("MidiNotes", val.ToString(), mMidiNotes[(int)val]); } int cnt = 0; foreach (string str in ExtraMidiNotes) { m_profile.SetValue("ExtraMidiNotes", ExtraMidiNotes[cnt], mExtraMidiNotes[cnt]); cnt++; } // now encrypt... SettingsEncrypt.Encrypt(filenamexml, filename); // and delete File.Delete(filenamexml); }
public static void WriteXmlConfig(string inPath) { string filename = inPath + "\\ConfigFiles\\Settings\\LocalisationSettings.xmc"; string filenamexml = inPath + "\\ConfigFiles\\Settings\\" + Path.GetFileNameWithoutExtension(filename) + ".xml"; if (File.Exists(filename)) { // convert to xml file.. later try away again! SettingsEncrypt.Decrypt(filename, filenamexml); } // read the xml file with all defaults....... m_profile = new Xml(); m_profile.Name = filenamexml; //m_profile.Name = inPath + "\\ConfigFiles\\LocalisationSettings.xml"; m_profile.SetValue("LocalisationSettings", "MoneyTreepStep1", mmoneyTreeSettings[0]); m_profile.SetValue("LocalisationSettings", "MoneyTreepStep2", mmoneyTreeSettings[1]); m_profile.SetValue("LocalisationSettings", "MoneyTreepStep3", mmoneyTreeSettings[2]); m_profile.SetValue("LocalisationSettings", "MoneyTreepStep4", mmoneyTreeSettings[3]); m_profile.SetValue("LocalisationSettings", "MoneyTreepStep5", mmoneyTreeSettings[4]); m_profile.SetValue("LocalisationSettings", "MoneyTreepStep6", mmoneyTreeSettings[5]); m_profile.SetValue("LocalisationSettings", "MoneyTreepStep7", mmoneyTreeSettings[6]); m_profile.SetValue("LocalisationSettings", "MoneyTreepStep8", mmoneyTreeSettings[7]); m_profile.SetValue("LocalisationSettings", "MoneyTreepStep9", mmoneyTreeSettings[8]); m_profile.SetValue("LocalisationSettings", "MoneyTreepStep10", mmoneyTreeSettings[9]); // now encrypt... SettingsEncrypt.Encrypt(filenamexml, filename); // and delete File.Delete(filenamexml); }
public static void ReadXmlConfig(string inPath) { string filename = inPath + "\\ConfigFiles\\Settings\\LocalisationSettings.xmc"; string filenamexml = inPath + "\\ConfigFiles\\Settings\\" + Path.GetFileNameWithoutExtension(filename) + ".xml"; if (File.Exists(filename)) { // convert to xml file.. later try away again! SettingsEncrypt.Decrypt(filename, filenamexml); } // read the xml file with all defaults....... m_profile = new Xml(); m_profile.Name = filenamexml; mmoneyTreeSettings[0] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep1", "1"); mmoneyTreeSettings[1] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep2", "2"); mmoneyTreeSettings[2] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep3", "3"); mmoneyTreeSettings[3] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep4", "4"); mmoneyTreeSettings[4] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep5", "5"); mmoneyTreeSettings[5] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep6", "6"); mmoneyTreeSettings[6] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep7", "7"); mmoneyTreeSettings[7] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep8", "8"); mmoneyTreeSettings[8] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep9", "9"); mmoneyTreeSettings[9] = m_profile.GetValue("LocalisationSettings", "MoneyTreepStep10", "10"); if (File.Exists(filenamexml)) { File.Delete(filenamexml); } }
public static void WriteXmlConfig(string inPath) { string filename = inPath + "\\ConfigFiles\\Settings\\GeneralSettings.xmc"; string filenamexml = inPath + "\\ConfigFiles\\Settings\\" + Path.GetFileNameWithoutExtension(filename) + ".xml"; if (File.Exists(filename)) { // convert to xml file.. later try away again! SettingsEncrypt.Decrypt(filename, filenamexml); } // read the xml file with all defaults....... m_profile = new Xml(); m_profile.Name = filenamexml; m_profile.SetValue("GeneralSettings", "Currencysign", mCurrencysign); m_profile.SetValue("GeneralSettings", "Currencysignafteramount", mCurrencysignafteramount); m_profile.SetValue("GeneralSettings", "TimeBeforeDoorCloses", mTimebeforethedoorcloses); m_profile.SetValue("GeneralSettings", "Timebeforettimerstart", mTimebeforettimerstart); m_profile.SetValue("GeneralSettings", "TextBetweenNames", mTextbetweenNames); // now encrypt... SettingsEncrypt.Encrypt(filenamexml, filename); // and delete File.Delete(filenamexml); }
public static void ReadXmlConfig(string inPath) { string filename = inPath + "\\ConfigFiles\\Settings\\ConnectionSettings.xmc"; string filenamexml = inPath + "\\ConfigFiles\\Settings\\" + Path.GetFileNameWithoutExtension(filename) + ".xml"; if (File.Exists(filename)) { // convert to xml file.. later try away again! SettingsEncrypt.Decrypt(filename, filenamexml); } // read the xml file with all defaults....... m_profile = new Xml(); m_profile.Name = filenamexml; //m_profile.Name = inPath + "\\ConfigFiles\\ConnectionSettings.xml"; // get all values mIpAddresses[(int)eEngines.OVERLAY] = m_profile.GetValue("IPAddresses", "OVERLAY", "127.0.0.1"); mIpAddresses[(int)eEngines.PROJECTOR] = m_profile.GetValue("IPAddresses", "LEDFLOOR", "127.0.0.1"); mIpAddresses[(int)eEngines.WISEQ] = m_profile.GetValue("IPAddresses", "WISEQ", "127.0.0.1"); mIpAddresses[(int)eEngines.HOST] = m_profile.GetValue("IPAddresses", "HOST", "127.0.0.1"); mIpAddresses[(int)eEngines.WISEAUDIO] = m_profile.GetValue("IPAddresses", "WISEAUDIO", "127.0.0.1"); mIpAddresses[(int)eEngines.CAGE] = m_profile.GetValue("IPAddresses", "CAGE", "127.0.0.1"); mIpAddresses[(int)eEngines.MIDI] = m_profile.GetValue("IPAddresses", "MIDI", "127.0.0.1"); mIpAddresses[(int)eEngines.EXTRAQA] = m_profile.GetValue("IPAddresses", "EXTRAQA", "127.0.0.1"); mIpAddressesHost2 = m_profile.GetValue("IPAddresses", "HOST2", "127.0.0.1"); // and the ports int.TryParse(m_profile.GetValue("Ports", "OVERLAY", "8020"), out mPorts[(int)eEngines.OVERLAY]); int.TryParse(m_profile.GetValue("Ports", "LEDFLOOR", "8021"), out mPorts[(int)eEngines.PROJECTOR]); int.TryParse(m_profile.GetValue("Ports", "WISEQ", "8022"), out mPorts[(int)eEngines.WISEQ]); int.TryParse(m_profile.GetValue("Ports", "WISEAUDIO", "8023"), out mPorts[(int)eEngines.WISEAUDIO]); int.TryParse(m_profile.GetValue("Ports", "HOST", "8024"), out mPorts[(int)eEngines.HOST]); int.TryParse(m_profile.GetValue("Ports", "CAGE", "8025"), out mPorts[(int)eEngines.CAGE]); int.TryParse(m_profile.GetValue("Ports", "HOSTMESSAGING", "8026"), out mPorts[(int)eEngines.HOSTMESSAGING]); int.TryParse(m_profile.GetValue("Ports", "MIDI", "8300"), out mPorts[(int)eEngines.MIDI]); int.TryParse(m_profile.GetValue("Ports", "EXTRAQA", "8310"), out mPorts[(int)eEngines.EXTRAQA]); int.TryParse(m_profile.GetValue("Ports", "HOST2", "8024"), out mPortHost2); if (File.Exists(filenamexml)) { File.Delete(filenamexml); } }
public static void WriteXmlConfig(string inPath) { string filename = inPath + "\\ConfigFiles\\Settings\\ConnectionSettings.xmc"; string filenamexml = inPath + "\\ConfigFiles\\Settings\\" + Path.GetFileNameWithoutExtension(filename) + ".xml"; if (File.Exists(filename)) { // convert to xml file.. later try away again! SettingsEncrypt.Decrypt(filename, filenamexml); } // read the xml file with all defaults....... m_profile = new Xml(); m_profile.Name = filenamexml; m_profile.SetValue("IPAddresses", "OVERLAY", mIpAddresses[(int)eEngines.OVERLAY]); m_profile.SetValue("IPAddresses", "LEDFLOOR", mIpAddresses[(int)eEngines.PROJECTOR]); m_profile.SetValue("IPAddresses", "WISEQ", mIpAddresses[(int)eEngines.WISEQ]); m_profile.SetValue("IPAddresses", "WISEAUDIO", mIpAddresses[(int)eEngines.WISEAUDIO]); m_profile.SetValue("IPAddresses", "HOST", mIpAddresses[(int)eEngines.HOST]); m_profile.SetValue("IPAddresses", "CAGE", mIpAddresses[(int)eEngines.CAGE]); m_profile.SetValue("IPAddresses", "MIDI", mIpAddresses[(int)eEngines.MIDI]); m_profile.SetValue("IPAddresses", "EXTRAQA", mIpAddresses[(int)eEngines.EXTRAQA]); m_profile.SetValue("IPAddresses", "HOST2", mIpAddressesHost2); m_profile.SetValue("Ports", "OVERLAY", mPorts[(int)eEngines.OVERLAY]); m_profile.SetValue("Ports", "LEDFLOOR", mPorts[(int)eEngines.PROJECTOR]); m_profile.SetValue("Ports", "WISEQ", mPorts[(int)eEngines.WISEQ]); m_profile.SetValue("Ports", "WISEAUDIO", mPorts[(int)eEngines.WISEAUDIO]); m_profile.SetValue("Ports", "HOST", mPorts[(int)eEngines.HOST]); m_profile.SetValue("Ports", "CAGE", mPorts[(int)eEngines.CAGE]); m_profile.SetValue("Ports", "HOSTMESSAGING", mPorts[(int)eEngines.HOSTMESSAGING]); m_profile.SetValue("Ports", "MIDI", mPorts[(int)eEngines.MIDI]); m_profile.SetValue("Ports", "EXTRAQA", mPorts[(int)eEngines.EXTRAQA]); m_profile.SetValue("Ports", "HOST2", mPortHost2); // now encrypt... SettingsEncrypt.Encrypt(filenamexml, filename); // and delete File.Delete(filenamexml); }
public static void ReadXmlConfig(string inPath) { string filename = inPath + "\\ConfigFiles\\Settings\\LocalisationTextSettings.xmc"; string filenamexml = inPath + "\\ConfigFiles\\Settings\\" + Path.GetFileNameWithoutExtension(filename) + ".xml"; if (File.Exists(filename)) { // convert to xml file.. later try away again! SettingsEncrypt.Decrypt(filename, filenamexml); } // read the xml file with all defaults....... m_profile = new Xml(); m_profile.Name = filenamexml; //m_profile.Name = inPath + "\\ConfigFiles\\Settings\\LocalisationSettings.xml"; mLanguageName = m_profile.GetValue("LocalisationTexts", "LanguageName", "Second Language"); foreach (RaidTheCagesModes val in Enum.GetValues(typeof(RaidTheCagesModes))) { mlocalisationTexts[(int)val] = m_profile.GetValue("LocalisationTexts", val.ToString(), GetContinueTextEnglish(val)); } int cnt = 0; foreach (string str in EnglishTexts) { SecondLanguageTexts[cnt] = m_profile.GetValue("LocalisationTexts", EnglishTexts[cnt], EnglishTexts[cnt]); cnt++; } if (File.Exists(filenamexml)) { File.Delete(filenamexml); } }