Exemplo n.º 1
0
        // GET: Home
        public ActionResult Index()
        {
            mainModel.Initialize();
            mainModel.countImages(configModel.OutputDirectory);

            return(View(mainModel));
        }
Exemplo n.º 2
0
 /// <summary>
 /// The main View
 /// </summary>
 /// <returns></returns>
 public ActionResult Index()
 {
     ConfigModel.Initialize();
     if (MainModel.Initialize()) // check if service status is active
     {
         // wait until data changes
         SpinWait.SpinUntil(() => ConfigModel.OutputDirectory != null, 4000);
         // count num of images
         MainModel.countImages(ConfigModel.OutputDirectory);
     }
     else // if service status is not active
     {
         MainModel.NumOfImages = 0;
     }
     return(View(MainModel));
 }