private void UpdateHighlighted(CyCustomCharacter selectedCharacter) { m_highlighted.Match(characterEditor); m_highlighted.Selected = false; m_highlighted.Invalidate(); m_highlighted = selectedCharacter; m_highlighted.Selected = true; m_highlighted.Invalidate(); currentEditableCharacter.Text = m_highlighted.DisplayName; this.characterEditor.Match(selectedCharacter); this.characterEditor.Invalidate(); }
private void custArray_MouseDown(object sender, MouseEventArgs e) { CharLCD_I2C_v1_5.CyCustomCharacter current = (CharLCD_I2C_v1_5.CyCustomCharacter)sender; CharLCD_I2C_v1_5.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 CustomCharactersOn() { customCharacterGroupBox.Enabled = true; m_highlighted.Selected = true; for (int i = 0; i < this.panel1.Controls.Count; i++) { CharLCD_I2C_v1_5.CyCustomCharacter character = (CharLCD_I2C_v1_5.CyCustomCharacter) this.panel1.Controls[i]; character.BorderBrush = new SolidBrush(Color.LightGray); character.ActiveBrush = new SolidBrush(Color.Black); character.InactiveBrush = new SolidBrush(Color.White); character.Invalidate(); } }
private void custArray_MouseMove(object sender, MouseEventArgs e) { if ((e.Button == MouseButtons.Left) || (e.Button == MouseButtons.Right)) { CharLCD_I2C_v1_5.CyCustomCharacter current = (CharLCD_I2C_v1_5.CyCustomCharacter)sender; CharLCD_I2C_v1_5.CyBox currentBox = current.GetBoxByLocation(e.X, e.Y); if (currentBox != null) { currentBox.IsActive = m_activate; current.Invalidate(); } } this.m_highlighted.Invalidate(); }
private void CustomCharactersOff() { m_highlighted.Selected = false; for (int i = 0; i < this.panel1.Controls.Count; i++) { CharLCD_I2C_v1_5.CyCustomCharacter character = (CharLCD_I2C_v1_5.CyCustomCharacter) this.panel1.Controls[i]; if (character.Visible == true) { character.ActiveBrush = new SolidBrush(Color.LightGray); character.InactiveBrush = new SolidBrush(Color.WhiteSmoke); character.BorderBrush = new SolidBrush(Color.LightGray); character.Invalidate(); } } customCharacterGroupBox.Enabled = false; }