|
From: <br...@us...> - 2008-06-02 21:02:20
|
Revision: 202
http://acmcontester.svn.sourceforge.net/acmcontester/?rev=202&view=rev
Author: brus07
Date: 2008-06-02 14:02:17 -0700 (Mon, 02 Jun 2008)
Log Message:
-----------
Delete old element from form
Modified Paths:
--------------
ACMServer/trunk/MediatorSolution/Mediator/Form1.Designer.cs
ACMServer/trunk/MediatorSolution/Mediator/Form1.cs
Modified: ACMServer/trunk/MediatorSolution/Mediator/Form1.Designer.cs
===================================================================
--- ACMServer/trunk/MediatorSolution/Mediator/Form1.Designer.cs 2008-06-02 20:20:15 UTC (rev 201)
+++ ACMServer/trunk/MediatorSolution/Mediator/Form1.Designer.cs 2008-06-02 21:02:17 UTC (rev 202)
@@ -29,39 +29,15 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- this.button1 = new System.Windows.Forms.Button();
- this.textBox1 = new System.Windows.Forms.TextBox();
this.button2 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.button3 = new System.Windows.Forms.Button();
- this.textBox2 = new System.Windows.Forms.TextBox();
- this.button4 = new System.Windows.Forms.Button();
- this.textBox3 = new System.Windows.Forms.TextBox();
- this.textBox4 = new System.Windows.Forms.TextBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.statusStrip1.SuspendLayout();
this.SuspendLayout();
//
- // button1
- //
- this.button1.Location = new System.Drawing.Point(202, 41);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(75, 23);
- this.button1.TabIndex = 0;
- this.button1.Text = "Send";
- this.button1.UseVisualStyleBackColor = true;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // textBox1
- //
- this.textBox1.Location = new System.Drawing.Point(12, 81);
- this.textBox1.Multiline = true;
- this.textBox1.Name = "textBox1";
- this.textBox1.Size = new System.Drawing.Size(290, 160);
- this.textBox1.TabIndex = 1;
- //
// button2
//
this.button2.Location = new System.Drawing.Point(12, 12);
@@ -75,7 +51,7 @@
// label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(199, 9);
+ this.label1.Location = new System.Drawing.Point(12, 76);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(23, 13);
this.label1.TabIndex = 3;
@@ -91,48 +67,13 @@
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
- // textBox2
- //
- this.textBox2.Location = new System.Drawing.Point(318, 81);
- this.textBox2.Multiline = true;
- this.textBox2.Name = "textBox2";
- this.textBox2.Size = new System.Drawing.Size(268, 160);
- this.textBox2.TabIndex = 5;
- //
- // button4
- //
- this.button4.Location = new System.Drawing.Point(12, 247);
- this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(75, 23);
- this.button4.TabIndex = 6;
- this.button4.Text = "GetWeb";
- this.button4.UseVisualStyleBackColor = true;
- this.button4.Click += new System.EventHandler(this.button4_Click);
- //
- // textBox3
- //
- this.textBox3.Location = new System.Drawing.Point(12, 276);
- this.textBox3.Multiline = true;
- this.textBox3.Name = "textBox3";
- this.textBox3.Size = new System.Drawing.Size(574, 169);
- this.textBox3.TabIndex = 7;
- //
- // textBox4
- //
- this.textBox4.Location = new System.Drawing.Point(93, 250);
- this.textBox4.Name = "textBox4";
- this.textBox4.Size = new System.Drawing.Size(493, 20);
- this.textBox4.TabIndex = 8;
- this.textBox4.Text = "http://acm.lviv.ua/fusion/acm/getsubmit.php?passw=master&type=GetSubmitInfo&id=35" +
- "000";
- //
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripStatusLabel1});
- this.statusStrip1.Location = new System.Drawing.Point(0, 448);
+ this.statusStrip1.Location = new System.Drawing.Point(0, 138);
this.statusStrip1.Name = "statusStrip1";
- this.statusStrip1.Size = new System.Drawing.Size(598, 22);
+ this.statusStrip1.Size = new System.Drawing.Size(262, 22);
this.statusStrip1.TabIndex = 9;
this.statusStrip1.Text = "statusStrip1";
//
@@ -151,17 +92,11 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(598, 470);
+ this.ClientSize = new System.Drawing.Size(262, 160);
this.Controls.Add(this.statusStrip1);
- this.Controls.Add(this.textBox4);
- this.Controls.Add(this.textBox3);
- this.Controls.Add(this.button4);
- this.Controls.Add(this.textBox2);
this.Controls.Add(this.button3);
this.Controls.Add(this.label1);
this.Controls.Add(this.button2);
- this.Controls.Add(this.textBox1);
- this.Controls.Add(this.button1);
this.Name = "Form1";
this.Text = "Gate";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
@@ -174,15 +109,9 @@
#endregion
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button3;
- private System.Windows.Forms.TextBox textBox2;
- private System.Windows.Forms.Button button4;
- private System.Windows.Forms.TextBox textBox3;
- private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.Timer timer1;
Modified: ACMServer/trunk/MediatorSolution/Mediator/Form1.cs
===================================================================
--- ACMServer/trunk/MediatorSolution/Mediator/Form1.cs 2008-06-02 20:20:15 UTC (rev 201)
+++ ACMServer/trunk/MediatorSolution/Mediator/Form1.cs 2008-06-02 21:02:17 UTC (rev 202)
@@ -14,31 +14,18 @@
{
public partial class Form1 : Form
{
- // SocketServer socket = new SocketServer();
public Form1()
{
InitializeComponent();
string s = System.Net.Dns.GetHostAddresses(System.Net.Dns.GetHostName())[0].ToString();
label1.Text += s;
- //socket.onDataArrived += DataArrived;
}
-
- private void button1_Click(object sender, EventArgs e)
- {
- //if (socket.CountClients() <= 0)
- MessageBox.Show("Server: Bida");
- //socket.Send(textBox1.Text);
- }
-
private void button2_Click(object sender, EventArgs e)
{
AcmContester.Mediator.Library.MediatorKernel kernel = new AcmContester.Mediator.Library.MediatorKernel();
kernel.LoadLists();
-
- //AcmContester.Mediator.Library.SocketGate sg = new AcmContester.Mediator.Library.SocketGate();
- //AcmContester.Mediator.Library.WebGate wg = new AcmContester.Mediator.Library.WebGate();
}
private void button3_Click(object sender, EventArgs e)
@@ -46,12 +33,6 @@
Disconnnect();
}
- private void DataArrived(string message)
- {
- textBox2.Text += "\r\n" + message;
- //TODO: doOther
- }
-
private void Disconnnect()
{
AcmContester.Mediator.Library.Plugins.SocketGate.CreaterMediatorPlugin socketCreater = new AcmContester.Mediator.Library.Plugins.SocketGate.CreaterMediatorPlugin();
@@ -64,31 +45,6 @@
Disconnnect();
}
- private void button4_Click(object sender, EventArgs e)
- {
- //AcmContester.Mediator.Library.Data.DataMediator d = AcmContester.Mediator.Library.Data.DataMediator.GetMediator();
- //d.DeleteOld();
-
- TcpClient tcpClient = new TcpClient();
- tcpClient.Connect(textBox4.Text, 80);
- NetworkStream netStream = tcpClient.GetStream();
- if (netStream.CanRead)
- {
- // Reads NetworkStream into a byte buffer.
- byte[] bytes = new byte[tcpClient.ReceiveBufferSize];
-
- // Read can return anything from 0 to numBytesToRead.
- // This method blocks until at least one byte is read.
- netStream.Read(bytes, 0, (int)tcpClient.ReceiveBufferSize);
-
- // Returns the data received from the host to the console.
- string returndata = Encoding.UTF8.GetString(bytes);
-
- textBox3.Text = returndata;
-
- }
- }
-
private void timer1_Tick(object sender, EventArgs e)
{
string mes = "CountOfClients: ";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|