/* GUI BUTTONS */ private void addNew_Click(object sender, EventArgs e) { materialEditor materialEditorInstance = new materialEditor(AchievementJsonPath); materialEditorInstance.FormClosed += new FormClosedEventHandler(ReloadList); materialEditorInstance.Show(); }
private void editSelected_Click(object sender, EventArgs e) { if (materialListBox.SelectedIndex == -1) { MessageBox.Show("No material selected.", "Deleted", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } materialEditor materialEditorInstance = new materialEditor(AchievementJsonPath, materialListBox.SelectedIndex, MaterialJSON["materials"][materialListBox.SelectedIndex]); materialEditorInstance.FormClosed += new FormClosedEventHandler(ReloadList); materialEditorInstance.Show(); }