private void ActionButton_OnClicked(object sender, System.Windows.Input.GestureEventArgs e) { if (this._link.money_transfer == null) { LinkButton button = this._link.button; string url = (button != null ? button.url : null) ?? this._link.url; if (string.IsNullOrEmpty(url)) { return; } e.Handled = true; LinkButtonAction action = button.action; LinkButtonAction linkButtonAction1 = action; if ((linkButtonAction1 != null ? (linkButtonAction1.Type == LinkButtonActionType.JoinGroupAndOpenUrl ? 1 : 0) : 0) != 0) { GroupsService.Current.Join(action.group_id, false, (Action <BackendResult <OwnCounters, ResultCode> >)(result => { if (result.ResultCode != ResultCode.Succeeded) { return; } Execute.ExecuteOnUIThread((Action)(() => Navigator.Current.NavigateToWebUri(url, action.IsExternal, false))); }), null); } else { INavigator current = Navigator.Current; string uri = url; LinkButtonAction linkButtonAction2 = action; int num1 = linkButtonAction2 != null ? (linkButtonAction2.IsExternal ? 1 : 0) : 0; int num2 = 0; current.NavigateToWebUri(uri, num1 != 0, num2 != 0); } } else { e.Handled = true; if (this.CanShowCard) { MoneyTransfer moneyTransfer = this._link.money_transfer; TransferCardView.Show(moneyTransfer.id, moneyTransfer.from_id, moneyTransfer.to_id); } else { string uri = "https://m.vk.com/landings/moneysend"; string lang = LangHelper.GetLang(); if (!string.IsNullOrEmpty(lang)) { uri += string.Format("?lang={0}", lang); } Navigator.Current.NavigateToWebViewPage(uri, true); } } }
private void ProcessNavigationTap() { if (this._notification.ParsedParent is WallPost || this._notification.ParsedParent is Comment) { WallPost wallPost = this._notification.ParsedParent as WallPost; if (wallPost == null) { Comment parsedParent = this._notification.ParsedParent as Comment; if (parsedParent.post != null) { wallPost = parsedParent.post; } else { if (parsedParent.photo != null) { Navigator.Current.NavigateToPhotoWithComments(parsedParent.photo, null, parsedParent.photo.owner_id, parsedParent.photo.pid, parsedParent.photo.access_key, false, false); return; } if (parsedParent.video != null) { Navigator.Current.NavigateToVideoWithComments(parsedParent.video, parsedParent.video.owner_id, parsedParent.video.vid, parsedParent.video.access_key); return; } if (parsedParent.topic != null) { Navigator.Current.NavigateToGroupDiscussion(-parsedParent.topic.owner_id, parsedParent.topic.tid, parsedParent.topic.title, parsedParent.topic.comments, true, parsedParent.topic.is_closed == 0); return; } if (parsedParent.market != null) { CurrentMarketItemSource.Source = MarketItemSource.feed; Navigator.Current.NavigateToProduct(parsedParent.market.owner_id, parsedParent.market.id); } } } if (wallPost == null) { return; } Navigator.Current.NavigateToWallPostComments(wallPost.id, wallPost.to_id, true, 0, 0, ""); } else if (this._notification.ParsedParent is Photo) { Photo parsedParent = this._notification.ParsedParent as Photo; Navigator.Current.NavigateToPhotoWithComments(parsedParent, null, parsedParent.owner_id, parsedParent.pid, parsedParent.access_key, false, false); } else if (this._notification.ParsedParent is VKClient.Common.Backend.DataObjects.Video) { VKClient.Common.Backend.DataObjects.Video parsedParent = this._notification.ParsedParent as VKClient.Common.Backend.DataObjects.Video; Navigator.Current.NavigateToVideoWithComments(parsedParent, parsedParent.owner_id, parsedParent.vid, ""); } else if (this._notification.ParsedParent is Topic) { Topic parsedParent = this._notification.ParsedParent as Topic; Navigator.Current.NavigateToGroupDiscussion(-parsedParent.owner_id, parsedParent.tid, parsedParent.title, parsedParent.comments, true, parsedParent.is_closed == 0); } else { if (!(this._notification.ParsedFeedback is MoneyTransfer)) { return; } MoneyTransfer parsedFeedback = (MoneyTransfer)this._notification.ParsedFeedback; TransferCardView.Show(parsedFeedback.id, parsedFeedback.from_id, parsedFeedback.to_id); } }