Try again
This commit is contained in:
parent
cc16201908
commit
c9cfe43ce8
Binary file not shown.
@ -50,25 +50,35 @@ namespace GameCreatorGroupProject
|
||||
bool connected = r.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(5));
|
||||
if (connected)
|
||||
{
|
||||
stream = client.GetStream();
|
||||
writer = new StreamWriter(stream);
|
||||
reader = new StreamReader(stream);
|
||||
//verifies client with server
|
||||
writer.WriteLine(MainClient.getThisClientID());
|
||||
writer.WriteLine(serverID);
|
||||
writer.Flush();
|
||||
//stops if method called improperly, or timeout reached on connection resulting in connection to be improperly established
|
||||
if (reader.ReadLine().Equals("err"))
|
||||
try
|
||||
{
|
||||
disconnectClient();
|
||||
MessageBox.Show("Connection refused by server.", "Connection declined.", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
MainClient.available.Enqueue(this);
|
||||
stream = client.GetStream();
|
||||
writer = new StreamWriter(stream);
|
||||
reader = new StreamReader(stream);
|
||||
//verifies client with server
|
||||
|
||||
writer.WriteLine(MainClient.getThisClientID());
|
||||
writer.WriteLine(serverID);
|
||||
writer.Flush();
|
||||
//stops if method called improperly, or timeout reached on connection resulting in connection to be improperly established
|
||||
if (reader.ReadLine().Equals("err"))
|
||||
{
|
||||
disconnectClient();
|
||||
MessageBox.Show("Connection refused by server.", "Connection declined.", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
return;
|
||||
}
|
||||
//resets priority after connected
|
||||
Thread.CurrentThread.Priority = ThreadPriority.Normal;
|
||||
//tells server clients username
|
||||
writer.WriteLine(MainClient.getUsername());
|
||||
writer.Flush();
|
||||
}
|
||||
//resets priority after connected
|
||||
Thread.CurrentThread.Priority = ThreadPriority.Normal;
|
||||
//tells server clients username
|
||||
writer.WriteLine(MainClient.getUsername());
|
||||
writer.Flush();
|
||||
catch (IOException)
|
||||
{
|
||||
MessageBox.Show("The connection has timed out.", "Connection timeout.", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -101,7 +111,7 @@ namespace GameCreatorGroupProject
|
||||
catch (Exception) { }
|
||||
|
||||
}
|
||||
MessageBox.Show("Disconnected.", "Unable to connect to chat server.", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
//MessageBox.Show("Disconnected.", "Unable to connect to chat server.", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,10 @@
|
||||
this.addUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addUserDebugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addUserReleaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton();
|
||||
this.refresh = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.addToList = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.peopleOnline = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolCompile = new System.Windows.Forms.ToolStripButton();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.ModeControlTabs = new System.Windows.Forms.TabControl();
|
||||
@ -58,6 +62,7 @@
|
||||
this.listFPVals = new System.Windows.Forms.ListBox();
|
||||
this.listFProperties = new System.Windows.Forms.ListBox();
|
||||
this.pnlResourcePreview = new System.Windows.Forms.Panel();
|
||||
this.listBox1 = new System.Windows.Forms.ListBox();
|
||||
this.picPreview = new System.Windows.Forms.PictureBox();
|
||||
this.lblResources = new System.Windows.Forms.Label();
|
||||
this.btnRemoveResource = new System.Windows.Forms.Button();
|
||||
@ -191,6 +196,7 @@
|
||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.toolFile,
|
||||
this.toolChat,
|
||||
this.toolStripDropDownButton1,
|
||||
this.toolCompile});
|
||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.toolStrip1.Name = "toolStrip1";
|
||||
@ -313,6 +319,42 @@
|
||||
this.addUserReleaseToolStripMenuItem.Text = "Add User Release";
|
||||
this.addUserReleaseToolStripMenuItem.Click += new System.EventHandler(this.addUserReleaseToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripDropDownButton1
|
||||
//
|
||||
this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.refresh,
|
||||
this.addToList,
|
||||
this.peopleOnline});
|
||||
this.toolStripDropDownButton1.ForeColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image")));
|
||||
this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
|
||||
this.toolStripDropDownButton1.Size = new System.Drawing.Size(87, 22);
|
||||
this.toolStripDropDownButton1.Text = "Connections";
|
||||
this.toolStripDropDownButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.TextBeforeImage;
|
||||
//
|
||||
// refresh
|
||||
//
|
||||
this.refresh.Name = "refresh";
|
||||
this.refresh.Size = new System.Drawing.Size(148, 22);
|
||||
this.refresh.Text = "Refresh";
|
||||
this.refresh.Click += new System.EventHandler(this.refresh_Click);
|
||||
//
|
||||
// addToList
|
||||
//
|
||||
this.addToList.Name = "addToList";
|
||||
this.addToList.Size = new System.Drawing.Size(148, 22);
|
||||
this.addToList.Text = "Add to List";
|
||||
this.addToList.Click += new System.EventHandler(this.addToList_Click);
|
||||
//
|
||||
// peopleOnline
|
||||
//
|
||||
this.peopleOnline.Name = "peopleOnline";
|
||||
this.peopleOnline.Size = new System.Drawing.Size(148, 22);
|
||||
this.peopleOnline.Text = "People Online";
|
||||
this.peopleOnline.Click += new System.EventHandler(this.peopleOnline_Click);
|
||||
//
|
||||
// toolCompile
|
||||
//
|
||||
this.toolCompile.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
@ -462,12 +504,23 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.pnlResourcePreview.BackColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.pnlResourcePreview.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.pnlResourcePreview.Controls.Add(this.listBox1);
|
||||
this.pnlResourcePreview.Controls.Add(this.picPreview);
|
||||
this.pnlResourcePreview.Location = new System.Drawing.Point(192, 31);
|
||||
this.pnlResourcePreview.Name = "pnlResourcePreview";
|
||||
this.pnlResourcePreview.Size = new System.Drawing.Size(707, 390);
|
||||
this.pnlResourcePreview.TabIndex = 4;
|
||||
//
|
||||
// listBox1
|
||||
//
|
||||
this.listBox1.FormattingEnabled = true;
|
||||
this.listBox1.Location = new System.Drawing.Point(477, 3);
|
||||
this.listBox1.Name = "listBox1";
|
||||
this.listBox1.Size = new System.Drawing.Size(212, 368);
|
||||
this.listBox1.TabIndex = 1;
|
||||
this.listBox1.Visible = false;
|
||||
this.listBox1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.listBox1_MouseClick);
|
||||
//
|
||||
// picPreview
|
||||
//
|
||||
this.picPreview.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
@ -837,7 +890,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnInstantiate.Location = new System.Drawing.Point(5, 6);
|
||||
this.btnInstantiate.Name = "btnInstantiate";
|
||||
<<<<<<< HEAD
|
||||
this.btnInstantiate.Size = new System.Drawing.Size(78, 23);
|
||||
=======
|
||||
this.btnInstantiate.Size = new System.Drawing.Size(112, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnInstantiate.TabIndex = 0;
|
||||
this.btnInstantiate.Text = "Instantiate Object";
|
||||
this.btnInstantiate.UseVisualStyleBackColor = true;
|
||||
@ -848,7 +905,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnDestroy.Location = new System.Drawing.Point(5, 35);
|
||||
this.btnDestroy.Name = "btnDestroy";
|
||||
<<<<<<< HEAD
|
||||
this.btnDestroy.Size = new System.Drawing.Size(78, 23);
|
||||
=======
|
||||
this.btnDestroy.Size = new System.Drawing.Size(112, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnDestroy.TabIndex = 1;
|
||||
this.btnDestroy.Text = "Destroy Object";
|
||||
this.btnDestroy.UseVisualStyleBackColor = true;
|
||||
@ -870,7 +931,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnMove.Location = new System.Drawing.Point(6, 64);
|
||||
this.btnMove.Name = "btnMove";
|
||||
<<<<<<< HEAD
|
||||
this.btnMove.Size = new System.Drawing.Size(77, 23);
|
||||
=======
|
||||
this.btnMove.Size = new System.Drawing.Size(111, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnMove.TabIndex = 2;
|
||||
this.btnMove.Text = "Move";
|
||||
this.btnMove.UseVisualStyleBackColor = true;
|
||||
@ -881,7 +946,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnScore.Location = new System.Drawing.Point(6, 93);
|
||||
this.btnScore.Name = "btnScore";
|
||||
<<<<<<< HEAD
|
||||
this.btnScore.Size = new System.Drawing.Size(77, 23);
|
||||
=======
|
||||
this.btnScore.Size = new System.Drawing.Size(111, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnScore.TabIndex = 3;
|
||||
this.btnScore.Text = "Set Score";
|
||||
this.btnScore.UseVisualStyleBackColor = true;
|
||||
@ -892,7 +961,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnTimer.Location = new System.Drawing.Point(6, 151);
|
||||
this.btnTimer.Name = "btnTimer";
|
||||
<<<<<<< HEAD
|
||||
this.btnTimer.Size = new System.Drawing.Size(77, 23);
|
||||
=======
|
||||
this.btnTimer.Size = new System.Drawing.Size(111, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnTimer.TabIndex = 5;
|
||||
this.btnTimer.Text = "Set Timer";
|
||||
this.btnTimer.UseVisualStyleBackColor = true;
|
||||
@ -904,7 +977,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnHealth.Location = new System.Drawing.Point(6, 122);
|
||||
this.btnHealth.Name = "btnHealth";
|
||||
<<<<<<< HEAD
|
||||
this.btnHealth.Size = new System.Drawing.Size(77, 23);
|
||||
=======
|
||||
this.btnHealth.Size = new System.Drawing.Size(111, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnHealth.TabIndex = 4;
|
||||
this.btnHealth.Text = "Set Health";
|
||||
this.btnHealth.UseVisualStyleBackColor = true;
|
||||
@ -942,7 +1019,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOnCreate.Location = new System.Drawing.Point(5, 3);
|
||||
this.btnOnCreate.Name = "btnOnCreate";
|
||||
<<<<<<< HEAD
|
||||
this.btnOnCreate.Size = new System.Drawing.Size(78, 23);
|
||||
=======
|
||||
this.btnOnCreate.Size = new System.Drawing.Size(112, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnOnCreate.TabIndex = 4;
|
||||
this.btnOnCreate.Text = "On Create";
|
||||
this.btnOnCreate.UseVisualStyleBackColor = true;
|
||||
@ -954,7 +1035,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnTestVar.Location = new System.Drawing.Point(5, 145);
|
||||
this.btnTestVar.Name = "btnTestVar";
|
||||
<<<<<<< HEAD
|
||||
this.btnTestVar.Size = new System.Drawing.Size(78, 23);
|
||||
=======
|
||||
this.btnTestVar.Size = new System.Drawing.Size(112, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnTestVar.TabIndex = 6;
|
||||
this.btnTestVar.Text = "Test Variable";
|
||||
this.btnTestVar.UseVisualStyleBackColor = true;
|
||||
@ -965,7 +1050,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnCollision.Location = new System.Drawing.Point(5, 87);
|
||||
this.btnCollision.Name = "btnCollision";
|
||||
<<<<<<< HEAD
|
||||
this.btnCollision.Size = new System.Drawing.Size(78, 23);
|
||||
=======
|
||||
this.btnCollision.Size = new System.Drawing.Size(112, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnCollision.TabIndex = 2;
|
||||
this.btnCollision.Text = "On Collision";
|
||||
this.btnCollision.UseVisualStyleBackColor = true;
|
||||
@ -977,7 +1066,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnInput.Location = new System.Drawing.Point(5, 116);
|
||||
this.btnInput.Name = "btnInput";
|
||||
<<<<<<< HEAD
|
||||
this.btnInput.Size = new System.Drawing.Size(78, 23);
|
||||
=======
|
||||
this.btnInput.Size = new System.Drawing.Size(112, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnInput.TabIndex = 1;
|
||||
this.btnInput.Text = "Get Input";
|
||||
this.btnInput.UseVisualStyleBackColor = true;
|
||||
@ -989,7 +1082,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOnDestruct.Location = new System.Drawing.Point(5, 29);
|
||||
this.btnOnDestruct.Name = "btnOnDestruct";
|
||||
<<<<<<< HEAD
|
||||
this.btnOnDestruct.Size = new System.Drawing.Size(78, 23);
|
||||
=======
|
||||
this.btnOnDestruct.Size = new System.Drawing.Size(112, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnOnDestruct.TabIndex = 5;
|
||||
this.btnOnDestruct.Text = "On Destruct";
|
||||
this.btnOnDestruct.UseVisualStyleBackColor = true;
|
||||
@ -1001,7 +1098,11 @@
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnOnStep.Location = new System.Drawing.Point(5, 58);
|
||||
this.btnOnStep.Name = "btnOnStep";
|
||||
<<<<<<< HEAD
|
||||
this.btnOnStep.Size = new System.Drawing.Size(78, 23);
|
||||
=======
|
||||
this.btnOnStep.Size = new System.Drawing.Size(112, 23);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnOnStep.TabIndex = 7;
|
||||
this.btnOnStep.Text = "On Step";
|
||||
this.btnOnStep.UseVisualStyleBackColor = true;
|
||||
@ -1618,7 +1719,11 @@
|
||||
// btnSendMsg
|
||||
//
|
||||
this.btnSendMsg.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
<<<<<<< HEAD
|
||||
this.btnSendMsg.Location = new System.Drawing.Point(1016, 134);
|
||||
=======
|
||||
this.btnSendMsg.Location = new System.Drawing.Point(1016, 142);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.btnSendMsg.Name = "btnSendMsg";
|
||||
this.btnSendMsg.Size = new System.Drawing.Size(139, 23);
|
||||
this.btnSendMsg.TabIndex = 2;
|
||||
@ -1629,7 +1734,11 @@
|
||||
//
|
||||
this.txtMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
<<<<<<< HEAD
|
||||
this.txtMessage.Location = new System.Drawing.Point(3, 137);
|
||||
=======
|
||||
this.txtMessage.Location = new System.Drawing.Point(3, 145);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.txtMessage.Name = "txtMessage";
|
||||
this.txtMessage.Size = new System.Drawing.Size(1006, 20);
|
||||
this.txtMessage.TabIndex = 1;
|
||||
@ -1644,7 +1753,11 @@
|
||||
this.txtChat.Name = "txtChat";
|
||||
this.txtChat.ReadOnly = true;
|
||||
this.txtChat.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
<<<<<<< HEAD
|
||||
this.txtChat.Size = new System.Drawing.Size(1152, 125);
|
||||
=======
|
||||
this.txtChat.Size = new System.Drawing.Size(1152, 133);
|
||||
>>>>>>> 51140f1a159830d8f0a42ba5e1a4106d61b148de
|
||||
this.txtChat.TabIndex = 0;
|
||||
//
|
||||
// folderPrjDir
|
||||
@ -1841,6 +1954,11 @@
|
||||
private System.Windows.Forms.TextBox textBox2;
|
||||
private System.Windows.Forms.TextBox textBox1;
|
||||
private System.Windows.Forms.Button button1;
|
||||
private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1;
|
||||
private System.Windows.Forms.ToolStripMenuItem refresh;
|
||||
private System.Windows.Forms.ToolStripMenuItem addToList;
|
||||
private System.Windows.Forms.ToolStripMenuItem peopleOnline;
|
||||
private System.Windows.Forms.ListBox listBox1;
|
||||
}
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -134,6 +134,21 @@
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolStripDropDownButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="toolCompile.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
|
@ -40,7 +40,7 @@ namespace GameCreatorGroupProject
|
||||
|
||||
private bool dc;
|
||||
|
||||
private Queue<TCPClient> available = new Queue<TCPClient>();
|
||||
static public Queue<TCPClient> available = new Queue<TCPClient>();
|
||||
//main port
|
||||
private readonly int port = 20112;
|
||||
|
||||
@ -168,7 +168,7 @@ namespace GameCreatorGroupProject
|
||||
//gives thread enhanced priority to attempt to connect as quickly as possible
|
||||
t.Priority = ThreadPriority.AboveNormal;
|
||||
t.Start(c);
|
||||
available.Enqueue(c);
|
||||
|
||||
clients.Add(c);
|
||||
}
|
||||
}
|
||||
@ -200,6 +200,7 @@ namespace GameCreatorGroupProject
|
||||
throw new ArgumentNullException("No client to connect");
|
||||
}
|
||||
((TCPClient)connectClient).connectClient(ServerInfo.getServerIP());
|
||||
|
||||
}
|
||||
|
||||
//sends request for server type specified by message, and sends request for connection for itself
|
||||
@ -307,9 +308,16 @@ namespace GameCreatorGroupProject
|
||||
//querys if specified user is online
|
||||
public bool isOnline(uint clientID)
|
||||
{
|
||||
staticWriter.Write((byte)5);
|
||||
staticWriter.Write(clientID);
|
||||
return staticReader.ReadBoolean();
|
||||
if (staticWriter != null && staticReader != null)
|
||||
{
|
||||
staticWriter.Write((byte)5);
|
||||
staticWriter.Write(clientID);
|
||||
return staticReader.ReadBoolean();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -9,6 +9,7 @@ namespace GameCreatorGroupProject
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
private static MainClient online = null;
|
||||
public static bool connected = false;
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
@ -16,11 +17,39 @@ namespace GameCreatorGroupProject
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
online = new MainClient();
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainWindow());
|
||||
}
|
||||
|
||||
|
||||
// making these connect to the functions in online so that they can be easier used in the Form
|
||||
public static void connect()
|
||||
{
|
||||
Thread t = new Thread(connectMain);
|
||||
t.Start();
|
||||
}
|
||||
|
||||
//connects the main client to the server
|
||||
private static void connectMain()
|
||||
{
|
||||
online.connectClient(ServerInfo.getServerIP());
|
||||
}
|
||||
|
||||
public static void disconnect()
|
||||
{
|
||||
online.disconnect();
|
||||
}
|
||||
|
||||
public static bool Online(uint clientID)
|
||||
{
|
||||
return online.isOnline(clientID);
|
||||
}
|
||||
|
||||
public static MainClient getMain()
|
||||
{
|
||||
return online;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ namespace GameCreatorGroupProject
|
||||
{
|
||||
public abstract class TCPClient
|
||||
{
|
||||
protected TcpClient client = null;
|
||||
public TcpClient client = null;
|
||||
protected NetworkStream stream = null;
|
||||
|
||||
//connects to a server
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
</configuration>
|
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
</configuration>
|
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,29 @@
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\GameCreatorGroupProject.exe.config
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\GameCreatorGroupProject.exe
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\GameCreatorGroupProject.pdb
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.Compatibility.dll
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.dll
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.GLControl.dll
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.pdb
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.xml
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.GLControl.xml
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.CollisionDesigner.resources
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.MainWindow.resources
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.ChatWindow.resources
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.csproj.GenerateResource.Cache
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.exe
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.pdb
|
||||
C:\Users\Cody\Downloads\CS-350-410-431-Group-Project-master (9)\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.csprojResolveAssemblyReference.cache
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\GameCreatorGroupProject.exe.config
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.exe
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.pdb
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\GameCreatorGroupProject.exe
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\GameCreatorGroupProject.pdb
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.pdb
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.xml
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Debug\OpenTK.GLControl.xml
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.csprojResolveAssemblyReference.cache
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.CollisionDesigner.resources
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.MainWindow.resources
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.ChatWindow.resources
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\obj\Debug\GameCreatorGroupProject.csproj.GenerateResource.Cache
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\GameCreatorGroupProject\GameCreatorGroupProject\bin\Release\GameCreatorGroupProject.exe.config
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,6 @@
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\Server Application Console\Server Application Console\bin\Debug\Server Application Console.exe.config
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\Server Application Console\Server Application Console\bin\Debug\Server Application Console.exe
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\Server Application Console\Server Application Console\bin\Debug\Server Application Console.pdb
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\Server Application Console\Server Application Console\obj\Debug\Server Application Console.csprojResolveAssemblyReference.cache
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\Server Application Console\Server Application Console\obj\Debug\Server Application Console.exe
|
||||
C:\Users\cdyrd\Desktop\CS-350-410-431-Group-Project-master\CS-350-410-431-Group-Project-master\Server Application Console\Server Application Console\obj\Debug\Server Application Console.pdb
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user