private void templateComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (bEnchit) { return; } if (templateComboBox.SelectedIndex >= 0 && templateComboBox.SelectedIndex < templateComboBox.Items.Count) { if (templateComboBox.SelectedIndex == templateComboBox.Items.Count - 1) { bEnchit = true; templateComboBox.SelectedIndex = p_lastSelectedTemplateIndex; bEnchit = false; RatedEventsEditor d = new RatedEventsEditor(); d.OnConfListChanged += new TBButtonPressed(OnConfigurationListChanged); RatedEventsEditorController dc = new RatedEventsEditorController(d); dc.ShowInContainer(Controller.ViewContainer, GVControlAlign.Fill); } else { SelectedConfiguration = GCConfigRatedManager.Configurations[templateComboBox.SelectedIndex]; Properties.Settings.Default.RatedConfiguration = SelectedConfiguration.Title; Properties.Settings.Default.Save(); Recalculate(); p_lastSelectedTemplateIndex = templateComboBox.SelectedIndex; } } }
public RatedEventsEditorController(RatedEventsEditor re) { View = re; re.Controller = this; }