Nevar pievienot vairāk kā 25 tēmas
Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
|
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Net;
- 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.Markup;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- using BPA.Communication;
- using BPA.Helper;
-
- namespace Test
- {
- /// <summary>
- /// Interaction logic for MainWindow.xaml
- /// </summary>
- public partial class MainWindow : Window
- {
- public MainWindow()
- {
- InitializeComponent();
- command = I
- modbusTcp.GetConfigPar().IpAddress = "192.168.2.10";
- modbusTcp.Connected = new Action(() =>
- {
- t = modbusTcp.IsConnected();
- });
- if (t)
- {
- MessageBox.Show("设备连接成功");
- }
- }
-
- public ModbusTcp modbusTcp = new ModbusTcp();
- bool t;
- public ICommand command { get; set; }
-
-
- private void Button_Click_1(object sender, RoutedEventArgs e)
- {
- if (t)
- {
-
- }
-
- }
- }
- }
|