private void addFeatButton_Click(object sender, EventArgs e) { this.SaveFeatData(); this.featData = new FeatData(); this.featList.Add(this.featData); this.featListBox.SelectedIndex = this.featList.Count - 1; }
private void featListBox_SelectedIndexChanged(object sender, EventArgs e) { if(this.currentFeatId == ((FeatData)this.featListBox.SelectedItem).Id) { return; } this.featData = (FeatData)this.featListBox.SelectedItem; this.currentFeatId = this.featData.Id; this.SetUpBindings(); }
private void removeFeatButton_Click(object sender, EventArgs e) { this.featList.Remove(this.featData); this.featData = null; this.featListBox.SelectedIndex = this.featListBox.SelectedIndex == 0 ? 0 : this.featListBox.SelectedIndex - 1; }