コード例 #1
0
ファイル: SearchWindow.cs プロジェクト: Laguland/AppDev
        private void btnMyProfile_Click(object sender, EventArgs e)
        {
            ProfileWindow newWindow = new ProfileWindow(Connection.loggedUserEmail);

            newWindow.StartPosition = FormStartPosition.Manual;
            newWindow.Location      = new Point(this.Location.X, this.Location.Y);
            newWindow.Show();
            this.Close();
        }
コード例 #2
0
 private void EditProfileButton_Click(object sender, RoutedEventArgs e)
 {
     if (ProfileWindow == null)
     {
         ProfileWindow = new ProfileWindow(LoggedUser, this);
     }
     Application.Current.MainWindow = ProfileWindow;
     ProfileWindow.Show();
 }
コード例 #3
0
        private void btnLogIn_Click(object sender, EventArgs e)
        {
            Packet logInPacket = new Packet(Packet.PacketType.LogIn, Connection.id);

            Connection.loggedUserEmail = tbEmail.Text;
            logInPacket.gData.Add(tbEmail.Text);
            logInPacket.gData.Add(tbPassword.Text);
            Connection.master.Send(logInPacket.ToBytes());

            Thread.Sleep(500);
            if (Connection.isValidUser)
            {
                ProfileWindow newWindow = new ProfileWindow(Connection.loggedUserEmail);
                newWindow.StartPosition = FormStartPosition.Manual;
                newWindow.Location      = new Point(this.Location.X, this.Location.Y);
                newWindow.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show(Connection.logInMessage);
            }
        }