Esempio n. 1
0
        void LoadConfig()
        {
            var cfg = Setting = MapSetting.Current;

            txtAddress.Text          = cfg.Address;
            txtCity.Text             = cfg.City;
            txtLocation.Text         = cfg.Location;
            txtLocation2.Text        = cfg.Location2;
            chkFormatAddress.Checked = cfg.FormatAddress;

            //cbMap.SelectedValue = cfg.Map;
            //cbMethod.SelectedValue = cfg.Method;
            //cbCoordtype.SelectedValue = cfg.Coordtype;
        }
Esempio n. 2
0
        void SaveConfig()
        {
            var cfg = Setting = MapSetting.Current;

            cfg.Address       = txtAddress.Text;
            cfg.City          = txtCity.Text;
            cfg.Location      = txtLocation.Text;
            cfg.Location2     = txtLocation2.Text;
            cfg.FormatAddress = chkFormatAddress.Checked;

            cfg.Map       = (cbMap.SelectedItem as Type)?.Name;
            cfg.Method    = (cbMethod.SelectedItem as MethodInfo)?.Name;
            cfg.Coordtype = cbCoordtype.SelectedItem as String;

            cfg.Save();
        }