示例#1
0
        public static void Main(string[] args)
        {
            QniProgramSimple.Init();
            var hub       = new QniHub(QniEntry);
            var hubHandle = hub.Handle;

            var programTask = Task.Run(() => { StartProgram(hubHandle); });

            Console.WriteLine("Input Q to exit...");

            while (true)
            {
                if (Console.ReadLine() == "Q")
                {
                    break;
                }
            }

            hub.Exit();
            Console.WriteLine("Wait program exit...");
            programTask.Wait();
            hub.Dispose();
        }
示例#2
0
 private static void StartProgram(IntPtr hubHandle)
 {
     QniProgramSimple.StartNewProgram(hubHandle, "127.0.0.1:4434");
 }