private bool IsSentBySelf(object sender) { if (sender is TreemapViewModel && (TreemapViewModel)sender != this) { return(false); } if (sender is TreemapIndexViewModel && Indexes.All(i => (TreemapIndexViewModel)sender != i)) { return(false); } if (sender is Gradient2ColorsViewModel && (Gradient2ColorsViewModel)sender != gradient2ColorsViewModel) { return(false); } if (sender is Gradient3ColorsViewModel && (Gradient3ColorsViewModel)sender != gradient3ColorsViewModel) { return(false); } if (sender is ColorPaletteViewModel && (ColorPaletteViewModel)sender != colorPaletteViewModel) { return(false); } return(true); }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> public bool Remove(T item) { return(Indexes.All(index => index.Remove(item))); }
public bool Remove(T item) => Indexes.All(index => index.Remove(item));