Ejemplo n.º 1
0
        private void fillFormLabelsWithVariablesName(int currentRow, int cloudyLevel, int pressureLevel, int precipitationLevel)
        {
            Label cloudyLabel        = this.Controls.Find("cloudy_row" + currentRow + "_label", true).FirstOrDefault() as Label;
            Label pressureLabel      = this.Controls.Find("pressure_row" + currentRow + "_label", true).FirstOrDefault() as Label;
            Label precipitationLabel = this.Controls.Find("precipitation_row" + currentRow + "_label", true).FirstOrDefault() as Label;

            cloudyLabel.Text        = Cloudy.chooseCloudyName(cloudyLevel);
            pressureLabel.Text      = Pressure.choosePressureName(pressureLevel);
            precipitationLabel.Text = Precipitation.choosePrecipitationName(precipitationLevel);
        }
Ejemplo n.º 2
0
        private void fillFormWithPrecipitationResult(Dictionary <int, double> maxOfPrecipitation)
        {
            int rowInResults = 1;

            foreach (KeyValuePair <int, double> keyValuePair in maxOfPrecipitation)
            {
                Label resultNameLabel  = this.Controls.Find("result_name_row" + rowInResults + "_label", true).FirstOrDefault() as Label;
                Label resultValueLabel = this.Controls.Find("result_value_row" + rowInResults + "_label", true).FirstOrDefault() as Label;

                resultNameLabel.Text  = "" + Precipitation.choosePrecipitationName(keyValuePair.Key);
                resultValueLabel.Text = "" + keyValuePair.Value;
                rowInResults++;
            }
        }