private void FeatureEditBtn_Click(object sender, EventArgs e) { if (this.SelectedFeature != null) { int feature = this.fRace.Features.IndexOf(this.SelectedFeature); OptionFeatureForm optionFeatureForm = new OptionFeatureForm(this.SelectedFeature); if (optionFeatureForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.fRace.Features[feature] = optionFeatureForm.Feature; this.update_features(); } } }
private void FeatureAddBtn_Click(object sender, EventArgs e) { OptionFeatureForm optionFeatureForm = new OptionFeatureForm(new Feature() { Name = "New Feature" }); if (optionFeatureForm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { this.fRace.Features.Add(optionFeatureForm.Feature); this.update_features(); } }
private void FeatureEditBtn_Click(object sender, EventArgs e) { if (SelectedFeature != null) { int index = fLevel.Features.IndexOf(SelectedFeature); OptionFeatureForm dlg = new OptionFeatureForm(SelectedFeature); if (dlg.ShowDialog() == DialogResult.OK) { fLevel.Features[index] = dlg.Feature; update_features(); } } }
private void FeatureAddBtn_Click(object sender, EventArgs e) { Feature ft = new Feature(); ft.Name = "New Feature"; OptionFeatureForm dlg = new OptionFeatureForm(ft); if (dlg.ShowDialog() == DialogResult.OK) { fLevel.Features.Add(dlg.Feature); update_features(); } }