コード例 #1
0
        private void Export(ISearchDataSet dataset, int quantity)
        {
            DialogResult result = MessageBox.Show("¿Desea exportar las publicaciones (publicaciones de twitter) con el contenido completo?", "Export content", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                IList <IPublication> publications = dataset.GetPublications();
                ReadHtmlContents(publications);
                dataset.AddOrReplacePublications(publications);
            }


            //FolderBrowserDialog folderDialog = new FolderBrowserDialog();
            //DialogResult resultFolderDialog = folderDialog.ShowDialog();


            string folderName = "";

            //if (resultFolderDialog == DialogResult.OK)
            //{
            //    string folderName = folderDialog.SelectedPath;
            //    dataset.BasePath = folderName + "/";
            //    dataset.ExportDataSet(-1);
            //IQueryConfiguration queryConfiguration = queriesControl.GetCurrentQueryConfiguration();
            //       string folderName = "..//..//..//Database//LemmatizedPublications";
            //string folderName = "..//..//..//Database//LemmatizedPublications";
            folderName       = "..//..//..//LemmatizedPublications";
            dataset.BasePath = folderName + "/";

            InvokeHandlers invokeHandlers = new InvokeHandlers(InvokeScrapperHandlers);

            this.Invoke(invokeHandlers);
            //}
        }
コード例 #2
0
        private void Export(ISearchDataSet dataset, int quantity)
        {
            DialogResult result = MessageBox.Show("¿Desea exportar las publicaciones (publicaciones de twitter) con el contenido completo?", "Export content", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                IList <IPublication> publications = dataset.GetPublications();
                ReadHtmlContents(publications);
                dataset.AddOrReplacePublications(publications);
            }

            IQueryConfiguration queryConfiguration = queriesControl.GetCurrentQueryConfiguration();

            if (queryConfiguration != null)
            {
                dataset.BaseName = queryConfiguration.SinceDate.ToShortDateString().Replace("/", "-") + "_" + queryConfiguration.UntilDate.AddDays(-1).ToShortDateString().Replace("/", "-");
            }
            else
            {
                dataset.BaseName = DateTime.Now.AddDays(-1).ToShortDateString().Replace("/", "-") + "_" + DateTime.Now.ToShortDateString().Replace("/", "-");
            }

            InvokeHandlers invokeHandlers = new InvokeHandlers(InvokeScrapperHandlers);

            this.Invoke(invokeHandlers);
        }
コード例 #3
0
        private void Export(ISearchDataSet dataset, int quantity)
        {
            DialogResult result = MessageBox.Show("¿Desea exportar las publicaciones (publicaciones de twitter) con el contenido completo?", "Export content", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                IList <IPublication> publications = dataset.GetPublications();
                ReadHtmlContents(publications);
                dataset.AddOrReplacePublications(publications);
            }

            FolderBrowserDialog folderDialog       = new FolderBrowserDialog();
            DialogResult        resultFolderDialog = folderDialog.ShowDialog();

            if (resultFolderDialog == DialogResult.OK)
            {
                string folderName = folderDialog.SelectedPath;

                dataset.BasePath = folderName + "/";
                dataset.BaseName = "Text Lemmatize";
                dataset.ExportDataSet(quantity);
            }
        }