public MainWindow()
        {
            InitializeComponent();

            EmailSheduler.Start();

            // для получения
            ip   = IPAddress.Parse("127.0.0.1");
            port = 9001;

            ep       = new IPEndPoint(ip, port);
            listener = new TcpListener(ep);
            listener.Start();

            listenerThread = new Thread(new ThreadStart(ListenerWorkItem));
            listenerThread.IsBackground = true;
            listenerThread.Start();


            //db.Users.Add(new User()
            //{

            //    FIO = "Быков Евгений",
            //    Login = "******",
            //    Password = "******"
            //});
            //db.SaveChanges();
        }
Beispiel #2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);

            EmailSheduler.Start();
        }
Beispiel #3
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            UnityConfig.RegisterComponents();

            // ----- Initialize parameters for sheduler -----

            var container = new UnityContainer();

            container.LoadConfiguration();
            IUnitOfWork     unitOfWork     = container.Resolve <IUnitOfWork>();
            IMailingService mailingService = UnityConfig.GetMailingService();

            EmailSheduler.Start(unitOfWork, mailingService);
        }