C#/Basics

F002. Login

페프 2021. 4. 14. 01:28
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace F002_Login
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
           
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtId.Text == "" || txtPassword.Text == "")
                return;
            if (txtId.Text == "abcd" && txtPassword.Text == "1234")
                txtResult.Text = "성공입니다.";
            else
                txtResult.Text = "실패입니다.";
        }

        private void txtId_TextChanged(object sender, EventArgs e)
        {

        }
    }
}