Ejemplo n.º 1
0
        private void ShowGamePanelInfoForIndex(int index)
        {
            if (!IsValidGameIndex(index))
            {
                panelGameInformation.AlphaRate = -0.5f;
                return;
            }

            panelGameInformation.Enable();
            panelGameInformation.X = Right;
            panelGameInformation.Y = Y;

            panelGameInformation.AlphaRate = 0.5f;

            var hostedGame = (GenericHostedGame)Items[index].Tag;

            panelGameInformation.SetInfo(hostedGame);
        }
Ejemplo n.º 2
0
        private void GameListBox_HoveredIndexChanged(object sender, EventArgs e)
        {
            if (HoveredIndex < 0 || HoveredIndex >= Items.Count)
            {
                panelGameInformation.AlphaRate = -0.5f;
                return;
            }

            panelGameInformation.Enable();
            panelGameInformation.X = Width;
            panelGameInformation.Y = Math.Min((HoveredIndex - TopIndex) * LineHeight,
                                              Height - panelGameInformation.Height);

            panelGameInformation.AlphaRate = 0.5f;

            var hostedGame = (GenericHostedGame)Items[HoveredIndex].Tag;

            panelGameInformation.SetInfo(hostedGame);
        }
Ejemplo n.º 3
0
        private void GameListBox_HoveredIndexChanged(object sender, EventArgs e)
        {
            if (HoveredIndex < 0 || HoveredIndex >= Items.Count)
            {
                showGameInfo = false;
                return;
            }

            panelGameInformation.ClientRectangle = new Rectangle(ClientRectangle.Width,
                                                                 Math.Min((HoveredIndex - TopIndex) * LineHeight,
                                                                          ClientRectangle.Height - panelGameInformation.ClientRectangle.Height),
                                                                 panelGameInformation.ClientRectangle.Width,
                                                                 panelGameInformation.ClientRectangle.Height);

            showGameInfo = true;

            var hostedGame = (GenericHostedGame)Items[HoveredIndex].Tag;

            panelGameInformation.SetInfo(hostedGame);
        }