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

            ExecuteOnMainThread(() => _onButtonClicked(action, activityPost));
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
    }
Exemplo n.º 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);
            }
        }
Exemplo n.º 7
0
        protected override bool CanExecuteInternal(object parameter)
        {
            if (parameter == null)
            {
                return(false);
            }

            ActivityPost activityPost = parameter as ActivityPost;

            return(true);
        }
Exemplo n.º 8
0
        protected override bool CanExecuteInternal(object parameter)
        {
            if (parameter == null)
            {
                return(false);
            }

            ActivityPost activityPost = parameter as ActivityPost;

            return(activityPost.CanLike && !activityPost.HasLiked);
        }
Exemplo n.º 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);
         }
     });
 }
Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 12
0
        protected override void PerformAction(object parameter)
        {
            ActivityPost activityPost = parameter as ActivityPost;

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

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