private void btnLayoutManager_Click(object sender, EventArgs e) { Object selected = comboLayout.SelectedItem; LayoutBoxEditor layoutBoxEditor = new LayoutBoxEditor(layoutBoxBindingSource); layoutBoxEditor.ShowDialog(); layoutBoxBindingSource.Clear(); foreach(Object o in layoutBoxEditor.Layouts) { layoutBoxBindingSource.Add(o); } comboLayout.SelectedItem = selected; }
private void btnLayoutManager_Click(object sender, EventArgs e) { Object selected = comboLayout.SelectedItem; LayoutBoxEditor layoutBoxEditor = new LayoutBoxEditor(layoutBoxBindingSource); layoutBoxEditor.ShowDialog(); layoutBoxBindingSource.Clear(); foreach (Object o in layoutBoxEditor.Layouts) { layoutBoxBindingSource.Add(o); } comboLayout.SelectedItem = selected; }