private void btnLoadConfig_Click(object sender, EventArgs e) { try { if (cboConfigs.Items.Count == 0) { return; } string name = ConfigUtil.ChangeConfig(m_LoadedConfig, ((ConfigEntries)cboConfigs.SelectedItem), chkBxBackupConfig.Checked); initForm(); //txtBxLoadedConfig.Text = name; //List<ConfigEntries> ConfigNames = ConfigUtil.GetAllConfigFilesNames(true); //if (ConfigNames != null) //{ // cboConfigs.DataSource = ConfigNames; // cboConfigs.DisplayMember = "Name"; //} MessageBox.Show("Config file has been changed"); } catch (Exception ex) { MessageBox.Show("btnLoadConfig\n" + ex.ToString()); } }
private void btnLoadConfig_Click(object sender, EventArgs e) { try { if (cboConfigs.Items.Count == 0) { return; } ConfigUtil.ChangeConfig(m_LoadedConfig, ((ConfigEntries)cboConfigs.SelectedItem)); m_ReloadMonitor.Reload(); MessageBox.Show("Config file has been changed"); } catch (Exception ex) { MessageBox.Show("btnLoadConfig\n" + ex.Message); } }
private void btnLoadConfig_Click(object sender, EventArgs e) { try { if (cboConfigs.Items.Count == 0) { return; } string name = ConfigUtil.ChangeConfig(m_LoadedConfig, ((ConfigEntries)cboConfigs.SelectedItem), this.chkBxBackupConfig.Checked); initForm(configType); m_ReloadMonitor.Reload(); MessageBox.Show("Config file has been changed"); } catch (Exception ex) { MessageBox.Show("btnLoadConfig\n" + ex.ToString()); } }