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));
        }
Esempio n. 2
0
        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));
        }