Exemplo n.º 1
0
    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));
    }
Exemplo n.º 2
0
    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));
    }
Exemplo n.º 3
0
    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));
    }
Exemplo n.º 4
0
    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));
    }
Exemplo n.º 5
0
    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));
    }
Exemplo n.º 6
0
    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));
    }
Exemplo n.º 7
0
    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));
    }
Exemplo n.º 8
0
    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));
    }
Exemplo n.º 9
0
 public string GetPathToDiagram()
 {
     return("Se guarda en: " + Path.Combine(Application.persistentDataPath, "Saves") + " Codigo: " + DiagramKeeper.GetCurrDiagramCode());
 }
Exemplo n.º 10
0
 // Start is called before the first frame update
 void Start()
 {
     GetComponent <Text>().text = "Se guarda en: " + Application.persistentDataPath + " Codigo: " + DiagramKeeper.GetCurrDiagramCode();
 }