예제 #1
0
파일: Form1.cs 프로젝트: fel88/teamScreen
 private void timer2_Tick(object sender, EventArgs e)
 {
     if (CurrentClient != null)
     {
         try
         {
             var pos = pictureBox1.PointToClient(Cursor.Position);
             if (pictureBox1.ClientRectangle.IntersectsWith(new Rectangle(pos.X, pos.Y, 1, 1)))
             {
                 pos = GetScaledCursor();
                 if (lastPoint.X != pos.X || lastPoint.Y != pos.Y)
                 {
                     lastPoint = pos;
                     MessageProcessor.AddMessage(new MouseMoveMessage(pos));
                 }
             }
         }
         catch (Exception ex)
         {
             CurrentClient = null;
             MessageBox.Show("client lost");
         }
     }
 }
예제 #2
0
파일: Form1.cs 프로젝트: fel88/teamScreen
 public void AddMessage(Message m)
 {
     MessageProcessor.AddMessage(m);
 }