//show the Quandl add instrument window private void AddInstrumentQuandlBtn_OnClick(object sender, RoutedEventArgs e) { var window = new AddInstrumentQuandlWindow(); if (window.AddedInstruments != null) { foreach (Instrument i in window.AddedInstruments) { Instruments.Add(i); } window.Close(); } }
//show the Quandl add instrument window private void AddInstrumentQuandlBtn_OnClick(object sender, RoutedEventArgs e) { var window = new AddInstrumentQuandlWindow(_client); window.ShowDialog(); if (window.ViewModel.AddedInstruments != null) { foreach (Instrument i in window.ViewModel.AddedInstruments) { ViewModel.Instruments.Add(i); } window.Close(); } }