private void Window_Loaded(object sender, RoutedEventArgs e) { EnableDebugWindow(); DebugPrint(MethodInfo.GetCurrentMethod().Name, "Head Track Demo - window loaded"); try { DebugPrint(MethodInfo.GetCurrentMethod().Name, "About to instantiate PLTLabsAPI object (version: " + PLTLabsAPI.SDK_VERSION + ")"); sdkversionlabel.Content = "Rev " + PLTLabsAPI.SDK_VERSION; m_pltlabsapi = new PLTLabsAPI(this); ConnectToPlantronicsDevice(); SetupHeadRotation(); } catch (Exception exc) { DebugPrint(MethodInfo.GetCurrentMethod().Name, "xception on connect! \r\n" + exc.ToString()); MessageBox.Show("Exception on connect! " + exc.ToString(), "HeadTrackDiagnostics Error"); } appversionlabel.Content = Assembly.GetEntryAssembly().GetName().Version; }
public SpokesIntegration() { pltlabsapi = new PLTLabsAPI(this); spokes = Spokes.Instance; InitializeWebSockets(); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); // TODO: use this.Content to load your game content here SpriteTexture = Content.Load <Texture2D>("targetcrosshairs"); m_screenmax_x = graphics.GraphicsDevice.Viewport.Width; m_screenmax_y = graphics.GraphicsDevice.Viewport.Height; m_halfscreenmax_x = m_screenmax_x / 2; m_halfscreenmax_y = m_screenmax_y / 2; m_origin.X = SpriteTexture.Width / 2; m_origin.Y = SpriteTexture.Height / 2; font = Content.Load <SpriteFont>("SpriteFont1"); // Initialise Plantronics head tracking... m_pltlabsapi = new PLTLabsAPI(this); }
private void Window_Loaded(object sender, RoutedEventArgs e) { DebugPrint(MethodInfo.GetCurrentMethod().Name, "Head Track Demo - window loaded"); try { DebugPrint(MethodInfo.GetCurrentMethod().Name, "About to instantiate PLTLabsAPI object"); m_pltlabsapi = new PLTLabsAPI(this); ConnectToPlantronicsDevice(); } catch (Exception exc) { ConnStatusLbl.Dispatcher.Invoke(new Action(delegate() { ConnStatusLbl.Content = "Exception on connect! " + exc.ToString(); DeviceLbl.Content = "-"; MessageBox.Show("Exception on connect! " + exc.ToString(), "HeadTrackDemo Error"); })); } }