コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public CalculationEngineForecast()
        {
            wfProxy  = new WeatherForecastProxy();
            chfProxy = new CalculateHourlyForecast();
            model    = CalculationEngineModel.Instance;
            powCalc  = new PowerCalculator();
            Thread newThread = new Thread(CalculatePerHour);

            newThread.Start();
        }
コード例 #2
0
        public CurrentWeatherJob()
        {
            // Dobijanje referenca modela
            model = SimulatorModel.Instance;

            // Otvaranje kanala prema vremenskoj prognozi
            wfProxy = new WeatherForecastProxy();

            // Kreiranje i pokretanje Thread-a
            collectorThread = new Thread(() => Collector());
            collectorThread.Start();
        }