예제 #1
0
        public bool ReadHtmlFile(string vsFile)
        {
            //Read bookmarks from file
            try
            {
                cFile oFile     = new cFile(vsFile);
                var   bookmarks = oHtmlReader.Read(oFile.ReadFileStream());

                foreach (var b in bookmarks.AllLinks)
                {
                    oUrListList.Add(b.Url);
                }
            }
            catch (Exception)
            {
                return(false);
            }
            return(true);
        }
예제 #2
0
        public bool ReadWriteHtmlFile(string vsFile)
        {
            //Read bookmarks from file
            try
            {
                cFile oFile     = new cFile(vsFile);
                cFile oWrite    = new cFile("out.txt");
                cFile oLog      = new cFile("log.log");
                var   bookmarks = oHtmlReader.Read(oFile.ReadFileStream());

                foreach (var b in bookmarks.AllLinks)
                {
                    oWrite.Write(b.Url);
                }
                oLog.Write(vsFile);
            }
            catch (Exception)
            {
                return(false);
            }
            return(true);
        }