Exemplo n.º 1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        //[STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Console.WriteLine("Hello!");
            Console.WriteLine(args[0]);
            XmlConfigurator.Configure(new System.IO.FileInfo(args[0]));
            IDictionary <String, string> props = new SortedList <String, String>();

            props.Add("ConnectionString", GetConnectionStringByName("labDB"));
            RepoDbContestant   repoDbContestant   = new RepoDbContestant(props);
            RepoDbOfficePers   repoDbOffice       = new RepoDbOfficePers(props);
            RepoDbRace         repoDbRace         = new RepoDbRace(props);
            RepoDbRegistration repoDbRegistration = new RepoDbRegistration(props);

            ServiceApp service = new ServiceApp(repoDbContestant, repoDbOffice, repoDbRace, repoDbRegistration);
            //repoTests repo1 = new repoTests();
            //repo1.test();

            Login login = new Login();

            login.Service = service;
            Application.Run(login);
        }
Exemplo n.º 2
0
 public ServiceApp(RepoDbContestant repoC, RepoDbOfficePers repoOp, RepoDbRace repoR, RepoDbRegistration repoReg)
 {
     this.repoC   = repoC;
     this.repoOp  = repoOp;
     this.repoR   = repoR;
     this.repoReg = repoReg;
 }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            XmlConfigurator.Configure(new System.IO.FileInfo(args[0]));
            IDictionary <String, string> props = new SortedList <String, String>();

            props.Add("ConnectionString", GetConnectionStringByName("labDB"));
            IRepoContestant    repoContestant     = new RepoDbContestant(props);
            IRepoRace          repoRace           = new RepoDbRace(props);
            IOfficePers        officePersRepo     = new RepoDbOfficePers(props);
            RepoDbRegistration repoDbRegistration = new RepoDbRegistration(props);
            IServer            serverImpl         = new ServerImpl(repoContestant, repoRace, officePersRepo, repoDbRegistration);
            SerialServer       server             = new SerialServer("127.0.0.1", 55555, serverImpl);

            server.Start();
            Console.WriteLine("Server started...");
            Console.ReadLine();
        }