コード例 #1
0
 private void updateByteSelectionUI()
 {
     for (int i = 0; i < DataStackPanel.Children.Count; i++)
     {
         StackPanel dataLineStack = (StackPanel)DataStackPanel.Children[i];
         for (int j = 0; j < dataLineStack.Children.Count; j++)
         {
             ByteControl item  = (ByteControl)dataLineStack.Children[j];
             int         index = ((getBaseVisibleIndex() + j) + (i * (int)BYTE_PER_LINE));
             if (selectedHexItems[index] == true)
             {
                 if (item.getControlState() != 2)
                 {
                     item.selectedState();
                     AsciiControl testItem = getAsciiControl((int)item.Tag);
                     testItem.selectedState();
                 }
             }
             else
             {
                 item.defaultState();
                 getAsciiControl((int)item.Tag).defaultState();
             }
         }
     }
 }
コード例 #2
0
        private void mouseLeaveEventHandler(object sender, MouseEventArgs e)
        {
            ByteControl  byteItem  = sender as ByteControl;
            AsciiControl asciiItem = sender as AsciiControl;

            if (asciiItem != null)
            {
                //if (asciiItem.Background != Brushes.Blue) { }
                //asciiItem.Background = Brushes.White;
                if (asciiItem.getControlState() == 1)
                {
                    asciiItem.defaultState();
                }
            }
            else
            {
                if (byteItem.getControlState() == 1)
                {
                    byteItem.defaultState();
                }
            }
        }