00001
00009 using System;
00010 using System.Collections.Generic;
00011 using System.ComponentModel;
00012 using System.Data;
00013 using System.Drawing;
00014 using System.Text;
00015 using System.Windows.Forms;
00016 using System.Net;
00017 using System.Net.Sockets;
00018 using System.Runtime.Serialization.Formatters.Binary;
00019 using System.Threading;
00020 using System.IO;
00021
00022 using Objects3D;
00023 using GRV11;
00024
00025 namespace Cubes3D
00026 {
00034 public class ClientHandler
00035 {
00036 private static Color FBackgroundColor = Color.Black;
00037 private static Color FDefaultCubeColor = Color.LightGray;
00038 private static Color FFirstCubeColor = Color.LightGreen;
00039 private static Color FLastCubeColor = Color.LightSalmon;
00040 private static Color FPlayerColor = Color.LightGoldenrodYellow;
00041
00042 private Form FOwner = null;
00043
00044 private Controller FController = null;
00045 private Cube[] FCubes = null;
00046 private Player[] FPlayers = null;
00047
00048 private Coordinate FReplayPos;
00049
00050 private GRControl FGRControl = null;
00051 private Thread FClientReceiver = null;
00052 private UdpClient FClientSender = null;
00053 private IPEndPoint FServerEndPoint = null;
00054
00055 private bool FActive = false;
00056 private bool FKill = false;
00057
00058 private bool FPlayReplay = false;
00059 private bool FRecordReplay = true;
00060 private String FReplayFileName = "";
00061
00062 private int FClientPort = 9999;
00063 private int FServerPort = 8888;
00064
00065 private int FTimeStamp = 0;
00066
00067 private bool FAcknowledged = false;
00068
00069 private bool FLocal = false;
00070
00071 private bool FEnded = false;
00072 private bool FFinished = false;
00073
00074 private int FGameStart = 0;
00075 private int FGameStop = 0;
00076
00077 public ClientHandler(Form AOwner, GRControl AGRControl, bool ALocal)
00078 {
00079 FLocal = ALocal;
00080
00081 FOwner = AOwner;
00082 FGRControl = AGRControl;
00083
00084 FController = new Controller();
00085 FController.ID = 0;
00086
00087 FReplayPos = new Coordinate(0, 0, 0);
00088
00089 FReplayFileName = System.Environment.CurrentDirectory + "\\Replay.rpl";
00090
00091 FClientReceiver = new Thread(new ThreadStart(StartClientReceiver));
00092 FClientReceiver.IsBackground = false;
00093 }
00094
00105 private void SetLight(GR AGR, Coordinate APosition)
00106 {
00107 if ((AGR != null) && (APosition != null))
00108 {
00110 AGR.glLightfv(GR.GL_LIGHT0, GR.GL_AMBIENT, new float[] { 0.3F, 0.3F, 0.3F, 0.0F });
00111 AGR.glLightfv(GR.GL_LIGHT0, GR.GL_DIFFUSE, new float[] { 1.0F, 1.0F, 1.0F, 0.0F });
00112
00113
00114 AGR.glLightfv(GR.GL_LIGHT0, GR.GL_POSITION, new float[] { - APosition.X, - APosition.Y + 150.0F, - APosition.Z, 0.0F });
00115 AGR.glLightfv(GR.GL_LIGHT0, GR.GL_SPOT_DIRECTION, new float[] { 0, 0, -1 });
00116 AGR.glLightf(GR.GL_LIGHT0, GR.GL_CONSTANT_ATTENUATION, 0.00003F);
00117 AGR.glLightf(GR.GL_LIGHT0, GR.GL_LINEAR_ATTENUATION, 0.00003F);
00118 AGR.glLightf(GR.GL_LIGHT0, GR.GL_QUADRATIC_ATTENUATION, 0.00003F);
00119 AGR.glEnable(GR.GL_LIGHT0);
00120
00121 AGR.glEnable(GR.GL_LIGHTING);
00122 }
00123 }
00124
00132 private void StartClientReceiver()
00133 {
00134 IPEndPoint LClientEndPoint = null;
00135 if (FLocal)
00136 {
00137 LClientEndPoint = new IPEndPoint(IPAddress.Loopback, FClientPort);
00138 }
00139 else
00140 {
00141 LClientEndPoint = new IPEndPoint(IPAddress.Any, FClientPort);
00142 }
00143
00144 UdpClient LClientReceiver = new UdpClient(FClientPort);
00145 LClientReceiver.EnableBroadcast = (!(FLocal));
00146
00147 byte[] LReceivedData;
00148
00149 if (FLocal)
00150 {
00151 FServerEndPoint = new IPEndPoint(IPAddress.Loopback, FServerPort);
00152 }
00153 else
00154 {
00155 FServerEndPoint = new IPEndPoint(IPAddress.Broadcast, FServerPort);
00156 }
00157
00158 FClientSender = new UdpClient();
00159 FClientSender.EnableBroadcast = (!(FLocal));
00160
00161 ASCIIEncoding LEncoding = new ASCIIEncoding();
00162
00163 bool LSave = false;
00164
00165 float LRadX = 0.0F;
00166 float LRadY = 0.0F;
00167 FileStream LReplayFile = null;
00168
00169 byte[] LByteHeader = new byte[3];
00170 byte[] LByteStamp = new byte[sizeof(int)];
00171 int LFileStamp = -1;
00172 int LLastTick = 0;
00173 byte LLength = 0;
00174 int LTimeStamp = -1;
00175
00176 int LAck = 0;
00177 bool LNew = false;
00178 int LRandom = new Random().Next();
00179
00180 try
00181 {
00182 while (!(FKill))
00183 {
00184 if (FActive)
00185 {
00186 LLastTick = System.Environment.TickCount;
00187
00188 if (FPlayReplay)
00189 {
00190 FAcknowledged = true;
00191
00192 if (LReplayFile == null)
00193 {
00194 if (File.Exists(FReplayFileName))
00195 {
00196 LReplayFile = File.OpenRead(FReplayFileName);
00197 }
00198 }
00199
00200 if (LReplayFile != null)
00201 {
00202 LRadX = Coordinate.DegToRad(FController.Rotation.X);
00203 LRadY = Coordinate.DegToRad(FController.Rotation.Y);
00204
00205 if (FController.GetKeyState(ControllerKey.KEY_DOWN))
00206 {
00207 FReplayPos.X += 5.0F * (float)Math.Sin(LRadY);
00208 FReplayPos.Y -= 5.0F * (float)Math.Sin(LRadX);
00209 FReplayPos.Z -= 5.0F * (float)Math.Cos(LRadY);
00210 }
00211 if (FController.GetKeyState(ControllerKey.KEY_LEFT))
00212 {
00213 FReplayPos.X += 2.5F * (float)Math.Cos(LRadY);
00214
00215 FReplayPos.Z += 2.5F * (float)Math.Sin(LRadY);
00216 }
00217 if (FController.GetKeyState(ControllerKey.KEY_RIGHT))
00218 {
00219 FReplayPos.X -= 2.5F * (float)Math.Cos(LRadY);
00220
00221 FReplayPos.Z -= 2.5F * (float)Math.Sin(LRadY);
00222 }
00223 if (FController.GetKeyState(ControllerKey.KEY_UP))
00224 {
00225 FReplayPos.X -= 5.0F * (float)Math.Sin(LRadY);
00226 FReplayPos.Y += 5.0F * (float)Math.Sin(LRadX);
00227 FReplayPos.Z += 5.0F * (float)Math.Cos(LRadY);
00228 }
00229
00230 LReplayFile.Read(LByteHeader, 0, LByteHeader.Length);
00231 if (LEncoding.GetString(LByteHeader).Equals(Network.PlrHeader) || LEncoding.GetString(LByteHeader).Equals(Network.WldHeader))
00232 {
00233 LReplayFile.Read(LByteStamp, 0, sizeof(int));
00234 LFileStamp = BitConverter.ToInt32(LByteStamp, 0);
00235 if (LTimeStamp < 0)
00236 {
00237 LTimeStamp = LFileStamp;
00238 }
00239
00240 LLength = (byte)LReplayFile.ReadByte();
00241
00242 LReplayFile.Seek(- sizeof(int) - 4, SeekOrigin.Current);
00243 if (LEncoding.GetString(LByteHeader).Equals(Network.PlrHeader))
00244 {
00245 LReceivedData = new byte[(Player.ByteSize * LLength) + (sizeof(int) * 1) + (sizeof(byte) * 4)];
00246 }
00247 else
00248 {
00249 LReceivedData = new byte[(Cube.ByteSize * LLength) + (sizeof(int) * 1) + (sizeof(byte) * 4)];
00250 }
00251
00252 LReplayFile.Read(LReceivedData, 0, LReceivedData.Length);
00253
00254 Network.SetCubes(LReceivedData, ref FCubes, ref FTimeStamp);
00255 Network.SetPlayers(LReceivedData, ref FPlayers, ref FTimeStamp);
00256
00257
00258
00259
00260
00261
00262
00263
00264 }
00265 }
00266 }
00267 else
00268 {
00269 LReceivedData = LClientReceiver.Receive(ref LClientEndPoint);
00270 LReceivedData = Convert.FromBase64String(LEncoding.GetString(LReceivedData));
00271
00272 if (FAcknowledged)
00273 {
00274 if (Network.SetEnd(LReceivedData, ref LTimeStamp))
00275 {
00276 FEnded = true;
00277 }
00278
00279 byte LID = 0;
00280 if (Network.SetFinish(LReceivedData, ref LID, ref LTimeStamp))
00281 {
00282 FFinished = (LID == FController.ID);
00283 if (FFinished)
00284 {
00285 if (FGameStop == 0)
00286 {
00287 FGameStop = System.Environment.TickCount;
00288 }
00289 }
00290 }
00291
00292 if ((FEnded || FFinished))
00293 {
00294 FActive = false;
00295 }
00296
00297 LSave = Network.SetCubes(LReceivedData, ref FCubes, ref FTimeStamp);
00298 LSave = LSave || Network.SetPlayers(LReceivedData, ref FPlayers, ref FTimeStamp);
00299
00300 if ((LSave) && (FGameStart == 0))
00301 {
00302 FGameStart = System.Environment.TickCount;
00303 }
00304
00305 if ((LSave) && (FRecordReplay))
00306 {
00307 File.AppendAllText(FReplayFileName, LEncoding.GetString(LReceivedData));
00308 }
00309 }
00310 else
00311 {
00312 if (LNew)
00313 {
00314 byte LID = 0;
00315 if (Network.SetAcknowledge(LReceivedData, ref LAck, ref LID, ref LTimeStamp))
00316 {
00317 FAcknowledged = (LAck == LRandom);
00318 if (FAcknowledged)
00319 {
00320 FController.ID = LID;
00321 }
00322 }
00323
00324 if (!(FAcknowledged))
00325 {
00326 byte[] LData = new ASCIIEncoding().GetBytes(Convert.ToBase64String(Network.GetEnter(LRandom, FTimeStamp)));
00327 FClientSender.Send(LData, LData.Length, FServerEndPoint);
00328 }
00329 }
00330 else
00331 {
00332 LNew = Network.SetNew(LReceivedData, ref LTimeStamp);
00333 if (LNew)
00334 {
00335 byte[] LData = new ASCIIEncoding().GetBytes(Convert.ToBase64String(Network.GetEnter(LRandom, FTimeStamp)));
00336 FClientSender.Send(LData, LData.Length, FServerEndPoint);
00337 }
00338 }
00339 }
00340 }
00341
00342 if ((FAcknowledged) && (LSave))
00343 {
00344 if ((FOwner != null) && (FGRControl != null))
00345 {
00346 FOwner.Invoke(new EventHandler(delegate(object sender2, EventArgs args2)
00347 {
00348 FGRControl.Invalidate();
00349 }));
00350 }
00351 }
00352
00353 LTimeStamp += (System.Environment.TickCount - LLastTick);
00354 }
00355 }
00356 }
00357 finally
00358 {
00359 LClientReceiver = null;
00360 }
00361 }
00362
00370 public bool Active
00371 {
00372 get
00373 {
00374 return FActive;
00375 }
00376
00377 set
00378 {
00379 FActive = value;
00380
00381 if (!(FClientReceiver.IsAlive))
00382 {
00383 FClientReceiver.Start();
00384 }
00385 }
00386 }
00387
00395 public bool Acknowledged
00396 {
00397 get
00398 {
00399 return FAcknowledged;
00400 }
00401 }
00402
00410 public bool Ended
00411 {
00412 get
00413 {
00414 return FEnded;
00415 }
00416 }
00417
00425 public bool Finished
00426 {
00427 get
00428 {
00429 return FFinished;
00430 }
00431 }
00432
00440 public int GameStart
00441 {
00442 get
00443 {
00444 return FGameStart;
00445 }
00446 }
00447
00455 public int GameStop
00456 {
00457 get
00458 {
00459 return FGameStop;
00460 }
00461 }
00462
00470 public bool Kill
00471 {
00472 get
00473 {
00474 return FKill;
00475 }
00476
00477 set
00478 {
00479 FKill = value;
00480 }
00481 }
00482
00490 public bool PlayReplay
00491 {
00492 get
00493 {
00494 return FPlayReplay;
00495 }
00496
00497 set
00498 {
00499 FPlayReplay = value;
00500 }
00501 }
00502
00510 public bool RecordReplay
00511 {
00512 get
00513 {
00514 return FRecordReplay;
00515 }
00516
00517 set
00518 {
00519 FRecordReplay = value;
00520 }
00521 }
00522
00530 public String ReplayFileName
00531 {
00532 get
00533 {
00534 return FReplayFileName;
00535 }
00536
00537 set
00538 {
00539 FReplayFileName = value;
00540 }
00541 }
00542
00543 public void OpenGLStarted(GRControl AGRControl)
00544 {
00545
00546 }
00547
00558 public void Paint(object sender, PaintEventArgs e)
00559 {
00560 if (FActive)
00561 {
00562 GRControl LGRControl = (sender as GRControl);
00563 if (LGRControl != null)
00564 {
00565 GR LGR = LGRControl.GetGR();
00566 if (LGR != null)
00567 {
00568 int LClientWidth = LGRControl.ClientRectangle.Width;
00569 int LClientHeight = LGRControl.ClientRectangle.Height;
00570 if (LClientWidth <= 0)
00571 {
00572 LClientWidth = 1;
00573 }
00574 if (LClientHeight <= 0)
00575 {
00576 LClientHeight = 1;
00577 }
00578
00579
00580 LGR.glViewport(0, 0, LClientWidth, LClientHeight);
00581
00582
00583 LGR.glEnable(GR.GL_DEPTH_TEST);
00584 LGR.glEnable(GR.GL_CULL_FACE);
00585 LGR.glCullFace(GR.GL_BACK);
00586 LGR.glDepthFunc(GR.GL_LEQUAL);
00587 LGR.glFrontFace(GR.GL_CCW);
00588
00589 LGR.glClearColor(FBackgroundColor.R / 255.0F, FBackgroundColor.G / 255.0F, FBackgroundColor.B / 255.0F, FBackgroundColor.A / 255.0F);
00590 LGR.glClear(GR.GL_COLOR_BUFFER_BIT | GR.GL_DEPTH_BUFFER_BIT);
00591
00592 LGR.glMatrixMode(GR.GL_PROJECTION);
00593 LGR.glLoadIdentity();
00594
00595 LGR.gluPerspective(60.0f, ((double)(LClientWidth) / (double)(LClientHeight)), 0.1f, 64000f);
00596
00597 LGR.glMatrixMode(GR.GL_MODELVIEW);
00598 LGR.glLoadIdentity();
00599
00600
00601 LGR.glRotatef(0f, 1f, 1f, 1f);
00602 LGR.glScalef(1f, 1f, 1f);
00603 LGR.glTranslatef(0f, 0f, 0f);
00604
00605 Player LLocalPlayer = null;
00606 Coordinate LPosition = new Coordinate(0.0F, 0.0F, 0.0F);
00607
00608 if (FPlayReplay)
00609 {
00610 LPosition = FReplayPos;
00611 }
00612 else
00613 {
00614
00615 if (FPlayers != null)
00616 {
00617 foreach (Player LPlayer in FPlayers)
00618 {
00619 if (LPlayer.ID == FController.ID)
00620 {
00621 LLocalPlayer = LPlayer;
00622
00623
00624
00625 FController.Rotation = LPlayer.Rotation;
00626 LPosition = LLocalPlayer.Position;
00627 }
00628 }
00629 }
00630 }
00631
00632 LGR.glRotatef(FController.Rotation.X, 1.0F, 0.0F, 0.0F);
00633 LGR.glRotatef(FController.Rotation.Y, 0.0F, 1.0F, 0.0F);
00634 LGR.glRotatef(FController.Rotation.Z, 0.0F, 0.0F, 1.0F);
00635
00636 LGR.glTranslatef(LPosition.X, LPosition.Y, LPosition.Z);
00637
00638 if (FCubes != null)
00639 {
00640 LGR.glPushMatrix();
00641 try
00642 {
00643 LGR.glColor4f(FDefaultCubeColor.R / 255.0F, FDefaultCubeColor.G / 255.0F, FDefaultCubeColor.B / 255.0F, FDefaultCubeColor.A / 255.0F);
00644
00645 foreach (Cube LCube in FCubes)
00646 {
00647 if (LCube != null)
00648 {
00649 if (FCubes.Length >= 2)
00650 {
00651 if (LCube == FCubes[0])
00652 {
00653 LGR.glColor4f(FFirstCubeColor.R / 255.0F, FFirstCubeColor.G / 255.0F, FFirstCubeColor.B / 255.0F, FFirstCubeColor.A / 255.0F);
00654
00655 LCube.Draw(LGR);
00656
00657 LGR.glColor4f(FDefaultCubeColor.R / 255.0F, FDefaultCubeColor.G / 255.0F, FDefaultCubeColor.B / 255.0F, FDefaultCubeColor.A / 255.0F);
00658 }
00659 else
00660 {
00661 if (LCube == FCubes[FCubes.Length - 1])
00662 {
00663 LGR.glColor4f(FLastCubeColor.R / 255.0F, FLastCubeColor.G / 255.0F, FLastCubeColor.B / 255.0F, FLastCubeColor.A / 255.0F);
00664
00665 LCube.Draw(LGR);
00666
00667 LGR.glColor4f(FDefaultCubeColor.R / 255.0F, FDefaultCubeColor.G / 255.0F, FDefaultCubeColor.B / 255.0F, FDefaultCubeColor.A / 255.0F);
00668 }
00669 else
00670 {
00671 LCube.Draw(LGR);
00672 }
00673 }
00674 }
00675 else
00676 {
00677 LCube.Draw(LGR);
00678 }
00679 }
00680 }
00681 }
00682 finally
00683 {
00684 LGR.glPopMatrix();
00685 }
00686 }
00687
00688
00689 IntPtr LQuadric = LGR.gluNewQuadric();
00690 if (LQuadric != null)
00691 {
00692 try
00693 {
00694 if (FPlayers != null)
00695 {
00696 foreach (Player LPlayer in FPlayers)
00697 {
00698 if (LPlayer != null)
00699 {
00700 if (LPlayer != LLocalPlayer)
00701 {
00702 LGR.glPushMatrix();
00703 try
00704 {
00705 LGR.glColor4f(FPlayerColor.R / 255.0F, FPlayerColor.G / 255.0F, FPlayerColor.B / 255.0F, FPlayerColor.A / 255.0F);
00706
00707 LPlayer.Draw(LGR, LQuadric);
00708 }
00709 finally
00710 {
00711 LGR.glPopMatrix();
00712 }
00713 }
00714 }
00715 }
00716 }
00717 }
00718 finally
00719 {
00720 LGR.gluDeleteQuadric(LQuadric);
00721 }
00722 }
00723
00724 LGR.wglSwapBuffers(LGRControl.GetHDC());
00725 }
00726 }
00727 }
00728 }
00729
00730 public void KeyPress(object sender, KeyPressEventArgs e)
00731 {
00732
00733 }
00734
00745 public void KeyDown(object sender, KeyEventArgs e)
00746 {
00747 if (FActive)
00748 {
00749 bool LChanged = false;
00750
00751 if ((e.KeyCode == Keys.Down) || (e.KeyCode == Keys.S))
00752 {
00753 FController.SetKeyState(ControllerKey.KEY_DOWN, true);
00754 LChanged = true;
00755 }
00756 if ((e.KeyCode == Keys.Left) || (e.KeyCode == Keys.A))
00757 {
00758 FController.SetKeyState(ControllerKey.KEY_LEFT, true);
00759 LChanged = true;
00760 }
00761 if ((e.KeyCode == Keys.Right) || (e.KeyCode == Keys.D))
00762 {
00763 FController.SetKeyState(ControllerKey.KEY_RIGHT, true);
00764 LChanged = true;
00765 }
00766 if ((e.KeyCode == Keys.Up) || (e.KeyCode == Keys.W))
00767 {
00768 FController.SetKeyState(ControllerKey.KEY_UP, true);
00769 LChanged = true;
00770 }
00771 if ((e.KeyCode == Keys.Return) || (e.KeyCode == Keys.Space))
00772 {
00773 FController.SetKeyState(ControllerKey.KEY_JUMP, true);
00774 LChanged = true;
00775 }
00776
00777 if ((LChanged) && (!(FPlayReplay)) && (FClientSender != null))
00778 {
00779 byte[] LData = new ASCIIEncoding().GetBytes(Convert.ToBase64String(Network.GetController(FController, FTimeStamp)));
00780 FClientSender.Send(LData, LData.Length, FServerEndPoint);
00781 }
00782 }
00783 }
00784
00795 public void KeyUp(object sender, KeyEventArgs e)
00796 {
00797 if (FActive)
00798 {
00799 bool LChanged = false;
00800
00801 if ((e.KeyCode == Keys.Down) || (e.KeyCode == Keys.S))
00802 {
00803 FController.SetKeyState(ControllerKey.KEY_DOWN, false);
00804 LChanged = true;
00805 }
00806 if ((e.KeyCode == Keys.Left) || (e.KeyCode == Keys.A))
00807 {
00808 FController.SetKeyState(ControllerKey.KEY_LEFT, false);
00809 LChanged = true;
00810 }
00811 if ((e.KeyCode == Keys.Right) || (e.KeyCode == Keys.D))
00812 {
00813 FController.SetKeyState(ControllerKey.KEY_RIGHT, false);
00814 LChanged = true;
00815 }
00816 if ((e.KeyCode == Keys.Up) || (e.KeyCode == Keys.W))
00817 {
00818 FController.SetKeyState(ControllerKey.KEY_UP, false);
00819 LChanged = true;
00820 }
00821 if ((e.KeyCode == Keys.Return) || (e.KeyCode == Keys.Space))
00822 {
00823 FController.SetKeyState(ControllerKey.KEY_JUMP, false);
00824 LChanged = true;
00825 }
00826
00827 if ((LChanged) && (!(FPlayReplay)) && (FClientSender != null))
00828 {
00829 byte[] LData = new ASCIIEncoding().GetBytes(Convert.ToBase64String(Network.GetController(FController, FTimeStamp)));
00830 FClientSender.Send(LData, LData.Length, FServerEndPoint);
00831 }
00832 }
00833 }
00834
00835 public void MouseDown(object sender, MouseEventArgs e)
00836 {
00837
00838 }
00839
00840 public void MouseUp(object sender, MouseEventArgs e)
00841 {
00842
00843 }
00844
00855 public void MouseMove(object sender, MouseEventArgs e)
00856 {
00857 if (FActive)
00858 {
00859 GRControl LGRControl = (sender as GRControl);
00860 if (LGRControl != null)
00861 {
00862 GR LGR = LGRControl.GetGR();
00863 if (LGR != null)
00864 {
00865 Point lCursorPos = Cursor.Position;
00866 lCursorPos.X -= FOwner.Left + LGRControl.Left + (LGRControl.Width / 2);
00867 lCursorPos.Y -= FOwner.Top + LGRControl.Top + (LGRControl.Height / 2);
00868
00869 if ((Math.Abs(lCursorPos.X) > 10) || (Math.Abs(lCursorPos.Y) > 0))
00870 {
00871 FController.Rotation.X += 0.05f * (float)(lCursorPos.Y);
00872 FController.Rotation.Y += 0.05f * (float)(lCursorPos.X);
00873 FController.Rotation.Y %= 360;
00874 if (FController.Rotation.Y < 0)
00875 {
00876 FController.Rotation.Y += 360;
00877 }
00878
00879 if (FController.Rotation.X < -60)
00880 {
00881 FController.Rotation.X = -60;
00882 }
00883 else
00884 {
00885 if (FController.Rotation.X > 60)
00886 {
00887 FController.Rotation.X = 60;
00888 }
00889 }
00890 FController.Rotation.Z = 0.0F;
00891
00892 if ((!(FPlayReplay)) && (FClientSender != null))
00893 {
00894 byte[] LData = new ASCIIEncoding().GetBytes(Convert.ToBase64String(Network.GetController(FController, FTimeStamp)));
00895 FClientSender.Send(LData, LData.Length, FServerEndPoint);
00896 }
00897
00898 Cursor.Position = new System.Drawing.Point(FOwner.Left + LGRControl.Left + (LGRControl.Width / 2),
00899 FOwner.Top + LGRControl.Top + (LGRControl.Height / 2));
00900 }
00901 }
00902 }
00903 }
00904 }
00905
00906 public void MouseWheel(object sender, MouseEventArgs e)
00907 {
00908
00909 }
00910 }
00911 }