/// <summary>
        /// Constructor
        /// </summary>
        public Form1()
        {
            InitializeComponent();
            this.Text = "WsnEngine Panel";

            //start the WsnController
            WsnController = new Controller();
            WsnEngine.Advise(WsnController);

            //start the Wcf Host
            //Host WsnHost = new Host();
            host = HostService(typeof(Elab.Rtls.Engines.WsnEngine.WsnEngineService));
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            //bad design
            //start the WsnController
            Controller WsnController = new Controller();
            WsnEngine.Advise(WsnController);

            //start the WCF Engine
            using (ServiceHost host = HostService(typeof(Elab.Rtls.Engines.WsnEngine.WsnEngineService)))
            {
                Console.WriteLine("Press <ENTER> to quit hosting. . . ");
                Console.ReadLine();
            }

            //TODO: dispose of WsnController?
        }
 public abstract void UnAdvise(Controller controller);
 public static void Advise(Controller controller)
 {
     ControllerRef = controller;
 }
 public override void UnAdvise(Controller controller)
 {
     controller.NewSensorDataEvent -= base.OnEventReceived;
 }