コード例 #1
0
ファイル: MainForm.cs プロジェクト: avodhel/later-list
 private void FileExistenceControl()
 {
     if (listPath == string.Empty)
     {
         CreateFileAndSave();
     }
     else if (listPath != string.Empty)
     {
         SaveLoadController.SaveList(true, SaveButton, currentSection, currentListView);
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: avodhel/later-list
 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();
     }
 }