예제 #1
0
        public static FilaCalcResult Calculate()
        {
            int messurements = _values.Count();
            double total = 0.0;

            foreach (var value in _values)
            {
                total += value;
            }
            FilaCalcResult result = new FilaCalcResult((float)(total / messurements), messurements);
            return result;
        }
예제 #2
0
        public static FilaCalcResult Calculate()
        {
            int    messurements = _values.Count();
            double total        = 0.0;

            foreach (var value in _values)
            {
                total += value;
            }
            FilaCalcResult result = new FilaCalcResult((float)(total / messurements), messurements);

            return(result);
        }
예제 #3
0
 void RefreshDisplay()
 {
     FilamentCalculator.FilaCalcResult result = FilamentCalculator.FilaCalc.Calculate();
     lbn_currentDiameter.Text = String.Format("{0}mm", result.Averrage);
     lbn_measurements.Text    = result.Messurements.ToString();
 }