public void RefreshApartmentInfo()
    {
        selectedBlock = ApartmentManager.instance.selectedApartment.GetComponent <ApartmentBlock> ();
        switch (type)
        {
        case infoType.name:
            label.text = selectedBlock.unitInfo.unit_name;
            break;

        case infoType.type:
            label.text = TypeIDToTypeName(selectedBlock.unitInfo.unit_type);
            break;

        case infoType.bedRooms:
            if (TypeIDToTypeName(selectedBlock.unitInfo.unit_type).Substring(0, 1) == "S")
            {
                label.text = "Studio";
            }
            else
            {
                label.text = selectedBlock.unitInfo.unitBedroomName;
            }
            break;

        case infoType.floor:
            label.text = FloorIDToFloorName(selectedBlock.unitInfo.unit_floor);
            break;

        case infoType.Level:
            label.text = ConvertFloorToLevel(FloorIDToFloorName(selectedBlock.unitInfo.unit_floor));
            break;

        case infoType.aspect:
            label.text = selectedBlock.unitInfo.unit_aspect;
            break;

        case infoType.price:
            label.text = selectedBlock.unitInfo.unit_price.ToString();
            break;

        case infoType.status:
            label.text = StatusIDToString(selectedBlock.unitInfo.unit_status);
            break;

        case infoType.Area_SqFt:
            label.text = selectedBlock.unitInfo.unit_sqft;
            break;

        case infoType.Area_SqM:
            label.text = selectedBlock.unitInfo.unit_sqm;
            break;

        default:
            break;
        }
    }
    public void RefreshApartmentInfo()
    {
        selectedBlock = ApartmentManager.instance.selectedApartment.GetComponent<ApartmentBlock> ();
        switch (type) {

        case infoType.name:
            label.text = selectedBlock.unitInfo.unit_name;
            break;
        case infoType.type:
            label.text = TypeIDToTypeName (selectedBlock.unitInfo.unit_type);
            break;
        case infoType.bedRooms:
            if(TypeIDToTypeName (selectedBlock.unitInfo.unit_type).Substring(0,1) =="S")
                label.text = "Studio";
            else label.text = selectedBlock.unitInfo.unitBedroomName;
            break;
        case infoType.floor:
            label.text = FloorIDToFloorName (selectedBlock.unitInfo.unit_floor);
            break;
        case infoType.Level:
            label.text = ConvertFloorToLevel(FloorIDToFloorName (selectedBlock.unitInfo.unit_floor));
            break;
        case infoType.aspect:
            label.text = selectedBlock.unitInfo.unit_aspect;
            break;
        case infoType.price:
            label.text = selectedBlock.unitInfo.unit_price.ToString ();
            break;
        case infoType.status:
            label.text = StatusIDToString (selectedBlock.unitInfo.unit_status);
            break;
        case infoType.Area_SqFt:
            label.text = selectedBlock.unitInfo.unit_sqft;
            break;
        case infoType.Area_SqM:
            label.text = selectedBlock.unitInfo.unit_sqm;
            break;

        default:
            break;
        }
    }
    void InitialiseLine(ApartmentBlock aptBlock)
    {
        //		Debug.Log ("LINE");

        GameObject listbutton = Instantiate(listItemPrefab) as GameObject;

        listbutton.transform.SetParent(this.transform, false);
        listbutton.name = aptBlock.unitInfo.unit_name;
        //listbutton

        listbutton.GetComponent <ApartmentBlockListButton>().unitInfo = aptBlock.unitInfo;
        listbutton.GetComponent <ApartmentBlockListButton>().UpdateListButtonInfo();

        if (isFavouriteList)
        {
            listbutton.GetComponent <SetFavouriteGallery>().selectedBlock = aptBlock;
            listbutton.GetComponent <SetFavouriteGallery>().selectedBlockIDinFavouriteContent = favouriteID;
            favouriteID++;
        }
    }
    void InitialiseLine(ApartmentBlock aptBlock)
    {
        //		Debug.Log ("LINE");

        GameObject listbutton = Instantiate(listItemPrefab) as GameObject;
        listbutton.transform.SetParent(this.transform, false);
        listbutton.name = aptBlock.unitInfo.unit_name;
        //listbutton

        listbutton.GetComponent<ApartmentBlockListButton>().unitInfo = aptBlock.unitInfo;
        listbutton.GetComponent<ApartmentBlockListButton>().UpdateListButtonInfo();

        if (isFavouriteList){
            listbutton.GetComponent<SetFavouriteGallery>().selectedBlock = aptBlock;
            listbutton.GetComponent<SetFavouriteGallery>().selectedBlockIDinFavouriteContent = favouriteID;
            favouriteID++;
        }
    }