示例#1
0
 private void AddAttachTap()
 {
     AttachmentPickerUC.Show(AttachmentTypes.AttachmentTypesWithPhotoFromGalleryAndLocation, this._commentVM.NumberOfAttAllowedToAdd, (Action)(() =>
     {
         PostCommentsPage.HandleInputParams(this._commentVM);
         this.UpdateAppBar();
     }), true, 0, 0, null);
 }
示例#2
0
        protected override void HandleOnNavigatedTo(NavigationEventArgs e)
        {
            base.HandleOnNavigatedTo(e);
            bool flag = true;

            if (!this._isInitialized)
            {
                ((UIElement)this.ucNewMessage).Opacity = 0.0;
                NewsItemDataWithUsersAndGroupsInfo parameterForIdAndReset = ParametersRepository.GetParameterForIdAndReset("WallPost") as NewsItemDataWithUsersAndGroupsInfo;
                long num1 = long.Parse(((Page)this).NavigationContext.QueryString["PollId"]);
                long num2 = long.Parse(((Page)this).NavigationContext.QueryString["PollOwnerId"]);
                if (this.FocusComments)
                {
                    this.panel.OnlyPartialLoad = true;
                }
                long postId  = this.CommonParameters.PostId;
                long ownerId = this.CommonParameters.OwnerId;
                MyVirtualizingPanel2 panel = this.panel;
                Action loadedCallback      = new Action(this.ViewModelIsLoaded);
                Action <CommentItem> replyCommentAction = new Action <CommentItem>(this.ReplyToComment);
                long knownPollId      = num1;
                long knownPollOwnerId = num2;
                PostCommentsViewModel commentsViewModel = new PostCommentsViewModel(parameterForIdAndReset, postId, ownerId, panel, loadedCallback, replyCommentAction, knownPollId, knownPollOwnerId);
                this.InitializeCommentVM();
                base.DataContext = commentsViewModel;
                commentsViewModel.LoadMoreCommentsInUI();
                this.UpdateAppBar();
                this.RestoreUnboundState();
                this.ucPullToRefresh.TrackListBox((ISupportPullToRefresh)this.panel);
                this.panel.OnRefresh = new Action(this.Refresh);
                this._isInitialized  = true;
                flag = false;
            }
            if (!flag && (!e.IsNavigationInitiator || e.NavigationMode != NavigationMode.New))
            {
                WallPostVMCacheManager.TryDeserializeInstance(this._commentVM);
            }
            this.ProcessInputData();
            PostCommentsPage.HandleInputParams(this._commentVM);
            this.UpdateAppBar();
        }