public static void addbefore(ref RakunModuleViewModel c2mother, ref RakunNodeBase c1) { foreach (RakunValueNodeViewModel node in c2mother.ModuleValues) { if (node.Input == null) { continue; } if (node.Input.BeforePoint == null) { continue; } RakunValueNodeViewModel ParentNode = node.Input.BeforePoint.ParentVM; if (ParentNode == null) { if (node.Input.BeforePoint != null) { RakunModuleViewModel ParentNodeVM = node.Input.BeforePoint.ModuleVM; RakunNodeInput inputf = Workspace.This.RakunManager.inputNode.Clone() as RakunNodeInput; inputf.rootNode.replace(inputf.rootNode.loopfunction, "NUMBER", ParentNodeVM.input); inputf.rootNode.replace(inputf.rootNode.loopfunction, "INPUTVALUE", node.ChangedName); c1 = c1 + inputf; //node.Input.BeforePoint. } continue; } RakunNodeInput input = Workspace.This.RakunManager.inputNode.Clone() as RakunNodeInput; input.rootNode.replace(input.rootNode.loopfunction, "NUMBER", ParentNode.ChangedName); input.rootNode.replace(input.rootNode.loopfunction, "INPUTVALUE", node.ChangedName); c1 = c1 + input; } }
public void AddRakunReader(string path) { if (System.IO.Path.GetFileNameWithoutExtension(path) == "IF Equal") { System.IO.StreamReader file = new System.IO.StreamReader(path); RakunNodeIf reader = new RakunNodeIf(); reader.ModuleName = System.IO.Path.GetFileNameWithoutExtension(path); reader.readXML(file.ReadToEnd()); ReaderList.Add(reader); file.Close(); } else if (System.IO.Path.GetFileNameWithoutExtension(path) == "IF Smaller") { System.IO.StreamReader file = new System.IO.StreamReader(path); RakunNodeIf reader = new RakunNodeIf(); reader.ModuleName = System.IO.Path.GetFileNameWithoutExtension(path); reader.readXML(file.ReadToEnd()); ReaderList.Add(reader); file.Close(); } else if (System.IO.Path.GetFileNameWithoutExtension(path) == "IF Bigger") { System.IO.StreamReader file = new System.IO.StreamReader(path); RakunNodeIf reader = new RakunNodeIf(); reader.ModuleName = System.IO.Path.GetFileNameWithoutExtension(path); reader.readXML(file.ReadToEnd()); ReaderList.Add(reader); file.Close(); } else if (System.IO.Path.GetFileNameWithoutExtension(path) == "IF Diffrent") { System.IO.StreamReader file = new System.IO.StreamReader(path); RakunNodeIf reader = new RakunNodeIf(); reader.ModuleName = System.IO.Path.GetFileNameWithoutExtension(path); reader.readXML(file.ReadToEnd()); ReaderList.Add(reader); file.Close(); } else if (System.IO.Path.GetFileNameWithoutExtension(path) == "IF Diffrent") { System.IO.StreamReader file = new System.IO.StreamReader(path); RakunNodeIf reader = new RakunNodeIf(); reader.ModuleName = System.IO.Path.GetFileNameWithoutExtension(path); reader.readXML(file.ReadToEnd()); ReaderList.Add(reader); file.Close(); } else if (System.IO.Path.GetFileNameWithoutExtension(path) == "Value") { System.IO.StreamReader file = new System.IO.StreamReader(path); RakunNodeInput reader = new RakunNodeInput(); reader.ModuleName = System.IO.Path.GetFileNameWithoutExtension(path); reader.readXML(file.ReadToEnd()); ReaderList.Add(reader); inputNode = reader; file.Close(); } else { System.IO.StreamReader file = new System.IO.StreamReader(path); RakunWin32.Logic.RakunNodeModule reader = new Logic.RakunNodeModule(); reader.ModuleName = System.IO.Path.GetFileNameWithoutExtension(path); reader.readXML(file.ReadToEnd()); ReaderList.Add(reader); file.Close(); } }