public ActionResult display(string ip, int port, int interval) { //display/ip/port/ interval - optional System.Net.IPAddress iPAddress; if (System.Net.IPAddress.TryParse(ip, out iPAddress)) { runAnimation = false; ClientModel client = ClientModel.Instance; client.Reset(); client.Ip = ip; client.Port = port; client.Start(); this.client = client; //save info on view bag this.client.PropertyChanged += this.Client_PropertyChanged; ViewBag.Lon = Double.NaN; ViewBag.Lat = Double.NaN; } else { string filePath = ip; interval = port; runAnimation = true; this.flightLogModel = FlightLogModel.Instance; this.flightLogModel.FileName = filePath; interval = port; //no port } ViewBag.Interval = (int)((1 / (Double)interval) * 1000); return(View()); }
public InfoController(IInfoModel infoModel, ICacheHelper cache) { _cache = cache; _infoModel = infoModel; }