示例#1
0
        public void Start()
        {
            ToolFramework instance = ToolFramework.Instance;

            instance.MainForm      = (Form)this;
            instance.MainDockPanel = this.panMain;
            instance.Init();

            PluginService pluginService = (PluginService)ToolFramework.Instance.ServiceManagerInstance.GetService(typeof(PluginService));

            AddBuiltinPlugins(pluginService);
            DiscoverAndAddPlugins(pluginService);

            instance.StatusBar      = new EntityStatusBar();
            instance.StatusBar.Dock = DockStyle.Bottom;
            instance.MainDockPanel.Controls.Add(ToolFramework.Instance.StatusBar);

            instance.ServiceManagerInstance.StartServices();

            IGame game = instance.Game;

            game.AppStopped     += new EventHandler(this.OnAppStopped);
            game.ModuleLoaded   += new EventHandler(this.OnModuleLoaded);
            game.ModuleLoaded   += new EventHandler(ModBackend.Instance.OnModuleLoaded);
            game.ModuleUnloaded += new EventHandler(ModBackend.Instance.OnModuleUnLoaded);

            KeywordPluginClass keywordPluginClass = (KeywordPluginClass)((PluginService)ToolFramework.Instance.ServiceManagerInstance.GetService(typeof(PluginService))).GetPlugin(typeof(KeywordPluginClass));

            if (keywordPluginClass != null)
            {
                keywordPluginClass.SetKeywordManager(EoCPluginClass.GetKeywordManager());
            }
            StoryPanel.RegisterCustomAutoCompleteMenuAction(3, "Insert Item Template", new EventHandler(MStoryTemplateCompletion.Instance.InsertItemTemplate));
            StoryPanel.RegisterCustomAutoCompleteMenuAction(3, "Insert Character Template", new EventHandler(MStoryTemplateCompletion.Instance.InsertCharacterTemplate));
            ((ToolBarService)ToolFramework.Instance.ServiceManagerInstance.GetService(typeof(ToolBarService))).DisableUI();
        }
示例#2
0
 private void OnModuleLoaded(object sender, EventArgs e)
 {
     StoryEditorPlugin.SetOsirisManager(EoCPluginClass.GetOsirisManager());
 }
示例#3
0
 private void OnModuleLoaded(object _param1, EventArgs _param2)
 {
     StoryEditorPlugin.SetOsirisManager(EoCPluginClass.GetOsirisManager());
 }