예제 #1
0
        public DockPanelService(IAppContext context, DebugWindowPlugin plugin, DebugPresenter presenter)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }
            if (plugin == null)
            {
                throw new ArgumentNullException("plugin");
            }
            if (presenter == null)
            {
                throw new ArgumentNullException("presenter");
            }

            var panels = context.DockPanels;

            panels.Lock();

            try
            {
                var panel = panels.Add(presenter.GetInternalObject(), DockPanelKey, plugin.Identity);
                panel.Caption = "Debug";
                panel.SetIcon(Resources.ico_bug24);
                panel.DockTo(DockPanelState.Bottom, 300);
                panel.Visible = false;
            }
            finally
            {
                panels.Unlock();
            }
        }
예제 #2
0
        /// <summary>
        /// The initialize method, called when the plug-in is loaded
        /// </summary>
        public override void Initialize(IAppContext context)
        {
            _context = context;

            _presenter         = context.Container.GetInstance <DebugPresenter>();
            _dockPanelService  = context.Container.GetInstance <DockPanelService>();
            _statusBarListener = context.Container.GetInstance <StatusBarListener>();
        }