コード例 #1
0
        // Try to Load The Board
        private async Task LoadBoard()
        {
            List <TrelloBoard> aaa = await TrelloRepository.GetTrelloBoards();

            if (aaa == null)
            {
                // RnD: color patching =)
                //lvwBoards.BackgroundColor = Color.Green;

                // RnD :show settings ONLY ONCE (on First Init)
                if (App.FirstInit)
                {
                    Navigation.PushAsync(new NoConnectionPage());
                }
                else
                {
                    lvwBoards.BackgroundColor = Color.Gray;
                    lvwBoards.ItemsSource     = null;

                    // show (enable) Settings button
                    Settings.IsEnabled = true;
                    Settings.IsVisible = true;
                }
            }
            else
            {
                lvwBoards.BackgroundColor = Color.White;
                lvwBoards.ItemsSource     = aaa;
                //Debug.WriteLine("lvwBoards.ItemsSource: " + lvwBoards.ItemsSource);

                // All is OK - hide (disable) Settings button
                Settings.IsEnabled = true; //false;
                Settings.IsVisible = true; //false;
            }
        }//LoadBoard end
コード例 #2
0
        private async Task TestModels()
        {
            List <TrelloBoard> list = new List <TrelloBoard>();

            list = await TrelloRepository.GetTrelloBoards();

            foreach (TrelloBoard item in list)
            {
                Debug.WriteLine(item.Name);
                List <TrelloList> l = new List <TrelloList>();
                l = await TrelloRepository.GetTrelloListsAsync(item.BoardId);

                foreach (TrelloList tl in l)
                {
                    TrelloCard card = new TrelloCard()
                    {
                        Name = "Testerdetesterdetest"
                    };
                    await TrelloRepository.AddCardAsync(tl.ListId, card);

                    Debug.WriteLine($"Listname: {tl.Name}");
                    List <TrelloCard> ltc = new List <TrelloCard>();
                    ltc = await TrelloRepository.GetTrelloCardsAsync(tl.ListId);

                    foreach (TrelloCard c in ltc)
                    {
                        Debug.WriteLine($"Cardname: {c.Name}");
                    }
                }
            }
            TrelloBoard b = list.Where(x => x.IsFavorite == true).ToList <TrelloBoard>().First();

            if (b != null)
            {
                Debug.WriteLine(b.Name);
            }
        }
コード例 #3
0
 private async Task LoadBord()
 {
     lvwBoards.ItemsSource = await TrelloRepository.GetTrelloBoards();
 }