Ejemplo n.º 1
0
        public SynchronisationArticle()
        {
            this.InitializeComponent();
            Model.Local.ArticleRepository ArticleRepository = new Model.Local.ArticleRepository();
            List <Int32> ListArticle = ArticleRepository.ListIdSyncOrderByPack(true);

            this.ListCount = ListArticle.Count;

            Core.Temp.LoadListesClients();

            Context = SynchronizationContext.Current;
            this.ParallelOptions.MaxDegreeOfParallelism = MaximumThreadCount;
            this.ReportProgress(0);
            Task.Factory.StartNew(() =>
            {
                Parallel.ForEach(ListArticle, this.ParallelOptions, Sync);
            });
        }