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.
85 lines
2.5 KiB
85 lines
2.5 KiB
3 months ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.ComponentModel;
|
||
|
using System.Configuration;
|
||
|
using System.Data;
|
||
|
using System.Drawing;
|
||
|
using System.Text;
|
||
|
using System.Windows.Forms;
|
||
|
using Microsoft.VisualBasic;
|
||
|
namespace wcfControlMonitorClient
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Creator:Richard.liu
|
||
|
/// ��ϻ��ά��
|
||
|
/// </summary>
|
||
|
public partial class FrmWaitTime : Form
|
||
|
{
|
||
|
private static FrmWaitTime _formInstance;
|
||
|
|
||
|
public static FrmWaitTime FormInstance
|
||
|
{
|
||
|
get
|
||
|
{
|
||
|
if (_formInstance == null)
|
||
|
{
|
||
|
_formInstance = new FrmWaitTime();
|
||
|
}
|
||
|
return _formInstance;
|
||
|
}
|
||
|
set { _formInstance = value; }
|
||
|
}
|
||
|
public FrmWaitTime()
|
||
|
{
|
||
|
InitializeComponent();
|
||
|
_formInstance = this;
|
||
|
}
|
||
|
|
||
|
private void button1_Click(object sender, EventArgs e)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
int a = 0;
|
||
|
if (int.TryParse(this.tbWaitTime.Text.Trim(),out a) == false)
|
||
|
{
|
||
|
MessageBox.Show("˫�������������ȴ�ʱ������Ϊ���֣�", "������ʾ��", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||
|
this.tbWaitTime.Focus();
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
CStaticClass.WcfControl.BeginSetForkCombinWaitTime(a, new AsyncCallback(CallbackSetForkCombinWaitTime), null);
|
||
|
|
||
|
|
||
|
}
|
||
|
catch (Exception ex)
|
||
|
{
|
||
|
throw ex;
|
||
|
}
|
||
|
}
|
||
|
void CallbackSetForkCombinWaitTime(IAsyncResult ar)
|
||
|
{
|
||
|
string errtext = string.Empty;
|
||
|
if (CStaticClass.WcfControl.EndSetForkCombinWaitTime(out errtext, ar) == false)
|
||
|
{
|
||
|
MessageBox.Show(errtext, "������ʾ��", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
CStaticClass.DoubleForkWaitTime = this.tbWaitTime.Text;
|
||
|
MessageBox.Show("�����ɹ���", "������ʾ��", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||
|
this.Close();
|
||
|
}
|
||
|
}
|
||
|
private void FrmDarkCasket_Load(object sender, EventArgs e)
|
||
|
{
|
||
|
string errtext= string.Empty ;
|
||
|
this.tbWaitTime.Text=CStaticClass.WcfControl.GetForkCombinWaitTime(out errtext).ToString();
|
||
|
|
||
|
}
|
||
|
|
||
|
private void FrmWaitTime_FormClosing(object sender, FormClosingEventArgs e)
|
||
|
{
|
||
|
_formInstance = null;
|
||
|
}
|
||
|
}
|
||
|
}
|