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; namespace BaseFunction { public partial class ResultPicture : UserControl { public ResultPicture() { try { InitializeComponent(); picBox_Result.Image = null; picBox_Result.BackColor = Color.FromArgb(((int)(((byte)(19)))), ((int)(((byte)(46)))), ((int)(((byte)(53))))); } catch { } } private void picBox_Result_Click(object sender, EventArgs e) { } /// 结果显示类型, True=合格,false=超差 public void SetResultPicture(bool bOK) { try { picBox_Result.Image = bOK ? ImageDfn.IMG_ResultOK : ImageDfn.IMG_ResultNG; } catch { } } /// 结果显示类型, 1=合格,2=超差,3=其他,4=无工件, 9=无图片 public void SetResultPicture(int ShowType = 1) { try { switch (ShowType) { case 1: picBox_Result.Image = ImageDfn.IMG_ResultOK; break; case 2: picBox_Result.Image = ImageDfn.IMG_ResultNG; break; case 3: picBox_Result.Image = ImageDfn.IMG_Other; break; case 4: picBox_Result.Image = ImageDfn.IMG_Null; break; case 5: picBox_Result.Image = ImageDfn.IMG_Waiting; break; case 9: picBox_Result.Image = null; break; default: break; } } catch { } } public void SetSize(int SizeWidth = 160, int SizeHeight = 160) { try { this.Width = SizeWidth; this.Height = SizeHeight; } catch { } } } }