private async void LoadAll()
        {
            try
            {
                //FindViewById<CardView>(Resource.Id.ReloadTest).Visibility = Android.Views.ViewStates.Gone;
                Tickets = await new AnsweredService().GetIncorrectTicketAsync(GetTicketBy.All);

                var meneger = new LinearLayoutManager(this)
                {
                    Orientation = LinearLayoutManager.Vertical
                };
                Recycler.SetLayoutManager(meneger);

                Recycler.SetAdapter(new EndUiAdapter(Tickets));
            }
            catch (SQLite.SQLiteException)
            {
                Android.Support.V7.App.AlertDialog.Builder alert = new Android.Support.V7.App.AlertDialog.Builder(this);
                alert.SetTitle("სტატისტიკა");
                alert.SetMessage("ჯერ გაიარე ტესტი");

                Dialog dialog = alert.Create();
                dialog.Show();
            }
        }
示例#2
0
        private void Initialize()
        {
            var inflater = (LayoutInflater)Context.GetSystemService(Context.LayoutInflaterService);

            inflater.Inflate(Resource.Layout.ColorPicker, this);

            Recycler = FindViewById <RecyclerView> (Resource.Id.ColorPickerRecyclerView);

            LayoutManager = new GridLayoutManager(Context, ColumnsCount);
            Recycler.SetLayoutManager(LayoutManager);

            Adapter = new ColorPickerAdapter();
            Recycler.SetAdapter(Adapter);
        }
示例#3
0
        private async void Load()
        {
            IEnumerable <ICategory> categories = null;

            if (Online)
            {
                categories = await new GetTopicService(Animations).GetAllOnlineCategoryAsync();
            }
            else
            {
                categories = await new GetTopicService(Animations).GetAllOfflineCategoryAsync();
            }

            Recycler.SetAdapter(new CategoryAdapter(categories, Click));
        }
示例#4
0
 private async void Load()
 {
     if (Online)
     {
         Recycler.SetAdapter(new TopicAdapter((await new GetTopicService(Animations).GetAllOnlineCategoryAsync()).FirstOrDefault(o => o.Name == Category).Topics.Select(i => new TopicAndroid {
             Name = i.Name, TicketsCount = i.TicketsDb.Count()
         }), CategoryChecked, Checked));
     }
     else
     {
         Recycler.SetAdapter(new TopicAdapter((await new GetTopicService(Animations).GetAllOfflineCategoryAsync()).FirstOrDefault(o => o.Name == Category).Topics.Select(i => new TopicAndroid {
             Name = i.Name, TicketsCount = i.TicketsDb.Count()
         }), CategoryChecked, Checked));
     }
 }
        private async void Load()
        {
            var TicketsCountStr = Intent.Extras.Get("TicketsCount").ToString();

            int.TryParse(TicketsCountStr, out int TicketsCountInt);
            var ticketsLstHrs = await new AnsweredService().GetIncorrectTicketAsync(GetTicketBy.Hrs);

            Tickets = ticketsLstHrs.Where(o => o.Id >= ticketsLstHrs.ElementAt(ticketsLstHrs.Count() - TicketsCountInt).Id);


            var meneger = new LinearLayoutManager(this)
            {
                Orientation = LinearLayoutManager.Vertical
            };

            Recycler.SetLayoutManager(meneger);

            Recycler.SetAdapter(new EndUiAdapter(Tickets));
        }