Ejemplo n.º 1
0
 public void Load(Box box)
 {
     Cards.AddRange(box.Cards.Select(x => mapper.Map <Card, CardViewModel>(x)));
     Columns.AddRange(box.Columns.Select(x => mapper.Map <Column, ColumnViewModel>(x)));
     Rows.AddRange(box.Rows.Select(x => mapper.Map <Row, RowViewModel>(x)));
     Boards.AddRange(box.Boards.Select(x => mapper.Map <Board, BoardViewModel>(x)));
     Loaded = true;
 }
Ejemplo n.º 2
0
        public void Load(Box box)
        {
            Cards.AddRange(box.Cards.Select(x => mapper.Map <Card, CardViewModel>(x)));
            Columns.AddRange(box.Columns.Select(x => mapper.Map <Column, ColumnViewModel>(x)));
            Rows.AddRange(box.Rows.Select(x => mapper.Map <Row, RowViewModel>(x)));
            Boards.AddRange(box.Boards.Select(x => mapper.Map <Board, BoardViewModel>(x)));
            LogEntries.AddRange(box.Log.Select(x => mapper.Map <Kamban.Repository.Models.LogEntry, LogEntryViewModel>(x)));

            Loaded = true;
        }
Ejemplo n.º 3
0
        private async void LoadBoards(string selectedId)
        {
            _progress.Show("Loading boards...");
            try
            {
                var boards = (await _api.Boards.ForMe(BoardFilter.Open)).ToList();
                Boards.Clear();
                Boards.AddRange(boards);

                SelectedBoard = boards.FirstOrDefault(b => b.Id == selectedId);
            }
            catch (Exception ex)
            {
                Analytics.LogException(ex);
                MessageBox.Show("Your boards were unable to be loaded.  Please " +
                                "ensure that you have an active internet connection.");
            }
            finally
            {
                _progress.Hide();
            }
        }
Ejemplo n.º 4
0
        public async Task GetBoards()
        {
            Boards.Clear();

            var result = await _boardsService.GetTestedBoards(CertificateId);

            if (!result.Success)
            {
                Dialogs.Toast(result.Message);
                return;
            }

            var boards = result.ResultObject as List <BoardTest>;

            if (boards == null || !boards.Any())
            {
                return;
            }

            Boards.AddRange(new List <BoardTest>(boards.OrderBy(x => x.BoardIdentity)));
            await GetCircuitsForCurrentBoard();
        }
Ejemplo n.º 5
0
 private void LoadBoards()
 {
     Boards.Clear();
     Boards.AddRange(ArduinoCLI_API.GetInstalledBoards().OrderBy(b => b.Fqbn));
     ((BindingSource)(cbBoards.DataSource)).ResetBindings(false);
 }