protected override void GUIBehaviorInput() { this.ajan = this.GetComponent <AJANAgent>(); if (GUI.Button(new Rect(270, 10, 120, 50), "Send Event")) { if (ajan) { MRDFGraph knowledge = new MRDFGraph(); knowledge.ContentType = "text/turtle"; knowledge.Graph = "_:test <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource> ."; Debug.Log("Send a new Event to AJANAgent capability: " + capability); ajan.sendEvent(capability, knowledge); } } }
public override void OnInspectorGUI() { AJANAgent agent = (AJANAgent)target; EditorGUILayout.Space(); EditorGUILayout.LabelField("Fields to establish a connection with AJAN", EditorStyles.boldLabel); agent.mmiSettings = (MMISettings)EditorGUILayout.ObjectField("MMISettings", agent.mmiSettings, typeof(MMISettings)); agent.AJANServer = EditorGUILayout.TextField("AJANServer", agent.AJANServer); agent.AJANPort = EditorGUILayout.IntField("AJANPort", agent.AJANPort); agent.AgentCLPort = EditorGUILayout.IntField("AgentCLPort", agent.AgentCLPort); agent.Repository = EditorGUILayout.TextField("Repository", agent.Repository); var toggleReport = EditorGUILayout.Toggle("Report", agent.Report); if (toggleReport) { agent.Report = true; } else { agent.Report = false; } var toggleDocker = EditorGUILayout.Toggle("Docker", agent.Docker); if (toggleDocker) { agent.Docker = true; } else { agent.Docker = false; } if (GUILayout.Button("Get Available Agent Templates")) { agent.Load(); } GUILayoutOption[] atList = new GUILayoutOption[] { }; agent.atIndex = EditorGUILayout.Popup("AgentTemplate", agent.atIndex, agent.atList.ToArray(), atList); agent.SetCapabilities(); GUILayoutOption[] caList = new GUILayoutOption[] { }; agent.caIndex = EditorGUILayout.Popup("Capability", agent.caIndex, agent.caList.ToArray(), caList); //agent.AJANExecute = EditorGUILayout.TextField("Capability", agent.AJANExecute); // TODO: Commented to fix error EditorGUILayout.Space(); EditorGUILayout.LabelField("Fields to define High-Level Tasklist", EditorStyles.boldLabel); var toggleTask = EditorGUILayout.Toggle("TaskList Editor", agent.TaskList); if (toggleTask) { agent.TaskList = true; } else { agent.TaskList = false; } }