private void StatsTimer_Tick(object sender, EventArgs e) { if (statsLoader == null) { StatsTimer.Enabled = false; StartButton.Enabled = true; return; } PicesClassStatisticList stats = statsLoader.GetStatsAlreadyLoaded(); if (stats != null) { imageCount = 0; foreach (PicesClassStatistic stat in stats) { imageCount += stat.Count; } ImageCount.Text = imageCount.ToString("##,###,##0"); } if (statsLoader.DoneLoading) { statsLoader = null; StatsTimer.Enabled = false; StartButton.Enabled = true; } }
} /* SaveImagesToDisk2_Load */ private void StartLoadingStatusOnTotalImageCount() { statsLoader = new PlanktonClassStatisticsLoader (group, cruise, station, deployment, sipperFileName, mlClass, classKeyToUse, probMin, probMax, sizeMin, sizeMax, depthMin, depthMax ); StatsTimer.Enabled = true; // Don't want to start saving images until we are done loading stats. StartButton.Enabled = false; } /* StartLoadingStatusOnTotalImageCount */