예제 #1
0
        static void Main(string[] args)
        {
            _maStation = new DonneesMeteo();
            _monAffFenetre = new Window1();
            _monAffConsole = new AffConsole();
            _maStation.enregistrerObservateur(_monAffFenetre);
            _maStation.enregistrerObservateur(_monAffConsole);

            // Lancement du programme
            new Thread(Program.Job).Start();
            Application.EnableVisualStyles();
            Application.Run(_monAffFenetre);

        }
예제 #2
0
        static void Main(string[] args)
        {
            DonneesMeteo maStation = new DonneesMeteo();
            Window1 monAffFenetre = new Window1();
            AffConsole monAffConsole = new AffConsole();
            maStation.enregistrerObservateur(monAffFenetre);
            maStation.enregistrerObservateur(monAffConsole);
            monAffFenetre.Show();

            while (true)
            {
                maStation.actualiserMesures();
                Thread.Sleep(1000);
            }
        }