//**************************************************************************************************** // //**************************************************************************************************** public void Setup(HandPick @handpick, int nbCols, int nbRows, float tilesSize, OnExitRequested onExitRequested) { UICmd.SetUniqueHandler(new UICMD[] { UICMD.MAP_ZOOM_INC, UICMD.MAP_ZOOM_DEC }, ProcessUICmd); UICmd.SetUniqueHandler(new UICMD[] { UICMD.SWITCH_TO_2D_MAP, UICMD.SWITCH_TO_3D_MAP }, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.MAP_ADD_FLAG, ContentProcessUICmd); UICmd.SetUniqueHandler(UICMD.MAP_ADD_PIN, ContentProcessUICmd); m_handpick = @handpick; m_nbCols = nbCols > 0 ? Alignement.Align(nbCols, 2) : 2; m_nbRows = nbRows > 0 ? Alignement.Align(nbRows, 2) : 2; m_nbSlots = m_nbRows * m_nbCols; m_nbColsUsed = 0; m_nbRowsUsed = 0; m_nbSlotsUsed = 0; m_nbTiles = m_nbSlots << 1; m_tilesSize = tilesSize >= 1.0f ? tilesSize : 1.0f; m_pool = new WebMapTilePool(m_nbTiles); System.Array.Resize(ref m_slots, m_nbSlots); System.Array.Resize(ref m_slotsUsed, m_nbSlots); System.Array.Resize(ref m_tilesRelaxed, m_nbSlots); System.Array.Resize(ref m_loadSeq, m_nbSlots); m_onExitRequested = onExitRequested; CreateLayout(); CreateContentDespotitNode(); CreatePinSelectionHalo(); }
public void Exit() { ExitRequested = true; OnExitRequested.Raise(); }