using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
namespace Signal_Generator
{
///
/// Логика взаимодействия для AddSignalWindow.xaml
///
public partial class AddSignalWindow : Window
{
ObservableCollection signalProps = new ObservableCollection();
ObservableCollection typesOfSignal = new ObservableCollection();
public AddSignalWindow()
{
InitializeComponent();
typesOfSignal.Add(new SinusoidalSignal(0, 0));
typesOfSignal.Add(new FmSignal(0, 0, 0));
signalType_ComboBox.ItemsSource = typesOfSignal;
signalProps_DataGrid.ItemsSource = signalProps;
}
private void signalType_ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
signalProps.Clear();
var dict = ((IAnalogSignal)signalType_ComboBox.SelectedItem).paramsCollection as Collection;
foreach (Parameter p in dict)
signalProps.Add(p);
}
}
}