static void Main()
        {
            string               connectionString = ConfigurationManager.ConnectionStrings["WeatherService"].ConnectionString;
            QueryFacade          facade           = new QueryFacade(connectionString);
            WeatherDataSummary   summary          = new WeatherDataSummary(facade);
            LongLatCalcs         translator       = new LongLatCalcs(connectionString);
            ConditionsRepository repo             = new ConditionsRepository(connectionString);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainWindow(summary, translator, repo));
        }
Exemple #2
0
        public MainWindow(WeatherDataSummary summary, LongLatCalcs translator, IProvideConditions repo)
            : this()
        {
            _repo       = repo;
            _translator = translator;
            _summary    = summary;
            _summary.PropertyChanged += HandleSummaryChange;

            for (int i = 0; i <= (int)StateCode.XX; i += 1)
            {
                _currentState.Items.Add((StateCode)i);
            }
            _currentState.SelectedIndexChanged += HandleStateChange;
            _currentState.SelectedIndex         = 0;
        }