private void link_lab_register_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { //连接服务器 connect_server(); //显示注册窗口 Frm_register frm_register = new Frm_register(); frm_register.Owner = this; frm_register.Show(); }
//传递数据给父窗口 private void set_selected_head(int selected_index) { if (owner_type == 1) { Frm_register frm_register = (Frm_register)(this.Owner); frm_register.select_head(selected_index); } else if (owner_type == 2) { Frm_modify frm_modify = (Frm_modify)(this.Owner); frm_modify.select_head(selected_index); } Close(); }
private void pb1_Click(object sender, EventArgs e) { Frm_register frm_register = (Frm_register)this.Owner; }