Ejemplo n.º 1
0
        //Ließt die Wolkendaten aus der API aus
        public static async void LoadClouds(string cityname)
        {
            try
            {
                OpenWeatherMapClient client = new OpenWeatherMapClient(weathercode);
                var currentWeather          = await client.CurrentWeather.GetByName(cityname);

                clouds = currentWeather.Clouds.Value;
            }
            finally
            {
                Simon.WriteInLog("Wolcken geladen");
            }
        }
Ejemplo n.º 2
0
        //Ließt die Temperatur aus der API aus
        public static async void LoadTemp(string cityname)
        {
            try
            {
                OpenWeatherMapClient client = new OpenWeatherMapClient(weathercode);
                var currentWeather          = await client.CurrentWeather.GetByName(cityname);

                temperatur = Convert.ToInt32(currentWeather.Temperature.Value - 273.15);
            }
            finally
            {
                Simon.WriteInLog("Temperatur geladen");
            }
        }
Ejemplo n.º 3
0
        public static bool Check(string text)
        {
            if (File.Exists(Application.StartupPath + "\\Vorgegeben.txt"))
            {
                FileStream   file   = new FileStream(Application.StartupPath + "\\Vorgegeben.txt", FileMode.Open);
                StreamReader reader = new StreamReader(file);

                while (reader.ReadLine() != null)
                {
                    string line = reader.ReadLine();
                }
                return(true);
            }
            else
            {
                Simon.WriteInLog("Die Datei mit denn Vorgegebenen daten konnte nicht geladen werden!");
                return(false);
            }
        }
Ejemplo n.º 4
0
 public static void Identify(string text)
 {
     Simon.SimonWaitforAwaik();
 }