예제 #1
0
        public List<ProcessDataViewModel> NewJob()
        {
            Initialize();

            var newId = processes.Max(p => p.Id) + 1;
            var processData = new ProcessDataViewModel
            {
                Id = newId,
                Name = "Process " + newId,
                Status = queued
            };

            for (int j = 0; j < 5; j++)
            {
                var processDataItem = new ProcessDataItemViewModel
                {
                    Status = queued
                };

                processData.DataItems.Add(processDataItem);
            }

            processes.Add(processData);

            return processes;
        }
예제 #2
0
        private static List<ProcessDataViewModel> BuildDummyData(int processCount, int processItemCount)
        {
            var result = new List<ProcessDataViewModel>();
            for (int i = 0; i <= processCount; i++)
            {
                var processData = new ProcessDataViewModel
                {
                    Id = i,
                    Name = "Process " + i,
                    Status = queued
                };

                for (int j = 0; j < processItemCount; j++)
                {
                    var processDataItem = new ProcessDataItemViewModel
                    {
                        Status = queued
                    };

                    processData.DataItems.Add(processDataItem);
                }

                result.Add(processData);
            }

            return result;
        }