private void MyList_DrawItem(object sender, DrawListViewItemEventArgs e)
{
if (e.State == 0) return;
e.DrawDefault = false;
SolidBrush brs2 = null;
if (!e.Item.Selected) //e.ItemStateでうまく判定できない???
{
if (e.Item.BackColor == _clSelf)
brs2 = _brsBackColorMine;
else if (e.Item.BackColor == _clAtSelf)
brs2 = _brsBackColorAt;
else if (e.Item.BackColor == _clTarget)
brs2 = _brsBackColorYou;
else if (e.Item.BackColor == _clAtTarget)
brs2 = _brsBackColorAtYou;
else if (e.Item.BackColor == _clAtFromTarget)
brs2 = _brsBackColorAtFromTarget;
else if (e.Item.BackColor == _clAtTo)
brs2 = _brsBackColorAtTo;
else
brs2 = _brsBackColorNone;
}
else
{
//選択中の行
if (((Control)sender).Focused)
brs2 = _brsHighLight;
else
brs2 = _brsDeactiveSelection;
}
e.Graphics.FillRectangle(brs2, e.Bounds);
e.DrawFocusRectangle();
this.DrawListViewItemIcon(e);
}