private void SearchStartNPC_Click(object sender, EventArgs e) { var mobSearch = new MobSearch(); mobSearch.SelectNpcClicked += (o, args) => { LoadStartNpc(((Mob)o).Name, ((Mob)o).Region); }; mobSearch.ShowDialog(this); }
private void button2_Click(object sender, EventArgs e) { var mobsearch = new MobSearch(); mobsearch.SelectNpcClicked += (o, args) => { LoadMob(((Mob)o).ObjectId); }; mobsearch.ShowDialog(this); }
private void button5_Click(object sender, EventArgs e) { var search = new MobSearch(_mobs) { TopMost = true }; search.SelectNpcClicked += (o, args) => { if (!(o is Mob mob)) { return; } _MobName.Text = mob.Name; _modelImageService.LoadMob(mob.Model, pictureBox2.Width, pictureBox2.Height) .ContinueWith(x => pictureBox2.Image = x.Result); }; search.ShowDialog(this); }