private Image img(string name) //传输头像 { byte[] b; Image image; LibraryBLL.user check = new LibraryBLL.user(); try { b = check.image(name); } catch { image = null; return(image); } if (b.Length > 0) { try { byte[] ima = b; image = LibraryBLL.drawimag.headima(ima, head.Width, head.Height); } catch { image = null; return(image); } return(image); } else { image = null; return(image); } }
private void skinTextBox1_Leave(object sender, EventArgs e) //动态头像 { LibraryBLL.user check = new LibraryBLL.user(); try { b = check.image(user.Text); } catch { head.BackgroundImage = null; return; } if (b.Length > 0) { byte[] ima = b; try { head.BackgroundImage = LibraryBLL.drawimag.headima(ima, head.Width, head.Height); } catch { head.BackgroundImage = null; return; } } }
public void landuserpicshow() //用户头像显示 { byte[] b; LibraryBLL.user check = new LibraryBLL.user(); try { b = check.image(username.Text); } catch { head.BackgroundImage = null; return; } if (b.Length > 0) { try { byte[] ima = b; head.BackgroundImage = LibraryBLL.drawimag.headima(ima, head.Width, head.Height); } catch { head.BackgroundImage = null; return; } } }