Example #1
0
        public TrainingPage()
        {
            InitializeComponent();
            abacus = new Abacus(9);
            Container.Children.Add(abacus.GetContainer());

            ShakeGesturesHelper.Instance.MinimumRequiredMovesForShake = 3;
            ShakeGesturesHelper.Instance.Active = true;
            ShakeGesturesHelper.Instance.ShakeGesture += new EventHandler<ShakeGestureEventArgs>(ResetOnShake);

            EventBinder.Bind(ref Bead.BeadMoved, UpdateValue);
        }
Example #2
0
        public Game()
        {
            InitializeComponent();
            abacus = new Abacus(9);
            ShakeGesturesHelper.Instance.ShakeGesture += new EventHandler<ShakeGestureEventArgs>(Instance_ShakeGesture);

            ShakeGesturesHelper.Instance.MinimumRequiredMovesForShake = 7;
            ShakeGesturesHelper.Instance.Active = true;
            Container.Children.Add(abacus.GetContainer());
            timer = new DispatcherTimer();
            timer.Interval = TimeSpan.FromMilliseconds(20);
            timer.Tick += new EventHandler(TimerTick);

            ProgressBar.Maximum = 100;
            ProgressBar.Value = 0;
            EventBinder.Bind(ref Bead.BeadMoved, CheckIfNumberGuessed);
            EventBinder.Bind(ref Bead.BeadTaped, TryToStartGame);
            // Bead.BeadMoved += new EventHandler(UpdateScore);
        }