|
From: <br...@us...> - 2009-02-04 17:28:49
|
Revision: 489
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=489&view=rev
Author: brus07
Date: 2009-02-04 17:28:44 +0000 (Wed, 04 Feb 2009)
Log Message:
-----------
Change timer because old timer not work.
(timer for show connect status)
Modified Paths:
--------------
ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs
ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs
ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.resx
Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs
===================================================================
--- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs 2009-02-04 16:57:31 UTC (rev 488)
+++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs 2009-02-04 17:28:44 UTC (rev 489)
@@ -28,7 +28,6 @@
/// </summary>
private void InitializeComponent()
{
- this.components = new System.ComponentModel.Container();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage1 = new System.Windows.Forms.TabPage();
@@ -38,7 +37,6 @@
this.button2 = new System.Windows.Forms.Button();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
- this.timer1 = new System.Windows.Forms.Timer(this.components);
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.portTextBox = new System.Windows.Forms.TextBox();
@@ -133,11 +131,6 @@
this.toolStripStatusLabel1.Size = new System.Drawing.Size(37, 17);
this.toolStripStatusLabel1.Text = "xx0xx";
//
- // timer1
- //
- this.timer1.Enabled = true;
- this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
- //
// label1
//
this.label1.AutoSize = true;
@@ -198,7 +191,6 @@
private System.Windows.Forms.Button button2;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
- private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs
===================================================================
--- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs 2009-02-04 16:57:31 UTC (rev 488)
+++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs 2009-02-04 17:28:44 UTC (rev 489)
@@ -5,11 +5,14 @@
using System.Data;
using System.Text;
using System.Windows.Forms;
+using System.Threading;
namespace AcmContester.Plugins.TesterPlugins.SocketClientGatePlugin
{
public partial class SocketClientGatePluginUserControl : UserControl
{
+ System.Threading.Timer tim;
+
public SocketClientGatePluginUserControl()
{
InitializeComponent();
@@ -60,16 +63,19 @@
SocketClientGate gate = SocketClientGate.GetInstance();
gate.CreateClient(textBox2.Text, Int32.Parse(portTextBox.Text));
gate.Connect();
+
+ tim = new System.Threading.Timer(new TimerCallback(timer1_Tick));
+ tim.Change(0, 100);
}
private void button2_Click(object sender, EventArgs e)
{
SocketClientGate.GetInstance().Disconnect();
+ tim.Change(0, 0);
}
- private void timer1_Tick(object sender, EventArgs e)
+ private void timer1_Tick(object state)
{
- MessageBox.Show("!");
if (SocketClientGate.GetInstance().IsConnected() == true)
toolStripStatusLabel1.Text = "CONNECTED";
else
Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.resx
===================================================================
--- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.resx 2009-02-04 16:57:31 UTC (rev 488)
+++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.resx 2009-02-04 17:28:44 UTC (rev 489)
@@ -120,7 +120,4 @@
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
- <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
- <value>127, 17</value>
- </metadata>
</root>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|