Ejemplo n.º 1
0
 public Form_member(Form_main fm, Panel mdi_pnl)
 {
     InitializeComponent();
     Load        += Form_member_Load;
     this.fm      = fm;
     this.mdi_pnl = mdi_pnl;
 }
Ejemplo n.º 2
0
        private void Btn_Click(object sender, EventArgs e)
        {
            num_btn = (Button)sender;
            Label result = new Label();

            if (num_btn.Name != "btn10" && num_btn.Name != "btn12")
            {
                if (pw_input.TextLength < 4)
                {
                    result.Text    = num_btn.Text;
                    pw_input.Text += result.Text;
                }
            }
            else if (num_btn.Name == "btn10" && pw_input.Text == pwd)
            {
                pw_input.Text = "";
                Form_main main = new Form_main(this);
                main.StartPosition = FormStartPosition.CenterParent;
                this.Visible       = false;
                main.Show();
            }
            else if (num_btn.Name == "btn10" && pw_input.Text != pwd && pw_input.Text != "")
            {
                MessageBox.Show("비밀번호를 잘못 입력하셨습니다.", "로그인 실패", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            else if (num_btn.Name == "btn10" && pw_input.Text == "")
            {
                MessageBox.Show("비밀번호를 입력해주세요.", "로그인 실패", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
            else if (num_btn.Name == "btn12")
            {
                if (pw_input.Text == "")
                {
                    pw_input.Text = "";
                }
                else
                {
                    pw_input.Text = pw_input.Text.Substring(0, pw_input.Text.Length - 1);
                }
            }
        }