Exemplo n.º 1
0
        protected virtual void CreateControllers()
        {
            if (((GnosisSplit)ControlImplementation).Splits != null)
            {
                foreach (GnosisSplit split in ((GnosisSplit)ControlImplementation).Splits)
                {
                    // IGnosisSplitImplementation splitImplementation = GlobalData.Singleton.ImplementationCreator.GetGnosisSplitImplementation();
                    GnosisSplitController splitController = new GnosisSplitController(split, EntityController, this);
                    splitController.Setup();
                    split.PropertyChanged += ChildContainer_PropertyChanged;

                    ChildControllers.Add(splitController);
                }
            }
            if (((GnosisSplit)ControlImplementation).Tiles != null)
            {
                foreach (GnosisTile tile in ((GnosisSplit)ControlImplementation).Tiles)
                {
                    // IGnosisTileImplemenation tileImplementation = GlobalData.Singleton.ImplementationCreator.GetGnosisTileImplementation();
                    GnosisTileController tileController = new GnosisTileController(tile, EntityController, this);
                    tile.PropertyChanged += ChildContainer_PropertyChanged;

                    ChildControllers.Add(tileController);
                }
            }
        }
Exemplo n.º 2
0
        public void AddChildModel(IGnosisContainerImplementation childModel)
        {
            if (childModel is GnosisSplit)
            {
                // IGnosisSplitImplementation splitImplementation = GlobalData.Singleton.ImplementationCreator.GetGnosisSplitImplementation();
                GnosisSplitController splitController = new GnosisSplitController((GnosisSplit)childModel, EntityController, this);
                splitController.Setup();

                AddChildController(splitController);
            }
            else if (childModel is GnosisTile)
            {
                // IGnosisTileImplemenation tileImplementation = GlobalData.Singleton.ImplementationCreator.GetGnosisTileImplementation();
                GnosisTileController tileController = new GnosisTileController((GnosisTile)childModel, EntityController, this);

                AddChildController(tileController);
            }
            ((GnosisContainer)childModel).PropertyChanged += ChildContainer_PropertyChanged;
        }