private void OpenFile(object sender, EventArgs e) { DialogResult result = openFileDialog1.ShowDialog(); if (result == DialogResult.OK) { currentFile = openFileDialog1.FileName; wrestlerData = CharheadStream.GetWrestlerData(currentFile); if (wrestlerData == null) { return; } RefreshWrestlerList(); } openFileDialog1.Dispose(); if (isDirty) { saveToolStripMenuItem.Enabled = true; saveAsToolStripMenuItem.Enabled = true; } }
private void SaveAs(object sender, EventArgs e) { DialogResult result = saveFileDialog1.ShowDialog(); if (result == DialogResult.OK) { CharheadStream.SaveWrestlerData(wrestlerData, saveFileDialog1.FileName); } currentFile = saveFileDialog1.FileName; wrestlerData = CharheadStream.GetWrestlerData(currentFile); if (wrestlerData == null) { return; } isDirty = false; RefreshWrestlerList(); saveFileDialog1.Dispose(); }
private void Save(object sender, EventArgs e) { CharheadStream.SaveWrestlerData(wrestlerData, currentFile); isDirty = false; RefreshWrestlerList(); }