public void setEggWarning(long unique_id, bool flag) { if (unique_id == 0) { return; } MaterialDataContext data = MaterialList.Find(a => a.m_UniqueId == unique_id); if (data != null) { data.m_bEggWarning = flag; } }