public bool DeleteLense(string lense) { var item = Lenses.Find(l => (l.Name == lense)); if (item != null) { Lenses.Remove(item); return(true); } return(false); }
public bool AddLense(Lense newLense) { var lense = Lenses.Find(l => (l.Factor == newLense.Factor)); if (lense == null) { //create a new lense Lenses.Add(newLense); return(true); } else { return(false); } }
public Lense GetLense(string lense) { return(Lenses.Find(l => (l.ToString() == lense))); }