public string NextCodeParam() { for (int i = 1; i <= int.MaxValue; i++) { string str = "NewCode" + i; if (CodeNameUnique(str)) { return(str); } } return(SWDataManager.NewGUID()); }
public string NextParam() { for (char c = 'a'; c <= 'z'; c++) { string str = "" + c; if (!ContainParam(str)) { return(str); } } return(SWDataManager.NewGUID()); }
public static void AddConnection(SWNodeBase leftNode, int leftPort, SWNodeBase rightNode, int rightPort) { //If rightNode is child node single connection limited, than remove child to this port if (rightNode.childPortSingleConnection) { while (rightNode.data.childrenPort.Contains(rightPort)) { int index = rightNode.data.childrenPort.IndexOf(rightPort); var childToRemove = SWWindowMain.Instance.NodeAll()[rightNode.data.children[index]]; RemoveConnection(rightNode, childToRemove); } } SWDataManager.AddConnection(leftNode.data, leftPort, rightNode.data, rightPort); }
public static void RemoveConnection(SWNodeBase parent, SWNodeBase child) { SWDataManager.RemoveConnection(parent.data, child.data); }
public void AssingNewID() { id = SWDataManager.NewGUID(); }
public static void Record(Object[] objs, string txt = "") { Undo.RecordObjects(objs, SWDataManager.NewGUID()); }