Пример #1
0
 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);
     }
 }
Пример #2
0
 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();
     }
 }