Beispiel #1
0
 public static Imageboard createNewIMB(string url, bool board)                                   // Create a new Imageboard
 {
     if (!board)
     {
         if (Fchan.isThread(url))                                                                 // if FChan, create FChan
         {
             return(new Fchan(url, board));
         }
         else if (Infinitechan.isThread(url))
         {
             return(new Infinitechan(url, board));
         }
         else if (Fchan_nsfw.isThread(url))
         {
             return(new Fchan_nsfw(url, board));
         }
     }
     else
     {
         if (Fchan.isBoard(url))
         {
             return(new Fchan(url, board));                                                       // if 8chan, create 8chan
         }
         else if (Infinitechan.isBoard(url))
         {
             return(new Infinitechan(url, board));
         }
         else if (Fchan_nsfw.isBoard(url))
         {
             return(new Fchan_nsfw(url, board));
         }
     }
     return(null);
 }
Beispiel #2
0
        // Create a new Imageboard
        public static Imageboard CreateNewImageboard(string url)
        {
            // if FChan, create FChan
            // if 8chan, create 8chan

            if (Fchan.urlIsThread(url))
            {
                return(new Fchan(url, false));
            }
            else if (Infinitechan.urlIsThread(url))
            {
                return(new Infinitechan(url, false));
            }

            if (Fchan.urlIsBoard(url))
            {
                return(new Fchan(url, true));
            }
            else if (Infinitechan.urlIsBoard(url))
            {
                return(new Infinitechan(url, true));
            }

            return(null);
        }