public ThemeClassViewModel(ThemeClass @class, ThemeFileViewModel parent)
        {
            this.@class = @class;
            Parent      = parent;

            properties.AddRange(@class.Properties.Select(x => new OwnedThemePropertyViewModel(x)));

            parts = @class.Parts.Select(x => new ThemePartViewModel(x, this)).ToList();
            parts.Sort((x, y) => x.Id.CompareTo(y.Id));
            children.Add(new NamedItemContainer("Parts", parts));
        }
        public ThemeFileComparisonViewModel CompareThemes(
            ThemeFileViewModel oldThemeFile, ThemeFileViewModel newThemeFile)
        {
            var cmpModel = new ThemeFileComparisonViewModel(oldThemeFile, newThemeFile);

            var items = MatchItems(oldThemeFile.Classes, newThemeFile.Classes,
                                   (l, r) => string.Compare(l.Name, r.Name, StringComparison.OrdinalIgnoreCase));

            foreach (var tuple in items)
            {
                var cmp = Compare(tuple.Item1, tuple.Item2);
                if (cmp != null)
                {
                    cmpModel.Classes.Add(cmp);
                }
            }

            cmpModel.Properties = Compare(oldThemeFile.Properties, newThemeFile.Properties);

            return(cmpModel);
        }
 public ThemeFileComparisonViewModel(
     ThemeFileViewModel oldThemeFile, ThemeFileViewModel newThemeFile)
 {
     OldThemeFile = oldThemeFile;
     NewThemeFile = newThemeFile;
 }