public static void ReportWallPost(WallPost wallPost, string adData = "") { if (string.IsNullOrEmpty(adData)) { PageBase currentPage = FramePageUtils.CurrentPage; if (currentPage != null && currentPage.NavigationContext != null && currentPage.NavigationContext.QueryString.ContainsKey("AdData")) { adData = currentPage.NavigationContext.QueryString["AdData"]; } } if (string.IsNullOrEmpty(adData)) { PickerUC.ShowPickerFor(ReportContentHelper.GetPredefinedReportReasons(), (PickableItem)null, (Action <PickableItem>)(pi => { if (wallPost.IsReply) { WallService.Current.ReportComment(wallPost.from_id, wallPost.id, (ReportReason)pi.ID, (Action <BackendResult <VKClient.Common.Backend.DataObjects.ResponseWithId, ResultCode> >)(res => GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, CommonResources.ReportSent, (VKRequestsDispatcher.Error)null))); } else { WallService.Current.Report(wallPost.to_id, wallPost.id, (ReportReason)pi.ID, (Action <BackendResult <VKClient.Common.Backend.DataObjects.ResponseWithId, ResultCode> >)(res => GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, CommonResources.ReportSent, (VKRequestsDispatcher.Error)null))); } }), (Action <PickableItem>)null, null, CommonResources.PostContains); } else { ReportContentHelper.ReportAdWallPost(adData); } }
internal static void ReportComment(long fromId, long id, LikeObjectType likeObjectType) { PickerUC.ShowPickerFor(ReportContentHelper.GetPredefinedReportReasons(), (PickableItem)null, (Action <PickableItem>)(pi => { switch (likeObjectType) { case LikeObjectType.comment: WallService.Current.ReportComment(fromId, id, (ReportReason)pi.ID, (Action <BackendResult <VKClient.Common.Backend.DataObjects.ResponseWithId, ResultCode> >)(res => GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, CommonResources.ReportSent, (VKRequestsDispatcher.Error)null))); break; case LikeObjectType.photo_comment: PhotosService.Current.ReportComment(fromId, id, (ReportReason)pi.ID, (Action <BackendResult <VKClient.Common.Backend.DataObjects.ResponseWithId, ResultCode> >)(res => GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, CommonResources.ReportSent, (VKRequestsDispatcher.Error)null))); break; case LikeObjectType.video_comment: VideoService.Instance.ReportComment(fromId, id, (ReportReason)pi.ID, (Action <BackendResult <VKClient.Common.Backend.DataObjects.ResponseWithId, ResultCode> >)(res => GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, CommonResources.ReportSent, (VKRequestsDispatcher.Error)null))); break; } }), (Action <PickableItem>)null, null, CommonResources.CommentContains); }
public static void ReportVideo(long ownerId, long videoId) { PickerUC.ShowPickerFor(ReportContentHelper.GetPredefinedReportReasons(), (PickableItem)null, (Action <PickableItem>)(pi => VideoService.Instance.Report(ownerId, videoId, (ReportReason)pi.ID, (Action <BackendResult <VKClient.Common.Backend.DataObjects.ResponseWithId, ResultCode> >)(res => GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, CommonResources.ReportSent, (VKRequestsDispatcher.Error)null)))), (Action <PickableItem>)null, null, CommonResources.VideoContains); }
public static void ReportPhoto(long ownerId, long photoId) { PickerUC.ShowPickerFor(ReportContentHelper.GetPredefinedReportReasons(), null, (pi => PhotosService.Current.Report(ownerId, photoId, (ReportReason)pi.ID, (Action <BackendResult <VKClient.Common.Backend.DataObjects.ResponseWithId, ResultCode> >)(res => GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, CommonResources.ReportSent, (VKRequestsDispatcher.Error)null)))), null, null, CommonResources.PhotoContains); }