Ви не можете вибрати більше 25 тем
Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
|
- //using Modbus.Device;
- using ModbusDemo.Model;
- using ModbusDemo.Uitls;
- using Prism.Commands;
- using Prism.Mvvm;
- using System;
- using System.Collections.Generic;
- using System.IO.Ports;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
-
- namespace ModbusDemo.VIewModel
- {
- public class AttachUCViewModel : BindableBase
- {
-
- private SerialPort _serialPort;
- public DelegateCommand WriteMoreRegisterCmm { get; set; }
- //读取的结果
- private string _readResult;
-
- public string ReadResult
- {
- get { return _readResult; }
- set
- {
- _readResult = value;
- RaisePropertyChanged();
- }
- }
-
-
-
- public AttachUCViewModel()
- {
-
- }
- public AttachUCViewModel(SerialPort serialPort)
- {
- WriteMoreRegisterCmm = new DelegateCommand(WriteMoreRegister);
- _serialPort = serialPort;
- }
-
- private void WriteMoreRegister()
- {
-
- }
- }
-
- }
|