Beispiel #1
0
 public void SortSelectedBySpeedTest()
 {
     lock (serverListWriteLock)
     {
         var selectedServers = queryHandler.GetSelectedServers().ToList();
         indexHandler.SortCoreServCtrlListBySpeedTestResult(ref selectedServers);
     }
     RequireFormMainReload();
 }
Beispiel #2
0
        public bool RunSpeedTestOnSelectedServers()
        {
            if (!speedTestingBar.Install())
            {
                return(false);
            }

            var list = queryHandler.GetSelectedServers(false);

            Task.Factory.StartNew(() =>
            {
                Lib.Utils.ExecuteInParallel(list, (server) =>
                {
                    server.GetCoreCtrl().RunSpeedTest();

                    // ExecuteInParallel require a return value
                    return("");
                });

                speedTestingBar.Remove();
                MessageBox.Show(I18N.SpeedTestFinished);
            });

            return(true);
        }