public ResourcesHelper()
        {
            var filepath = Path.Combine(_vsInstallDir, "Microsoft.Data.ConnectionUI.Dialog.dll");

            _dataConnectionDialogResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.ConnectionUI.DataConnectionDialog");
            _sqlConnectionUIControlResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.ConnectionUI.SqlConnectionUIControl");

            filepath = Path.Combine(_vsInstallDir, "Microsoft.WizardFramework.dll");
            _wizardFrameworkResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.WizardFramework.Properties.Resources");

            filepath = Path.Combine(_vsInstallDir, "Microsoft.Data.Entity.Design.Package.dll");
            _designPackageResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.Entity.Design.Package.Resources");

            filepath = Path.Combine(_vsInstallDir, "Microsoft.Data.Entity.Design.dll");
            _modelWizardResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Properties.Resources");
            _viewsDialogsResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.Entity.Design.UI.Views.Dialogs.DialogsResource");
            _entityDesignResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.Entity.Design.Resources");
        }
        private string GetResourceString(AssemblyResourceLookup resourceLookup, string key)
        {
            if (string.IsNullOrEmpty(key))
            {
                return(string.Empty);
            }

            var value = resourceLookup.LookupString(key);

            return(RemoveAmpersands(value));
        }
예제 #3
0
        public ResourcesHelper()
        {
            var filepath = Path.Combine(_vsInstallDir, "Microsoft.Data.ConnectionUI.Dialog.dll");
            _dataConnectionDialogResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.ConnectionUI.DataConnectionDialog");
            _sqlConnectionUIControlResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.ConnectionUI.SqlConnectionUIControl");

            filepath = Path.Combine(_vsInstallDir, "Microsoft.WizardFramework.dll");
            _wizardFrameworkResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.WizardFramework.Properties.Resources");

            filepath = Path.Combine(_vsInstallDir, "Microsoft.Data.Entity.Design.Package.dll");
            _designPackageResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.Entity.Design.Package.Resources");

            filepath = Path.Combine(_vsInstallDir, "Microsoft.Data.Entity.Design.dll");
            _modelWizardResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.Entity.Design.VisualStudio.ModelWizard.Properties.Resources");
            _viewsDialogsResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.Entity.Design.UI.Views.Dialogs.DialogsResource");
            _entityDesignResourceLookup = new AssemblyResourceLookup(
                Assembly.LoadFile(filepath), "Microsoft.Data.Entity.Design.Resources");
        }
예제 #4
0
        private string GetResourceString(AssemblyResourceLookup resourceLookup, string key)
        {
            if (string.IsNullOrEmpty(key))
            {
                return string.Empty;
            }

            var value = resourceLookup.LookupString(key);
            return RemoveAmpersands(value);
        }