Esempio n. 1
0
 private void createNPCButtonItem_Click(object sender, EventArgs e)
 {
     using (var nCreator = new NPCCreator())
     {
         nCreator.ShowDialog();
     }
 }
Esempio n. 2
0
        private void editNPCButtonItem_Click(object sender, EventArgs e)
        {
            string npcID = String.Empty;

            if (Methods.InputBox("Entry ID", "What is the entry ID of the NPC?", ref npcID) == DialogResult.OK)
            {
                int id = 0;

                if (int.TryParse(npcID, out id))
                {
                    using (var cCreator = new NPCCreator() { editor = true, editNPCID = id })
                    {
                        cCreator.ShowDialog();
                    }
                }
                else
                {
                    TaskDialog.Show(new TaskDialogInfo("Error", eTaskDialogIcon.Stop, "Error!",
                    "The entry id must be a number", eTaskDialogButton.Ok));
                }
            }
        }