public ActionResult Path(string ip, int port, int seconds)
        {
            ClosePreviousView();

            model.Connect();
            Session["time"] = 1.0 / seconds; // the amount of time per seconds

            return(View());
        }
Exemplo n.º 2
0
 /// <summary>
 /// Connect method for the command
 /// </summary>
 private void ConnectButton()
 {
     if (isConnected) // if it is not the first connection
     {
         // close the current server
         infoModel.CloseServer();
         commandsModel.Disconnect();
     }
     else
     {
         isConnected = true;
     }
     // open the server for the simulator and connect to it
     infoModel.OpenServer();
     commandsModel.Connect();
     connectButton.Content    = "Connected!";
     connectButton.Foreground = Brushes.MediumSeaGreen;
 }