void onButtonClicked(string action, AndroidJavaObject post)
        {
            Debug.Log(">>>>>>> XXXX");
            var activityPost = new ActivityPost().ParseFromAJO(post);

            ExecuteOnMainThread(() => _onButtonClicked(action, activityPost));
        }
Exemple #2
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,DateTimePosted,DateTimeChanged,DateTimeStarted,DateTimeEnded,HoursSpent,MinutesSpent,SecondsSpent,ApplicationUserId,HealthActivityId,ActivityPostStatusId,Description,Location")] ActivityPost activityPost)
        {
            if (id != activityPost.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(activityPost);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ActivityPostExists(activityPost.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ActivityPostStatusId"] = new SelectList(_context.Set <ActivityPostStatus>(), "Id", "ActivityPostStatusName", activityPost.ActivityPostStatusId);
            ViewData["HealthActivityId"]     = new SelectList(_context.Set <HealthActivity>(), "Id", "HealthActivityName", activityPost.HealthActivityId);
            ViewData["ApplicationUserId"]    = new SelectList(_context.Users, "Id", "FullName", activityPost.ApplicationUserId);
            return(View(activityPost));
        }
Exemple #3
0
        protected override void PerformAction(object parameter)
        {
            ActivityPost activityPost = parameter as ActivityPost;

            String fullitemstring = activityPost.Actor + ": " + activityPost.Message + " " + activityPost.Updated.ToString();

            Clipboard.SetData(DataFormats.Text, fullitemstring);
        }
Exemple #4
0
        protected override void PerformAction(object parameter)
        {
            object[]     parameterList = parameter as object[];
            ActivityPost activityPost  = parameterList[0] as ActivityPost;
            string       comment       = parameterList[1] as string;

            ServiceProvider.FacebookService.AddComment(activityPost, comment);
        }
    void OnActivityActionClicked(string actionId, ActivityPost post)
    {
        var message = string.Format("Activity feed button clicked, action type: {0}", actionId);
        var popup   = new MNPopup("Info", message);

        popup.AddAction("OK", () => {});
        popup.Show();
        _console.LogD(message);
    }
Exemple #6
0
        public static void OnActionButtonClick(IntPtr onButtonClickedPtr, string actionId, string serializedActivityPost)
        {
            GetSocialDebugLogger.D(string.Format("OnActionButtonClick for action [{0}], post: {1}", actionId, serializedActivityPost));

            if (onButtonClickedPtr != IntPtr.Zero)
            {
                var post = new ActivityPost().ParseFromJson(serializedActivityPost.ToDict());
                onButtonClickedPtr.Cast <Action <string, ActivityPost> >().Invoke(actionId, post);
            }
        }
Exemple #7
0
        protected override bool CanExecuteInternal(object parameter)
        {
            if (parameter == null)
            {
                return(false);
            }

            ActivityPost activityPost = parameter as ActivityPost;

            return(true);
        }
Exemple #8
0
        protected override bool CanExecuteInternal(object parameter)
        {
            if (parameter == null)
            {
                return(false);
            }

            ActivityPost activityPost = parameter as ActivityPost;

            return(activityPost.CanLike && !activityPost.HasLiked);
        }
Exemple #9
0
 private static Action DrawMessage(ActivityPost message)
 {
     return(() =>
     {
         if (message.Author.Id.Equals(GetSocial.User.Id))
         {
             GUILayout.Label(message.Text, GSStyles.RightAlignedChatText);
         }
         else
         {
             GUILayout.Label(message.Text, GSStyles.LeftAlignedChatText);
         }
     });
 }
Exemple #10
0
        public async Task <IActionResult> Create([Bind("Id,DateTimePosted,DateTimeChanged,DateTimeStarted,DateTimeEnded,HoursSpent,MinutesSpent,SecondsSpent,ApplicationUserId,HealthActivityId,ActivityPostStatusId,Description,Location")] ActivityPost activityPost)
        {
            if (ModelState.IsValid)
            {
                _context.Add(activityPost);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["ActivityPostStatusId"] = new SelectList(_context.Set <ActivityPostStatus>(), "Id", "ActivityPostStatusName", activityPost.ActivityPostStatusId);
            ViewData["HealthActivityId"]     = new SelectList(_context.Set <HealthActivity>(), "Id", "HealthActivityName", activityPost.HealthActivityId);
            ViewData["ApplicationUserId"]    = new SelectList(_context.Users, "Id", "FullName", activityPost.ApplicationUserId);
            return(View(activityPost));
        }
Exemple #11
0
        protected override bool CanExecuteInternal(object parameter)
        {
            if (parameter == null)
            {
                return(false);
            }

            object[]     parameterList = parameter as object[];
            ActivityPost activityPost  = parameterList[0] as ActivityPost;

            if (activityPost == null)
            {
                return(false);
            }

            return(activityPost.CanComment);
        }
Exemple #12
0
        protected override void PerformAction(object parameter)
        {
            ActivityPost activityPost = parameter as ActivityPost;

            ServiceProvider.FacebookService.GetMoreComments(activityPost);
        }
Exemple #13
0
        protected override void PerformAction(object parameter)
        {
            ActivityPost activityPost = parameter as ActivityPost;

            ServiceProvider.FacebookService.RemoveLike(activityPost);
        }
Exemple #14
0
 public PhotoExplorerPostNode(ActivityPost post)
     : base(post, string.Empty)
 {
     this.Post = post;
 }