Example #1
0
 private void AddComment(string comment, TfsCard card)
 {
     if (string.IsNullOrEmpty(comment))
     {
         return;
     }
     _trello.Cards.AddComment(card, comment);
 }
Example #2
0
 private void SetName(string name, TfsCard card)
 {
     if (card.Name == name)
     {
         return;
     }
     _trello.Cards.ChangeName(card, name);
     card.Name = name;
 }
Example #3
0
 private void SetListName(string listName, TfsCard card)
 {
     if (card.ListName == listName)
     {
         return;
     }
     _trello.Cards.Move(card, GetListIdByName(listName));
     card.ListName = listName;
 }
Example #4
0
 private void SetDesc(string desc, TfsCard card)
 {
     if (card.Name == desc)
     {
         return;
     }
     _trello.Cards.ChangeDescription(card, desc);
     card.Desc = desc;
 }
Example #5
0
 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;
 }
Example #6
0
        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;
        }
Example #7
0
 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);
 }
Example #8
0
 private void SetName(string name, TfsCard card)
 {
     if(card.Name == name) return;
     _trello.Cards.ChangeName(card, name);
     card.Name = name;
 }
Example #9
0
 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;
 }
Example #10
0
 private void SetListName(string listName, TfsCard card)
 {
     if (card.ListName == listName) return;
     _trello.Cards.Move(card, GetListIdByName(listName));
     card.ListName = listName;
 }
Example #11
0
 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;
 }
Example #12
0
 private void SetComment(string comment, TfsCard card)
 {
     if (string.IsNullOrEmpty(comment) || card.Desc == comment) return;
     _trello.Cards.AddComment(card, comment);
     card.Desc = comment;
 }
Example #13
0
 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);
 }