예제 #1
0
        public bool HasChanges(Plugin plugin)
        {
            var originalResources = new NativeInstrumentsResource();

            originalResources.Load(plugin);

            if (originalResources.Categories.CategoryNames.Count != Categories.CategoryNames.Count)
            {
                return(true);
            }

            foreach (var categoryName in originalResources.Categories.CategoryNames)
            {
                if (!(from cat in Categories.CategoryNames where cat.Name == categoryName.Name select cat).Any())
                {
                    return(true);
                }
            }


            foreach (var image in ResourceImages)
            {
                if (image.State.ShouldSave)
                {
                    return(true);
                }
            }

            return
                (GetHexColor(originalResources.Color.BackgroundColor) != GetHexColor(Color.BackgroundColor) ||
                 originalResources.ShortNames.VB_shortname != ShortNames.VB_shortname ||
                 originalResources.ShortNames.MST_shortname != ShortNames.MST_shortname ||
                 originalResources.ShortNames.MKII_shortname != ShortNames.MKII_shortname ||
                 originalResources.ShortNames.MIKRO_shortname != ShortNames.MIKRO_shortname);
        }