private void View()
 {
     GUILayout.Space(ToolData.lineSpace);
     GUILayout.Label("View 层代码生成", itemTitle);
     GUILayout.Space(ToolData.lineSpace);
     InputName("请输入脚本名称", ref ToolData.viewName);
     CreateButton("生成脚本", () =>
     {
         GenerateCode.CreateScript(ToolData.viewPath, ToolData.viewName + ToolData.viewPostfix,
                                   CodeTemplate.GetViewCode());
     }
                  );
 }
 private void Service()
 {
     GUILayout.Space(ToolData.lineSpace);
     GUILayout.Label("Service 层代码生成", itemTitle);
     GUILayout.Space(ToolData.lineSpace);
     InputName("请输入脚本名称", ref ToolData.serviceName);
     CreateButton("生成脚本", () =>
     {
         GenerateCode.CreateScript(ToolData.servicePath, ToolData.serviceName + ToolData.servicePostfix,
                                   CodeTemplate.GetServiceCode());
         GenerateCode.InitServices(ToolData.serviceManagerPath);
     }
                  );
 }
 private void ReactiveSystem()
 {
     GUILayout.Space(ToolData.lineSpace);
     GUILayout.Label("响应系统部分", itemTitle);
     GUILayout.Space(ToolData.lineSpace);
     InputName("请输入脚本名称", ref ToolData.systemName);
     CreateButton("生成脚本", () =>
     {
         GenerateCode.CreateScript(ToolData.systemPath + "/" + ToolData.selectedContextName, ToolData.selectedContextName + ToolData.systemName +
                                   ToolData.systemPosfix, CodeTemplate.GetReactiveSystemCode());
         GenerateCode.InitSystem(ToolData.selectedContextName, ToolData.selectedContextName + ToolData.systemName +
                                 ToolData.systemPosfix, "ReactiveSystem");
     }
                  );
 }
 private void OtherSystem()
 {
     GUILayout.Space(ToolData.lineSpace);
     GUILayout.Label("其他系统部分", itemTitle);
     GUILayout.Space(ToolData.lineSpace);
     GUILayout.Label("选择要生成的系统");
     if (ToolData.systemSelectedStateDic != null)
     {
         foreach (string systemName in ToolData.systemInterfaceNames)
         {
             ToolData.systemSelectedStateDic[systemName] = GUILayout.Toggle(ToolData.systemSelectedStateDic[systemName], systemName);
         }
     }
     GUILayout.Space(ToolData.lineSpace);
     InputName("请输入脚本名称", ref ToolData.otherSystemName);
     CreateButton("生成脚本", () =>
     {
         GenerateCode.CreateScript(ToolData.systemPath, ToolData.selectedContextName + ToolData.otherSystemName + ToolData.systemPosfix, CodeTemplate.GetOtherSystemCode());
         List <string> selectedSystem = CodeTemplate.GetSelectedSystem();
         List <string> funcName       = CodeTemplate.GetFuncName(selectedSystem);
         GenerateCode.InitSystem(ToolData.selectedContextName, ToolData.selectedContextName + ToolData.otherSystemName + ToolData.systemPosfix, funcName.ToArray());
     }
                  );
 }