//Connect to COSMIC, preform login and get the Articles for each mutatin that has cosmic details.
        private void _articlesBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BeginInvoke((MethodInvoker)delegate
            {
                _articleTabControl.TabPages.Clear();
            });
            _articlesBackgroundWorker.ReportProgress(0);
            bool logedIn = _cosmicWebService.loginToCosmic(Properties.Settings.Default.CosmicEmail, Properties.Settings.Default.CosmicPassword, 5);

            if (_cosmicWebService.isLogedIn())
            {
                _articlesBackgroundWorker.ReportProgress(1);
                foreach (Mutation m in _mutationList)
                {
                    if (!m.CosmicName.Equals("-----"))
                    {
                        foreach(int i in m.getCosmicNums())
                        {
                            string tsvStringFromCosmic = _cosmicWebService.getTsvFromCosmic(i);
                            string tabName = m.GeneName + "  " + m.PMutationName + "  COSM"+i;
                            ArticleTabPage p = new ArticleTabPage(tabName, TSVHandler.getArticleListFromTsv(tsvStringFromCosmic));
                            BeginInvoke((MethodInvoker)delegate
                            {
                                _articleTabControl.TabPages.Add(p);
                            });
                        }
                    }
                }
            }
            else
            {
                _articlesBackgroundWorker.ReportProgress(2);
            }
        }
Пример #2
0
        //Connect to COSMIC, preform login and get the Articles for each mutatin that has cosmic details.
        private void _articlesBackgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            BeginInvoke((MethodInvoker) delegate
            {
                _articleTabControl.TabPages.Clear();
            });
            _articlesBackgroundWorker.ReportProgress(0);
            bool logedIn = _cosmicWebService.loginToCosmic(Properties.Settings.Default.CosmicEmail, Properties.Settings.Default.CosmicPassword, 5);

            if (_cosmicWebService.isLogedIn())
            {
                _articlesBackgroundWorker.ReportProgress(1);
                foreach (Mutation m in _mutationList)
                {
                    if (!m.CosmicName.Equals("-----"))
                    {
                        foreach (int i in m.getCosmicNums())
                        {
                            string         tsvStringFromCosmic = _cosmicWebService.getTsvFromCosmic(i);
                            string         tabName             = m.GeneName + "  " + m.PMutationName + "  COSM" + i;
                            ArticleTabPage p = new ArticleTabPage(tabName, TSVHandler.getArticleListFromTsv(tsvStringFromCosmic));
                            BeginInvoke((MethodInvoker) delegate
                            {
                                _articleTabControl.TabPages.Add(p);
                            });
                        }
                    }
                }
            }
            else
            {
                _articlesBackgroundWorker.ReportProgress(2);
            }
        }
 //Initialize the form, get all journals and present them as a list of checkboxs.
 public FilterArticlesForm(MainForm mainForm, ArticleTabPage articleTabPage)
 {
     this.mainForm = mainForm;
     this.articleTabPage = articleTabPage;
     Dictionary<string, bool> dictionary = articleTabPage.getJournalToView();
     InitializeComponent();
     foreach (KeyValuePair<string, bool> entry in dictionary)
     {
         journalCheckedListBox.Items.Add(entry.Key,entry.Value);
     }
 }
Пример #4
0
        //Initialize the form, get all journals and present them as a list of checkboxs.
        public FilterArticlesForm(MainForm mainForm, ArticleTabPage articleTabPage)
        {
            this.mainForm       = mainForm;
            this.articleTabPage = articleTabPage;
            Dictionary <string, bool> dictionary = articleTabPage.getJournalToView();

            InitializeComponent();
            foreach (KeyValuePair <string, bool> entry in dictionary)
            {
                journalCheckedListBox.Items.Add(entry.Key, entry.Value);
            }
        }