Exemple #1
0
        private void SaveSettings()
        {
            _db.PutSettingBool("NetlogDirAutoMode", radioButton_Auto.Checked);
            _db.PutSettingString("Netlogdir", textBoxNetLogDir.Text);

            _db.PutSettingInt("FormWidth", this.Width);
            _db.PutSettingInt("FormHeight", this.Height);
            _db.PutSettingInt("FormTop", this.Top);
            _db.PutSettingInt("FormLeft", this.Left);
            _db.PutSettingString("DefaultMapCenter", textBoxHomeSystem.Text);
            _db.PutSettingDouble("DefaultMapZoom", Double.Parse(textBoxDefaultZoom.Text));
            _db.PutSettingBool("CentreMapOnSelection", radioButtonHistorySelection.Checked);
            routeControl1.SaveSettings();
            _db.PutSettingBool("EDSMPushOnly", travelHistoryControl1.EDSMPushOnly);
            EDDConfig.UseDistances       = checkBox_Distances.Checked;
            EDDConfig.EDSMLog            = checkBoxEDSMLog.Checked;
            EDDConfig.CanSkipSlowUpdates = checkboxSkipSlowUpdates.Checked;

            List <EDCommander> edcommanders = (List <EDCommander>)dataGridViewCommanders.DataSource;

            EDDConfig.StoreCommanders(edcommanders);
            dataGridViewCommanders.DataSource = null;
            dataGridViewCommanders.DataSource = EDDConfig.listCommanders;
            dataGridViewCommanders.Update();
        }