internal void UpdateMozItems()
{
if (this.Items.Count == this.Controls.Count)
{
this.MatchControlCollToMozItemsColl();
return;
}
if (this.Items.Count > this.Controls.Count)
{
for (int i=0; i<this.Items.Count; i++)
{
if (!this.Controls.Contains(this.Items[i]))
{
this.OnMozItemAdded(new MozItemEventArgs(this.Items[i]));
}
}
}
else
{
int i = 0;
MozItem mozItem;
while (i < this.Controls.Count)
{
mozItem = (MozItem) this.Controls[i];
if (!this.Items.Contains(mozItem))
{
this.OnMozItemRemoved(new MozItemEventArgs(mozItem));
}
else
{
i++;
}
}
}
}