//**************************************************************************************************** // //**************************************************************************************************** public void Start() { if (DBObjects.instance != null) { DBObjects.instance.listeners.Add(OnDBEvent); } UICmd.SetUniqueHandler(UICMD.UI_SITES_EXPAND_ALL, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.UI_SITES_COLLAPSE_ALL, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.UI_SITES_SORT_ASCENDING, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.UI_SITES_SORT_DESCENDING, ProcessUICmd); }
//**************************************************************************************************** // //**************************************************************************************************** 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 Start() { options.Load(); ApplyOptions(); UICmd.SetUniqueHandler(UICMD.SWITCH_TO_GLOBE, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.SWITCH_TO_MAP, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.SWITCH_TO_OPTIONS, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.DB_REFRESH, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.GO_TO_SELECTION, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.EDIT_SELECTION, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.IMPORT_CSV, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.EXPORT_CSV, ProcessUICmd); UICmd.SetUniqueHandler(UICMD.APPLICATION_EXIT, ProcessUICmd); m_UI.Create(); m_UI.Show(false); if (m_navModes == null) { m_navModes = new Modes <ApplicationMain>(this); m_navModes.Create <NavigationModeGlobe>(); m_navModes.Create <NavigationModeMap>(); } if (m_worldMap != null) { m_worldMap.SetActive(false); } SelectNavigationMode(NAVIGATION_MODE.GLOBE); TeleportTo(0.0f, 0.0f, MAP_SWITCH_DIST_EXIT); }