Exemplo n.º 1
0
        public virtual HResult Initialize()
        {
            try
            {
                var commandTarget = this as INiCommandTarget;

                if (commandTarget != null)
                {
                    ((INiCommandManager)GetService(typeof(INiCommandManager))).RegisterCommandTarget(commandTarget, out _commandTargetCookie);
                }

                RegisterEditorFactories();

                ToolStripManager.Renderer = new VS2012ToolStripRenderer();

                Application.AddMessageFilter(new MessageFilter(this));

                MouseWheelMessageFilter.Install();

                return(HResult.OK);
            }
            catch (Exception ex)
            {
                return(ErrorUtil.GetHResult(ex));
            }
        }