private void comboBoxProfile_SelectedIndexChanged(object sender, EventArgs e) { string settingsPath = settingsManager.GetSettingsFilePath(comboBoxProfile.Text, "settings.json"); selSettings = MySettings.Load(settingsPath); if (selSettings.poloniexkey == "") { textBoxPoloniexKey.Text = "Empty"; textBoxPoloniexSecret.Text = "Empty"; } else { textBoxPoloniexKey.Text = "******"; textBoxPoloniexSecret.Text = "******"; } if (selSettings.bittrexkey == "") { textBoxBittrexKey.Text = "Empty"; textBoxBittrexSecret.Text = "Empty"; } else { textBoxBittrexKey.Text = "******"; textBoxBittrexSecret.Text = "******"; } checkBoxDefLimitTrade.Checked = selSettings.defaultlimitorders; }
public static void Init() { System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone(); customCulture.NumberFormat.NumberDecimalSeparator = "."; CultureInfo.DefaultThreadCurrentCulture = customCulture; // System.Threading.Thread.CurrentThread.CurrentCulture = customCulture; Global.settingsInit = SettingsInit.Load(Path.Combine(ApplicationPath.directoryAppBin, "init.json")); AppSettingsManager settingsManager = new AppSettingsManager(); string settingsPath = settingsManager.GetSettingsFilePath(Global.settingsInit.currentprofile, "settings.json"); Global.settingsMain = MySettings.Load(settingsPath); }
public static void LoadSettings() { Global.settingsInit = SettingsInit.Load(Path.Combine(ApplicationPath.directoryAppBin, "init.json")); AppSettingsManager settingsManager = new AppSettingsManager(); string settingsPath = settingsManager.GetSettingsFilePath(Global.settingsInit.currentprofile, "settings.json"); Global.settingsMain = MySettings.Load(settingsPath); if (File.Exists(pathAlert)) { AlertManager.settingsAlert = SettingsAlert.Load(pathAlert); } else { AlertManager.settingsAlert = new SettingsAlert(); } AlertManager.alerts = AlertManager.settingsAlert.alerts; }