コード例 #1
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);

            Instance = this;

            IPluginManager pm = poderosa.PluginManager;

            _optionSupplier = new MRUOptionsSupplier();
            _coreServices   = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);

            _protocolService         = (IProtocolService)pm.FindPlugin("org.poderosa.protocols", typeof(IProtocolService));
            _terminalSessionsService = (ITerminalSessionsService)pm.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService));

            //接続成功時にリスト更新
            _mruList = new MRUList(this, pm);
            _coreServices.SessionManager.AddSessionListener(_mruList);
            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.telnetSSHLoginDialogInitializer").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.loginDialogUISupport").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.terminalParameterStore").RegisterExtension(_mruList);

            _mruCommand = new OpenMRUCommand();
        }
コード例 #2
0
ファイル: MRUPlugin.cs プロジェクト: Ricordanza/poderosa
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);

            Instance = this;

            IPluginManager pm = poderosa.PluginManager;
            _optionSupplier = new MRUOptionsSupplier();
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);

            _protocolService = (IProtocolService)pm.FindPlugin("org.poderosa.protocols", typeof(IProtocolService));
            _terminalSessionsService = (ITerminalSessionsService)pm.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService));

            //接続成功時にリスト更新
            _mruList = new MRUList(this, pm);
            _coreServices.SessionManager.AddSessionListener(_mruList);
            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.telnetSSHLoginDialogInitializer").RegisterExtension(_mruList);
            pm.FindExtensionPoint("org.poderosa.terminalsessions.loginDialogUISupport").RegisterExtension(_mruList);

            _mruCommand = new OpenMRUCommand();
        }