Example #1
0
        //关闭页面时触发
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            //下线操作
            //给所有好友发送“我下线啦”的消息
            NoticeMessage notice = new NoticeMessage
            {
                Notice = "我下线啦"
            };

            FriendsConversation.SendMessageAsync(notice);
            //关闭Client
            User.CloseAsync();
        }
 void OnDestroy()
 {
     _client.CloseAsync();
     _instance = null;
 }
Example #3
0
 private void btn_Pause_Click(object sender, EventArgs e)
 {
     client.CloseAsync();
 }