vue-java-tutorials/CSharp/SerialPort/Base-2-Window/MainWindow.xaml.cs

27 lines
529 B
C#
Raw Normal View History

2025-06-23 23:05:34 +08:00
using System.IO.Ports;
2025-06-23 22:26:07 +08:00
using System.Windows;
2025-07-08 17:15:03 +08:00
using Base_2_Window.Model;
2025-06-23 23:05:34 +08:00
using Base_2_Window.ViewModel;
2025-06-23 22:26:07 +08:00
namespace Base_2_Window;
/// <summary>
2025-06-23 23:05:34 +08:00
/// Interaction logic for MainWindow.xaml
2025-06-23 22:26:07 +08:00
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
2025-06-23 23:05:34 +08:00
2025-07-08 17:15:03 +08:00
DataContext = new MainWindowViewModel();
Command = new OpenSerialPortCommand(OpenPort);
}
public OpenSerialPortCommand Command { get; set; }
public void OpenPort()
{
2025-06-23 22:26:07 +08:00
}
}