static void Main() { Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); KeyValueConfigurationCollection settings = config.AppSettings.Settings; DbConnection connection = DbConnection.FromConfig(settings); Server server = new Server(connection); ServerConnector connector = new ServerConnector(server); Client client = new Client(connector); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new main(client)); }
/// <summary> /// Constructor for Client. /// </summary> /// <param name="conn">The server connector the client should be /// using.</param> public Client(ServerConnector conn) { this.Connector = conn; }