Example #1
0
        async void ReactionButtonClicked(object sender, System.EventArgs e)
        {
            var Button = (Button)sender;

            /*bool answer = await DisplayAlert("Reagera", "TEST TEXT", "Nej", "Ja"); //(Title,Message,Accept,Cancel)
             * if (!answer)
             * {*/
            ReactionPopUp rp = new ReactionPopUp(ArticleNR, Reacted, CR, this);
            await PopupNavigation.Instance.PushAsync(rp);

            /*}
             * else
             * {
             *
             * }*/
        }
Example #2
0
        async void ReactionButtonClicked(object sender, System.EventArgs e) //Sends an reaction object to the server on this article based on what the user pressed on.
        {
            Button b = (Button)sender;

            var ID = Convert.ToInt32(b.ClassId);

            var           UserReactions = App.database.GetReactionsFromUser(App.LoggedinUser.ID);
            bool          Reacted       = false;
            ReactionTable CR            = null;

            foreach (ReactionTable Reaction in UserReactions)
            {
                if (Reaction.Article == ID)
                {
                    Reacted = true;
                    CR      = Reaction;
                    break;
                }
            }
            ReactionPopUp rp = new ReactionPopUp(ID, Reacted, CR, null);
            await PopupNavigation.Instance.PushAsync(rp);
        }
Example #3
0
 // A popup to react to the user's input on pressing a reaction.
 async void ReactionButtonClicked(object sender, System.EventArgs e)
 {
     var           Button = (Button)sender;
     ReactionPopUp rp     = new ReactionPopUp(ArticleNR, Reacted, CR, this);
     await PopupNavigation.Instance.PushAsync(rp);
 }