예제 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="poderosa">an instance of PoderosaWorld</param>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);

            _instance      = this;
            _poderosaWorld = poderosa;

            _adapterManager = poderosa.AdapterManager;
            _coreServices   = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _stringResource = new StringResource("Poderosa.Pipe.strings", typeof(PipePlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);

            _terminalSessionsService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService)) as ITerminalSessionsService;
            _terminalEmulatorService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService)) as ITerminalEmulatorService;
            _serializeService        = poderosa.PluginManager.FindPlugin("org.poderosa.core.serializing", typeof(ISerializeService)) as ISerializeService;

            IExtensionPoint extSer = _coreServices.SerializerExtensionPoint;

            extSer.RegisterExtension(new PipeTerminalParameterSerializer());
            extSer.RegisterExtension(new PipeTerminalSettingsSerializer());

            _openPipeCommand = new OpenPipeCommand();

            IPluginManager pm = poderosa.PluginManager;

            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(new PipeMenuGroup(_openPipeCommand));

            // Toolbar button has not been added yet
            //pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(new PipeToolBarComponent());

            pm.FindExtensionPoint("org.poderosa.termianlsessions.terminalConnectionFactory").RegisterExtension(new PipeConnectionFactory());
        }
예제 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="poderosa">an instance of PoderosaWorld</param>
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);

            _instance = this;
            _poderosaWorld = poderosa;

            _adapterManager = poderosa.AdapterManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _stringResource = new StringResource("Poderosa.Pipe.strings", typeof(PipePlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);

            _terminalSessionsService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService)) as ITerminalSessionsService;
            _terminalEmulatorService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService)) as ITerminalEmulatorService;
            _serializeService = poderosa.PluginManager.FindPlugin("org.poderosa.core.serializing", typeof(ISerializeService)) as ISerializeService;

            IExtensionPoint extSer = _coreServices.SerializerExtensionPoint;
            extSer.RegisterExtension(new PipeTerminalParameterSerializer());
            extSer.RegisterExtension(new PipeTerminalSettingsSerializer());

            _openPipeCommand = new OpenPipeCommand();

            IPluginManager pm = poderosa.PluginManager;
            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(new PipeMenuGroup(_openPipeCommand));

            // Toolbar button has not been added yet
            //pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(new PipeToolBarComponent());

            pm.FindExtensionPoint("org.poderosa.termianlsessions.terminalConnectionFactory").RegisterExtension(new PipeConnectionFactory());
        }