public void Run() { string[] _readlines = InputFromFile.Read(InputFileNamePath); List <Talk> _talkList = CreateTalkList(_readlines); //create a sorted (ascending) list of all the Talks in it List <ConferenceTrack> _conferenceTrack = CreateTracks(this.NumberOfTracks); //create empty Conference Tracks based on input NumberOfTracks Scheduler(_talkList, _conferenceTrack); //schedule the final program by allocating talk based on the available timeslots WriteOutput(_conferenceTrack, OutputFileNamePath); //write the final program in ConferenceProgram.txt file }
public void Menu() { bool exit = false; while (!exit) { Console.WriteLine($"\t\t\tGraph Menu\n" + $"\t1.Input Graph\n" + $"\t2.Output Graph\n" + $"\t3.SearchOfShortestPath(Deijkstra)\n" + $"\t4.BreadthFirstSearch\n" + $"\t5.DepthFirstSearch\n" + $"\t6.InputFromFile\n" + $"\t7.OutputInFile\n" + $"\t8.IsGraphDictyledonous\n" + $"\t9.Close road\n" + $"\tAnother.Exit\n"); var keyInfo = Console.ReadKey(); Console.WriteLine(); switch (keyInfo.Key) { case ConsoleKey.D1: InputOfGraph.Invoke(this, EventArgs.Empty); break; case ConsoleKey.D2: OutputOfGraph.Invoke(this, EventArgs.Empty); break; case ConsoleKey.D3: SearchOfPath.Invoke(this, EventArgs.Empty); break; case ConsoleKey.D4: BreadthFirstSearch.Invoke(this, EventArgs.Empty); break; case ConsoleKey.D5: DepthFirstSearch.Invoke(this, EventArgs.Empty); break; case ConsoleKey.D6: InputFromFile.Invoke(this, EventArgs.Empty); break; case ConsoleKey.D7: OutputInFile.Invoke(this, EventArgs.Empty); break; case ConsoleKey.D8: IsGraphDictyledonous.Invoke(this, EventArgs.Empty); break; case ConsoleKey.D9: IsRoadsClosed.Invoke(this, EventArgs.Empty); break; default: exit = true; break; } Console.ReadKey(); Console.Clear(); } }
public InputFromFileTest() { _inputFromFile = new InputFromFile(); }