private void AddComment(string comment, TfsCard card) { if (string.IsNullOrEmpty(comment)) { return; } _trello.Cards.AddComment(card, comment); }
private void SetName(string name, TfsCard card) { if (card.Name == name) { return; } _trello.Cards.ChangeName(card, name); card.Name = name; }
private void SetListName(string listName, TfsCard card) { if (card.ListName == listName) { return; } _trello.Cards.Move(card, GetListIdByName(listName)); card.ListName = listName; }
private void SetDesc(string desc, TfsCard card) { if (card.Name == desc) { return; } _trello.Cards.ChangeDescription(card, desc); card.Desc = desc; }
private void SetLabel(Color color, TfsCard card) { if (card.LabelColor == color) { return; } _trello.Cards.AddLabel(card, color); if (card.LabelColor != null) { _trello.Cards.RemoveLabel(card, (Color)card.LabelColor); } card.LabelColor = color; }
private void SetMember(string user, TfsCard card) { if (string.IsNullOrEmpty(user) || card.Username == user) { return; } if (!_members.ContainsKey(user)) { Console.WriteLine("Users not defined correctly in config ({0})", user); Console.ReadKey(); return; } var idOrUsername = _members[user]; _trello.Cards.AddMember(card, new MemberId(idOrUsername)); card.Username = user; }
private void SetValues(string listName, string name, string username, Color color, string comment, TfsCard tfsCard) { SetName(name, tfsCard); SetListName(listName, tfsCard); SetMember(username, tfsCard); SetLabel(color, tfsCard); SetComment(comment, tfsCard); }
private void SetName(string name, TfsCard card) { if(card.Name == name) return; _trello.Cards.ChangeName(card, name); card.Name = name; }
private void SetMember(string user, TfsCard card) { if (string.IsNullOrEmpty(user) || card.Username == user) return; if (!_members.ContainsKey(user)) { Console.WriteLine("Users not defined correctly in config ({0})", user); Console.ReadKey(); return; } var idOrUsername = _members[user]; _trello.Cards.AddMember(card, new MemberId(idOrUsername)); card.Username = user; }
private void SetListName(string listName, TfsCard card) { if (card.ListName == listName) return; _trello.Cards.Move(card, GetListIdByName(listName)); card.ListName = listName; }
private void SetLabel(Color color, TfsCard card) { if (card.LabelColor == color) return; _trello.Cards.AddLabel(card, color); if (card.LabelColor != null) _trello.Cards.RemoveLabel(card, (Color)card.LabelColor); card.LabelColor = color; }
private void SetComment(string comment, TfsCard card) { if (string.IsNullOrEmpty(comment) || card.Desc == comment) return; _trello.Cards.AddComment(card, comment); card.Desc = comment; }
private void SetValues(string listName, string name, string username, Color color, string comment, TfsCard tfsCard) { SetName(name, tfsCard); SetListName(listName, tfsCard); SetMember(username, tfsCard); SetLabel(color, tfsCard); SetDesc(comment, tfsCard); }