Ejemplo n.º 1
0
        public GameLobbyPage()
        {
            this.InitializeComponent();

            for (int i = 0; i < 100; i++)
            {
                roomCard[i] = new RoomCard(i + 1);
                roomCard[i].PointerPressed += roomCard_pressed;
            }
            for (int i = 0; i < 25; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    Canvas.SetLeft(roomCard[i * 4 + j], j * 270 + 50);
                    Canvas.SetTop(roomCard[i * 4 + j], 50);
                    roomArea.Children.Add(roomCard[i * 4 + j]);
                }
            }
            for (int i = 4; i < 100; i++)
            {
                roomCard[i].Visibility = Windows.UI.Xaml.Visibility.Collapsed;
            }

            this.pageBox.SelectedIndex = currentPageNum - 1;
        }
Ejemplo n.º 2
0
        public GameLobbyPage()
        {
            this.InitializeComponent();

            Gule.Begin();
            maskPanel.Width  = win_width;
            maskPanel.Height = win_height;

            Self.roomNum = 0;

            for (int i = 0; i < 17; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    cards[i * 3 + j] = new Cards();
                    Canvas.SetLeft(cards[i * 3 + j], i * 100 + 20);
                    Canvas.SetTop(cards[i * 3 + j], j * 150 + 50);
                    Canvas_cards.Children.Add(cards[i * 3 + j]);
                }
            }


            for (int i = 0; i < currentPageTotalRoomNum * totalPage; i++)
            {
                roomCard[i] = new RoomCard(i + 1);
                roomCard[i].PointerEntered += roomCard_Entered;
                roomCard[i].PointerEntered += roomCard_Exited;
                roomCard[i].PointerPressed += roomCard_Enter;
            }
            for (int i = 0; i < totalPage; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    Canvas.SetLeft(roomCard[i * 8 + j], j * 180 + 80);
                    Canvas.SetTop(roomCard[i * 8 + j], 0);
                    roomArea.Children.Add(roomCard[i * 8 + j]);
                }
                for (int j = 4; j < currentPageTotalRoomNum; j++)
                {
                    Canvas.SetLeft(roomCard[i * 8 + j], (j - 4) * 180 + 350);
                    Canvas.SetTop(roomCard[i * 8 + j], 180);
                    roomArea.Children.Add(roomCard[i * 8 + j]);
                }
            }
            for (int i = 8; i < 120; i++)
            {
                roomCard[i].Visibility = Windows.UI.Xaml.Visibility.Collapsed;
            }

            storyboard_appear.Completed  += storyboard_artWordBegin;
            storyboard_artWord.Completed += storyboard_artWord_completed;
            storyboard_visible.Completed += storyboard_visible_Completed;
            Gule.Completed += storyboard_guleshou_Completed;

            this.pageBox.SelectedIndex = currentPageNum - 1;
        }
Ejemplo n.º 3
0
        public GameLobbyPage()
        {
            this.InitializeComponent();

            mediaElement.Volume = Sound.allVolume;
            Gule.Begin();
            maskPanel.Width = win_width;
            maskPanel.Height = win_height;
            Canvas.SetTop(btnMute, win_height - 75);
            Canvas.SetLeft(mylogo, win_width - 110);

            Self.roomNum = 0;
            userName.Text = Self.self.GetName();

            for (int i = 0 ; i < 17 ; i++)
                for (int j = 0 ; j < 3 ; j++)
                {
                    cards[i*3+j] = new Cards();
                    Canvas.SetLeft(cards[i * 3 + j] , i * 100 + 20);
                    Canvas.SetTop(cards[i * 3 + j], j * 150 + 50);
                    Canvas_cards.Children.Add(cards[i*3+j]);
                }
            
            
            for (int i = 0; i < currentPageTotalRoomNum * totalPage; i++)
            {
                roomCard[i] = new RoomCard(i + 1);
                roomCard[i].PointerEntered += roomCard_Entered;
                roomCard[i].PointerEntered += roomCard_Exited;
                roomCard[i].PointerPressed += roomCard_Enter;
            }
            for (int i = 0; i < totalPage; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    Canvas.SetLeft(roomCard[i * 8 + j], j * 180 + 80);
                    Canvas.SetTop(roomCard[i * 8 + j], 0);
                    roomArea.Children.Add(roomCard[i * 8 + j]);
                }
                for (int j = 4; j < currentPageTotalRoomNum; j++)
                {
                    Canvas.SetLeft(roomCard[i * 8 + j], (j - 4) * 180 + 350);
                    Canvas.SetTop(roomCard[i * 8 + j], 180);
                    roomArea.Children.Add(roomCard[i * 8 + j]);
                }
            }
            for (int i = 8; i < 80; i++)
                roomCard[i].Visibility = Windows.UI.Xaml.Visibility.Collapsed;
            
            storyboard_appear.Completed += storyboard_artWordBegin;
            storyboard_artWord.Completed += storyboard_artWord_completed;
            storyboard_visible.Completed += storyboard_visible_Completed;
            Gule.Completed += storyboard_guleshou_Completed;

            this.pageBox.SelectedIndex = currentPageNum - 1;
        }
Ejemplo n.º 4
0
        public GameLobbyPage()
        {
            this.InitializeComponent();

            for (int i = 0; i < 100; i++)
            {
                roomCard[i] = new RoomCard(i + 1);
                roomCard[i].PointerPressed += roomCard_pressed;
                roomCard[i].Storyboard_Close.Completed += joinInBtn_click;
            }
            for (int i = 0; i < 25; i++)
                for (int j = 0; j < 4; j++)
                {
                    Canvas.SetLeft(roomCard[i * 4 + j], j * 270 + 50);
                    Canvas.SetTop(roomCard[i * 4 + j], 50);
                    roomArea.Children.Add(roomCard[i * 4 + j]);
                }
            for (int i = 4; i < 100; i++)
                roomCard[i].Visibility = Windows.UI.Xaml.Visibility.Collapsed;
        }
Ejemplo n.º 5
0
        public GameLobbyPage()
        {
            this.InitializeComponent();

            for (int i = 0; i < 100; i++)
            {
                roomCard[i] = new RoomCard(i + 1);
                roomCard[i].PointerPressed += roomCard_pressed;
            }
            for (int i = 0; i < 25; i++)
                for (int j = 0; j < 4; j++)
                {
                    Canvas.SetLeft(roomCard[i * 4 + j], j * 270 + 50);
                    Canvas.SetTop(roomCard[i * 4 + j], 50);
                    roomArea.Children.Add(roomCard[i * 4 + j]);
                }
            for (int i = 4; i < 100; i++)
                roomCard[i].Visibility = Windows.UI.Xaml.Visibility.Collapsed;

            this.pageBox.SelectedIndex = currentPageNum - 1;
        }