private void lb_units_SelectedIndexChanged(object sender, EventArgs e) { BaseUnit = lb_units.SelectedIndex == -1 ? null : (Unit)lb_units.SelectedItem; SelectedUnitChanged?.Invoke(this, new SelectedUnitChangedEventArgs() { BaseUnit = this.BaseUnit, }); }
public void NotifySelectionUnitChanged(ITreeUnit unit) { SelectedUnit = unit; SelectedUnitChanged?.Invoke(this, unit); }