예제 #1
0
        public DarkSky(ICanTranslate translator, string token, string request)
        {
            _token   = token;
            _request = request;

            _translator = translator;
        }
예제 #2
0
        public MessageControl(ICanTranslate translator, ICanGetWeatherByName weatherByName, ICanGetWeatherByCoordinate weatherByCoordinate, List <long> isWaitAnswerForWeather, List <long> isWaitAnswerForRememder, Func <IUsersRepository> createRepository)
        {
            _isWaitAnswerForWeather  = isWaitAnswerForWeather;
            _isWaitAnswerForRememder = isWaitAnswerForRememder;

            _weatherByCoordinate = weatherByCoordinate;
            _weatherByName       = weatherByName;
            _translator          = translator;

            _createRepository = createRepository;
        }
예제 #3
0
        public MainWindow()
        {
            InitializeComponent();

            _isWaitAnswerForWeather  = new List <long>();
            _isWaitAnswerForRememder = new List <long>();

            _translator = new Translator(Properties.Settings.Default.TokenTranslator, Properties.Settings.Default.RequestTranslator);


            CanGetByName.Items.Add("Open Weather Map");
            CanGetByName.Items.Add("Dark Sky");

            CanGetByCoordinate.Items.Add("Dark Sky");
        }
예제 #4
0
파일: Bot.cs 프로젝트: infom/DeeBeeTeeBot
        public Bot(string key, CancellationToken token, ICanGetWeatherByCoordinate weatherByCoordinate, ICanGetWeatherByName weatherByName, ICanTranslate translator, Func <IUsersRepository> createRepository)
        {
            _key = key;

            _token = token;

            _isWaitAnswerForWeather  = new List <long>();
            _isWaitAnswerForRememder = new List <long>();

            _translator          = translator;
            _weatherByName       = weatherByName;
            _weatherByCoordinate = weatherByCoordinate;

            _createRepository = createRepository;

            _messageControl = new MessageControl(_translator, _weatherByName, _weatherByCoordinate, _isWaitAnswerForWeather, _isWaitAnswerForRememder, createRepository);
        }