예제 #1
0
        public ActionResult Display(string ip, int port)
        {
            System.Net.IPAddress p;
            if (System.Net.IPAddress.TryParse(ip, out p) == false)
            {
                // Load Travel
                ViewBag.Filename  = ip;
                ViewBag.Frequency = port;

                return(View("LoadTravel"));
            }
            //get it by the else
            else
            {
                // Display
                InfoModel infoModel = InfoModel.Instance;
                infoModel.Connect(ip, port);

                ViewBag.Coordinate = infoModel.GetCoordinate();

                infoModel.Disconnect();

                return(View());
            }
        }
예제 #2
0
        public string GetStringRudderThrottle(string ip, int port)
        {
            InfoModel infoModel = InfoModel.Instance;

            infoModel.Connect(ip, port);

            Coordinate coordinate = infoModel.GetRudderThrottle();

            infoModel.Disconnect();

            return(coordinate.Longitude.ToString() + " " + coordinate.Latitude.ToString());
        }