private void SetFilePath() { if (currentSection == Sections.Movie) { SaveLoadController.SetPaths(Properties.Settings.Default.movie_path); } if (currentSection == Sections.Serie) { SaveLoadController.SetPaths(Properties.Settings.Default.serie_path); } if (currentSection == Sections.Book) { SaveLoadController.SetPaths(Properties.Settings.Default.book_path); } }
private void CreateFileAndSave() { savefiledialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); savefiledialog.RestoreDirectory = true; savefiledialog.FileName = currentSection + "list"; savefiledialog.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"; if (savefiledialog.ShowDialog() == DialogResult.OK) { settingsForm.SetFilePath(currentSection, savefiledialog.FileName); settingsForm.SaveSettings(); GetFilePath(); SaveLoadController.SetPaths(listPath); SaveLoadController.SaveList(true, SaveButton, currentSection, currentListView); } else { settingsForm.GetAllFilePathsFromProperties(); } }