Esempio n. 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();
        }
Esempio n. 2
0
        private static CommandResult LoopbackTerminalCommand(ICommandTarget target)
        {
            IPluginManager               pm = SessionTestPlugin.Instance.PoderosaWorld.PluginManager;
            IProtocolTestService         ps = (IProtocolTestService)pm.FindPlugin("org.poderosa.protocols", typeof(IProtocolTestService));
            ITerminalSessionStartCommand s  = ((ITerminalSessionsService)pm.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService))).TerminalSessionStartCommand;
            ITerminalEmulatorService     es = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));
            ITerminalSettings            ts = es.CreateDefaultTerminalSettings("LOOPBACK", null);

            //改行はCRLFがいいっすね
            ts.BeginUpdate();
            ts.TransmitNL = Poderosa.ConnectionParam.NewLine.CRLF;
            ts.EndUpdate();
            s.StartTerminalSession(target, ps.CreateLoopbackConnection(), ts);
            return(CommandResult.Succeeded);
        }
Esempio n. 3
0
 public MRUItemSerializer(IPluginManager pm)
 {
     _instance         = this;
     _serializeService = (ISerializeService)pm.FindPlugin("org.poderosa.core.serializing", typeof(ISerializeService));
     pm.FindExtensionPoint("org.poderosa.core.serializeElement").RegisterExtension(this);
     Debug.Assert(_serializeService != null);
 }
Esempio n. 4
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;

            _coreServices           = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorPlugin = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));
            Debug.Assert(_terminalEmulatorPlugin != null);

            TerminalUICommand.Register(_coreServices.CommandManager);

            TerminalUIMenuGroup uimenu  = new TerminalUIMenuGroup();
            LogMenuGroup        logmenu = new LogMenuGroup();
            //Console Menu
            IExtensionPoint consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");

            consolemenu.RegisterExtension(uimenu);
            consolemenu.RegisterExtension(logmenu);
            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");

            contextmenu.RegisterExtension(uimenu);
            contextmenu.RegisterExtension(logmenu);
            IExtensionPoint documentContextMenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.documentContextMenu");

            documentContextMenu.RegisterExtension(uimenu);
            documentContextMenu.RegisterExtension(logmenu);

            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");

            toolmenu.RegisterExtension(new ShellSchemeEditMenuGroup());
        }
Esempio n. 5
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;
            _stringResource = new StringResource("Poderosa.XZModem.strings", typeof(XZModemPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);

            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorService = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));

            _startXZModemCommand = new StartXZModemCommand();
            _coreServices.CommandManager.Register(_startXZModemCommand);

            IExtensionPoint consolemenu = pm.FindExtensionPoint(TerminalEmulatorConstants.TERMINALSPECIAL_EXTENSIONPOINT);
            consolemenu.RegisterExtension(new XZModemMenuGroup());

        }
Esempio n. 6
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;

            _commandManager     = (ICommandManager)pm.FindPlugin("org.poderosa.core.commands", typeof(ICommandManager));
            _loginDialogCommand = new CygwinLoginDialogCommand();
            _commandManager.Register(_loginDialogCommand);

            IExtensionPoint ep = poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.file");

            _cygwinMenuGroup = new CygwinMenuGroup();
            ep.RegisterExtension(_cygwinMenuGroup);

            _cygwinToolBarComponent = new CygwinToolBarComponent();
            poderosa.PluginManager.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(_cygwinToolBarComponent);
        }
Esempio n. 7
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            // 文字列リソース読み込み
            _stringResource = new Poderosa.StringResource("Contrib.ConnectProfile.strings", typeof(ConnectProfilePlugin).Assembly);
            ConnectProfilePlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            // コマンド登録
            IPluginManager pm = poderosa.PluginManager;

            _coreServices           = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorPlugin = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));
            ConnectProfileCommand.Register(_coreServices.CommandManager);

            // メニューリスト作成
            ConnectProfileMenuGroup        menulist        = new ConnectProfileMenuGroup();
            ConnectProfileContextMenuGroup contextmenulist = new ConnectProfileContextMenuGroup();

            // メニュー登録
            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");

            toolmenu.RegisterExtension(menulist);

            // コンテキストメニュー登録
            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");

            contextmenu.RegisterExtension(contextmenulist);

            // 設定ファイル連携
            _connectProfileOptionSupplier = new ConnectProfileOptionsSupplier();
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_connectProfileOptionSupplier);

            // 接続プロファイル
            _profiles = new ConnectProfileList();
        }
 public TerminalSettingsSerializer(IPluginManager pm) {
     _serializeService = (ISerializeService)pm.FindPlugin("org.poderosa.core.serializing", typeof(ISerializeService));
 }
 public TerminalSettingsSerializer(IPluginManager pm)
 {
     _serializeService = (ISerializeService)pm.FindPlugin("org.poderosa.core.serializing", typeof(ISerializeService));
 }
Esempio n. 10
0
 public MRUItemSerializer(IPluginManager pm) {
     _instance = this;
     _serializeService = (ISerializeService)pm.FindPlugin("org.poderosa.core.serializing", typeof(ISerializeService));
     pm.FindExtensionPoint("org.poderosa.core.serializeElement").RegisterExtension(this);
     Debug.Assert(_serializeService != null);
 }