示例#1
0
        private async void MediaPlayer_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            FrameworkElement ctrl = (FrameworkElement)sender;

            ClickAttach.SetClicks(ctrl, e.ClickCount);
            await Task.Delay(300);

            DoClickStuff(ctrl);
        }
示例#2
0
        private void DoClickStuff(FrameworkElement ctrl)
        {
            int clicks = ClickAttach.GetClicks(ctrl);

            ClickAttach.SetClicks(ctrl, 0);
            if (clicks > 0)
            {
                if (clicks == 1)
                {
                    PlayClick();
                }
                else
                {
                    FullscreenClick();
                }
            }
        }