Ejemplo n.º 1
0
 public DownloadManager(FrmStartPage startPage)
 {
     this.startPage = startPage;
     downloadQueue  = new Stack();
     downloads      = new ArrayList();
     downloadCount  = 0;
 }
        /// <summary>
        /// Preperation
        /// </summary>
        /// <param name="m"></param>
        /// <param name="startPage"></param>
        public void StartUp(Manga m, FrmStartPage startPage)
        {
            this.root      = m.mangaDirectory;
            this.startPage = startPage;

            foreach (DirectoryInfo dir in root.GetDirectories("*", SearchOption.TopDirectoryOnly)) // chapters
            {
                FileInfo[] files = dir.GetFiles("*");
                ArrayList  pages = new ArrayList();

                foreach (FileInfo fi in files) // pages
                {
                    string shortName = Path.GetFileNameWithoutExtension(fi.Name);
                    string num       = Regex.Match(shortName, @"(\d+(\.\d+)?)|(\.\d+)").Value;
                    pages.Add(new Page(num, fi));
                }

                Chapter c = new Chapter(dir.Name, dir, SortPages((Page[])pages.ToArray(typeof(Page))));
                if (dir.Name == m.currentChapter)
                {
                    curChapter = c;
                }
                chapters.Add(c);
            }

            UpdateChapters();
            UpdatePages(curChapter);
            cmboPage.SelectedItem = m.currentPage;
        }
Ejemplo n.º 3
0
 public FrmHentaiBrowser(FrmStartPage startPage)
 {
     InitializeComponent();
     InitializeBrowser();
     this.startPage = startPage;
 }
Ejemplo n.º 4
0
 public FrmSettings(FrmStartPage startPage)
 {
     InitializeComponent();
     this.startPage = startPage;
 }