public void UpdateRoomInstancesColors()
        {
            roomInstancesGuidList.RemoveAll(i => i == "");

            /*    for (int i = 0; i < roomInstancesGuidList.Count; i++)
             *  {
             *      try
             *      {
             *          Owner.OnPingDocument().FindComponent(new Guid(roomInstancesGuidList[i]));
             *          if (Owner.OnPingDocument().FindComponent(new Guid(roomInstancesGuidList[i])) == null)
             *          {
             *              roomInstancesGuidList.RemoveAt(i);
             *              i--;
             *          }
             *      }
             *      catch (Exception e)
             *      {
             *          roomInstancesGuidList.RemoveAt(i);
             *          i--;
             *      }
             *  }
             */

            foreach (string guidS in roomInstancesGuidList)
            {
                RoomInstance childRoom = Owner.OnPingDocument().FindComponent(new Guid(guidS)) as RoomInstance;
                if ((childRoom.Attributes as RoomInstanceAttributes).roomBrush != houseBrush)
                {
                    (childRoom.Attributes as RoomInstanceAttributes).roomBrush = houseBrush;
                    childRoom.ExpireSolution(true);
                }
            }
        }
Exemple #2
0
        protected override void HandleTextInputAccepted(string text)
        {
            _input.Text = text;

            switch (_roomInstanceVar)
            {
            case (RoomInstanceVar.RoomName):
                _roomInstance.RoomName = text;
                break;

            case (RoomInstanceVar.RoomArea):
                _roomInstance.RoomArea = Int32.Parse(text);
                break;
            }
            _roomInstance.ExpireSolution(false);
            if ((_roomInstance.Attributes as RoomInstanceAttributes).AssignedHouseInstance != null)
            {
                (_roomInstance.Attributes as RoomInstanceAttributes).AssignedHouseInstance.ExpireSolution(false);
            }
        }