public MainWindow() { InitializeComponent(); //Connect to the server and subscribe to the events we want imager = new ImagerRemote(serverName); imager.DescriptionReceived += new DescriptionReceivedEventHandler(imager_DescriptionReceived); imager.FramesDiscarded += new FramesDiscardedEventHandler(imager_FramesDiscarded); imager.FrameReceived += new FrameReceivedEventHandler(imager_FrameReceived); imager.MuteWarnings = true; imager.UnbindChannels(); //This isn't required here, but it doesn't hurt anything //Put the name of the server on the GUI ServerNameLabel.Content = "Listening to server: " + serverName; //Use a timer to keep the VRPN connection updated timer = new DispatcherTimer(); timer.Tick += new EventHandler(timer_Tick); timer.Interval = new TimeSpan(0, 0, 0, 0, 15); timer.Start(); thisProc = System.Diagnostics.Process.GetCurrentProcess(); thisProc.ErrorDataReceived += thisProc_ErrorDataReceived; thisProc.OutputDataReceived += thisProc_ErrorDataReceived; }