コード例 #1
0
        private async Task OnClickGame(string content, gridCellUser grid, TextBlock lblControl, ThicknessAnimation marginAnimation, DoubleAnimation fontAnimation)
        {
            if (false)
            {
                WindowAPI.SetWindowExTransparent(hwnd);
            }

            grid.contentGrid.IsEnabled = false;
            grid.contentGrid.BeginAnimation(MarginProperty, marginAnimation);
            lblControl.BeginAnimation(Label.FontSizeProperty, fontAnimation);
            var task = GameManager.RunGame(content);

            //if (isClickable)
            //{
            //    isClickable = false;
            //    try
            //    {
            //        grid.contentGrid.BeginAnimation(MarginProperty, marginAnimation);
            //        lblControl.BeginAnimation(Label.FontSizeProperty, fontAnimation);
            //        var task = GameManager.RunGame(content);
            //    }
            //    catch (Exception ex)
            //    {
            //        Show(ex.Message);
            //        isClickable = true;
            //    }
            //}

            await Task.Delay(3000);

            grid.contentGrid.IsEnabled = true;
            //isClickable = true;
            if (false)
            {
                WindowAPI.RemoveWindowExTransparent(hwnd);
            }
        }