Exemplo n.º 1
0
 public static Board ParseChandef(string line)
 {
     Board board = new Board();
     string[] args = GetArgs(line);
     board.Host = args[0];
     board.BoardName = args[1];
     board.ImageRegex = args[2];
     board.StorageDir = args[3];
     return board;
 }
Exemplo n.º 2
0
 public Thread(string ThreadURL)
 {
     this.ThreadURL = ThreadURL;
     ThreadNumber = StripHash(ThreadURL.Split("/".ToCharArray())[5].Split(".".ToCharArray())[0]);
     System.IO.Directory.CreateDirectory(StoragePath);
     string boardname = Config.GetBoardName(ThreadURL);
     foreach (Board parent in Config.boards)
     {
         if (parent.BoardName == boardname) board = parent;
     }
     if (board == null) System.Windows.Forms.MessageBox.Show("There is no chandef for this board, downloading will not work properly.",
                                                             "Error",
                                                             System.Windows.Forms.MessageBoxButtons.OK,
                                                             System.Windows.Forms.MessageBoxIcon.Error);
     if(board != null) m_StorageDir = System.IO.Path.Combine(Configuration.StorageDirectory, board.StorageDir.Replace("{threadno}", ThreadNumber));
     Scan();
 }