Exemple #1
0
 private void Client_CityUpdated(object sender, CityEventArgs e)
 {
     RebuildCityList(client.GetMyCities());
     if (form != null && form.Visible)
     {
         Show();
     }
 }
 private void CityPropertyChangedCurrent(CityEventArgs obj)
 {
     if (obj.CityModel.Id != CurrentCityId)
     {
         CurrentCity   = obj.CityModel.Name;
         CurrentCityId = obj.CityModel.Id;
         GetWeatherByCity().ConfigureAwait(false);
     }
 }
Exemple #3
0
 private void CityPropertyChangedForecast(CityEventArgs obj)
 {
     if (obj.CityModel.Id != CurrentCityId)
     {
         CurrentCity      = obj.CityModel.Name;
         CurrentCityId    = obj.CityModel.Id;
         ForecastWeathers = null;
         GetForecastWeatherByCity();
     }
 }
Exemple #4
0
        private void City_CityCaptured(object sender, CityEventArgs e)
        {
            Packet pOut = new Packet((int)PacketHeader.CityUpdate, e.City);

            server.SendDataToAll(pOut);
        }
Exemple #5
0
        private void City_CitySettled(object sender, CityEventArgs e)
        {
            Packet pOut = new Packet((int)PacketHeader.CityAdded, e.City);

            server.SendDataToAll(pOut);
        }