public ActionResult display(string ip, int port, int?rate) { Session["isDone"] = "false"; Session["isSaveNeeded"] = "false"; Session["first mission"] = "false"; IPAddress IP; if (!IPAddress.TryParse(ip, out IP)) { rate = -1; Session["rate"] = port; this.loader.M_fileName = ip; this.loader.loadFromFile(); this.loader.M_isLoaded = true; return(View()); } client.connect(ip, port); if (String.IsNullOrEmpty(rate.ToString())) { client.start(); rate = -1; Session["lat"] = this.data.M_lat; Session["lon"] = this.data.M_lon; Session["first mission"] = "true"; this.loader.M_isLoaded = false; return(View()); } Session["rate"] = rate; return(View()); }