Beispiel #1
0
        private void downloadButton_Click(object sender, EventArgs e)
        {
            DirectoryInfo di = new DirectoryInfo("download");

            if (!di.Exists)
            {
                di.Create();
            }
            for (int row = 0; row < this.subtitleListDataGridView.Rows.Count; row++)
            {
                DataGridViewCheckBoxCell cell = this.subtitleListDataGridView.Rows[row].Cells[0] as DataGridViewCheckBoxCell;
                if ((bool)cell.Value == true)
                {
                    DownloadSubtitle(this.subtitleListDataGridView.Rows[row].Cells["Link"].Value.ToString());
                }
            }

            foreach (FileInfo fi in di.GetFiles())
            {
                if (fi.Extension == ".rar" || fi.Extension == ".zip")
                {
                    //Console.WriteLine("{0}{1}{2}", di.FullName, Settings.Default.defaultPath, fi.Name);
                    if (UnpackerForm.UnZip(di.FullName, Settings.Default.defaultPath, fi.Name) == 0)
                    {
                        fi.Delete();
                    }
                }
                else
                {
                    //Console.WriteLine("{0}{1}", fi.FullName, Settings.Default.defaultPath + @"\" + fi.Name);

                    File.Copy(fi.FullName, Settings.Default.defaultPath + @"\" + fi.Name, true);
                    fi.Delete();
                }
            }

            MessageBox.Show("Letöltés kész!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
            //Console.WriteLine("letöltés kész teljesen");
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainForm_Load(object sender, EventArgs e)
        {
            SplashScreen.UdpateStatusText("Beállítások betöltése...");
            this.optForm             = new OptionsForm();
            this.optForm.Deactivate += new EventHandler(optForm_Deactivate);
            Thread.Sleep(50);

            SplashScreen.UdpateStatusText("Átnevező modul betöltése...");
            this.ft = new FileTree(this.fileSystemTreeView, Settings.Default.defaultPath);
            this.fileSystemTreeView.AfterSelect += new TreeViewEventHandler(fileSystemTreeView_AfterSelect);

            this.watcher      = new FileSystemWatcher();
            this.watcher.Path = this.fileSystemTreeView.SelectedNode.FullPath;
            this.watcher.IncludeSubdirectories = true;
            this.watcher.Filter              = "*.*";
            this.watcher.Changed            += new FileSystemEventHandler(OnChanged);
            this.watcher.Created            += new FileSystemEventHandler(OnChanged);
            this.watcher.Deleted            += new FileSystemEventHandler(OnChanged);
            this.watcher.Renamed            += new RenamedEventHandler(OnRenamed);
            this.watcher.EnableRaisingEvents = true;

            this.ren = new Renamer(this.fileSystemTreeView, this.videoListBox, this.subtitleListBox,
                                   this.renameProgressBar, this.optForm.VideoCheckedListBox, this.optForm.SubtitleCheckedListBox, this.autoRenameButton);
            ren.RefreshWindows();

            this.renameProgressBar.Hide();

            this.videoListBox.ContextMenuStrip    = AddVideoListContextMenuStrip();
            this.subtitleListBox.ContextMenuStrip = AddSubtitleListContextMenuStrip();

            ToolTip buttonToolTip = new ToolTip();

            buttonToolTip.ToolTipTitle = "Automatikus átnevezés";
            buttonToolTip.ToolTipIcon  = ToolTipIcon.Info;
            buttonToolTip.UseFading    = true;
            buttonToolTip.UseAnimation = true;
            buttonToolTip.IsBalloon    = true;
            buttonToolTip.ShowAlways   = true;
            buttonToolTip.AutoPopDelay = 5000;
            buttonToolTip.InitialDelay = 500;
            buttonToolTip.ReshowDelay  = 500;
            buttonToolTip.SetToolTip(this.autoRenameButton, "CTRL + Klikk:"
                                     + Environment.NewLine + "A sorozat cím figyelmen kívül hagyása.");

            Thread.Sleep(50);

            SplashScreen.UdpateStatusText("Rendszerező modul betöltése...");

            this.orgForm             = new OrganizerForm();
            this.orgForm.Deactivate += new EventHandler(orgForm_Deactivate);
            Thread.Sleep(50);

            SplashScreen.UdpateStatusText("Sorozat Naptár modul betöltése...");
            this.scFrom             = new SeriesCalenderFrom();
            this.scFrom.Deactivate += new EventHandler(scFrom_Deactivate);
            Thread.Sleep(50);

            SplashScreen.UdpateStatusText("Kicsomagoló modul betöltése...");
            this.unpForm             = new UnpackerForm(this.optForm.VideoCheckedListBox);
            this.unpForm.Deactivate += new EventHandler(unpForm_Deactivate);
            Thread.Sleep(50);

            this.aboutForm = new AboutForm();

            SplashScreen.UdpateStatusText("Modulok betöltve...");
            Thread.Sleep(1000);

            //LoadTheme(Theme.DARK);

            this.Show();
            SplashScreen.CloseSplashScreen();
            this.Activate();
        }