| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Net; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | |
| | | if (string.IsNullOrEmpty(txt_ip.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("IP不能为空!"); |
| | | txt_printNo.Focus(); |
| | | txt_ip.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_port.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("端口不能为空!"); |
| | | txt_printNo.Focus(); |
| | | txt_port.Focus(); |
| | | return; |
| | | } |
| | | try |
| | | { |
| | | IPAddress.Parse(txt_ip.Text); |
| | | } |
| | | catch |
| | | { |
| | | txt_ip.Text = ""; |
| | | MessageBox.Show("请输入正确的IP地址"); |
| | | txt_ip.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new PrintInfo |