示例#1
0
        public override void Initialize(EditorService service)
        {
            base.Initialize(service);

            ctrl = new ToolBox();
            EditorService.Instance.QueryModule<FormViewModule>().RegisterView(ctrl, "Tools");

            base.ToolListChanged += ctrl.toolBoxControl1.OnToolListChanged;

            MenuModule menu = EditorService.Instance.QueryModule<MenuModule>();
            MenuItem mItem = new MenuItem();
            mItem.Name = "工具配置";
            mItem.Index = 0;
            menu.AddMenuItem("", mItem);

            StatusBarModule sbm = EditorService.Instance.QueryModule<StatusBarModule>();
            sbm.AddIndicator("当前工具");
            sbm.SetIndicator("当前工具", "当前工具:无");
        }
示例#2
0
        public override void Initialize(EditorService service)
        {
            base.Initialize(service);

            projectCtrl = new ProjectControl();

            MenuBuilder = new ProjectItemContextMenuBuilder();
            MenuBuilder.Menu = projectCtrl.contextMenuStrip1;

            EditorService.Instance.QueryModule<FormViewModule>(null).RegisterView(projectCtrl, "ProjectTab");

            MenuModule menuModule = EditorService.Instance.QueryModule<MenuModule>();
            MenuItem fileItem = new MenuItem();
            fileItem.Name = "文件";
            fileItem.Index = 0;
            menuModule.AddMenuItem("", fileItem);
            MenuItem item = new MenuItem();
            item.Name = "新建";
            item.Index = 0;
            item.Command = menuCommand_New;
            menuModule.AddMenuItem("文件", item);
            item = new MenuItem();
            item.Name = "打开";
            item.Index = 1;
            item.Command = menuCommand_Open;
            menuModule.AddMenuItem("文件", item);
            item = new MenuItem();
            item.Name = "保存";
            item.Index = 2;
            item.Command = menuCommand_Save;
            menuModule.AddMenuItem("文件", item);
            item = new MenuItem();
            item.Name = "关闭";
            item.Index = 3;
            item.Command = menuCommand_Close;
            menuModule.AddMenuItem("文件", item);
            item = new MenuItem();
            item.Name = "新建场景";
            item.Index = 0;
            item.Command = menuCommand_NewStage;
            menuModule.AddMenuItem("文件", item);
            item = new MenuItem();
            item.Name = "保存场景";
            item.Index = 0;
            item.Command = menuCommand_SaveStage;
            menuModule.AddMenuItem("文件", item);
            item = new MenuItem();
            item.Name = "退出";
            item.Index = 4;
            item.Command = menuCommandQuit;
            menuModule.AddMenuItem("文件", item);
            fileItem = new Lofinil.GameSDK.Editor.Module.Menu.MenuItem();
            fileItem.Name = "项目";
            fileItem.Index = 1;
            menuModule.AddMenuItem("", fileItem);
            item = new MenuItem();
            item.Name = "项目配置";
            item.Index = 0;
            item.Command = menuCommand_ProjConf;
            menuModule.AddMenuItem("项目", item);
            item = new MenuItem();
            item.Name = "管线预设配置";
            item.Index = 1;
            item.Command = menuCommand_PipelineConf;
            menuModule.AddMenuItem("项目", item);

            StatusBarModule statusModule = EditorService.Instance.QueryModule<StatusBarModule>();
            statusModule.AddIndicator("项目状态");
            statusModule.SetIndicator("项目状态", "项目状态:未加载");
        }