示例#1
0
        private void Items_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            Regex regWS = new Regex(" +");

            if (e.NewItems != null)
            {
                foreach (var o in e.NewItems)
                {
                    ItemModel     m         = o as ItemModel;
                    var           exp       = regWS.Split(m.ItemExpression);
                    List <string> unlisted  = new List <string>();
                    var           morphList = exp.Select(x =>
                    {
                        var one = Morphs.FirstOrDefault(p => p.Morph == x);
                        if (one == null)
                        {
                            unlisted.Add(x);
                        }
                        return(one);
                    });
                }
            }
        }