123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using Aitex.Core.UI.MVVM;
- using Aitex.Core.Utilities;
- using MECF.Framework.Simulator.Core.Commons;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Security.Cryptography.X509Certificates;
- 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.Navigation;
- using System.Windows.Shapes;
- namespace CyberX8_Simulator.Views
- {
- /// <summary>
- /// BarcodeReaderView.xaml 的交互逻辑
- /// </summary>
- public partial class BarcodeReaderView : UserControl
- {
- public BarcodeReaderView()
- {
- InitializeComponent();
- this.DataContext = new BarcodeReaderViewModel();
-
- }
- private void SerialPortTitleView_Loaded(object sender, RoutedEventArgs e)
- {
- }
-
-
- }
- class BarcodeReaderViewModel : SerialPortDeviceViewModel
- {
- public string Title
- {
- get { return "BarcodeReader controller simulator"; }
- }
-
- private string _barcode;
- [IgnorePropertyChange]
- /// <summary>
- /// Barcode用于获取和设置条形码的值
- /// </summary>
- public string Barcode
- {
- get
- {
- return _barcode;
- }
- set
- {
- _barcode = value;
- _sim.SetBarcode(_barcode);
- }
- }
- private BarcodeReaderSerialPortDevice _sim;
- public BarcodeReaderViewModel() : base("BarcodeReaderSimulator")
- {
- _sim = new BarcodeReaderSerialPortDevice();
- Init(_sim);
- }
- }
- }
|