| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace PCLCommunication
- {
- public partial class FrmPLC : Form
- {
- public FrmPLC()
- {
- InitializeComponent();
- }
- public DataRow Item
- {
- get;
- set;
- }
- private void btnOK_Click(object sender, EventArgs e)
- {
- Item["IP"] = this.txtIP.Text.Trim();
- Item["Port"] = Convert.ToInt32(this.txtPort.Text.Trim());
- Item["Interval"] = Convert.ToInt32(this.txtInterval.Text.Trim());
- this.DialogResult = DialogResult.OK;
- this.Close();
- }
- private void FrmPLC_Load(object sender, EventArgs e)
- {
- this.txtIP.Text = Item["IP"].ToString();
- this.txtPort.Text = Item["Port"].ToString();
- this.txtInterval.Text = Item["Interval"].ToString();
- }
- private void btnClose_Click(object sender, EventArgs e)
- {
- this.DialogResult = DialogResult.Cancel;
- this.Close();
- }
- }
- }
|