using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using Lskj.Business.Impl; using Lskj.Control; namespace Lskj.PictureComp { public partial class control_ShowPic : UserControl { public string picName; private picShowClickEventHandler picShowClick; public delegate void picShowClickEventHandler(string name, byte[] Byte); public control_ShowPic() { InitializeComponent(); this.textEdit_sign.Properties.ReadOnly = true; this.textEdit_class1.Properties.ReadOnly = true; this.textEdit_class2.Properties.ReadOnly = true; this.textEdit_score.Properties.ReadOnly = true; this.textEdit_brief.Properties.ReadOnly = true; this.pic_show.Properties.ReadOnly = true; } public void SetClickEvent(picShowClickEventHandler clickEvent) { this.picShowClick = clickEvent; } private void pic_show_Click(object sender, EventArgs e) { try { DevExpress.XtraEditors.PictureEdit picEdit = (DevExpress.XtraEditors.PictureEdit)sender; picShowClick(picName, picEdit.Tag as byte[]); } catch (Exception ex) { string Message = ErrorMessage.PromptErrorMessage(ex); MessageUtil.Show(Message,ex.Message); } } } }