Пример #1
0
        private void btnCollectLinks_Click(object sender, EventArgs e)
        {
            lblStatus.Text = "Starting";
            //cFile oFile = new cFile("C:\\Users\\joshua\\Sync\\Dropbox\\Documents\\FF\\input");
            //string[] fileList = oFile.GetAllFileList("C:\\Users\\joshua\\Sync\\Dropbox\\Documents\\FF\\input");
            //cUrlCollector oUrlCollector = new cUrlCollector();
            List <string> sPaths = GetLinks();
            // oUrlCollector.GetLinks(fileList);
            cUrlTool oUrl = new cUrlTool();

            oUrl.ExportedLinkPath = "C:\\Users\\joshua\\Sync\\Dropbox\\Documents\\FF\\InputsAll.txt";
            int iCnt = 0;

            foreach (string sT in sPaths)
            {
                string sOutput = "FF" + iCnt.ToString() + ".txt";
                sPaths.Add(sT);
                oUrl.GetLinks(sT);
                oUrl.WriteLinks(sOutput);
                iCnt += 1;
            }
            //oUrl.GetLinks("C:\\Users\\joshua\\Sync\\Dropbox\\Documents\\FF\\input");
            //oUrl.WriteLinks(oUrl.UrlList);
            lblStatus.Text = "Finished";
        }
Пример #2
0
        private void Test()
        {
            cUrlTool oUrl      = new cUrlTool();
            string   sUrlInput = "http://m.fanfiction.net/s/3037112/3/";

            lblTest.Text = sUrlInput;
            string sUrlOutput = oUrl.FixFFdotNet(sUrlInput);

            lblTest2.Text = sUrlOutput;
        }
Пример #3
0
        private void Test3()
        {
            cUrlTool oUrl      = new cUrlTool();
            string   sFilePath = "C:\\Users\\joshua\\Sync\\Dropbox\\Documents\\FF\\input\\2\\mediaminer.txt";

            lblTest.Text = sFilePath;
            string sUrlOutput = "False";

            if (oUrl.LoadLinksFromFile(sFilePath))
            {
                sUrlOutput = "True";
            }
            //string sUrlOutput =
            lblTest2.Text = sUrlOutput;
        }
Пример #4
0
        private void btnCollectLinks_Click(object sender, EventArgs e)
        {
            lblStatus.Text = "Starting";
            string sPath = "";

            sPath = "E:\\sync\\Dropbox\\Documents\\FF\\input";
            //cFile oFile = new cFile("C:\\Users\\joshua\\Sync\\Dropbox\\Documents\\FF\\input");
            //string[] fileList = oFile.GetAllFileList("C:\\Users\\joshua\\Sync\\Dropbox\\Documents\\FF\\input");
            //cUrlCollector oUrlCollector = new cUrlCollector();
            // oUrlCollector.GetLinks(fileList);
            cUrlTool oUrl = new cUrlTool();

            oUrl.ExportedLinkPath = "E:\\sync\\Dropbox\\Documents\\FF\\InputsAll.txt";
            //oUrl.ExportedLinkPath = "C:\\Users\\joshua\\Sync\\Dropbox\\Documents\\FF\\InputsAll.txt";
            //oUrl.GetLinks("C:\\Users\\joshua\\Sync\\Dropbox\\Documents\\FF\\input");
            oUrl.GetLinks(sPath);
            oUrl.WriteLinks(oUrl.UrlList);
            lblStatus.Text = "Finished";
        }
Пример #5
0
        private Task ProcessFile(string fileName)
        {
            cFile oFile = new cFile("log");
            // use await here, like so
            Task task = new Task(() =>
            {
                try
                {
                    cUrlTool voTool = new cUrlTool();
                    voTool.GetLinksFromFile(fileName);
                    voTool.WriteLinks();
                }
                catch (Exception ex)
                {
                    oFile.Write(ex.Message);
                }
            });

            //Task<List<String>> voTask = new Task<List<String>>(() => GetLinksFromFile(vsFilepath));
            return(task);
        }