Exemplo n.º 1
0
        /// <summary>
        /// Hủy thách đấu club
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDelete(object sender, EventArgs e)
        {
            var btn    = sender as Button;
            var parent = btn.BindingContext as ChallengeInfo;

            if (parent != null)
            {
                ChallengeAction.AcceptOrCancelChall(parent.ChallengeID, 0);
                model.Notifi.ListChallengesClub.Remove(parent);
                model.Notifi.count--;
                model.Notifi.notify = model.Notifi.count.ToString();
                ChallengeAction.ListSendClub.Remove(parent.SenderID);
                NotifiDialog.Initiance().DialogChallengeDelete();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Chấp nhận thách đấu Club
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAccept(object sender, EventArgs e)
        {
            var btn    = sender as Button;
            var parent = btn.BindingContext as ChallengeInfo;

            if (parent != null)
            {
                ChallengeAction.AcceptOrCancelChall(parent.ChallengeID, 1);
                model.Notifi.ListChallengesClub.Remove(parent);
                model.Notifi.count--;
                model.Notifi.notify = model.Notifi.count.ToString();
                ChallengeAction.ListSendClub.Remove(parent.SenderID);
                UserDialogs.Instance.Toast("Đã chấp nhận thách đấu thành công");
                //btn.IsVisible = false;
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// ấn hủy thách đấu
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Clicked_1(object sender, EventArgs e)
        {
            var btn    = sender as Button;
            var parent = btn.BindingContext as ChallengeInfo;

            if (parent != null)
            {
                ChallengeAction.AcceptOrCancelChall(parent.ChallengeID, 0);
                model.Notifi.ListChallengesPer.Remove(parent);
                ChallengeAction.ListSendAcc.Remove(parent.SenderID);
                model.Notifi.count--;
                model.Notifi.notify    = model.Notifi.count.ToString();
                parent.IsVisibleAccept = false;
                parent.IsvisibleDelete = false;
                NotifiDialog.Initiance().DialogChallengeDelete();
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// chấp nhận thách đấu cá nhân
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Clicked_1(object sender, EventArgs e)
        {
            var btn = sender as Button;

            //var parent = btn.BindingContext as ChallengeInfo;
            if (model != null)
            {
                ChallengeAction.AcceptOrCancelChall(model.Chall.ChallengeID, 1);
                if (model.IsPerson)
                {
                    model.OnBackAccept();
                }
                else
                {
                    model.OnBackAcceptClub();
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// hủy thách đấu cá nhân
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Button_Clicked(object sender, EventArgs e)
        {
            var btn    = sender as Button;
            var parent = btn.BindingContext as ChallengeInfo;

            if (model != null && parent != null)
            {
                ChallengeAction.AcceptOrCancelChall(parent.ChallengeID, 0);
                if (model.IsPerson)
                {
                    model.OnBackDelete();
                }
                else
                {
                    model.OnBackDeleteClub();
                }
            }
        }