private void AddServerButton_Click(object sender, EventArgs e) { //adds server ServerInfoForm InfoForm = new ServerInfoForm(); InfoForm.ShowDialog(); comboBox1.Items.Clear(); LoadXmlFile(); }
private void EditButton_Click(object sender, EventArgs e) { try { ServerInfoForm EditForm = new ServerInfoForm(comboBox1.SelectedItem.ToString(), ComboBoxList[comboBox1.SelectedItem.ToString()]); EditForm.ShowDialog(); LoadXmlFile(); comboBox1.Refresh(); comboBox1.ResetText(); } catch (NullReferenceException) { MessageBox.Show("No server selected!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }