Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 private void _appBarButtonAttachments_Click(object sender, EventArgs e)
 {
     if (this._commentVM.OutboundAttachments.Count == 0)
     {
         PickerUC.PickAttachmentTypeAndNavigate(AttachmentTypes.AttachmentTypesWithPhotoFromGallery, null, (() => Navigator.Current.NavigateToPhotoPickerPhotos(2, false, false)));
     }
     else
     {
         ParametersRepository.SetParameterForId("NewCommentVM", this._commentVM);
         Navigator.Current.NavigateToNewWallPost(0, false, 0, false, false, false);
     }
 }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
 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);
 }
Esempio n. 6
0
 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);
 }
Esempio n. 7
0
 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());
 }
Esempio n. 8
0
 private void DoNotDisturbClick(object sender, RoutedEventArgs e)
 {
     PickerUC.ShowPickerFor(new ObservableCollection <PickableItem>(SettingsNotificationsViewModel.DoNotDisturbOptions), null, (pi => this.VM.Disable((int)(pi.ID * 3600L))), null, null, CommonResources.Settings_Notifications_DoNotDisturb.ToUpperInvariant());
 }