Beispiel #1
0
 /// <summary>
 /// shows lists of teams
 /// </summary>
 public void ShowTeamList()
 {
     foreach (var item in tImpl.GetAllyTeamList())
     {
         TeamListBox.Items.Add(item.Key);
     }
 }
Beispiel #2
0
        //Constructor to take two kinds of windows
        public ParticipantCreateWindow(MainWindow mw, Window w, Fighter_Impl pImpl, Team_Impl tImpl)
        {
            this.pImpl = pImpl;
            this.tImpl = tImpl;
            exitApp    = true; //used for closing app
            this.w     = w;
            this.mw    = mw;
            InitializeComponent();
            Closed += new EventHandler(App_exit); //subscribing to closed event

            /*Test section (new team box) START */
            CreateTeamBox.Visibility = Visibility.Hidden;
            // Inserts image into site. (not sure how the path works)

            CoverTeamCanvasImage.Stretch    = Stretch.Fill;
            CoverTeamCanvasImage.Source     = new BitmapImage(new Uri(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName + "\\Sources\\SlimeBlack.png"));
            CoverTeamCanvasImage.Visibility = Visibility.Visible;
            CoverTeamCanvasImage.Margin     = new Thickness(556, 358, 0, 0);

            /*Test section (new team box) END */

            //List<Participant_DTO> participantList = pImpl.GetCurrentList();
            foreach (var item in pImpl.GetCurrentList())
            {
                StrongAgainstFirstChoice.Items.Add(item.NameGS);
                StrongAgainstSecondChoice.Items.Add(item.NameGS);
                WeakAgainstFirstChoice.Items.Add(item.NameGS);
                WeakAgainstSecondChoice.Items.Add(item.NameGS);
                ImmuneAgainstFirstChoice.Items.Add(item.NameGS);
                ImmuneAgainstSecondChoice.Items.Add(item.NameGS);
            }
            foreach (var item in tImpl.GetAllyTeamList())
            {
                TeamNameChoice.Items.Add(item.Key);
            }
        }