コード例 #1
0
 private void OnDeleteRoomCommand()
 {
     if (RoomsData.Contains(this.Room))
     {
         RoomsData.Remove(this.Room);
         this.Room = null;
     }
 }
コード例 #2
0
ファイル: Autorization.cs プロジェクト: lunice/bgo
 //void onMarketItemsRecive() {
 //AccountEvent.requestAccountInformation(); // запрашиваем данные об аккаунте
 //}
 void onRoomsReceive(RoomsData rooms) // █ получив комнаты
 {
     Rooms.setNewRoomsData(rooms);
     /////////////////////////////////////////////////////////
     //var controller = WindowController.getWinController;
     //MarketEvent marketEvent = controller.getMarketEvent();
     //marketEvent.OnReady += (sender, e) => controller.onMarketItemsRecive();
     //WindowController.requestContent(WindowController.TypePopUpWindow.NONE);
     /////////////////////////////////////////////////////////
     AccountEvent.requestAccountInformation(); // запрашиваем данные об аккаунте
 }
コード例 #3
0
        private List <HotelBedMappedRoomDetail> GetMappedRooms(RoomsData epsRoom, List <RoomMappingResult> roomsMappedToEpsRoom)
        {
            List <HotelBedMappedRoomDetail> hotelBedMappedRoomDetails = new List <HotelBedMappedRoomDetail>();

            foreach (var room in roomsMappedToEpsRoom)
            {
                HotelBedMappedRoomDetail hotelBedMappedRoomDetail = new HotelBedMappedRoomDetail();
                hotelBedMappedRoomDetail.HBRoomName = room.
                                                      hotelBedMappedRoomDetail.HBMatchingString = room.HBMatchingStringForHighestMatch;
                hotelBedMappedRoomDetail.MatchingFields    = room.FieldsUsedForHighestMatch;
                hotelBedMappedRoomDetail.MatchScore        = room.HighestMatchedScore;
                hotelBedMappedRoomDetail.EpsMatchingString = room.EpsMatchingStringForHighestMatch;
                hotelBedMappedRoomDetails.Add(hotelBedMappedRoomDetail);
            }
            return(hotelBedMappedRoomDetails);
        }
コード例 #4
0
ファイル: Room.cs プロジェクト: pontura/ArtPlacer
    public IEnumerator GetArtData(RoomsData.RoomAreaArtWork areaArtwork, int areaId, RoomsData.Room room)
    {
        ArtData.GalleryData.ArtData artData = null;
        print ("GallID: " + areaArtwork.galleryID + " ArtId: " + areaArtwork.galleryArtID);
        Texture2D tex = null;

        artData = Data.Instance.artData.GetArtData(areaArtwork.galleryID,areaArtwork.galleryArtID);
        if (artData == null)
        {
            Debug.Log("No existe mas esta obra!");
            LoadedArtwork++;
            Data.Instance.roomsData.RemoveArtFromRoom(areaArtwork.galleryArtID);
            //LoadRoomTexture();
        }
        else
        {
            if (areaArtwork.galleryID == -2)
            {
                tex = TextureUtils.LoadLocal(artData.GetUrl(false));
            }
            else
            {
                Debug.Log("Existe esta obra:  artData.GetUrl(): " + artData.GetUrl(true));
                yield return StartCoroutine(TextureUtils.LoadRemote(artData.GetUrl(false), value => tex = value));
            }

            int h = (int)artData.size.y;

            print("W: " + h);

            float aspect = 1f * tex.height / tex.width;
            h = h == 0 ? defaultArtHeight :h;
            int w = (int)(h / aspect);

            Data.Instance.areaData.areas[areaId].AddArtWork(w, h, tex, artData);
            Data.Instance.areaData.areas[areaId].artworks[Data.Instance.areaData.areas[areaId].artworks.Count - 1].position = areaArtwork.position;
            Data.Instance.artData.selectedGallery = areaArtwork.galleryID;

            Debug.Log("__________totalArtworks2Load: " + totalArtworks2Load + " LoadedArtwork" + LoadedArtwork);
            LoadedArtwork++;
        }
        print("totalArtworks2Load______ " + totalArtworks2Load + " LoadedArtwork: " + LoadedArtwork);

        if (totalArtworks2Load == LoadedArtwork)
            LoadRoomTexture();
        yield return null;
    }
