using System; using System.Collections.Generic; using System.Text; namespace ConsoleApplication1 { static class ContentProcessor { static public bool isRunning = true; static public void GetInput() { Console.WriteLine(); Console.Write(">>"); string command = Console.ReadLine(); CheckInput(command); } static private void CheckInput(string line) { Array commands = line.Split(' '); switch (commands.GetValue(0)) { case "displayNodes": NodeManager.DisplayNodes(); break; case "sphere": NodeManager.addToList(NodeManager.GetNodeName(commands.GetValue(1)), "sphere"); break; case "light": NodeManager.addToList(NodeManager.GetNodeName(commands.GetValue(1)), "light"); break; case "quit": isRunning = false; break; case "help": displayHelp(); break; case "parent": Console.WriteLine("Parent " + commands.GetValue(1) +" WITH " + commands.GetValue(2)); break; default: Console.WriteLine("Unknown Command... " + commands.GetValue(0)); break; } } static private void displayHelp() { Console.WriteLine("Help Menu:"); Console.WriteLine("----------"); Console.WriteLine("displayNodes - Displays the list of nodes in their heirarchial form"); Console.WriteLine("sphere - Creates a sphere node"); Console.WriteLine("light - Creates a light node"); Console.WriteLine("parent nodeName1 nodeName2 - Makes nodeName2 the parent of nodeName1"); Console.WriteLine("delete nodeName - deletes nodeName"); Console.WriteLine("rename oldNodeName newNodeName - Renames oldNodeName to newNodeName"); Console.WriteLine("quit - Quits the application"); Console.WriteLine("---------"); } static private void seperateCommand(string command) { } } }