using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Net.Sockets;
using System.Net;
using System.Threading;
using System.IO;
namespace RTFMessenger
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class mainForm : System.Windows.Forms.Form
{
private System.Windows.Forms.RichTextBox rtfSend;
private System.Windows.Forms.Splitter splitter;
private System.Windows.Forms.RichTextBox rtfReceive;
private System.Windows.Forms.Button btnSend;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public mainForm()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
thread = new Thread(new ThreadStart(Listen));
thread.Start();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.rtfSend = new System.Windows.Forms.RichTextBox();
this.splitter = new System.Windows.Forms.Splitter();
this.rtfReceive = new System.Windows.Forms.RichTextBox();
this.btnSend = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// rtfSend
//
this.rtfSend.Dock = System.Windows.Forms.DockStyle.Top;
this.rtfSend.Location = new System.Drawing.Point(0, 0);
this.rtfSend.Name = "rtfSend";
this.rtfSend.Size = new System.Drawing.Size(292, 96);
this.rtfSend.TabIndex = 0;
this.rtfSend.Text = "";
//
// splitter
//
this.splitter.Dock = System.Windows.Forms.DockStyle.Top;
this.splitter.Location = new System.Drawing.Point(0, 96);
this.splitter.Name = "splitter";
this.splitter.Size = new System.Drawing.Size(292, 3);
this.splitter.TabIndex = 1;
this.splitter.TabStop = false;
//
// rtfReceive
//
this.rtfReceive.Dock = System.Windows.Forms.DockStyle.Top;
this.rtfReceive.Location = new System.Drawing.Point(0, 99);
this.rtfReceive.Name = "rtfReceive";
this.rtfReceive.Size = new System.Drawing.Size(292, 133);
this.rtfReceive.TabIndex = 2;
this.rtfReceive.Text = "";
//
// btnSend
//
this.btnSend.Location = new System.Drawing.Point(216, 240);
this.btnSend.Name = "btnSend";
this.btnSend.TabIndex = 3;
this.btnSend.Text = "Send";
this.btnSend.Click += new System.EventHandler(this.btnSend_Click);
//
// mainForm
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 266);
this.Controls.Add(this.btnSend);
this.Controls.Add(this.rtfReceive);
this.Controls.Add(this.splitter);
this.Controls.Add(this.rtfSend);
this.Name = "mainForm";
this.Text = "mainForm";
this.Closing += new System.ComponentModel.CancelEventHandler(this.mainForm_Closing);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new mainForm());
}