private void luckyButton_Click(object sender, EventArgs e) { int rndID = _finderRepository.GetRandomID(CurrentUser.GetId()); var profileForm = new ProfileForm(rndID); profileForm.Show(); }
private void metroButton2_Click(object sender, EventArgs e) { ProfileForm pf = new ProfileForm(this, username); pf.Show(); this.Hide(); }
private void btnProfile_Click(object sender, EventArgs e) { if (selected != 1) { closeCurrentForm(); profileForm = new ProfileForm(); selected = 1; profileForm.MdiParent = this; profileForm.Show(); } }
//主控面>>員工連結 private void btnEmployee_Click(object sender, EventArgs e) { this.Cursor = Cursors.WaitCursor; try { ProfileForm p = new ProfileForm(); p.Show(); } finally { this.Cursor = Cursors.Default; } }
//loginclicked void btnLoginClicked(object sender, MouseEventArgs e) { TcpClient tcpClient = new TcpClient(server, 7000); NetworkStream stream = tcpClient.GetStream(); string id = tbx_ID.Text; string password = tbx_password.Text; ByteField loginmsg = new ByteField(256); string msg = id + " " + password; TcpHeader head; head.mode = 2; head.msgsize = 0; loginmsg.setHeader(head); loginmsg.ConcStrAfterHead(msg); loginmsg.setHeadLenByIndex(); stream.Write(loginmsg.m_field, 0, (int)loginmsg.getheader().msgsize); int cnt = 0; ByteField msgFromServ = new ByteField(256); cnt += stream.Read(msgFromServ.m_field, 0, 256 - cnt); while (cnt < 8) { cnt += stream.Read(msgFromServ.m_field, cnt, 256 - cnt); } if (msgFromServ.getheader().mode == 200) { // 로그인 시작 Form client = new ProfileForm(); ((ProfileForm)client).initData(tbx_ID.Text, tcpClient, msgFromServ.getMsgStr()); client.Show(); this.Hide(); } else { MessageBox.Show("아이디와비밀번호를 확인해주세요"); } }
private void generateButtons() { if (role == 1) // admin { showBtnMahasiswa(0); showBtnDosen(59); showBtnMataKuliah(59 * 2); } if (role == 2) // dosen { showBtnProfile(0); showBtnMahasiswa(59); showBtnDosen(59 * 2); showBtnMataKuliah(59 * 3); profileForm = new ProfileForm(); selected = 1; profileForm.MdiParent = this; profileForm.Show(); } if (role == 3) // mahasiswa { showBtnProfile(0); showBtnAbsensi(59); showBtnNilai(59 * 2); showBtnDosen(59 * 3); showBtnMataKuliah(59 * 4); profileForm = new ProfileForm(); selected = 1; profileForm.MdiParent = this; profileForm.Show(); } }
private void pictureBox2_Click(object sender, EventArgs e) { ProfileForm pf = new ProfileForm(); pf.Show(); }