Esempio n. 1
0
        private void updateScreen()
        {
            WeatherResponse weatherResponse = this.weatherResponse = (WeatherResponse)g_Weather.Invoke();
            ISharedResponse sharedResponse  = g_SunRiseSet.Invoke();
            string          text            = SharedObjects.BetweenTimespans(DateTime.Now.TimeOfDay, ((SunRiseSetResponse)sharedResponse).SunRise.TimeOfDay, ((SunRiseSetResponse)sharedResponse).SunSet.TimeOfDay) ? "Day" : "Night";
            string          name            = Enum.GetName(typeof(SharedObjects.WeatherTypes), weatherResponse.WType);

            trayIcon.Tooltip = ($"{name} {weatherResponse.Temp}");
            _ = text + name;
            trayIcon.Pixbuf = ((Pixbuf)(object)new Pixbuf(GetWeatherIconPath(weatherResponse.WType, text == "Day")));
        }
Esempio n. 2
0
        private void updateScreen()
        {
            //IL_00c4: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ce: Expected O, but got Unknown
            WeatherResponse weatherResponse = this.weatherResponse = (WeatherResponse)g_Weather.Invoke();
            ISharedResponse sharedResponse  = g_SunRiseSet.Invoke();
            string          text            = SharedObjects.BetweenTimespans(DateTime.Now.TimeOfDay, ((SunRiseSetResponse)sharedResponse).SunRise.TimeOfDay, ((SunRiseSetResponse)sharedResponse).SunSet.TimeOfDay) ? "Day" : "Night";
            string          name            = Enum.GetName(typeof(SharedObjects.WeatherTypes), weatherResponse.WType);

            trayIcon.set_Tooltip($"{name} {weatherResponse.Temp}");
            _ = text + name;
            trayIcon.set_Pixbuf((Pixbuf)(object)new Pixbuf(GetWeatherIconPath(weatherResponse.WType, text == "Day")));
        }