public void Load(IServiceProvider serviceProvider)
 {
     this.windowManager = (IWindowManager)serviceProvider.GetService(typeof(IWindowManager));
     //this.windowManager.ShowMessage("Loading Perst!");
     this.assemblyManager = (IAssemblyManager)serviceProvider.GetService(typeof(IAssemblyManager));
     this.commandBarManager = (ICommandBarManager)serviceProvider.GetService(typeof(ICommandBarManager));
     this.translatorManager = (ITranslatorManager)serviceProvider.GetService(typeof(ITranslatorManager));
     this.translator = this.translatorManager.CreateDisassembler(null, null);
     this.separator = this.commandBarManager.CommandBars["Tools"].Items.AddSeparator();
     this.button = this.commandBarManager.CommandBars["Tools"].Items.AddButton("&Detect Modify Bug", new EventHandler(this.PerstListButton_Click));
 }
        public void Load(IServiceProvider serviceProvider)
        {
            FileDisassemblerWindow fileDisassemblerWindow = new FileDisassemblerWindow();
            fileDisassemblerWindow.AssemblyBrowser = (IAssemblyBrowser) serviceProvider.GetService(typeof(IAssemblyBrowser));
            fileDisassemblerWindow.AssemblyManager = (IAssemblyManager) serviceProvider.GetService(typeof(IAssemblyManager));
            fileDisassemblerWindow.LanguageManager = (ILanguageManager) serviceProvider.GetService(typeof(ILanguageManager));
            fileDisassemblerWindow.TranslatorManager = (ITranslatorManager) serviceProvider.GetService(typeof(ITranslatorManager));

            this.windowManager = (IWindowManager) serviceProvider.GetService(typeof(IWindowManager));
            this.windowManager.Windows.Add("FileDisassemblerWindow", fileDisassemblerWindow, "File Disassembler");

            this.commandBarManager = (ICommandBarManager) serviceProvider.GetService(typeof(ICommandBarManager));
            this.separator = this.commandBarManager.CommandBars["Tools"].Items.AddSeparator();
            this.button = this.commandBarManager.CommandBars["Tools"].Items.AddButton("&File Disassembler", new EventHandler(this.FileDisassemblerButton_Click));
        }
        /// <summary>
        /// .NET Reflector が plug-in をロードした際に呼び出します。
        /// </summary>
        /// <param name="serviceProvider"></param>
        public void Load(IServiceProvider serviceProvider)
        {
            _commandBarManager = serviceProvider.GetTypedService<ICommandBarManager>();
            _assemblyBrowser = serviceProvider.GetTypedService<IAssemblyBrowser>();

            _assemblyBrowser.ActiveItemChanged += AssemblyBrowserActiveItemChanged;

            _separator1 = _commandBarManager.CommandBars["Browser.TypeDeclaration"].Items.AddSeparator();
            _button1 = _commandBarManager.CommandBars["Browser.TypeDeclaration"].Items.AddButton(@"Copy Full Assembly Name", CopyFullAssemblyNameButtonClick);

            _separator2 = _commandBarManager.CommandBars["Browser.MethodDeclaration"].Items.AddSeparator();
            _button2 = _commandBarManager.CommandBars["Browser.MethodDeclaration"].Items.AddButton(@"Copy Full Assembly Name", CopyFullAssemblyNameButtonClick);

            _separator3 = _commandBarManager.CommandBars["Edit"].Items.AddSeparator();
            _button3 = _commandBarManager.CommandBars["Edit"].Items.AddButton(@"Copy Full Assembly Name", CopyFullAssemblyNameButtonClick, Keys.Alt|Keys.Control|Keys.O);
        }
        public void Load(IServiceProvider serviceProvider)
        {
            this.serviceProvider = serviceProvider;

            var fileGeneratorControl = new FileGeneratorControl(this.serviceProvider);

            windowManager =
                (IWindowManager) this.serviceProvider.GetService(typeof(IWindowManager));
            windowManager.Windows.Add(WindowID, fileGeneratorControl, WindowTitle);

            fileGeneratorWindow = windowManager.Windows[WindowID];
            fileGeneratorWindow.Content.Dock = DockStyle.Fill;

            var commandBarManager =
                (ICommandBarManager) this.serviceProvider.GetService(typeof(ICommandBarManager));
            var commandToolItems = commandBarManager.CommandBars[ToolsCommandBar].Items;
            fileGeneratorCommandBarSeparator = commandToolItems.AddSeparator();
            fileGeneratorCommandBarButton = commandToolItems.AddButton(
                ToolsTitle, new EventHandler(OnFileGeneratorButtonClick), MenuKeys);
        }