示例#1
0
 public MoveVertical(
     Expr moveExpr,
     Expr targetExpr,
     BeforeAfter beforeAfter)
 {
     _moveExpr    = moveExpr;
     _targetExpr  = targetExpr;
     _beforeAfter = beforeAfter;
 }
        /// <summary>
        /// Check if detected new startup
        /// </summary>
        /// <returns>detected</returns>
        // -------------------------------------------------------------------------------------------------------
        public bool checkIfDetectedNewStartup(BeforeAfter ba)
        {
            if (ba == BeforeAfter.Before)
            {
                return(this.m_detectedNewStartupObjectBefore);
            }

            else
            {
                return(this.m_detectedNewStartupObjectAfter);
            }
        }
示例#3
0
        public override string ToString()
        {
            return "GLUCOSE ENTRY:"
                + "\nId: " + Id
                + "\nPatient: " + UserName
                //+ "\nUserId: " + UserId
                + "\nMeasurement: " + Measurement
                + "\nBefore/After: " + BeforeAfter.ToString()
                + "\nWhich meal: " + WhichMeal.ToString()
                + "\nCreatedAt: " + CreatedAt
                + "\nUpdatedAt: " + UpdatedAt
                + "\nTimestamp: " + Timestamp;

        } // ToString
示例#4
0
        public ActionResult EditAction([Bind(Include = "A_ID,q_ID,states,action,triggerID,TableType,done,DoneDate")] Answers_tbl ans_tbl)
        {
            if (ModelState.IsValid)
            {
                if (ans_tbl.done)
                {
                    ans_tbl.DoneDate = DateTime.Now;
                }
                if (!ans_tbl.states)
                {
                    ans_tbl.action = null;
                    ans_tbl.done   = true;
                }

                db.Entry(ans_tbl).State = EntityState.Modified;
                db.SaveChanges();
                long id = ans_tbl.triggerID;

                Triggers_tbl       trg = db.Triggers_tbl.Find(id);
                Summary_tbl        summ;
                BeforeAfter        AB         = new BeforeAfter();
                List <Answers_tbl> BeforeList = AB.Before_tr(trg.line, ans_tbl.TableType, trg.shift, DateTime.Now);
                List <Answers_tbl> AfterList  = AB.After_tr(trg.line, ans_tbl.TableType, trg.shift, DateTime.Now);

                if (db.Summary_tbl.Any(s => s.TrigID == id))
                {
                    summ                 = db.Summary_tbl.Where(s => s.TrigID == id).FirstOrDefault();
                    summ.LastEdited      = DateTime.Now;
                    summ.SafetyBefore    = BeforeList.Any();
                    summ.SafetyAfter     = AfterList.Any();
                    db.Entry(summ).State = EntityState.Modified;
                    db.SaveChanges();
                }
                else
                {
                    summ              = new Summary_tbl();
                    summ.TrigID       = id;
                    summ.Inserted     = DateTime.Now;
                    summ.SafetyBefore = BeforeList.Any();
                    summ.SafetyAfter  = AfterList.Any();
                    db.Summary_tbl.Add(summ);
                    db.SaveChanges();
                }
                return(RedirectToAction("Index", new { TID = id }));
            }
            ViewBag.SqID      = new SelectList(db.Questions_tbl, "q_Id", "question", ans_tbl.q_ID);
            ViewBag.TriggerID = new SelectList(db.Triggers_tbl, "triggerID", "shift", ans_tbl.triggerID);
            return(View(ans_tbl));
        }
