示例#1
0
文件: GUI.cs 项目: rpavlik/chromium
 public GUI(Tracker t, UDP udp, FlockOfBirds fob)
 {
     InitializeComponent();
       _Tracker = t;
       _udp = udp;
       _fob = fob;
 }
示例#2
0
        static void Main()
        {
            Application.EnableVisualStyles();
              Application.SetCompatibleTextRenderingDefault(false);

              UDP udp = new UDP();
              Tracker tracker = new Tracker();
              FlockOfBirds fob = new FlockOfBirds();
              GUI gui = new GUI(tracker, udp, fob);

              tracker.Paused += delegate(object Sender, EventArgs e) {
            fob.paused = tracker.paused;
              };

              tracker.PoseChanged += delegate(object Sender, EventArgs e) {
            udp.sendPose(tracker.Position, tracker.Orientation);
              };

              fob.Pose += delegate(object Sender, FlockOfBirds.PoseEventArgs e) {
            tracker.setPose(e.Position, e.Orientation, e.TimeStamp);
              };

              Application.Run(gui);
        }