private void newToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult result = SaveCurrentFile(); if (result != DialogResult.Cancel) { OpenedFile = new LibraryFile(); EditLibrarySettings(); UpdateSoundList(); } }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { DialogResult result = SaveCurrentFile(); if (result != DialogResult.Cancel) { OpenFileDialog dialog = new OpenFileDialog(); if (OpenedFile != null) { dialog.InitialDirectory = Path.GetDirectoryName(OpenedFile.Filepath); } dialog.Filter = "Soundscape Library files (*.slib)|*.slib|All files (*.*)|*.*"; dialog.RestoreDirectory = true; if (dialog.ShowDialog() == DialogResult.OK) { OpenedFile = new LibraryFile(dialog.FileName); UpdateStatus(); UpdateSoundList(); } } }