static public void DeleteDiagram(ERData node) { ActionData newAction = new ActionData(); newAction.Add("DiagramCode", DiagramKeeper.GetCurrDiagramCode()); instance.dataLog.actions.Add(new Tuple <string, ActionData>("DeleteDiagram", newAction)); }
public static void NextRoom(string sceneName, string diagramCode) { PlayerEventHandler.RoomMovement(SceneManager.GetActiveScene().name, sceneName); DiagramKeeper.SetDiagramCode(diagramCode); DiagramKeeper.GetCurrDiagram(); SceneManager.LoadScene(sceneName); SceneManager.LoadScene("PlayerUI", LoadSceneMode.Additive); inUIscene = false; }
static public void ChangeCardinality(LinkData link) { ActionData newAction = new ActionData(); newAction.Add("DiagramCode", DiagramKeeper.GetCurrDiagramCode()); newAction.Add("Name", link.name); newAction.Add("New Cardinality", link.nodeState); instance.dataLog.actions.Add(new Tuple <string, ActionData>("ChangeCardinality", newAction)); }
static public void AddNode(NodeData node) { ActionData newAction = new ActionData(); newAction.Add("DiagramCode", DiagramKeeper.GetCurrDiagramCode()); newAction.Add("Name", node.nodeName); newAction.Add("Type", node.type.ToString()); instance.dataLog.actions.Add(new Tuple <string, ActionData>("AddNode", newAction)); }
static public void RemLink(LinkData link) { ActionData newAction = new ActionData(); newAction.Add("DiagramCode", DiagramKeeper.GetCurrDiagramCode()); newAction.Add("Node1-Id", link.linkedNodeId[0].ToString()); newAction.Add("Node2-Id", link.linkedNodeId[1].ToString()); newAction.Add("Type", link.type.ToString()); instance.dataLog.actions.Add(new Tuple <string, ActionData>("RemoveLink", newAction)); }
static public void ChangeGenType(NodeData node, string oldState) { ActionData newAction = new ActionData(); newAction.Add("DiagramCode", DiagramKeeper.GetCurrDiagramCode()); newAction.Add("Id", node.id.ToString()); newAction.Add("From", oldState); newAction.Add("To", node.nodeName); instance.dataLog.actions.Add(new Tuple <string, ActionData>("ChangeGenType", newAction)); }
static public void ChangeParticipation(LinkData link) { ActionData newAction = new ActionData(); newAction.Add("DiagramCode", DiagramKeeper.GetCurrDiagramCode()); newAction.Add("Name", link.name); string participation = link.participationIsTotal ? "Total" : "Parcial"; newAction.Add("New Participation", link.nodeState); instance.dataLog.actions.Add(new Tuple <string, ActionData>("ChangeParticipation", newAction)); }
static public void ChangeGenLinkType(LinkData link, string oldType) { ActionData newAction = new ActionData(); newAction.Add("DiagramCode", DiagramKeeper.GetCurrDiagramCode()); newAction.Add("Node1-Id", link.linkedNodeId[0].ToString()); newAction.Add("Node2-Id", link.linkedNodeId[1].ToString()); newAction.Add("From", oldType); newAction.Add("To", link.type.ToString()); instance.dataLog.actions.Add(new Tuple <string, ActionData>("ChangeGenLinkType", newAction)); }
static public void ChangeKeyAttribute(NodeData node, string oldState) { ActionData newAction = new ActionData(); string keyValue = ""; newAction.Add("DiagramCode", DiagramKeeper.GetCurrDiagramCode()); newAction.Add("Name", node.nodeName); newAction.Add("Id", node.id.ToString()); newAction.Add("Type", node.type.ToString()); keyValue = node.isKey ? "Es" : "No es"; newAction.Add("Estado", keyValue + " atributo clave"); instance.dataLog.actions.Add(new Tuple <string, ActionData>("ChangeKeyAttribute", newAction)); }
void Start() { Cursor.lockState = CursorLockMode.None; //Get Canvas Scaler component canvas_ = GetComponent <Canvas>(); //Get Graphic and Data components of the ERDiagram erData_ = DiagramKeeper.GetCurrDiagram(); erDiagram_ = GetComponent <ERDiagram>(); //Setup path display pathDisplay.text = GetPathToDiagram(); //Load all names on the nameDropdown Menu List <string> dropdownOptions = GlobalController.config.nodeNames; //Apply the names to the DropDown Component nameList = nameMenu.GetComponent <Dropdown>(); nameListAttr = nameMenuAtr.GetComponent <Dropdown>(); nameList.AddOptions(dropdownOptions); nameListAttr.AddOptions(dropdownOptions); //Create diagram form diagramData erDiagram_.DrawDiagram(erData_); }
public string GetPathToDiagram() { return("Se guarda en: " + Path.Combine(Application.persistentDataPath, "Saves") + " Codigo: " + DiagramKeeper.GetCurrDiagramCode()); }
// Start is called before the first frame update void Start() { GetComponent <Text>().text = "Se guarda en: " + Application.persistentDataPath + " Codigo: " + DiagramKeeper.GetCurrDiagramCode(); }