Пример #1
0
        private void CreateRecView(List <DailyData> data)
        {
            //recview = FindViewById<RecyclerView>(Resource.Id.recviewits);
            recview.SetLayoutManager(new LinearLayoutManager(this, LinearLayoutManager.Vertical, false));
            WeatherAdapter adpt = new WeatherAdapter(this, data);

            recview.SetAdapter(adpt);
        }
Пример #2
0
        public WeatherPlugin()
        {
            try
            {
                var bot = VA.Components.Get <SimlBot>();
                bot.Adapters.Add(new WeatherAdapter());

                var weatherService = new Service("Weather-Report-Service",
                                                 () =>
                {
                    WeatherAdapter.GenerateWeatherReport(bot.MainUser, Settings["Location"].Value);
                });

                weatherService.Description = StringResource.WeatherPlugin_WeatherReportServiceDescription;
                weatherService.Interval    = TimeSpan.FromHours(2);
                VA.Services.Add(weatherService);
            }
            catch (Exception exception)
            {
                VA.Logger.Error(exception);
            }
        }