public void SaveAsFile() { if (Loading.FilePath != null) { SaveSTBLXMLDialog.InitialDirectory = Path.GetDirectoryName(Loading.FilePath); SaveSTBLXMLDialog.FileName = Path.GetFileName(Loading.FilePath); } if (SaveSTBLXMLDialog.ShowDialog() == DialogResult.Cancel) { return; } string saveFilePath = SaveSTBLXMLDialog.FileName; SaveSTBLXMLDialog.InitialDirectory = ""; SaveSTBLXMLDialog.FileName = ""; try { Loading.SaveFile(saveFilePath); } catch (Exception saveException) { ShowSaveFailureDialog(saveException); } EntryBrowser.RefreshItems(); }
private void MenuStripEditSelectedResetKeysItem_Click(object sender, EventArgs e) { foreach (DataGridViewRow selectedEntryRow in EntryBrowser.GetAllSelectedItems()) { STBLXMLEntry entry = EntryBrowser.FindEntry(selectedEntryRow); if (entry != null) { continue; } entry.Key = STBL.GetRandomUIntKey(blockedKeys: Loading.GetAllEntryKeys()); } EntryBrowser.RefreshItems(); }