private void controller_TrafficChanged(object sender, EventArgs e)
{
if (icon_baseBitmap == null)
return;
Icon newIcon;
bool hasInbound = controller.traffic.Last.inboundIncreasement > 0;
bool hasOutbound = controller.traffic.Last.outboundIncreasement > 0;
if (hasInbound && hasOutbound)
newIcon = icon_both;
else if (hasInbound)
newIcon = icon_in;
else if (hasOutbound)
newIcon = icon_out;
else
newIcon = icon_base;
if (newIcon != this.targetIcon)
{
this.targetIcon = newIcon;
_notifyIcon.Icon = newIcon;
}
}