예제 #1
0
        private void PreLoadData()
        {
            var options = IdMsoPackage.GetOptions(ServiceProvider);

            if (options.OfficeApplication != OfficeApplication.NotSpecified &&
                options.OfficeVersion != OfficeVersion.NotSpecified)
            {
                Task.Run(() => ExcelLoader.GetIdsFromCache(options.OfficeVersion, options.OfficeApplication));
            }

            if (options.OfficeApplication != OfficeApplication.NotSpecified &&
                options.OfficeVersion != OfficeVersion.NotSpecified)
            {
                Task.Run((Action)(() => ImageLoader.GetMsoImagesFromCache(options.OfficeVersion)));
            }
        }
예제 #2
0
        public static IEnumerable <Entry> GetIds(IServiceProvider serviceProvider)
        {
            var options = IdMsoPackage.GetOptions(serviceProvider);

            if (options.OfficeVersion == OfficeVersion.NotSpecified || options.OfficeApplication == OfficeApplication.NotSpecified)
            {
                OptionsPrompt.EditOptions(options);

                if (options.OfficeVersion == OfficeVersion.NotSpecified || options.OfficeApplication == OfficeApplication.NotSpecified)
                {
                    return(new List <Entry>());
                }
            }

            return(GetIdsFromCache(options.OfficeVersion, options.OfficeApplication).ToList());
        }
예제 #3
0
        public static IEnumerable <Completion> GetMsoImages(IServiceProvider serviceProvider)
        {
            var options = IdMsoPackage.GetOptions(serviceProvider);

            if (options.OfficeVersion == OfficeVersion.NotSpecified)
            {
                OptionsPrompt.EditOptions(options);

                if (options.OfficeVersion == OfficeVersion.NotSpecified)
                {
                    return(new List <Completion>());
                }
            }

            return(GetMsoImagesFromCache(options.OfficeVersion));
        }