private void custArray_MouseDown(object sender, MouseEventArgs e) { CharLCD_I2C_v2_0.CyCustomCharacter current = (CharLCD_I2C_v2_0.CyCustomCharacter)sender; CharLCD_I2C_v2_0.CyBox clickedBox = current.GetBoxByLocation(e.X, e.Y); if (clickedBox != null) { clickedBox.IsActive = !clickedBox.IsActive; m_activate = clickedBox.IsActive; current.Invalidate(); } this.m_highlighted.Invalidate(); }
private void custArray_MouseMove(object sender, MouseEventArgs e) { if ((e.Button == MouseButtons.Left) || (e.Button == MouseButtons.Right)) { CharLCD_I2C_v2_0.CyCustomCharacter current = (CharLCD_I2C_v2_0.CyCustomCharacter)sender; CharLCD_I2C_v2_0.CyBox currentBox = current.GetBoxByLocation(e.X, e.Y); if (currentBox != null) { currentBox.IsActive = m_activate; current.Invalidate(); } } this.m_highlighted.Invalidate(); }