public HarmonicsListPartView(HarmonicsListViews views, IListBoxViewModel listBoxViewModel) { _views = views; _listBoxViewModel = listBoxViewModel; InitializeHarmonicsList(); _views.DeleteSelectedButton.Click += new EventHandler(DeleteSelectedButton_Click); _views.AddNewButton.Click += new EventHandler(AddNewButton_Click); _views.HarmonicsListBox.SelectedIndexChanged += new EventHandler(HarmonicsList_SelectedIndexChanged); }
private void InitializeHarmonicsListBoxPartView() { var harmonicsListViews = new HarmonicsListViews(HarmonicsList, DeleteSelectedButton, AddNewButton); _harmonicsListPartView = new HarmonicsListPartView(harmonicsListViews, _mainFormViewModel); _harmonicsListPartView.SelectedHarmonicChanged += () => { if (_mainFormViewModel.SelectedHarmonic != null) { _selectedHarmonicPartView.UpdateDataBindings(); } }; }