예제 #1
0
        /// <summary>
        /// Ustawienie miejsc dla graczy wraz z miejscami na stacki
        /// </summary>
        private void SeatsPlacer()
        {
            //Czyścymy elementy
            this.ellipseTableSeats.Children.Clear();
            this.SeatList.Clear();

            //Dodawanie miejsc / Pozycje etc / uzytkownicy
            for (int i = 0; i < GameTable.Seats; i++)
            {
                GameControls.Seat seat = new GameControls.Seat(this);
                if (this.GameTable.Type == Enums.TableType.Normal)
                {
                    seat.TakeSeat.Click += (o, e) =>
                    {
                        NormalModeStackWindow stackWindow = new NormalModeStackWindow(this.Window);
                        stackWindow.Seat = seat;
                        stackWindow.ShowModal(this.Window);
                        stackWindow.Owner = this.Window;
                    };
                }
                SeatList.Add(seat);
            }

            //Dodawanie iejsc do stolu
            foreach (GameControls.Seat seat in SeatList)
            {
                this.ellipseTableSeats.Children.Add(seat);
            }

            this.ellipseTableSeats.UpdateLayout();
        }
예제 #2
0
        private void JoinToTable_Click(object sender, RoutedEventArgs e)
        {
            //Modal window
            NormalModeStackWindow stackWindow = new NormalModeStackWindow(this.parent);

            stackWindow.ShowModal(this.parent);
            stackWindow.Owner = this.parent;

            //MainWindow.Session.Client.ServiceProxy.DoAction(ActionModel.GameActionType.JoinGame,this.parent.table);
            //this.parent.AfterAction();
        }