Example #1
0
 public ActionResult Config(ConfigModel Model)
 {
     if (ModelState.IsValid)
     {
         ViewBag.Message = "Setting saved.";
         ConfigHelper.SaveConfig(Model);
         FaceBusiness.Initialize();
     }
     return(View(Model));
 }
Example #2
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();

            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);

            ConfigHelper.SetConfigFile(Server.MapPath("~/Config.xml"));
            SimpleLog.SetLogFolder(Server.MapPath("~/Content/Log/TextLog"));

            FaceBusiness.Initialize();
            FaceBusiness.SetXMLPath(Server.MapPath("~/"));
            FaceBusiness.SetTrainingFolderPath(Server.MapPath("~/Content/Training Data"));

            //Bat dau set cai scheduler
            PathHolder.TempPath = Server.MapPath("~/Content/Temp/");
            PathHolder.LogoPath = Server.MapPath("~/Content/") + "png-logo_resize.png";
            // PathHolder.LogoPath = Server.MapPath("~/Content/") + "fu_logo_edited.png";

            TaskManager.Initialize(new MyRegistry());
            TaskManager.UnobservedTaskException += TaskManager_UnobservedTaskException;
        }