Files
@ 62bce5871a4e
Branch filter:
Location: ATITD-Tools/Desert-Paint-Lab/PaintSwatch.cs - annotation
62bce5871a4e
925 B
text/x-csharp
Added tag VERSION_T8_RC5 for changeset 5db137e7ce90
63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c 63ce80f17b8c | using System;
namespace DesertPaintLab
{
[System.ComponentModel.ToolboxItem(true)]
public partial class PaintSwatch : Gtk.Bin
{
PaintColor color;
public PaintColor Color
{
get
{
return color;
}
set
{
color.Red = value.Red;
color.Green = value.Green;
color.Blue = value.Blue;
colorBox.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(color.Red, color.Green, color.Blue));
rgbLabel.Text = color.Red.ToString() + ", " +
color.Green.ToString() + ", " +
color.Blue.ToString();
colorNameLabel.Text = Palette.FindNearest(color);
}
}
public PaintSwatch ()
{
color = new PaintColor();
this.Build ();
}
public void Clear()
{
color.Clear();
colorBox.ModifyBg(Gtk.StateType.Normal, new Gdk.Color(color.Red, color.Green, color.Blue));
rgbLabel.Text = "???, ???, ???";
colorNameLabel.Text = "Unknown";
}
}
}
|