Exemple #1
0
        private void TestSaveStandart()
        {
            MySettings settings     = new MySettings();
            string     settingsPath = settingsManager.GetSettingsFilePath("Standart", "settings.json");

            settings.Save(settingsPath);
        }
Exemple #2
0
        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;
        }
Exemple #3
0
        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;
        }