/*Loading Application configuration*/ internal static void LoadAppConfig() { /*Loading Application configuration*/ udlDoubleM = AppWRDoubleM.ReadSetting("DoubleM_UDL").Trim(); _blnFirewll = Convert.ToBoolean(AppWRDoubleM.ReadSetting("Firewall")); _sProxy = AppWRDoubleM.ReadSetting("Proxy").Trim(); _sUID = AppWRDoubleM.ReadSetting("UID").Trim(); _sPWD = CryptorEngine.Decrypt(AppWRDoubleM.ReadSetting("PWD"), true); }
/*Loading Application configuration*/ internal static void LoadAppConfig() { /*Loading Application configuration*/ //string aName = System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName; //string aPath = System.IO.Path.GetDirectoryName(aName); //Console.WriteLine("App.Path and App.ExeName Plus Extension Name is " + aPath); _DoubleMPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName); udlDoubleM = AppWRDoubleM.ReadSetting("DoubleM_UDL").Trim(); _sDefaultExcelFile = AppWRDoubleM.ReadSetting("ExcelExport"); _blnFirewll = Convert.ToBoolean(AppWRDoubleM.ReadSetting("Firewall")); _sProxy = AppWRDoubleM.ReadSetting("Proxy").Trim(); _sUID = AppWRDoubleM.ReadSetting("UID").Trim(); _sPWD = CryptorEngine.Decrypt(AppWRDoubleM.ReadSetting("PWD"), true); _sLatestPriceNotOldtThanHour = AppWRDoubleM.ReadSetting("LatestPriceNotOldtThanHour").Trim(); _sBatchKey = AppWRDoubleM.ReadSetting("Batchkey").Trim(); }
private void btnSave_Click(object sender, EventArgs e) { CommonDoubleM._blnFirewll = chkProxy.Checked; AppWRDoubleM.WriteSetting("Firewall", CommonDoubleM._blnFirewll.ToString()); try { if (chkProxy.Checked) { CommonDoubleM._sProxy = txtProxySrvName.Text.Trim(); AppWRDoubleM.WriteSetting("Proxy", CommonDoubleM._sProxy); CommonDoubleM._sUID = txtUID.Text.Trim(); AppWRDoubleM.WriteSetting("UID", txtUID.Text.Trim()); CommonDoubleM._sPWD = txtPWD.Text.Trim(); AppWRDoubleM.WriteSetting("PWD", CryptorEngine.Encrypt(CommonDoubleM._sPWD, true)); } // CommonDoubleM.LoadAppConfig(); } catch (Exception ex) { CommonDoubleM.LogDM(ex.Message); } }