public GUI(Tracker t, UDP udp, FlockOfBirds fob) { InitializeComponent(); _Tracker = t; _udp = udp; _fob = fob; }
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); }