コード例 #1
0
 public string NextCodeParam()
 {
     for (int i = 1; i <= int.MaxValue; i++)
     {
         string str = "NewCode" + i;
         if (CodeNameUnique(str))
         {
             return(str);
         }
     }
     return(SWDataManager.NewGUID());
 }
コード例 #2
0
 public string NextParam()
 {
     for (char c = 'a'; c <= 'z'; c++)
     {
         string str = "" + c;
         if (!ContainParam(str))
         {
             return(str);
         }
     }
     return(SWDataManager.NewGUID());
 }
コード例 #3
0
        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);
        }
コード例 #4
0
 public static void RemoveConnection(SWNodeBase parent, SWNodeBase child)
 {
     SWDataManager.RemoveConnection(parent.data, child.data);
 }
コード例 #5
0
 public void AssingNewID()
 {
     id = SWDataManager.NewGUID();
 }
コード例 #6
0
 public static void Record(Object[] objs, string txt = "")
 {
     Undo.RecordObjects(objs, SWDataManager.NewGUID());
 }