Пример #1
0
        public TrelloViewModel()
        {
            //return;
            Configuration currentConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            currentConfig = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
            ITrello trello = new Trello(currentConfig.AppSettings.Settings["AppKey"].Value);

            trello.Authorize(currentConfig.AppSettings.Settings["Token"].Value);
            boardModel = new BindingList<BoardModel>();
            
            /*var test = trello.Members.Me();
            System.Collections.Generic.IEnumerable<Organization> organization = trello.Organizations.ForMe();
            Organization org = organization.ElementAt(0);*/

            var board = trello.Boards.ForMe();
            for (int i = 0; i != board.Count(); i++)
            {
                Board boards = board.ElementAt(i);
                if (boardModelCheckBox == null)
                    boardModelCheckBox = new BindingList<BoardModel>();
                boardModelCheckBox.Add(new BoardModel() { Id = boards.Id, Name = boards.Name, Desc = boards.Desc });
            }

            browser = new Browser();
            string document = browser.GET("http://servicedesk.gradient.ru/", Encoding.UTF8);
            if (document == null)
                document = browser.GET("http://servicedesk.gradient.ru/", Encoding.UTF8);
            if (document == null)
                document = browser.GET("http://servicedesk.gradient.ru/", Encoding.UTF8);
            //document = browser.GET("http://servicedesk.gradient.ru/api/task", Encoding.UTF8);
            string test = "";

        }