Exemple #1
0
 /// <summary>
 /// Helps add the post activation steps that link bridges to main controller
 /// </summary>
 /// <param name="bridge"></param>
 void AddBridgePostActivationHelper(MobileControlBridgeBase bridge)
 {
     bridge.AddPostActivationAction(() =>
     {
         var parent = DeviceManager.AllDevices.FirstOrDefault(d => d.Key == "appServer") as MobileControlSystemController;
         if (parent == null)
         {
             Debug.Console(0, bridge, "ERROR: Cannot connect app server room bridge. System controller not present");
             return;
         }
         Debug.Console(0, bridge, "Linking to parent controller");
         bridge.AddParent(parent);
         parent.AddBridge(bridge);
     });
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="bridge"></param>
        public void AddBridge(MobileControlBridgeBase bridge)
        {
            RoomBridges.Add(bridge);
            var b = bridge as IDelayedConfiguration;

            if (b != null)
            {
                Debug.Console(0, this, "Adding room bridge with delayed configuration");
                b.ConfigurationIsReady += new EventHandler <EventArgs>(bridge_ConfigurationIsReady);
            }
            else
            {
                Debug.Console(0, this, "Adding room bridge and sending configuration");
                //SystemUuid = ConfigReader.ConfigObject.SystemUuid;
                RegisterSystemToServer();
            }
        }