123456789101112131415161718192021222324252627282930313233343536 |
- using System;
- using System.Collections.Generic;
- 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;
- using WpfTest1.ComAgent;
- namespace WpfTest1.SmallDialogs.Debug
- {
- /// <summary>
- /// SerialPortLogWindow.xaml 的交互逻辑
- /// </summary>
- public partial class SerialPortLogWindow : Window
- {
- public SerialPortLogWindow()
- {
- InitializeComponent();
- }
- public void Log(string str)
- {
- App.Current.Dispatcher.Invoke(() =>
- {
- listBox.Items.Add(str);
- });
- }
- }
- }
|