/// <summary>
 /// gets the down value for the corresponding zoom level
 /// from the data tier and relays it to the gui
 /// </summary>
 /// <param name="zoom"></param>
 /// <returns>
 /// returns num tiles down or -1 if failure
 /// aswell as a error message via reference
 /// </returns>
 public int GetNumTilesDown(int zoom)
 {
     try
     {
         return(m_tmData.GetNumTilesDown(zoom));
     }
     catch (FaultException <DataServerFault> )
     {
         throw new FaultException <BizServerFault>(new BizServerFault("TMBizControllerImpl.GetNumTilesDown", "Error In Data Server"));
     }
     catch (CommunicationException)
     {
         throw new FaultException <BizServerFault>(new BizServerFault("TMBizControllerImpl.GetNumTilesDown", "Error communicating with data server"));
     }
 }
        // 1) Calling the functions at data tier. And getting the return value of data tier's function
        // 2) Call goes to the ITMDataController(Interface)
        // 3) From the interface the call is diverted to TMDataControllerImpl class
        // 4) This ensures gui clients does not have direct access to the data tier
        public int GetNumTilesDown(int zoom)
        {
            int ret = 0;

            try
            {
                ret = m_data.GetNumTilesDown(zoom);
            }
            catch (CommunicationException)
            {
                System.Console.WriteLine("Error : The data tier program exited implicitly");
            }

            return(ret);
        }
Пример #3
0
        private void btnDown_Click(object sender, RoutedEventArgs e)
        {
            y++; //increases the x axis by 1 unit per click

            if (y < 0 || y == 0)
            {
                y    = 0;
                load = true;
                refreshTiles();
            }

            else if (y < m_tmData.GetNumTilesDown(zoomValue))
            {
                load = true;
                refreshTiles();
            }

            else
            {
                y    = m_tmData.GetNumTilesDown(zoomValue) - 1;
                load = true;
                refreshTiles();
            }
        }
Пример #4
0
 //gets max vertical tiles
 public int GetNumTilesDown(int zoom)
 {
     return(m_tmData.GetNumTilesDown(zoom));
 }