예제 #1
0
 private void custArray_MouseDown(object sender, MouseEventArgs e)
 {
     CharLCDmp_v1_2.CyCustomCharacter current    = (CharLCDmp_v1_2.CyCustomCharacter)sender;
     CharLCDmp_v1_2.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();
 }
예제 #2
0
 // Before runtime, if the number of columns or rows is changed, update.
 // Causes loss of box state data.
 private void CheckBoxArray()
 {
     CheckBoxSize();
     m_box = new CyBox[m_rows, m_columns];
     for (int row = 0; row < m_rows; row++)
     {
         for (int column = 0; column < m_columns; column++)
         {
             m_box[row, column] = new CyBox(row, column);
         }
     }
 }
예제 #3
0
 private void custArray_MouseMove(object sender, MouseEventArgs e)
 {
     if ((e.Button == MouseButtons.Left) || (e.Button == MouseButtons.Right))
     {
         CharLCDmp_v1_2.CyCustomCharacter current    = (CharLCDmp_v1_2.CyCustomCharacter)sender;
         CharLCDmp_v1_2.CyBox             currentBox = current.GetBoxByLocation(e.X, e.Y);
         if (currentBox != null)
         {
             currentBox.IsActive = m_activate;
             current.Invalidate();
         }
     }
     this.m_highlighted.Invalidate();
 }
 // Before runtime, if the number of columns or rows is changed, update.
 // Causes loss of box state data.
 private void CheckBoxArray()
 {
     CheckBoxSize();
     m_box = new CyBox[m_rows, m_columns];
     for (int row = 0; row < m_rows; row++)
     {
         for (int column = 0; column < m_columns; column++)
         {
             m_box[row, column] = new CyBox(row, column);
         }
     }
 }