示例#5
0
        public ActionResult Index([Bind(Include = "A_ID,q_ID,states,action,done,triggerID,TableType")] List <Answers_tbl> Actions_tbl, long TID)
        {
            if (ModelState.IsValid)
            {
                foreach (var table in Actions_tbl)
                {
                    if (table.done)
                    {
                        table.DoneDate    = DateTime.Now;
                        table.DoneTrigger = TID;
                    }

                    db.Entry(table).State = EntityState.Modified;
                    db.SaveChanges();
                }

                long id = TID;

                Triggers_tbl       trg = db.Triggers_tbl.Find(id);
                Summary_tbl        summ;
                BeforeAfter        AB         = new BeforeAfter();
                List <Answers_tbl> BeforeList = AB.Before_tr(trg.line, Actions_tbl[0].TableType, trg.shift, DateTime.Now);
                List <Answers_tbl> AfterList  = AB.After_tr(trg.line, Actions_tbl[0].TableType, trg.shift, DateTime.Now);

                if (db.Summary_tbl.Any(s => s.TrigID == id))
                {
                    summ                 = db.Summary_tbl.Where(s => s.TrigID == id).FirstOrDefault();
                    summ.LastEdited      = DateTime.Now;
                    summ.SafetyBefore    = BeforeList.Any();
                    summ.SafetyAfter     = AfterList.Any();
                    db.Entry(summ).State = EntityState.Modified;
                    db.SaveChanges();
                }
                else
                {
                    summ              = new Summary_tbl();
                    summ.TrigID       = id;
                    summ.Inserted     = DateTime.Now;
                    summ.SafetyBefore = BeforeList.Any();
                    summ.SafetyAfter  = AfterList.Any();
                    db.Summary_tbl.Add(summ);
                    db.SaveChanges();
                }

                return(RedirectToAction("Index", new { TID = id }));
            }
            ViewBag.message = "Not Saved";
            return(View(Actions_tbl));
        }
示例#6
0
 protected override void OnModelCreating(ModelBuilder modelBuilder)
 {
     LandingRequest.Build(modelBuilder);
     Notice.Build(modelBuilder);
     Broadcast.Build(modelBuilder);
     IdelStar.Build(modelBuilder);
     PressCoverage.Build(modelBuilder);
     IdelTV.Build(modelBuilder);
     IdelEvent.Build(modelBuilder);
     User.Build(modelBuilder);
     Counseling.Build(modelBuilder);
     Reservation.Build(modelBuilder);
     BeforeAfter.Build(modelBuilder);
     Manager.Build(modelBuilder);
     MainSlide.Build(modelBuilder);
     base.OnModelCreating(modelBuilder);
 }
示例#7
0
        /// <summary>
        /// Start IEnumerator startups
        /// </summary>
        /// <param name="ba">BeforeAfter</param>
        /// <returns>IEnumerator</returns>
        // -------------------------------------------------------------------------------------------------------
        public IEnumerator startIEnumerator(BeforeAfter ba)
        {
            var list = (ba == BeforeAfter.Before) ? this.m_iesListBefore : this.m_iesListAfter;

            if (list.Count <= 0 || !this.hasNotYetContent(ba))
            {
                yield break;
            }

            // ---------------

            // clearErrorForRestart
            {
                this.clearErrorForRestart();
            }

            // StartCoroutine
            {
                for (int i = 0; i < this.m_numberOfCo; i++)
                {
                    StartCoroutine(this.startIEnumeratorSub(ba));
                }
            }

            // wait 1 frame
            {
                yield return(null);
            }

            // wait coroutines
            {
                WaitForSeconds wfs = new WaitForSeconds(0.1f);

                while (list.Find(x => x.currentWorkingState == StartupContents.WorkingState.NowWorking) != null)
                {
                    yield return(wfs);
                }
            }
        }
示例#8
0
        public ActionResult AddAction([Bind(Include = "q_ID,states,action,done,triggerID,TableType")] Answers_tbl answer)
        {
            if (ModelState.IsValid)
            {
                db.Answers_tbl.Add(answer);
                db.SaveChanges();

                long               id  = answer.triggerID;
                Triggers_tbl       trg = db.Triggers_tbl.Find(id);
                Summary_tbl        summ;
                BeforeAfter        AB         = new BeforeAfter();
                List <Answers_tbl> BeforeList = AB.Before_tr(trg.line, answer.TableType, trg.shift, DateTime.Now);
                List <Answers_tbl> AfterList  = AB.After_tr(trg.line, answer.TableType, trg.shift, DateTime.Now);

                if (db.Summary_tbl.Any(s => s.TrigID == id))
                {
                    summ                 = db.Summary_tbl.Where(s => s.TrigID == id).FirstOrDefault();
                    summ.LastEdited      = DateTime.Now;
                    summ.SafetyBefore    = BeforeList.Any();
                    summ.SafetyAfter     = AfterList.Any();
                    db.Entry(summ).State = EntityState.Modified;
                    db.SaveChanges();
                }
                else
                {
                    summ              = new Summary_tbl();
                    summ.TrigID       = id;
                    summ.Inserted     = DateTime.Now;
                    summ.SafetyBefore = BeforeList.Any();
                    summ.SafetyAfter  = AfterList.Any();
                    db.Summary_tbl.Add(summ);
                    db.SaveChanges();
                }

                return(RedirectToAction("Index", new { TID = id }));
            }
            return(View());
        }
示例#9
0
        public async Task <IActionResult> Detail(int?id)
        {
            var item = default(BeforeAfter);

            if (id == null)
            {
                item = new BeforeAfter
                {
                    Id = -1
                };
            }
            else
            {
                item = await this.Db.BeforeAfters
                       .FirstOrDefaultAsync(x => x.Id == id.Value);
            }

            if (item == null)
            {
                return(NotFound());
            }

            return(View(item));
        }
        public ActionResult Create([Bind(Include = "A_ID,q_ID,states,action,triggerID")] List <Answers_tbl> Quality_ans_tbls)
        {
            if (ModelState.IsValid)
            {
                foreach (var table in Quality_ans_tbls)
                {
                    table.TableType = "Quality";
                    table.done      = !table.states;
                    if (table.states)
                    {
                        string entireString = table.action;
                        if (entireString == null)
                        {
                            entireString = "";
                            db.Answers_tbl.Add(table);
                            db.SaveChanges();
                        }
                        foreach (var myString in entireString.Split(new string[] { "\n", "\r\n" }, StringSplitOptions.RemoveEmptyEntries))
                        {
                            var record = table;
                            record.action = myString;
                            db.Answers_tbl.Add(record);
                            db.SaveChanges();
                        }
                    }
                    else
                    {
                        table.action = null;
                        db.Answers_tbl.Add(table);
                        db.SaveChanges();
                    }
                }
                long         id  = Quality_ans_tbls[0].triggerID;
                Triggers_tbl trg = db.Triggers_tbl.Find(id);

                Summary_tbl        summ;
                BeforeAfter        AB         = new BeforeAfter();
                List <Answers_tbl> BeforeList = AB.Before_tr(trg.line, "Quality", trg.shift, DateTime.Now);
                List <Answers_tbl> AfterList  = AB.After_tr(trg.line, "Quality", trg.shift, DateTime.Now);


                if (db.Summary_tbl.Any(s => s.TrigID == id))
                {
                    summ                 = db.Summary_tbl.Where(s => s.TrigID == id).FirstOrDefault();
                    summ.LastEdited      = DateTime.Now;
                    summ.QualityBefore   = BeforeList.Any();
                    summ.QualityAfter    = AfterList.Any();
                    db.Entry(summ).State = EntityState.Modified;
                    db.SaveChanges();

                    return(RedirectToAction("Index", new { T_ID = id }));
                }
                else
                {
                    summ               = new Summary_tbl();
                    summ.TrigID        = id;
                    summ.Inserted      = DateTime.Now;
                    summ.QualityBefore = BeforeList.Any();
                    summ.QualityAfter  = AfterList.Any();
                    db.Summary_tbl.Add(summ);
                    db.SaveChanges();
                    return(RedirectToAction("Index", "Operator", new { TID = id }));
                }
            }

            var validq = db.Questions_tbl.Where(a => a.Available == true).Select(q => q.question);

            ViewBag.Sq    = validq.ToArray();
            ViewBag.count = validq.Count();

            return(View(Quality_ans_tbls));
        }
        //TODO: DisplaySearchResults Method
        public ActionResult DisplaySearchResults(String SearchString, String ReleaseYearString, BeforeAfter BeforeAfter, MPAARating MPAARating, List <int> SelectedGenres, String RatingString, String ActorString)
        {
            // create query
            var query = from m in db.Movies
                        select m;

            // TODO: make sure genre search is working, what does this do??
            if (SelectedGenres != null)
            {
                List <Genre> SelGenres = new List <Genre>();
                foreach (Genre item in db.Genres)
                {
                    if (SelectedGenres.Contains(item.GenreID))
                    {
                        SelGenres.Add(item);
                    }
                }
            }



            // search conditions
            if (SearchString != null)
            {
                query = query.Where(m => m.Title.Contains(SearchString));
            }

            if (ReleaseYearString != null && ReleaseYearString != "")
            {
                try // ensure release year entry is valid
                {
                    Int32 intReleaseYear = Convert.ToInt32(ReleaseYearString);

                    if (BeforeAfter == BeforeAfter.After)
                    {
                        query = query.Where(m => m.ReleaseDate.Year >= intReleaseYear);
                    }

                    if (BeforeAfter == BeforeAfter.Before)
                    {
                        query = query.Where(m => m.ReleaseDate.Year <= intReleaseYear);
                    }
                }
                catch // invalid, display error
                {
                    ViewBag.ReleaseYearErrorMessage = "You must enter a valid number to search by Year";
                    //TODO: Create viewbag with all genres
                    return(View("DetailedSearch"));
                }
            }

            if (MPAARating != MPAARating.All)
            {
                if (MPAARating == MPAARating.G)
                {
                    query = query.Where(m => m.MPAARating == MPAARating.G);
                }
                if (MPAARating == MPAARating.PG)
                {
                    query = query.Where(m => m.MPAARating == MPAARating.PG);
                }
                if (MPAARating == MPAARating.PG13)
                {
                    query = query.Where(m => m.MPAARating == MPAARating.PG13);
                }
                if (MPAARating == MPAARating.R)
                {
                    query = query.Where(m => m.MPAARating == MPAARating.R);
                }
                if (MPAARating == MPAARating.NC17)
                {
                    query = query.Where(m => m.MPAARating == MPAARating.NC17);
                }
            }

            if (SelectedGenres != null)
            {
                if (SelectedGenres.Count != 0)
                {
                    query = query.Where(r => r.Genres.Any(x => SelectedGenres.Contains(x.GenreID)));
                }
            }


            if (RatingString != null && RatingString != "")
            {
                try // ensure rating entry is valid
                {
                    Decimal decRating = Convert.ToDecimal(RatingString);

                    query = query.Where(m => m.CustomerRatingAverage >= decRating);
                }
                catch // invalid, display error
                {
                    ViewBag.RatingErrorMessage = "You must enter a valid number to search by Rating";
                    //TODO: Create viewbag with all genres
                    return(View("DetailedSearch"));
                }
            }

            //TODO: Actor string detailed search will need to be found
            if (ActorString != null)
            {
                query = query.Where(m => m.Actors.Contains(ActorString));
            }

            List <Movie> MoviesToDisplay = new List <Movie>();

            MoviesToDisplay = query.ToList();

            MoviesToDisplay.OrderByDescending(m => m.CustomerRatingAverage);
            ViewBag.TotalMovies    = db.Movies.Count();
            ViewBag.SelectedMovies = MoviesToDisplay.Count();

            return(View("Index", MoviesToDisplay));
        }
示例#12
0
        public async Task <IActionResult> Update(
            int id, string category, string title, string comment,
            IFormFile beforefront, IFormFile beforehalf, IFormFile beforeside,
            IFormFile afterfront, IFormFile afterhalf, IFormFile afterside)
        {
            try
            {
                if (string.IsNullOrWhiteSpace(category))
                {
                    throw new Exception("카테고리를 선택하세요");
                }
                if (string.IsNullOrWhiteSpace(title))
                {
                    throw new Exception("제목을 입력하세요");
                }
                if (string.IsNullOrWhiteSpace(comment))
                {
                    throw new Exception("간략소개글을 입력하세요");
                }

                var item = default(BeforeAfter);

                if (id <= 0)
                {
                    if (beforefront == null ||
                        beforehalf == null ||
                        beforeside == null ||
                        afterfront == null ||
                        afterhalf == null ||
                        afterside == null)
                    {
                        throw new Exception("이미지는 모두 선택해야 합니다.");
                    }

                    item = new BeforeAfter
                    {
                        CreateTime = DateTime.Now
                    };
                    await this.Db.AddAsync(item);
                }
                else
                {
                    item = await this.Db.BeforeAfters
                           .FirstOrDefaultAsync(x => x.Id == id);
                }

                item.Category = category;
                item.Title    = title;
                item.Comment  = comment;

                if (beforefront != null)
                {
                    var savefile = new FileInfo(Path.Combine(
                                                    Env.WebRootPath,
                                                    "images",
                                                    "upload",
                                                    "beforeafter",
                                                    DateTime.Now.ToString("yyyyMMddHHmmss_") + new FileInfo(beforefront.FileName).Name));

                    var url = savefile.FullName.Replace(Env.WebRootPath, $"http://{Request.Host.ToString()}").Replace("\\", "/");

                    if (!savefile.Directory.Exists)
                    {
                        savefile.Directory.Create();
                    }

                    using (var fileStream = new FileStream(savefile.FullName, FileMode.Create))
                    {
                        await beforefront.OpenReadStream().CopyToAsync(fileStream);
                    }

                    item.BeforeFront = url;
                }

                if (beforehalf != null)
                {
                    var savefile = new FileInfo(Path.Combine(
                                                    Env.WebRootPath,
                                                    "images",
                                                    "upload",
                                                    "beforeafter",
                                                    DateTime.Now.ToString("yyyyMMddHHmmss_") + new FileInfo(beforehalf.FileName).Name));

                    var url = savefile.FullName.Replace(Env.WebRootPath, $"http://{Request.Host.ToString()}").Replace("\\", "/");

                    if (!savefile.Directory.Exists)
                    {
                        savefile.Directory.Create();
                    }

                    using (var fileStream = new FileStream(savefile.FullName, FileMode.Create))
                    {
                        await beforehalf.OpenReadStream().CopyToAsync(fileStream);
                    }

                    item.BeforeHalf = url;
                }

                if (beforeside != null)
                {
                    var savefile = new FileInfo(Path.Combine(
                                                    Env.WebRootPath,
                                                    "images",
                                                    "upload",
                                                    "beforeafter",
                                                    DateTime.Now.ToString("yyyyMMddHHmmss_") + new FileInfo(beforeside.FileName).Name));

                    var url = savefile.FullName.Replace(Env.WebRootPath, $"http://{Request.Host.ToString()}").Replace("\\", "/");

                    if (!savefile.Directory.Exists)
                    {
                        savefile.Directory.Create();
                    }

                    using (var fileStream = new FileStream(savefile.FullName, FileMode.Create))
                    {
                        await beforeside.OpenReadStream().CopyToAsync(fileStream);
                    }

                    item.BeforeSide = url;
                }

                if (afterfront != null)
                {
                    var savefile = new FileInfo(Path.Combine(
                                                    Env.WebRootPath,
                                                    "images",
                                                    "upload",
                                                    "beforeafter",
                                                    DateTime.Now.ToString("yyyyMMddHHmmss_") + new FileInfo(afterfront.FileName).Name));

                    var url = savefile.FullName.Replace(Env.WebRootPath, $"http://{Request.Host.ToString()}").Replace("\\", "/");

                    if (!savefile.Directory.Exists)
                    {
                        savefile.Directory.Create();
                    }

                    using (var fileStream = new FileStream(savefile.FullName, FileMode.Create))
                    {
                        await afterfront.OpenReadStream().CopyToAsync(fileStream);
                    }

                    item.AfterFront = url;
                }

                if (afterhalf != null)
                {
                    var savefile = new FileInfo(Path.Combine(
                                                    Env.WebRootPath,
                                                    "images",
                                                    "upload",
                                                    "beforeafter",
                                                    DateTime.Now.ToString("yyyyMMddHHmmss_") + new FileInfo(afterhalf.FileName).Name));

                    var url = savefile.FullName.Replace(Env.WebRootPath, $"http://{Request.Host.ToString()}").Replace("\\", "/");

                    if (!savefile.Directory.Exists)
                    {
                        savefile.Directory.Create();
                    }

                    using (var fileStream = new FileStream(savefile.FullName, FileMode.Create))
                    {
                        await afterhalf.OpenReadStream().CopyToAsync(fileStream);
                    }

                    item.AfterHalf = url;
                }

                if (afterside != null)
                {
                    var savefile = new FileInfo(Path.Combine(
                                                    Env.WebRootPath,
                                                    "images",
                                                    "upload",
                                                    "beforeafter",
                                                    DateTime.Now.ToString("yyyyMMddHHmmss_") + new FileInfo(afterside.FileName).Name));

                    var url = savefile.FullName.Replace(Env.WebRootPath, $"http://{Request.Host.ToString()}").Replace("\\", "/");

                    if (!savefile.Directory.Exists)
                    {
                        savefile.Directory.Create();
                    }

                    using (var fileStream = new FileStream(savefile.FullName, FileMode.Create))
                    {
                        await afterside.OpenReadStream().CopyToAsync(fileStream);
                    }

                    item.AfterSide = url;
                }

                await this.Db.SaveChangesAsync();

                return(Json(new { status = true }));
            }
            catch (Exception ex)
            {
                return(Json(new { status = false, message = ex.Message }));
            }
        }
示例#13
0
        /// <summary>
        /// Start IEnumerator startups sub
        /// </summary>
        /// <param name="ba">BeforeAfter</param>
        /// <returns>IEnumerator</returns>
        // -------------------------------------------------------------------------------------------------------
        protected IEnumerator startIEnumeratorSub(BeforeAfter ba)
        {
            var list = (ba == BeforeAfter.Before) ? this.m_iesListBefore : this.m_iesListAfter;

            int size = list.Count;

            IeStartupContents ies = null;

            // ----------------------

            for (int i = 0; i < size; i++)
            {
                // hasError break
                {
                    if (this.hasError())
                    {
                        break;
                    }
                }

                // ----------------------

                ies = list[i];

                // ----------------------

                // continue if not NotYet
                {
                    if (ies.currentWorkingState != StartupContents.WorkingState.NotYet)
                    {
                        continue;
                    }
                }

                // ----------------------

                // NowWorking
                {
                    ies.currentWorkingState = StartupContents.WorkingState.NowWorking;
                }

                // startup
                {
                    yield return(ies.startup);
                }

                // updateError
                {
                    ies.errorMessage = (ies.errorMessageFunc != null) ? ies.errorMessageFunc() : "";

                    if (!string.IsNullOrEmpty(ies.errorMessage))
                    {
                        this.updateError(ies);
                    }
                }

                // DoneSuccessOrError
                {
                    ies.currentWorkingState = StartupContents.WorkingState.DoneSuccessOrError;
                }
            }
        }
示例#14
0
 public MoveVerticalM(Cursor targetCursor, BeforeAfter aboveBelow)
 {
     _targetCursor = targetCursor;
     _aboveBelow   = aboveBelow;
 }
示例#15
0
 /// <summary>
 /// Has NotYet content
 /// </summary>
 /// <returns>detected</returns>
 // -------------------------------------------------------------------------------------------------------
 public bool hasNotYetContent(BeforeAfter ba)
 {
     return(this.properList(ba).Find(x => x.currentWorkingState == StartupContents.WorkingState.NotYet) != null);
 }
示例#16
0
 /// <summary>
 /// Get proper list
 /// </summary>
 /// <param name="ba">BeforeAfter</param>
 /// <returns>list</returns>
 // -------------------------------------------------------------------------------------------------------
 protected List <IeStartupContents> properList(BeforeAfter ba)
 {
     return((ba == BeforeAfter.Before) ? this.m_iesListBefore : this.m_iesListAfter);
 }
示例#17
0
        /// <summary>
        /// Add startup data
        /// </summary>
        /// <param name="startup">startup</param>
        /// <param name="progress">progress</param>
        /// <param name="ba">before or after</param>
        // -------------------------------------------------------------------------------------------------------
        public void addSceneStartupIEnumerator(IEnumerator startup, Func <float> progress, Func <string> error, BeforeAfter ba)
        {
            if (startup == null)
            {
#if UNITY_EDITOR
                Debug.LogWarning("startup == null");
#endif

                return;
            }

            // -------------------------------

            if (ba == BeforeAfter.Before)
            {
                this.m_iesListBefore.Add(new IeStartupContents(startup, progress, error));
            }

            else
            {
                this.m_iesListAfter.Add(new IeStartupContents(startup, progress, error));
            }
        }
        /// <summary>
        /// Start IEnumerator startups
        /// </summary>
        /// <param name="ba">BeforeAfter</param>
        /// <returns>IEnumerator</returns>
        // -------------------------------------------------------------------------------------------------------
        public IEnumerator startIEnumerator(BeforeAfter ba)
        {
            yield return(null);


            // m_detectedNewStartupObject
            {
                if (ba == BeforeAfter.Before)
                {
                    this.m_detectedNewStartupObjectBefore = false;
                }

                else
                {
                    this.m_detectedNewStartupObjectAfter = false;
                }
            }

            // clear error
            {
                this.setError("");
            }

            List <IeStruct> list = (ba == BeforeAfter.Before) ? this.m_iesListBefore : this.m_iesListAfter;

            int listCount        = list.Count;
            int listIndex        = 0;
            int workingCoCounter = 0;

            while (listIndex < listCount)
            {
                if (this.hasError())
                {
                    break;
                }

                // -------------

                if (workingCoCounter < this.m_numberOfCo)
                {
                    IeStruct ies = list[listIndex++];

                    if (!ies.doneSuccess)
                    {
                        workingCoCounter++;

                        StartCoroutine(this.startIEnumeratorInternal(ies, () =>
                        {
                            workingCoCounter--;
                        }));
                    }
                }

                yield return(null);
            }

            while (workingCoCounter > 0)
            {
                yield return(null);
            }
        }
        /// <summary>
        /// Add startup data
        /// </summary>
        /// <param name="iess">IEnumeratorStartupScript</param>
        /// <param name="ba">before or after</param>
        // -------------------------------------------------------------------------------------------------------
        public void addSceneStartupIEnumerator(IEnumerator startup, Func <float> progress, Func <string> error, BeforeAfter ba)
        {
            if (startup == null)
            {
                Debug.LogWarning("startup == null");
                return;
            }

            // -------------------------------

            if (ba == BeforeAfter.Before)
            {
                this.m_iesListBefore.Add(new IeStruct(startup, progress, error));
                this.m_detectedNewStartupObjectBefore = true;
            }

            else
            {
                this.m_iesListAfter.Add(new IeStruct(startup, progress, error));
                this.m_detectedNewStartupObjectAfter = true;
            }
        }