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);
     }
 }
 private static void ReportAdWallPost(string adData)
 {
     PickerUC.ShowPickerFor(ReportContentHelper.GetPredefinedAdReportReasons(), (PickableItem)null, (Action <PickableItem>)(pi => AdsIntService.ReportAd(adData, (ReportAdReason)pi.ID, (Action <BackendResult <VKClient.Audio.Base.ResponseWithId, ResultCode> >)(res =>
     {
         EventAggregator.Current.Publish((object)new AdReportedEvent()
         {
             AdData = adData
         });
         GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, CommonResources.ReportSent, (VKRequestsDispatcher.Error)null);
     }))), (Action <PickableItem>)null, null, CommonResources.PostContains);
 }
        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);
        }
Example #4
0
 private void reportMenuItem_Click(object sender, RoutedEventArgs e)
 {
     ReportContentHelper.ReportWallPost(this._wallPost, this.AdData);
 }
 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);
 }
 public static void ReportApp(long appId, long ownerId = 0)
 {
     PickerUC.ShowPickerFor(ReportContentHelper.GetPredefinedAppReportReasons(), null, (pi => AppsService.Instance.Report(appId, (ReportAppReason)pi.ID, ownerId, "", (Action <BackendResult <int, ResultCode> >)(res => GenericInfoUC.ShowBasedOnResult((int)res.ResultCode, CommonResources.ReportSent, (VKRequestsDispatcher.Error)null)))), null, null, CommonResources.Report.ToUpperInvariant());
 }
Example #8
0
 private void _reportMenuItem_Click(object sender, RoutedEventArgs e)
 {
     ReportContentHelper.ReportComment(this._comment.from_id, this._comment.id, this._likeObjectType);
 }