private void FromClipboardToolStripMenuItem_Click(object sender, EventArgs e) { if (selectedModViewer.IsVanilla) { return; } if (!Clipboard.ContainsText()) { return; } JsonEditor je = new JsonEditor(Clipboard.GetText()); if (je.ShowDialog() == DialogResult.OK) { switch (je.ObjectType) { case "Aspect": FromClipboardOnOkay(selectedModViewer.Content.Aspects, je.ObjectText); break; case "Element": FromClipboardOnOkay(selectedModViewer.Content.Elements, je.ObjectText); break; case "Recipe": FromClipboardOnOkay(selectedModViewer.Content.Recipes, je.ObjectText); break; case "Deck": FromClipboardOnOkay(selectedModViewer.Content.Decks, je.ObjectText); break; case "Legacy": FromClipboardOnOkay(selectedModViewer.Content.Legacies, je.ObjectText); break; case "Ending": FromClipboardOnOkay(selectedModViewer.Content.Endings, je.ObjectText); break; case "Verb": FromClipboardOnOkay(selectedModViewer.Content.Verbs, je.ObjectText); break; default: MessageBox.Show("I'm not sure what you selected or how, but that was an invalid choice.", "Unknown Object Type", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } selectedModViewer.MarkDirty(); } }