コード例 #1
0
        private void Chat_Form_FormClosed(object sender, FormClosedEventArgs e)
        {
            string msg = "^^^" + Name;                         //关闭时发送关闭消息

            sendMessage(msg);
            Client.Close();
            client_log father_form = new client_log();

            father_form = (client_log)this.Owner;
            father_form.Dispose();
            father_form.Close();
        }
コード例 #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            string msg = "^^^" + Name;                         //关闭时发送关闭消息

            sendMessage(msg);
            Client.Close();
            client_log father_form = new client_log();

            father_form = (client_log)this.Owner;
            father_form.Dispose();
            father_form.Close();

            this.Dispose();
            this.Close();
        }