Пример #1
0
 bool NeedtoUpdate(ArrayList items, ComboBox comboBox)
 {
     if (items.Count != comboBox.Items.Count)
     {
         return(true);
     }
     for (int i = 0; i < items.Count; ++i)
     {
         ComboBoxItem oldItem = (ComboBoxItem)comboBox.Items[i];
         ComboBoxItem newItem = (ComboBoxItem)items[i];
         if (oldItem.GetType() != newItem.GetType())
         {
             return(true);
         }
         if (newItem.CompareItemTo(oldItem) != 0)
         {
             return(true);
         }
     }
     return(false);
 }