Ejemplo n.º 1
0
        private async void PlayButton_OnClicked(object sender, RoutedEventArgs e)
        {
            if (this._isInPlayHandler)
            {
                return;
            }
            this._isInPlayHandler = true;
            GameInvitationHeaderUC.HideInvitation(this.DataProvider);
            Game        game        = this.DataProvider.Game;
            GameRequest gameRequest = this.DataProvider.GameRequest;
            bool        flag        = InstalledPackagesFinder.Instance.IsPackageInstalled(game.platform_id);

            EventAggregator.Current.Publish(new GamesActionEvent()
            {
                game_id      = game.id,
                visit_source = AppGlobalStateManager.Current.GlobalState.GamesVisitSource,
                action_type  = (GamesActionType)(flag ? 0 : 1),
                click_source = GamesClickSource.request,
                request_name = gameRequest.name
            });
            await Task.Delay(1000);

            Navigator.Current.OpenGame(game);
            this._isInPlayHandler = false;
        }
Ejemplo n.º 2
0
 private void HideButton_OnClicked(object sender, RoutedEventArgs e)
 {
     GameInvitationHeaderUC.HideInvitation(this.DataProvider);
 }