Esempio n. 1
0
        private void LoadInputs()
        {
            if (Util.curModelDir == null)
            {
                return;
            }
            Util.ShowLoading("Načítání vstupů...", "", false);
            List <Task> tasks = new List <Task>();

            WRF.Init(new Dictionary <string, string> {
                { "mask", Util.pathSource["wrf_mask"] },
                { "mask_orp", Util.pathSource["masks"] + "Model_WRF_NMM_FLYMET.bmp" }
            }, false);

            tasks.Add(Task.Run(() => UserControlModel.Instance.EnumerationModels()));
            Task.WaitAll(tasks.ToArray());
            Util.HideLoading();
        }
Esempio n. 2
0
File: Form1.cs Progetto: jichu/Meteo
        private void Form1_Load(object sender, EventArgs e)
        {
            WRF.Init(new Dictionary <string, string> {
                { "mask", pathSource["wrf_mask"] },
                { "mask_orp", pathSource["masks"] + "Model_WRF_NMM_FLYMET.bmp" }
            });


            List <string> paths = new List <string>()
            {
                @".\models\03.png",  //@".\models\06.png"
            };

            List <Task> tasks = new List <Task>();

            foreach (string si in paths)
            {
                EnumerationModel(si);
                // tasks.Add(Task.Run(() => EnumerationModel(si)));
            }

            //Task.WaitAll(tasks.ToArray());
        }