private void Form1_Shown(object sender, EventArgs e) { K_S = new Kcard_Socket("Client"); if (K_S.Server_ip != "") { if (K_S.Open() == 1) { Form_Login = new Form_Login(this); Form_Assign = new Form_Assign(this); Form_Home = new Form_Home(this); Form_Back = new Form_Back(this); Form_Post = new Form_Post(this); Form_Login.Show(this); this.Hide(); } } }
private void btn_connect_Click(object sender, EventArgs e) { string ip = txt_IP.Text; K_S.Get_Server_ip(ip); if (K_S.Open() == 1) { Form_Login = new Form_Login(this); Form_Assign = new Form_Assign(this); Form_Home = new Form_Home(this); Form_Back = new Form_Back(this); Form_Post = new Form_Post(this); Form_Login.Show(this); this.Hide(); } else { txt_IP.Clear(); } }