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 UAS_MES_NEW.CustomControl.ClickPicBox { public partial class LockIcon : PictureBox { static Control MaCtl; private bool Locked = false; public LockIcon() { InitializeComponent(); Image = Properties.Resources.lock_open_24px; } /// /// 获取存放工单的控件 /// public static void GetMakeCodeCtl(Control ctl) { MaCtl = ctl; } private void LockIcon_Click(object sender, EventArgs e) { if (Locked) { Image = Properties.Resources.lock_open_24px; Locked = false; } else { Image = Properties.Resources.lock_lock_24px ; Locked = true; } } } }