Exemplo n.º 1
0
 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();
             }
         }
     }
 }
Exemplo n.º 2
0
        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;
                }
            }
        }
Exemplo n.º 3
0
 public void ProfileWindowClosed(object sender, System.EventArgs e)
 {
     profileWindow = null;
 }
Exemplo n.º 4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var profile = new ProfileWindow();

            profile.Show();
        }