1 DialogResult dr = ofdAddUserPicture.ShowDialog();
2 this.picPicture.Image = Image.FromFile(ofdAddUserPicture.FileName); //显示图片
3 if (dr == DialogResult.OK)
4 {
5 user.Picture = ofdAddUserPicture.FileName;
6 }
7 else
8 {
9 user.Picture = null;
10 }
敏于事,慎于言