private void tlbSave_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(profileName)) { tlbSaveAs_Click(null, null); } else { ProfileUnity.SaveFile(StaticUnity.Profile, profileName); } }
private void tlbSave_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(profileName)) { ProfileUnity.SaveFile(Config.Instance.Profile, StaticUnity.Profile); } else { ProfileUnity.SaveFile(StaticUnity.Profile, profileName); } }
private void tlbSaveAs_Click(object sender, EventArgs e) { using (var dialog = new SaveFileDialog()) { dialog.Filter = FILTER; dialog.InitialDirectory = profileDir; if (dialog.ShowDialog() == DialogResult.OK) { profileName = dialog.FileName; ProfileUnity.SaveFile(StaticUnity.Profile, profileName); } } }