示例#1
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

#if UNITTEST
            StartMode = StartMode.Slave;
#else
            //NOTE Preferenceから取得するなどすべきか
            StartMode = StartMode.StandAlone;
#endif

            //Coreアセンブリ内のプラグインを代表してここでAdapterFactoryをセット
            new CoreServices(poderosa);

            TabBar.Init();

            IPluginManager pm = poderosa.PluginManager;
            pm.FindExtensionPoint("org.poderosa.root").RegisterExtension(this);
            pm.CreateExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID, typeof(IViewManagerFactory), this);
            pm.CreateExtensionPoint(WindowManagerConstants.VIEW_FACTORY_ID, typeof(IViewFactory), this);
            pm.CreateExtensionPoint(WindowManagerConstants.VIEWFORMATEVENTHANDLER_ID, typeof(IViewFormatEventHandler), this);
            pm.CreateExtensionPoint(WindowManagerConstants.TOOLBARCOMPONENT_ID, typeof(IToolBarComponent), this);
            pm.CreateExtensionPoint(WindowManagerConstants.MAINWINDOWEVENTHANDLER_ID, typeof(IMainWindowEventHandler), this);
            pm.CreateExtensionPoint(WindowManagerConstants.FILEDROPHANDLER_ID, typeof(IFileDropHandler), this);
            AboutBoxUtil.DefineExtensionPoint(pm);

            _preferences = new WindowPreference();
            pm.FindExtensionPoint(PreferencePlugin.EXTENSIONPOINT_NAME)
            .RegisterExtension(_preferences);
            pm.FindExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID)
            .RegisterExtension(new DefaultViewManagerFactory());

            _windows      = new List <MainWindow>();
            _popupWindows = new List <PopupViewContainer>();

            _menu               = new MainWindowMenu();
            _selectionService   = new SelectionService(this);
            _viewFactoryManager = new ViewFactoryManager();

            CommandManagerPlugin.Instance.AddKeyBindChangeListener(this);
            poderosa.Culture.AddChangeListener(this);
        }
示例#2
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;

            //Coreアセンブリ内のプラグインを代表してここでAdapterFactoryをセット
            new CoreServices(poderosa);

            TabBar.Init();

            IPluginManager pm = poderosa.PluginManager;
            pm.FindExtensionPoint("org.poderosa.root").RegisterExtension(this);
            pm.CreateExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID, typeof(IViewManagerFactory), this);
            pm.CreateExtensionPoint(WindowManagerConstants.VIEW_FACTORY_ID, typeof(IViewFactory), this);
            pm.CreateExtensionPoint(WindowManagerConstants.VIEWFORMATEVENTHANDLER_ID, typeof(IViewFormatEventHandler), this);
            pm.CreateExtensionPoint(WindowManagerConstants.TOOLBARCOMPONENT_ID, typeof(IToolBarComponent), this);
            pm.CreateExtensionPoint(WindowManagerConstants.MAINWINDOWEVENTHANDLER_ID, typeof(IMainWindowEventHandler), this);
            pm.CreateExtensionPoint(WindowManagerConstants.FILEDROPHANDLER_ID, typeof(IFileDropHandler), this);
            AboutBoxUtil.DefineExtensionPoint(pm);

            _preferences = new WindowPreference();
            pm.FindExtensionPoint(PreferencePlugin.EXTENSIONPOINT_NAME)
                .RegisterExtension(_preferences);
            pm.FindExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID)
                .RegisterExtension(new DefaultViewManagerFactory());

            _windows = new List<MainWindow>();
            _popupWindows = new List<PopupViewContainer>();

            _menu = new MainWindowMenu();
            _appContext = new PoderosaAppContext();
            _selectionService = new SelectionService(this);
            _viewFactoryManager = new ViewFactoryManager();

            CommandManagerPlugin.Instance.AddKeyBindChangeListener(this);
            poderosa.Culture.AddChangeListener(this);
        }
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            #if UNITTEST
            StartMode =  StartMode.Slave;
            #else
            //NOTE Preference����擾����Ȃǂ��ׂ���
            StartMode = StartMode.StandAlone;
            #endif

            //Core�A�Z���u����̃v���O�C�����\���Ă�����AdapterFactory��Z�b�g
            new CoreServices(poderosa);

            TabBar.Init();

            IPluginManager pm = poderosa.PluginManager;
            pm.FindExtensionPoint("org.poderosa.root").RegisterExtension(this);
            pm.CreateExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID, typeof(IViewManagerFactory), this);
            pm.CreateExtensionPoint(WindowManagerConstants.VIEW_FACTORY_ID, typeof(IViewFactory), this);
            pm.CreateExtensionPoint(WindowManagerConstants.VIEWFORMATEVENTHANDLER_ID, typeof(IViewFormatEventHandler), this);
            pm.CreateExtensionPoint(WindowManagerConstants.TOOLBARCOMPONENT_ID, typeof(IToolBarComponent), this);
            pm.CreateExtensionPoint(WindowManagerConstants.MAINWINDOWEVENTHANDLER_ID, typeof(IMainWindowEventHandler), this);
            pm.CreateExtensionPoint(WindowManagerConstants.FILEDROPHANDLER_ID, typeof(IFileDropHandler), this);
            AboutBoxUtil.DefineExtensionPoint(pm);

            _preferences = new WindowPreference();
            pm.FindExtensionPoint(PreferencePlugin.EXTENSIONPOINT_NAME)
                .RegisterExtension(_preferences);
            pm.FindExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID)
                .RegisterExtension(new DefaultViewManagerFactory());

            _windows = new List<MainWindow>();
            _popupWindows = new List<PopupViewContainer>();

            _menu = new MainWindowMenu();
            _selectionService = new SelectionService(this);
            _viewFactoryManager = new ViewFactoryManager();

            CommandManagerPlugin.Instance.AddKeyBindChangeListener(this);
            poderosa.Culture.AddChangeListener(this);
        }