private void btnMember_Click(object sender, RoutedEventArgs e, string id) { if (profileWindow == null) { foreach (Person per in people) { //writes down all the persons roles if (per.id == int.Parse(id)) { profileWindow = new ProfileWindow(per); profileWindow.Closed += ProfileWindowClosed; profileWindow.ShowDialog(); } } } }
public void DialogHandler(string arg) { if (overlayWindow == null) { switch (arg) { case "family": familyWindow = new FamilyWindow(people); familyWindow.Closed += OverlayWindowClosed; //ShowDialog() makes the window stay in focus until dissmissed familyWindow.ShowDialog(); break; case "profile": //change player for a search profileWindow = new ProfileWindow(player); profileWindow.Closed += OverlayWindowClosed; profileWindow.ShowDialog(); break; } } }