Beispiel #1
0
        private async void ValidateContentCreatorStageName(string stageName)
        {
            try
            {
                bool contentCreatorAux = await Session.serverConnection.contentCreatorService.GetContentCreatorByStageNameAsync(textBox_StageName.Text);

                if (contentCreatorAux == true)
                {
                    textBlock_Message.Text = "*Stage name already exists in Spotifake";
                }
                else
                {
                    SendContentCreator();
                    Login loginWindow = new Login();
                    this.Close();
                    loginWindow.Show();
                }
            } catch (Exception ex)
            {
                Console.WriteLine(ex + "in SingUn ValidateContentCreatorStageName");
                textBlock_Message.Text = "*Server error, please close and try again";
            }
        }
Beispiel #2
0
        private async void ValidateConsumerEmail(string email)
        {
            try
            {
                bool consumerAux = await Session.serverConnection.consumerService.GetConsumerByEmailAsync(textBox_Email.Text);

                if (consumerAux == true)
                {
                    textBlock_Message.Text = "*Email already exists in Spotifake";
                }
                else
                {
                    SendConsumer();
                    Login loginWindow = new Login();
                    this.Close();
                    loginWindow.Show();
                }
            } catch (Exception ex)
            {
                Console.WriteLine(ex + " in SingUp ValidateConsumerEmail");
                textBlock_Message.Text = "*Service error, please close and try again";
            }
        }
Beispiel #3
0
 private void linkLabel1_TabIndexChanged(object sender, EventArgs e)
 {
     Login li = new Login();
     this.Close();
     li.Show();
 }
Beispiel #4
0
 private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     Login li = new Login();
     this.Close();
     li.Show();
 }
Beispiel #5
0
        private void AdminClientFront_FormClosing(object sender, FormClosingEventArgs e)
        {
            Login login = new Login();

            login.Show();
        }
        protected override void Update(GameTime gameTime)
        {
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
            {
                Exit();
            }

            PrevKey    = CurrentKey;
            CurrentKey = Keyboard.GetState();
            prevms     = ms;
            ms         = Mouse.GetState();
            string username = Login.userName;

            switch (gameState)
            {
            case GameStates.TitleScreen:
                if (playButton.Contains(ms.Position))
                {
                    if (ms.LeftButton == ButtonState.Pressed && prevms.LeftButton == ButtonState.Released)
                    {
                        loginForm.Show();
                        System.Threading.Thread.Sleep(300);
                        gameState = GameStates.GameLobby;
                    }
                }
                if (exitButton.Contains(ms.Position))
                {
                    if (ms.LeftButton == ButtonState.Pressed && prevms.LeftButton == ButtonState.Released)
                    {
                        Exit();
                    }
                }
                break;

            case GameStates.GameLobby:
                Network.Update(this);
                ChatManager.Update();
                GameLobby.Update(gameTime, ms);

                if (Login.IsConnected)
                {
                    if (CurrentKey.IsKeyDown(Keys.E) && PrevKey.IsKeyUp(Keys.E))
                    {
                        chatBox.Show();
                    }
                }

                if (GameLobby.timer <= 0)
                {
                    Random randX = new Random();
                    Random randY = new Random();
                    int    x, y;

                    x = randX.Next(0, 500);
                    y = randY.Next(0, 400);

                    Network.outmsg = Network.Client.CreateMessage();
                    Network.outmsg.Write("CharacterSelection");
                    Network.outmsg.Write(Login.userName);
                    Network.outmsg.Write(GameLobby.selectedHero);
                    Network.outmsg.Write(x);
                    Network.outmsg.Write(y);
                    Network.Client.SendMessage(Network.outmsg, NetDeliveryMethod.ReliableOrdered);
                    gameState = GameStates.PlayingState;
                }
                break;

            case GameStates.PlayingState:
                Network.Update(this);
                collisionManager.Update(this);
                Player.Update(gameTime);
                shotManager.Update();
                break;

            case GameStates.EndGameScreen:
                Network.Update(this);
                break;
            }
            base.Update(gameTime);
        }
        private void SupporterCalendar_FormClosing(object sender, FormClosingEventArgs e)
        {
            Login login = new Login();

            login.Show();
        }
 private void Label_MouseUp_1(object sender, MouseButtonEventArgs e)
 {
     Login logW = new Login();
     logW.Show();
     this.Close();
 }