private void DoSave() { string path = SaveBmdDialog(); if (string.IsNullOrEmpty(path)) { return; } if (m_File.MyType == BmdFile.FileType.Item) { m_File.SaveAsBmd(path, m_AllStructures); } else { m_File.SaveAsBmd(path, dataGridView1); } Main.Log("File {0} saved", path); m_IsSaved = true; Properties.Settings.Default.SaveFolder = Path.GetDirectoryName(path); Properties.Settings.Default.Save(); // Close(); }
private void saveToolStripMenuItem_Click(object sender, EventArgs e) { string FilePath; SaveFileDialog Dialog = new SaveFileDialog(); Dialog.InitialDirectory = m_SaveFolderPath; Dialog.Filter = "MU Config File (*.bmd)|*.bmd"; if (Dialog.ShowDialog() == DialogResult.OK) { m_SaveFolderPath = Path.GetDirectoryName(Dialog.FileName); Properties.Settings.Default.SaveFolder = m_SaveFolderPath; FilePath = Dialog.FileName; } else { return; } swapItemInfo(); m_File.SaveAsBmd(FilePath, m_Items); m_IsSaved = true; MessageBox.Show(FilePath + " has been saved", "zFileManager"); Properties.Settings.Default.SaveFolder = Path.GetDirectoryName(FilePath); Properties.Settings.Default.Save(); }