private void MAdapterOnItemClick(object sender, SelectContactsAdapterClickEventArgs e)
        {
            try
            {
                var item = MAdapter.GetItem(e.Position);
                switch (item)
                {
                case null:
                    return;
                }

                var check1 = MAdapter.UserList.Where(a => a.Selected).ToList();
                switch (check1.Count)
                {
                case > 0:
                {
                    foreach (var all in check1)
                    {
                        all.Selected = false;
                    }
                    break;
                }
                }

                item.Selected = !item.Selected;
                MAdapter.NotifyDataSetChanged();
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
            }
        }
Exemplo n.º 2
0
        private void MAdapterOnItemClick(object sender, SelectContactsAdapterClickEventArgs e)
        {
            try
            {
                var item = MAdapter.GetItem(e.Position);
                if (item == null)
                {
                    return;
                }

                var check1 = MAdapter.UserList.Where(a => a.Selected).ToList();
                if (check1.Count > 0)
                {
                    foreach (var all in check1)
                    {
                        all.Selected = false;
                    }
                }

                item.Selected = !item.Selected;
                MAdapter.NotifyDataSetChanged();
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }