/// <summary>
 /// Set the visibility of ContentControl to 'Visible'
 /// </summary>
 private void ExecuteShowChartCommand()
 {
     HistoryDataChartVM = new HistoryDataChartViewModel(selectedGid);
     ShowData           = Visibility.Collapsed;
     ShowCharts         = Visibility.Visible;
     ShowForecast       = Visibility.Collapsed;
 }
        public void ObjectSelected(long gid)
        {
            selectedGid = gid;

            //Ako se nalazimo na istorijskom dijagramo izmeni podatke... radi tree view
            if (ShowCharts == Visibility.Visible)
            {
                HistoryDataChartVM = new HistoryDataChartViewModel(selectedGid);
            }

            new Thread(() =>
            {
                if (gid != -1)
                {
                    WeatherInfo tempWeather = weatherProxy.Proxy.GetCurrentWeatherDataByGlobalId(gid);

                    tempWeather.Currently.Temperature = Math.Round(tempWeather.Currently.Temperature, 2);
                    tempWeather.Currently.WindSpeed   = Math.Round(tempWeather.Currently.WindSpeed, 2);
                    tempWeather.Currently.Humidity    = Math.Round(tempWeather.Currently.Humidity, 2);
                    tempWeather.Currently.Pressure    = Math.Round(tempWeather.Currently.Pressure, 2);

                    if (tempWeather.Currently.Summary.ToUpper().Equals("CLEAR"))
                    {
                        WeatherIcon = @"../Images/WeatherConditionsSunny.png";
                    }
                    else if (tempWeather.Currently.Summary.ToUpper().Equals("OVERCAST") || tempWeather.Currently.Summary.ToUpper().Contains("CLOUD"))
                    {
                        WeatherIcon = @"../Images/WeatherConditionsOvercast.png";
                    }
                    else if (tempWeather.Currently.Summary.ToUpper().Contains("RAIN") || tempWeather.Currently.Summary.ToUpper().Contains("DRIZZLE"))
                    {
                        WeatherIcon = @"../Images/WeatherConditionsRain.png";
                    }
                    else
                    {
                        WeatherIcon = @"../Images/WindIcon.png";
                    }

                    Weather = tempWeather;

                    WeatherWidgetVisible = Visibility.Visible;

                    new Thread(() => ShowGauges()).Start();
                }
                else
                {
                    WeatherWidgetVisible = Visibility.Hidden;
                    new Thread(() => ShowGauges()).Start();
                }
            }).Start();
        }