Beispiel #1
0
        /// <summary>
        /// <ja>初期化</ja>
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

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

            // コマンド登録
            IPluginManager  pm       = poderosa.PluginManager;
            IExtensionPoint extp_cmd = pm.FindExtensionPoint("org.poderosa.terminalsessions.pasteCommand");

            extp_cmd.RegisterExtension(new ExtendPasteCommand());

            // オプションパネル登録
            IExtensionPoint extp_opt = pm.FindExtensionPoint("org.poderosa.optionpanel");

            extp_opt.RegisterExtension(new ExtendPastePanelExtension());

            // オプションクラス登録
            _optionSupplier = new ExtendPasteOptionsSupplier();
            _coreServices   = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);
        }
        /// <summary>
        /// <ja>初期化</ja>
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

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

            // コマンド登録
            IPluginManager pm = poderosa.PluginManager;
            IExtensionPoint extp_cmd = pm.FindExtensionPoint("org.poderosa.terminalsessions.pasteCommand");
            extp_cmd.RegisterExtension(new ExtendPasteCommand());

            // オプションパネル登録
            IExtensionPoint extp_opt = pm.FindExtensionPoint("org.poderosa.optionpanel");
            extp_opt.RegisterExtension(new ExtendPastePanelExtension());

            // オプションクラス登録
            _optionSupplier = new ExtendPasteOptionsSupplier();
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);
        }