|
From: <br...@us...> - 2008-05-31 12:47:52
|
Revision: 190
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=190&view=rev
Author: brus07
Date: 2008-05-31 05:48:00 -0700 (Sat, 31 May 2008)
Log Message:
-----------
Added StatusBar for information about connection status
Modified Paths:
--------------
ACMServer/trunk/TesterSolution/Tester/Form1.Designer.cs
ACMServer/trunk/TesterSolution/Tester/Form1.cs
ACMServer/trunk/TesterSolution/Tester/Form1.resx
Modified: ACMServer/trunk/TesterSolution/Tester/Form1.Designer.cs
===================================================================
--- ACMServer/trunk/TesterSolution/Tester/Form1.Designer.cs 2008-05-31 10:56:13 UTC (rev 189)
+++ ACMServer/trunk/TesterSolution/Tester/Form1.Designer.cs 2008-05-31 12:48:00 UTC (rev 190)
@@ -28,12 +28,17 @@
/// </summary>
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.textBox2 = new System.Windows.Forms.TextBox();
this.button3 = new System.Windows.Forms.Button();
this.textBox3 = new System.Windows.Forms.TextBox();
+ this.statusStrip1 = new System.Windows.Forms.StatusStrip();
+ this.timer1 = new System.Windows.Forms.Timer(this.components);
+ this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
+ this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
// textBox1
@@ -41,7 +46,7 @@
this.textBox1.Location = new System.Drawing.Point(12, 90);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(268, 171);
+ this.textBox1.Size = new System.Drawing.Size(268, 158);
this.textBox1.TabIndex = 0;
//
// button1
@@ -89,11 +94,33 @@
this.textBox3.TabIndex = 5;
this.textBox3.Text = "127.0.0.1";
//
+ // statusStrip1
+ //
+ this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.toolStripStatusLabel1});
+ this.statusStrip1.Location = new System.Drawing.Point(0, 251);
+ this.statusStrip1.Name = "statusStrip1";
+ this.statusStrip1.Size = new System.Drawing.Size(292, 22);
+ this.statusStrip1.TabIndex = 6;
+ this.statusStrip1.Text = "statusStrip1";
+ //
+ // timer1
+ //
+ this.timer1.Enabled = true;
+ this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
+ //
+ // toolStripStatusLabel1
+ //
+ this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
+ this.toolStripStatusLabel1.Size = new System.Drawing.Size(109, 17);
+ this.toolStripStatusLabel1.Text = "toolStripStatusLabel1";
+ //
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 273);
+ this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.button3);
this.Controls.Add(this.textBox2);
@@ -103,6 +130,8 @@
this.Name = "Form1";
this.Text = "Tester";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
+ this.statusStrip1.ResumeLayout(false);
+ this.statusStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
@@ -116,6 +145,9 @@
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.TextBox textBox3;
+ private System.Windows.Forms.StatusStrip statusStrip1;
+ private System.Windows.Forms.Timer timer1;
+ private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
}
}
Modified: ACMServer/trunk/TesterSolution/Tester/Form1.cs
===================================================================
--- ACMServer/trunk/TesterSolution/Tester/Form1.cs 2008-05-31 10:56:13 UTC (rev 189)
+++ ACMServer/trunk/TesterSolution/Tester/Form1.cs 2008-05-31 12:48:00 UTC (rev 190)
@@ -47,8 +47,21 @@
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
- if (socket.IsConnected() == true)
- socket.Disconnect();
+ if (socket != null)
+ if (socket.IsConnected() == true)
+ socket.Disconnect();
}
+
+ private void timer1_Tick(object sender, EventArgs e)
+ {
+ if (socket != null)
+ {
+ if (socket.IsConnected() == true)
+ toolStripStatusLabel1.Text = "CONNECTED";
+ else
+ toolStripStatusLabel1.Text = "not connected";
+ }
+ toolStripStatusLabel1.Text = "not connected";
+ }
}
}
\ No newline at end of file
Modified: ACMServer/trunk/TesterSolution/Tester/Form1.resx
===================================================================
--- ACMServer/trunk/TesterSolution/Tester/Form1.resx 2008-05-31 10:56:13 UTC (rev 189)
+++ ACMServer/trunk/TesterSolution/Tester/Form1.resx 2008-05-31 12:48:00 UTC (rev 190)
@@ -117,4 +117,10 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
+ <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.
|