using System.IO.Ports;
using System.Windows;
using Base_2_Window.ViewModel;
namespace Base_2_Window;
///
/// Interaction logic for MainWindow.xaml
///
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
DataContext = new MainWindowViewModel
{
SerialPortNames = SerialPort.GetPortNames().Select(s => s).ToList(),
BaudRates = new List { 9600 },
DataBits = new List { 6, 7, 8 },
StopBitsList = new List { StopBits.None, StopBits.One, StopBits.Two, StopBits.OnePointFive },
ParityList = new List
{ Parity.None, Parity.Even, Parity.Mark, Parity.None, Parity.Odd, Parity.Space }
};
}
}