Esempio n. 1
0
 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);
 }
Esempio n. 2
0
        private void InitializeHarmonicsListBoxPartView()
        {
            var harmonicsListViews = new HarmonicsListViews(HarmonicsList, DeleteSelectedButton, AddNewButton);

            _harmonicsListPartView = new HarmonicsListPartView(harmonicsListViews, _mainFormViewModel);

            _harmonicsListPartView.SelectedHarmonicChanged += () =>
            {
                if (_mainFormViewModel.SelectedHarmonic != null)
                {
                    _selectedHarmonicPartView.UpdateDataBindings();
                }
            };
        }