private void LoadBlindStructs() { BlindsForm form = new BlindsForm(); try { structures = form.LoadXml(false); } catch (Exception /*e*/) { //MessageBox.Show(e.Message); MessageBox.Show("Loading of blinds.xml failed"); //Application.Exit(); return; } comboBoxCasinos.BeginUpdate(); comboBoxCasinos.Items.Clear(); foreach (string sitename in structures.Keys) { comboBoxCasinos.Items.Add(sitename); } comboBoxCasinos.EndUpdate(); if (comboBoxCasinos.Items.Count > 0) comboBoxCasinos.SelectedIndex = 0; #if DEBUGOMA tabPage4.AllowDrop = true; #endif form = null; }
private void blindStructuresToolStripMenuItem_Click(object sender, EventArgs e) { BlindsForm form = new BlindsForm(); try { form.LoadXml(true); } catch (Exception exp) { Debug.WriteLine(exp.ToString()); MessageBox.Show("Reading of blinds.xml failed"); return; } form.ShowDialog(); LoadBlindStructs(); }