private void LogoutSafe() { if (this.InvokeRequired) { LogoutSafeHandler handler = new LogoutSafeHandler(LogoutSafe); this.Invoke(handler); } else { //状态栏显示 lbl_status.Text = ResourceCulture.GetString("please_login"); //左侧按钮禁用 panel_selfCheck.Enabled = false; panel_contacts.Enabled = false; panel_selfInfo.Enabled = false; panel_logout.Enabled = false; picBox_login.Enabled = true; PanelNotClicked(); //picBox_check.Enabled = false; //picBox_message.Enabled = false; //picBox_selfInfo.Enabled = false; //picBox_logout.Enabled = false; //picBox_login.Enabled = true; //picBox_check.Image = Resources.查看自检_灰_; //picBox_message.Image = Resources.联系人_灰_; ////LoginStatus.UserInfo = new Model.DoctorModel() { Name = "tony" }; //picBox_selfInfo.Image = Resources.个人信息_灰_; //picBox_logout.Image = Resources.注销_灰_; //picBox_login.Image = Resources.登录; //右侧Panel清除所有 panel.Controls.Clear(); if (selfInfoForm != null) { selfCheckForm.Close(); selfInfoForm.Close(); contactsForm.Close(); } MyIMClient.ConnectionEstablished -= MyIMClient_ConnectionEstablished; MyIMClient.ConnectionSuspended -= MyIMClient_ConnectionSuspended; MyIMClient.Connecting -= MyIMClient_Connecting; } }