コード例 #5
0
        private void OnUpdateRoomCommand()
        {
            if (RoomsData.Contains(this.Room))
            {
                RoomWindow window = new RoomWindow();

                Room currentRoom = new Room();

                currentRoom.Copy(Room);

                (window.DataContext as RoomWindowViewModel).SelectedRoom = currentRoom;

                bool?result = window.ShowDialog();

                if (result == true)
                {
                    room.Copy(currentRoom);
                }
            }
        }
コード例 #6
0
        private void OnAddRoomCommand()
        {
            RoomWindow window = new RoomWindow();

            bool?result = window.ShowDialog();

            if (result == true)
            {
                Room room = (window.DataContext as RoomWindowViewModel).SelectedRoom;

                if (room != null)
                {
                    int maxId = 0;
                    if (RoomsData.Count != 0)
                    {
                        maxId = RoomsData.Select(x => x.Id).Max();
                    }
                    room.Id = maxId + 1;
                    RoomsData.Add(room);
                }
            }
        }
コード例 #7
0
 public static ArrayList ConvertDataSetToArrayList(DataSet dataset)
 {
     if (dataset == null)
     {
         return(null);
     }
     if (dataset.Tables.Count > 0)
     {
         ArrayList roomDataArray = new ArrayList();
         foreach (DataRow dr in dataset.Tables[0].Rows)
         {
             RoomsData roomsdata = new RoomsData();
             roomsdata.id             = Convert.ToInt32(dr["Id"]);
             roomsdata.hotelId        = Convert.ToInt32(dr["HotelId"]);
             roomsdata.roomType       = dr["RoomType"].ToString();
             roomsdata.totalRooms     = Convert.ToInt32(dr["TotalRooms"]);
             roomsdata.availableRooms = Convert.ToInt32(dr["AvailableRooms"]);
             roomsdata.rentOfRoom     = dr["Price"].ToString();
             roomDataArray.Add(roomsdata);
         }
         return(roomDataArray);
     }
     return(null);
 }
コード例 #8
0
ファイル: Data.cs プロジェクト: pontura/ArtPlacer
    void Awake()
    {
        if (!mInstance)
            mInstance = this;
        //otherwise, if we do, kill this thing
        else
        {
            Destroy(this.gameObject);
            return;
        }
        artData = GetComponent<ArtData>();

        filtersManager = GetComponent<FiltersManager>();

        StartCoroutine(GetServerData(json_galleries_Url));

        cameraData = GetComponent<CameraData>();

        fade = GetComponentInChildren<Fade>();
        areaData = GetComponent<AreaData>();

        fade.gameObject.SetActive(true);

        roomsData = GetComponent<RoomsData>();

        filtersManager = GetComponent<FiltersManager>();

        DontDestroyOnLoad(this.gameObject);

        Screen.autorotateToLandscapeLeft = true;
        Screen.autorotateToLandscapeRight = false;
        Screen.autorotateToPortrait = false;
        Screen.autorotateToPortraitUpsideDown = false;

        Events.ToggleUnit += ToggleUnits;
    }
コード例 #9
0
    // ( подключено и вызывается из Autorization ) помещаются доступные комнаты в свой внутренний список комнат
    public static void setNewRoomsData(RoomsData loadingRooms)
    {
        var roomsData = Rooms.get;      // пустая операция, для создания синглтона

        roomsData.rooms = loadingRooms.Room;
    }
コード例 #10
0
ファイル: Rooms.cs プロジェクト: pontura/ArtPlacer
    void Start()
    {
        Events.OnLoading (true);
        Close();

        Events.HelpShow();

        Data.Instance.SetTitle("ROOMS");
        Events.Back += Back;
        PickerEventListener.onImageLoad += OnImageLoad;

        Data.Instance.SetMainMenuActive(true);

        List<RoomsData.Room> rooms;
        roomData = Data.Instance.roomsData;

        /*switch (roomData.type)
        {
            case RoomsData.types.LOCAL:
                title.text = "SAVED PROJECTS";
                rooms = Data.Instance.roomsData.rooms;
                break;
            default:
                title.text = "PUBLIC ROOMS";
                rooms = Data.Instance.roomsData.onlineRooms;
                break;
        }*/
        title.text = "SAVED PROJECTS";
        rooms = Data.Instance.roomsData.rooms;
        Invoke("timeOut", 0.2f);
    }