public void ReadSettingTest() { var appConfig = new AppConfiguration(); appConfig.AddOrUpdateAppSettings("Slider33Hz", "50"); double actualValue = appConfig.ReadSetting("Slider33Hz"); Assert.AreEqual(50, actualValue); appConfig.AddOrUpdateAppSettings("Slider32Hz", "60"); Assert.AreEqual(60, appConfig.ReadSetting("Slider32Hz")); appConfig.AddOrUpdateAppSettings("Volume", "50"); Assert.AreEqual(50, appConfig.ReadSetting("Volume")); appConfig.AddOrUpdateAppSettings("Volume", "100"); Assert.AreEqual(100, appConfig.ReadSetting("Volume")); Assert.AreEqual(0, appConfig.ReadSetting("dasdasdasd")); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); CultureInfo myCI = new CultureInfo("en-GB", false); myCI.DateTimeFormat.ShortDatePattern = "dd-MM-yyyy"; Thread.CurrentThread.CurrentCulture = myCI; var dataFolder = General.GetDataFolder("CenturyFinCorpApp\\bin\\Debug", "DataAccess\\Data\\"); if (AppConfiguration.AddOrUpdateAppSettings("SourceFolder", dataFolder)) { //LogHelper.WriteLog($"started application"); Application.Run(new frmIndexForm()); } //frmPrediction.Predict(); }
public void SaveVolumeSetting(double volume) { appConfiguration.AddOrUpdateAppSettings("Volume", volume.ToString()); }
private void btnConfig_Click(object sender, System.EventArgs e) { AppConfiguration.AddOrUpdateAppSettings("interest", txtInterest.Text); }