Пример #1
0
        public ClockOne(int timeZone, int xPos, int yPos)
        {
            InitializeComponent();

            obj = new ObserverOne();
            timerOne.Enabled = true;
            additional       = timeZone;
            x = xPos;
            y = yPos;
        }
Пример #2
0
        static void Main(string[] args)
        {
            WeatherStation weatherStation = new WeatherStation();
            ObserverOne    observerOne    = new ObserverOne(weatherStation);
            ObserverTwo    observerTwo    = new ObserverTwo(weatherStation);
            ObserverThree  observerThree  = new ObserverThree(weatherStation);

            weatherStation.BeginCollectWeatherData();

            Console.ReadLine();
        }