/// <summary> /// /// </summary> public void SaveTitle() { if (this.textBox.Text.Length != 0 && this.title != this.textBox.Text) { bool succes = SeriesCalenderFrom.UpdateXMLFile(this.day, this.title, this.textBox.Text); if (!succes) { MessageBox.Show("A " + this.title + " cím már létezik az adatbázisban!", this.day, MessageBoxButtons.OK, MessageBoxIcon.Information); this.textBox.ReadOnly = false; } else { this.title = this.textBox.Text; this.textBox.ReadOnly = true; this.dsf = new DownloadSubtitleForm(this.title); } } else { this.textBox.ReadOnly = true; } }
/// <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(); }
/// <summary> /// Delete series entry /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void deleteButton_Click(object sender, EventArgs e) { SeriesCalenderFrom.DeleteFromXMLFile(this.day, this.title); this.Dispose(); }