Exemple #1
0
        // What mistake have I done here?
        // HINT: It wont impact the runtime in any way, but professional devs don't like this....
        private void UpdateStackPanel(Weather_Object.RootObject rootObject)
        {

            textCity.Text = rootObject.name;
            textTemp.Text = rootObject.main.temp + " C" + "\n";
            textPressure.Text = "Pressure: " + rootObject.main.pressure + " hPa" + "\n";
            textHumidity.Text = "Humidity: " + rootObject.main.humidity + " %" + "\n";
            textWindDir.Text = "Wind Speed: " + rootObject.wind.speed + " m/s" + "\n";
            textDescription.Text = rootObject.weather[0].description;
            
        }
Exemple #2
0
        private void UpdateTextBlock(Weather_Object.RootObject rootObject)
        {
            string outputString = "";
            outputString += rootObject.name + " " + rootObject.main.temp + " C" + "\n";
            outputString += "Wind Speed: " + rootObject.wind.speed + " m/s" + "\n";
            outputString += "Pressure: " + rootObject.main.pressure + " hPa" + "\n";
            outputString += "Humidity: " + rootObject.main.humidity + " %" + "\n";
            outputString += rootObject.weather[0].description;

            outputBox.Text = outputString;
        }