Esempio n. 1
0
 private void SetUpModel(string file)
 {
     _model = new Model();
     _model.Open(file);
     EntitiesTree = EntityNode.GetRoots(_model);
     EntitiesList = EntityNode.GetFlat(EntitiesTree).OrderBy(e => e.Name).ToList();
 }
Esempio n. 2
0
        private void txtFilter_KeyUp(object sender, System.Windows.Input.KeyEventArgs arg)
        {
            var filter = txtFilter.Text?.ToUpperInvariant();

            if (string.IsNullOrWhiteSpace(filter))
            {
                EntitiesList = EntityNode.GetFlat(EntitiesTree).OrderBy(e => e.Name).ToList();
                return;
            }

            EntitiesList = EntityNode.GetFlat(EntitiesTree)
                           .Where(e => e.Name.ToUpperInvariant().Contains(filter))
                           .OrderBy(e => e.Name).ToList();
        }