Ejemplo n.º 1
0
 public void Update(libexeinfo.GEM.TreeObjectNode node, libexeinfo.GEM.ColorIcon colorIcon)
 {
     txtFlags.Text           = node.flags == 0 ? "None" : node.flags.ToString();
     txtState.Text           = node.state == 0 ? "Normal" : node.state.ToString();
     txtCoordinates.Text     = $"{colorIcon.Monochrome.X},{colorIcon.Monochrome.Y}";
     txtSize.Text            = $"{colorIcon.Monochrome.Width}x{colorIcon.Monochrome.Height} pixels";
     txtCharater.Text        = $"{colorIcon.Monochrome.Character}";
     txtCharCoordinates.Text = $"{colorIcon.Monochrome.CharX},{colorIcon.Monochrome.CharY}";
     txtFgColor.Text         = $"{colorIcon.Monochrome.ForegroundColor}";
     txtBgColor.Text         = $"{colorIcon.Monochrome.BackgroundColor}";
     txtTextCoordinates.Text = $"{colorIcon.Monochrome.TextX},{colorIcon.Monochrome.TextY}";
     txtTextBoxSize.Text     = $"{colorIcon.Monochrome.TextWidth}x{colorIcon.Monochrome.TextHeight} pixels";
     txtText.Text            = colorIcon.Monochrome.Text;
     imgIcon.Image           = GemIcon.GemIconToEto(colorIcon.Monochrome);
     treePlanes.DataStore    = colorIcon.Color;
     iconWidth  = (int)colorIcon.Monochrome.Width;
     iconHeight = (int)colorIcon.Monochrome.Height;
     treePlanes.SelectRow(0);
     if (colorIcon.Color != null && colorIcon.Color.Length >= 1 && colorIcon.Color[0] != null)
     {
         imgColorIcon.Image =
             GemColorIcon.GemColorIconToEto(colorIcon.Color[0], iconWidth, iconHeight, false);
         imgSelectedIcon.Image = GemColorIcon.GemColorIconToEto(colorIcon.Color[0], iconWidth, iconHeight, true);
     }
     else
     {
         imgColorIcon.Image    = null;
         imgSelectedIcon.Image = null;
     }
 }
Ejemplo n.º 2
0
        void TreePlanesOnSelectedItemsChanged(object sender, EventArgs eventArgs)
        {
            if (!(treePlanes.SelectedItem is libexeinfo.GEM.ColorIconPlane cicon))
            {
                imgColorIcon.Image    = null;
                imgSelectedIcon.Image = null;
                return;
            }

            imgColorIcon.Image    = GemColorIcon.GemColorIconToEto(cicon, iconWidth, iconHeight, false);
            imgSelectedIcon.Image = GemColorIcon.GemColorIconToEto(cicon, iconWidth, iconHeight, true);
        }