示例#1
0
        private async void _inactivityTimer_Elapsed(object sender, ElapsedEventArgs e)
        {
            await Task.WhenAny <bool>
            (
                PlayerHUD.FadeTo(0)
            );

            _inactivityTimer.Stop();
            _inactivityTimer.Start();
        }
        private async void OnInactivityTimerElapsed(object sender, ElapsedEventArgs e)
        {
            await Task.WhenAny <bool>
            (
                PlayerHUD.FadeTo(0)
            );

            _inactivityTimer.Stop();

            if (Parent != null)
            {
                _inactivityTimer.Start();
            }
        }
示例#3
0
        private async void TapGestureRecognizer_Tapped(object sender, EventArgs e)
        {
            if (PlayerHUD.Opacity == 1)
            {
                await Task.WhenAny <bool>
                (
                    PlayerHUD.FadeTo(0)
                );
            }
            else
            {
                await Task.WhenAny <bool>
                (
                    PlayerHUD.FadeTo(1, 100)
                );
            }

            _inactivityTimer.Stop();
            _inactivityTimer.Start();
        }