コード例 #1
0
        /**
         * ExecuteCode method gets list of commands,
         * and executes the command one by one.
         **/
        public void ExecuteCode(string code)
        {
            if (server == null || code == null || code == string.Empty)
            {
                return;
            }

            List <string> commands = GetCommands(code);

            foreach (string cmd in commands)
            {
                server.Write(cmd + "\r\n");
                Thread.Sleep(2000);                     // delay for 2 seconds
            }
        }
コード例 #2
0
        /**
         * SetProperty method gets property name and value,
         * and update the property value in flight-gear application
         **/
        public void SetProperty(string property, double value)
        {
            string command = "set " + property + " " + value + "\r\n";

            server.Write(command);
        }