Exemplo n.º 1
0
 public void open(ConnectionData cnn)
 {
     //TcpClientを作成し、サーバーと接続する
     tcp = new System.Net.Sockets.TcpClient(cnn.addr, cnn.port);
     //NetworkStreamを取得する
     ns = tcp.GetStream();
     ns.WriteTimeout = 1;
     //
     isOpen = true;
 }
Exemplo n.º 2
0
 private void FormMain_Load(object sender, EventArgs e)
 {
     cnn = new ConnectionData();
     rc = new RobotController();
     //
     nowPosition = new Point(pictureBoxField.Width / 2, pictureBoxField.Height / 2);
     previousPosition = new Point(pictureBoxField.Width / 2, pictureBoxField.Height / 2);
     rad = 0;
     moveWaiting = false;
     //
     pictureBoxField.MouseDown += pictureBoxField_MouseDown;
     pictureBoxField.MouseMove += pictureBoxField_MouseMove;
     pictureBoxField.MouseUp += pictureBoxField_MouseUp;
     pictureBoxField.Paint += pictureBoxField_Paint;
 }