private void OnManipulationComPpleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { int userNum = new DirectionJudge().Direction(xDistance, yDistance); if (picTrue == userNum) { sum += 10; Code.Text = sum.ToString(); chang(); } else { MessageBox.Show("得分:" + sum.ToString()); } }
private void OnManipulationComPpleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { int userNum = new DirectionJudge().Direction(xDistance, yDistance); if (picTrue == userNum) { sum += 10; Code.Text = sum.ToString(); chang(); } else { //VibrateController.Default.Start(TimeSpan.FromSeconds(1)); MessageBox.Show("得分:" + sum.ToString()); chang(); } }
private void OnManipulationComPpleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { if (!isFirst) { isFirst = true; return; } isFirst = false; if (Math.Abs(x1Distance) > 10 || Math.Abs(y1Distance) > 10) { int userNum = new DirectionJudge().Direction(x1Distance, y1Distance); if (pic1True == userNum) { sum1 += 10; DownCode.Text = sum1.ToString(); chang(); } else { sum2 += 10; UpCode.Text = sum2.ToString(); chang(); } } if (Math.Abs(x2Distance) > 10 || Math.Abs(y2Distance) > 10) { int userNum = new DirectionJudge().Direction(x2Distance, y2Distance); if (pic2True == userNum) { sum2 += 10; UpCode.Text = sum2.ToString(); chang(); } else { sum1 += 10; DownCode.Text = sum1.ToString(); chang(); } } x1Distance = 0; y1Distance = 0; x2Distance = 0; y2Distance = 0; }
private void OnManipulationComPpleted(object sender, System.Windows.Input.ManipulationCompletedEventArgs e) { int userNum = new DirectionJudge().Direction(xDistance, yDistance); if (picTrue == userNum) { sum += 10; time = 2; MyTimeBox.Text = "剩余时间:2s"; Code.Text = sum.ToString(); chang(); } else { this.NavigationService.Navigate(new Uri("/FailPage.xaml", UriKind.Relative)); MessageBox.Show("得分:" + sum.ToString()); } }