public SKGroupMsgWindow(List <SKMsgCore.SKFriend> _friends, SKMsgCore _core) { friends = _friends; core = _core; InitializeComponent(); foreach (SKMsgCore.SKFriend f in friends) { listBox1.Items.Add(f); } this.Visible = true; }
public SKMsgWindow(SKMsgCore.SKFriend _friend, SKMsgCore _core) { InitializeComponent(); friend = _friend; core = _core; label1.Text = friend.show_name + "(" + friend.stu_num + ")"; label2.Text = friend.comment; if (friend.Img != null) { pictureBox1.Image = friend.Img; } this.Visible = true; file_init(); }
private void SKMsgMainForm_Load(object sender, EventArgs e) { this.Visible = false; timer2.Enabled = false; LoginForm.login_info login_info = new LoginForm.login_info(); System.Net.Sockets.Socket login_socket = new System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp); (new LoginForm(ref login_socket, ref login_info)).ShowDialog(); if (login_info.suc) { this.Visible = true; } else { Close(); } stu_num = login_info.stu_num; msg_core = new SKMsgCore(stu_num, login_socket, this); timer2.Enabled = true; refresh(); }