public GamePage() { InitializeComponent(); allTaboos = MainPage.allTaboos; BackKeyPress += OnBackKeyPressed; actualTeam = (int)PhoneApplicationService.Current.State["ActualTeam"]; teamPoints = (int[])PhoneApplicationService.Current.State["TeamPoints"]; teamPointsTextLabel.Text = "" + teamPoints[actualTeam].ToString(); gameSettings = MainPage.gameSettings; actualTime = gameSettings.getTime(); //allTaboos = new Taboos(); Debugger.Log(1, "Warning", "ZAŁADOWAŁEM TABOOS \n "); changeTaboo(); accelSensor = new Accelerometer(); // Add the accelerometer event handler to the accelerometer sensor. accelSensor.ReadingChanged += new EventHandler<AccelerometerReadingEventArgs>(AccelerometerReadingChanged); // Start the accelerometer try { accelSensor.Start(); } catch (AccelerometerFailedException e) { // the accelerometer couldn't be started. No fun! } timer.Interval = new TimeSpan(0, 0, 0, 1); timer.Tick += new EventHandler(timer_Tick); timer.Start(); }