Ejemplo n.º 1
0
 private void Parse(string dir)
 {
     string[] dirs = Directory.GetDirectories(dir);
     foreach (string d in dirs)
     {
         Parse(d);
     }
     string[] files = Directory.GetFiles(dir, "logfile");
     foreach (string f in files)
     {
         if (dir.IndexOf("saves") == -1)
         {
             CrawlCharacter c = new CrawlCharacter(f);
             CrawlList.Add(c);
             object[] row = new object[7];
             row[0] = c["v"];
             row[1] = c["name"];
             row[2] = Convert.ToInt32(c["xl"]);
             row[3] = c["race"];
             row[4] = c["cls"];
             row[5] = Convert.ToInt32(c["turn"]);
             row[6] = Convert.ToInt32(c["sc"]);
             dgCrawl.Rows.Add(row);
             Application.DoEvents();
         }
     }
 }
Ejemplo n.º 2
0
        private void UploadMorgue(CrawlCharacter c)
        {
            FtpWebRequest req = (FtpWebRequest)WebRequest.Create("ftp://trinkit.crawlarchive.com/" + c.Morgue);

            req.Method      = WebRequestMethods.Ftp.UploadFile;
            req.Credentials = new NetworkCredential("trinkit", "s9zaPE9ute");
            StreamReader sr = new StreamReader(c.MorgueFile);

            byte[] fc = Encoding.UTF8.GetBytes(sr.ReadToEnd());
            sr.Close();
            req.ContentLength = fc.Length;

            Stream sreq = req.GetRequestStream();

            sreq.Write(fc, 0, fc.Length);
            sreq.Close();
            FtpWebResponse res = (FtpWebResponse)req.GetResponse();

            MessageBox.Show("Upload Complete, status {0}", res.StatusDescription);
            res.Close();
        }
Ejemplo n.º 3
0
 private void UploadDownload(CrawlCharacter c)
 {
 }