Exemple #1
0
        public Form1()
        {
            InitializeComponent();
            InitializePanels();

            //Create the environnement thread
            castle              = new Castle();
            castle.DataChanged += HandleDataChanged;
            Thread thread = new Thread(new ThreadStart(castle.Run));

            thread.Start();

            //Create the agent thread
            agent = new Agent(castle);
            Thread thread2 = new Thread(new ThreadStart(agent.Run));

            thread2.Start();
            castle.SubscribeToAgent(agent);



            Invalidate();
        }
Exemple #2
0
 public Sensor(Castle castle)
 {
     this.castle = castle;
 }