static void Main(string[] args) { AppConfigSettingsFetcher f = new AppConfigSettingsFetcher(); int port = f.GetPort(); if (port == -1) { return; } ILobbyView cm = new Communicator(port); IModel m = new MasterModel(); MazePresenter presenter = new MazePresenter(m, cm); cm.StartListening(); }
/// <summary> /// Reads information from AppConfig file and initiates the View, Model and Presenter. /// View starts listening. /// </summary> /// <param name="args">The arguments.</param> static void Main(string[] args) { // Reading App.config file if (!AppSettings.Settings.ReadAllSettings(AppSettings.settings)) { Console.WriteLine("Error in app.config."); return; } // test ILobbyView lv = new Communicator(int.Parse(AppSettings.Settings["port"])); IModel m = new MasterModel(); MazePresenter presenter = new MazePresenter(m, lv); lv.StartListening(); }