private void btnPlay_Click(object sender, RoutedEventArgs e)
        {
            if (lbRequests.SelectedItems.Count == 1)
            {
                GameFolder.GameData.GameStatus = (short)GameFolder.Enums.GameStatusEnum.waiting;

                GameRequestClient gr = (GameRequestClient)lbRequests.SelectedItems[0];
                MainData.BmClient.StartPlayAsync(MainData.UserName, gr.Name);
                mw         = new MessageWindow("", "Várj a másik játékosra", MainData.WaitingScreenSec, true);
                mw.Closed += new EventHandler(mw_Closed);
                mw.Show();
            }
        }
        private bool CheckAlreadyRequest(GameRequestClass gr)
        {
            //ha már benne van a listában akkor csak átírjuk a kérés dátumát
            GameRequestClient grc = (from item in lbRequests.Items
                                     where ((GameRequestClient)item).Name == gr.Name
                                     select(GameRequestClient) item).FirstOrDefault();

            if (grc != null)
            {
                grc.RequestDate = gr.RequestDate;
                return(true);
            }
            return(false);
        }
        void BmClient_GameRequestGetReceived(object sender, GameRequestGetReceivedEventArgs e)
        {
            if (e.gr == null)
            {
                return;
            }

            if (CheckAlreadyRequest(e.gr))
            {
                return;
            }

            GameRequestClient gr = new GameRequestClient();

            gr.Name        = e.gr.Name;
            gr.ImageSource = e.gr.Sex == 1 ? malepic.Source : femalepic.Source;
            gr.RequestDate = e.gr.RequestDate;

            lbRequests.Items.Add(gr);
        }