private void btnConfig_Click(object sender, EventArgs e) { FormConfig formConfig = new FormConfig(); formConfig.ShowDialog(); ServerConfig.LoadGrid(dataGridView1, ddlGroup.SelectedValue.ToString()); ServerConfig.LoadDDLGroup(ddlGroup); }
public FormMain() { InitializeComponent(); dataGridView1.AutoGenerateColumns = false; ddlColor.SelectedIndex = 4; try { ServerConfig.LoadGrid(dataGridView1, "All"); ServerConfig.LoadDDLGroup(ddlGroup); } catch (Exception ex) { MessageBox.Show(ex.Message); } try { Configuration cfa = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoaming); txtDesktopwidth.Text = cfa.AppSettings.Settings["desktopwidth"].Value; txtDesktopheight.Text = cfa.AppSettings.Settings["desktopheight"].Value; } catch { } }