private void saveToolStripMenuItem_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(m_configFname)) { saveFileDialog1.FileName = m_configFname; saveFileDialog1.DefaultExt = "stx"; saveFileDialog1.Title = "Save Stampyx File"; saveFileDialog1.Filter = "Stampyx files (*.stx)|*.stx"; saveFileDialog1.FilterIndex = 1; DialogResult result = saveFileDialog1.ShowDialog(); // If the file name is not an empty string open it for saving. if (saveFileDialog1.FileName != "") { Hydrator.DehydrateTo(m_config, saveFileDialog1.FileName); toolStripStatusLabel1.Text = "File saved."; m_configFname = saveFileDialog1.FileName; } } else { Hydrator.DehydrateTo(m_config, m_configFname); toolStripStatusLabel1.Text = "File saved."; } }