private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) //更换头像 { userParam = new LibraryModel.user_Param(); userParam.name = nameshow.Text; userParam.HeadImg = head.BackgroundImage; System.Threading.ThreadPool.QueueUserWorkItem(new System.Threading.WaitCallback(GetuserLog), nameshow.Text); }
private void Showheadchange(user_Param userParam) { if (this.InvokeRequired) { ShowMainFrmEventHandler cb = new ShowMainFrmEventHandler(Showheadchange); this.Invoke(cb, new object[] { userParam }); } else { headchange = new UIheadchange(userParam); headchange.ShowDialog(); } }
private void ShowMainFrm(user_Param userParam) { if (this.InvokeRequired) { ShowMainFrmEventHandler cb = new ShowMainFrmEventHandler(ShowMainFrm); this.Invoke(cb, new object[] { userParam }); } else { this.Hide(); main = new UImain(userParam); main.Show(); } }
public UImain(user_Param userParam) : this() { Helper.eventSend += new SendHandler(ReceiveParam); /**New一个当前用户的对象 * UserItem = new ChatListSubItem(userParam.Id, (ChatListSubItem.UserStatus)Convert.ToInt32(userParam.BtnState.Tag)); * UserItem.HeadImage = userParam.HeadImg; * UserItem.PersonalMsg = lblQm.Text; * UserLogin.UserItem = UserItem;**/ //获取当前登录帐号与头像 this.stu_name = nameshow.Text = userParam.stuname; this.headimg = head.BackgroundImage = userParam.HeadImg; this.level = userParam.level; lastOnline.Text = userParam.lastonline; /**获取当前状态 * btnState.Image = userParam.BtnState.Image; * btnState.Tag = userParam.BtnState.Tag; * btnState.Left = lblName.Right; * lblLv.Left = btnState.Right;**/ //获取屏幕宽高 SW = Screen.PrimaryScreen.Bounds.Width; SH = Screen.PrimaryScreen.Bounds.Height; /** * this.userParam = userParam; * if (userParam.BackImg != null) * { * this.Back = userParam.BackImg; * this.btnTq.Image = userParam.WeatherImg; * }**/ //else //{ // btnTq.Visible = false; //} }
public UIheadchange(user_Param userParam) : this() { this.name = userParam.name; this.head.BackgroundImage = userParam.HeadImg; }