Example #1
0
        public BoardsUpdateRequest(IUpdatableBoard board)
            : base(board.Id, method: Method.PUT)
        {
            Guard.RequiredTrelloString(board.Name, "name");
            Guard.OptionalTrelloString(board.Desc, "desc");

            AddParameter("name", board.Name);
            AddParameter("desc", board.Desc);
            AddParameter("closed", board.Closed.ToTrelloString());
        }
		public BoardsUpdateRequest(IUpdatableBoard board)
			: base(board.Id, method: Method.PUT)
		{
			Guard.RequiredTrelloString(board.Name, "name");
			Guard.OptionalTrelloString(board.Desc, "desc");

			AddParameter("name", board.Name);
			AddParameter("desc", board.Desc);
			AddParameter("closed", board.Closed.ToTrelloString());
		}
Example #3
0
        private async void LoadListsFor(IUpdatableBoard board, May <string> selectedId)
        {
            _progress.Show("Loading lists...");
            try
            {
                var lists = (await _api.Lists.ForBoard(new BoardId(board.Id))).ToList();
                Lists.Clear();
                Lists.AddRange(lists);

                selectedId
                .Else(lists.Take(1).Select(l => l.Id).MayFirst())
                .IfHasValueThenDo(id => { SelectedList = lists.FirstOrDefault(l => l.Id == id); });
            }
            catch (Exception ex)
            {
                Analytics.LogException(ex);
                MessageBox.Show("The lists for that board were unable to be loaded.  Please " +
                                "ensure that you have an active internet connection.");
            }
            finally
            {
                _progress.Hide();
            }
        }
Example #4
0
        private async void LoadListsFor(IUpdatableBoard board, May<string> selectedId)
        {
            _progress.Show("Loading lists...");
            try
            {
                var lists = (await _api.Lists.ForBoard(new BoardId(board.Id))).ToList();
                Lists.Clear();
                Lists.AddRange(lists);

                selectedId
                    .Else(lists.Take(1).Select(l => l.Id).MayFirst())
                    .IfHasValueThenDo(id => { SelectedList = lists.FirstOrDefault(l => l.Id == id); });
            }
            catch (Exception ex)
            {
                Analytics.LogException(ex);
                MessageBox.Show("The lists for that board were unable to be loaded.  Please " +
                                "ensure that you have an active internet connection.");
            }
            finally
            {
                _progress.Hide();
            }
        }
Example #5
0
 public Task Update(IUpdatableBoard board)
 {
     return _restClient.RequestAsync(new BoardsUpdateRequest(board));
 }
Example #6
0
		public void Update(IUpdatableBoard board)
		{
			_restClient.Request(new BoardsUpdateRequest(board));
		}
Example #7
0
 public void Update(IUpdatableBoard board)
 {
     _restClient.Request(new BoardsUpdateRequest(board));
 }
Example #8
0
		public Task Update(IUpdatableBoard board)
		{
			return _restClient.RequestAsync(new BoardsUpdateRequest(board));
		}