You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.6 KiB

3 years ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace PDAForm.Comm
{
public partial class frmSetServer : Form
{
public frmSetServer()
{
InitializeComponent();
}
private void frmSetServer_Load(object sender, EventArgs e)
{
this.txtWebService.Text = MyAppconfig.GetValue("WebService");
}
private void btnTest_Click(object sender, EventArgs e)
{
try
{
PDAForm.Comm.PDAService.Service service = new PDAForm.Comm.PDAService.Service();
service.Url = this.txtWebService.Text;
if (service.HelloWorld() == "Hello World")
{
MyMessageBox.ShowInfoMessage("���Գɹ���");
}
}
catch (Exception ex)
{
MyMessageBox.ShowErrorMessage("����ʧ�ܣ���ϸԭ�����£�\r\n" + ex.Message);
}
}
private void btnSave_Click(object sender, EventArgs e)
{
if (this.txtWebService.Text.Trim() != "")
{
MyAppconfig.SetValue("WebService", this.txtWebService.Text.Trim());
MyMessageBox.ShowInfoMessage("���óɹ�������������Ч��");
}
else
{
MyMessageBox.ShowErrorMessage("�����������������ӵ�ַ��");
}
}
private void btnClose_Click(object sender, EventArgs e)
{
this.Close();
}
}
}