//Scenes static public void RoomMovement(string origin, string destination) { ActionData newAction = new ActionData(); newAction.Add("Origin", origin); newAction.Add("Destination", destination); instance.dataLog.actions.Add(new Tuple <string, ActionData>("RoomMovement", newAction)); }
static public void OpenDiagram(string room, string diagramCode) { ActionData newAction = new ActionData(); newAction.Add("Room", room); newAction.Add("DiagramCode", diagramCode); instance.dataLog.actions.Add(new Tuple <string, ActionData>("OpenDiagram", 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)); }
//Starting Log public void LogData() { ActionData newAction = new ActionData(); string date_time = DateTime.UtcNow.ToString("dd/MM/yyyy H:mm:ss (zzz)"); newAction.Add("CaseID", playerCaseId); newAction.Add("DateTime", date_time); instance.dataLog.actions.Add(new Tuple <string, ActionData>("LogGeneralData", newAction)); }
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 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 ChangeMessageState(MessageData message, string oldState) { ActionData newAction = new ActionData(); newAction.Add("Sender", message.entityCode); newAction.Add("Message", message.message); newAction.Add("oldState", oldState); newAction.Add("newState", message.state.ToString()); instance.dataLog.actions.Add(new Tuple <string, ActionData>("ChangeMessageState", 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)); }
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)); }
static public void SeeMessages(string sender) { ActionData newAction = new ActionData(); newAction.Add("Sender", sender); instance.dataLog.actions.Add(new Tuple <string, ActionData>("SeeMessages", newAction)); }
protected static bool LoadSocialData(BooterHelper.DocumentBootFile socialData) { if (!socialData.IsValid) { BooterLogger.AddError(socialData + ": Unknown SocialData File"); return(false); } XmlElementLookup lookup = new XmlElementLookup(socialData.Document); List <XmlElement> actions = lookup["Action"]; if ((actions == null) || (actions.Count == 0)) { BooterLogger.AddError(socialData + ": No Action"); return(false); } bool isEp5Installed = GameUtils.IsInstalled(ProductVersion.EP5); foreach (XmlElement element in actions) { XmlElementLookup table = new XmlElementLookup(element); CommodityTypes types; ParserFunctions.TryParseEnum <CommodityTypes>(element.GetAttribute("com"), out types, CommodityTypes.Undefined); ProductVersion version; ParserFunctions.TryParseEnum <ProductVersion>(element.GetAttribute("ver"), out version, ProductVersion.BaseGame); ActionData data = new ActionData(element.GetAttribute("key"), types, version, table, isEp5Installed); List <XmlElement> list = table["LHS"]; if (list.Count > 0x0) { SocialRuleLHS.sDictionary.Remove(data.Key); foreach (XmlElement element3 in list) { SocialRuleLHS lhs = new SocialRuleLHS(data.Key, data.IntendedCommodityString, element3); lhs.ProceduralPrecondition = FindMethod(element3.GetAttribute("ProcTest")); } SocialRuleLHS.Get(data.Key).Sort(new Comparison <SocialRuleLHS>(SocialRuleLHS.SortSocialRules)); } ActionData.Add(data); BooterLogger.AddTrace(" " + data.Key + " Added"); } return(true); }
public static void LoadSocialData(string spreadsheet) { XmlDocument root = Simulator.LoadXML(spreadsheet); bool isEp5Installed = GameUtils.IsInstalled(ProductVersion.EP5); if (spreadsheet != null) { XmlElementLookup lookup = new XmlElementLookup(root); List <XmlElement> list = lookup["Action"]; foreach (XmlElement element in list) { CommodityTypes types; XmlElementLookup table = new XmlElementLookup(element); ParserFunctions.TryParseEnum <CommodityTypes>(element.GetAttribute("com"), out types, CommodityTypes.Undefined); ActionData data = new ActionData(element.GetAttribute("key"), types, ProductVersion.BaseGame, table, isEp5Installed); ActionData.Add(data); } } }