Ejemplo n.º 1
0
        private void DownLoadForm_Load(object sender, EventArgs e)
        {
            if (File.Exists("CONFIG.INI"))
            {
                savePathTexb.Text = ComicConfig.ReadConfig("savePath");
            }

            LoadDownLoadRecord();
        }
Ejemplo n.º 2
0
        private void saveBtn_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog folder = new FolderBrowserDialog();

            if (folder.ShowDialog() == DialogResult.OK)
            {
                savePathTexb.Text = folder.SelectedPath;
                ComicConfig.SaveConfig("downPath", savePathTexb.Text);
            }
        }
Ejemplo n.º 3
0
        private void downnLoadTool_Click(object sender, EventArgs e)//下载漫画
        {
            try
            {
                string              savaPath = "";
                DownLoadFile        downFile;
                List <DownLoadFile> downFileList;
                downFileList = new List <DownLoadFile>();
                ListViewItemInfo item = currentItem as ListViewItemInfo;

                if (downForm == null)
                {
                    downForm = new DownLoadForm();
                }

                if (File.Exists("CONFIG.INI"))
                {
                    savaPath = ComicConfig.ReadConfig("savePath");
                }
                else
                {
                    savaPath = ".\\";
                }

                foreach (Controls.CheckBoxEx i in checkPanel.Controls)
                {
                    if (i.Checked)
                    {
                        if (item.UrlDictronary.ContainsKey(i.FullText))
                        {
                            downFile           = new DownLoadFile();
                            downFile.ComicUrl  = item.UrlDictronary[i.FullText];
                            downFile.ComicName = comicNameLabel.Text.Substring(4) + i.Text;
                            downFile.SavePath  = savaPath;
                            downFileList.Add(downFile);
                        }
                    }
                }

                downForm.StartPosition = FormStartPosition.Manual;
                downForm.Location      = new Point(this.Left + 55, this.Bottom - downForm.Height - 50);
                downForm.Start(downFileList, decoder);
                downForm.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }