Пример #1
0
        public static List <AstroQueue> Clone(List <AstroQueueImpl> astroQueues)
        {
            List <AstroQueue> astroQueueTemps = new List <AstroQueue>();
            AstroQueue        temp            = null;

            astroQueues.ForEach(q => {
                temp        = new AstroQueue();
                temp.Id     = q.Id;
                temp.User   = q.User;
                temp.Target = q.Target;
                temp.Target.exposedHistory.Clear();
                astroQueueTemps.Add(temp);
            });

            return(astroQueueTemps);
        }
Пример #2
0
        public static List <ExposureInfo> generate(AstroQueue task)
        {
            /*
             *
             *          SORT = 1, //R R R G G G B B B
             *          SEQUENCE = 2, // R G B   R G B
             *
             */
            List <ExposureInfo> exposeJobs = new List <ExposureInfo>();

            if (task.Target.filterMode == FILTER_MODE.SORT)
            {
                foreach (ExposureInfo exposeInfo in task.Target.exposureInfo)
                {
                    for (int i = 0; i < exposeInfo.exposureAmount; ++i)
                    {
                        exposeJobs.Add(exposeInfo);
                    }
                }
            }
            else if (task.Target.filterMode == FILTER_MODE.SEQUENCE)
            {
                while (true)
                {
                    Boolean isComplete = false;

                    foreach (ExposureInfo exposeInfo in task.Target.exposureInfo)
                    {
                        if (exposeInfo.exposureAmount > exposeJobs.Where(x => x.filterName == exposeInfo.filterName).Count())
                        {
                            exposeJobs.Add(exposeInfo);
                            //--exposeInfo.exposureAmount;
                            isComplete = true;
                        }
                    }

                    if (!isComplete)
                    {
                        break;
                    }
                }
            }

            return(exposeJobs);
        }