public static void Enable(System.Windows.Forms.PictureBox p, bool val) { My.Button c = (My.Button)p.Tag; if (c != null) { c.Enabled = val; } }
public static void SetON(System.Windows.Forms.PictureBox p, bool val) { My.Button c = (My.Button)p.Tag; if (c != null) { if (val == false) { c.Stato = State.OFF; } else { c.Stato = State.ON; } } }