public List<IKPI> GetKPIs()
    {
        KPIManager kpiManager = new KPIManager();
        KPIProviderCollection kpiProviders = kpiManager.Providers;
        System.Collections.IEnumerator iterator = kpiProviders.GetEnumerator();

        while (iterator.MoveNext()) {
            IKPI kpi = (IKPI)iterator.Current;

            // set default periods
            kpi.CurrentPeriod = EkEnumeration.KPIPeriod.ThisMonth;
            kpi.PreviousPeriod = EkEnumeration.KPIPeriod.LastMonth;

            // recover from session
            kpi.CurrentPeriod = GetPeriod((string)Session[_wrapperId + "_Current_" + kpi.Indicator], kpi.CurrentPeriod);
            kpi.PreviousPeriod = GetPeriod((string)Session[_wrapperId + "_Previous_" + kpi.Indicator], kpi.PreviousPeriod);

            RecoverUserPeriodSelection();
            if (_clientPeriodSelectionTarget == kpi.Indicator) {
                if (_clientPeriodSelectionType == "Current")
                    kpi.CurrentPeriod = _clientPeriodSelectionPeriod;
                else if (_clientPeriodSelectionType == "Previous")
                    kpi.PreviousPeriod = _clientPeriodSelectionPeriod;
            }

            // store to session:
            Session[_wrapperId + "_Current_" + kpi.Indicator] = kpi.CurrentPeriod.ToString();
            Session[_wrapperId + "_Previous_" + kpi.Indicator] = kpi.PreviousPeriod.ToString();

            kpi.Calculate(null);
            _data.Add(kpi);
        }

        return _data;
    }
Beispiel #2
0
        // ============================================================================
        //						    ***** GAME MANAGEMENT *****
        // ============================================================================
        /// <summary>
        /// Load en premier le fichier de localization anglais pour les traductions+ abonnement d'event (ne pas oublier de les remove dans OnDestroy)
        /// </summary>
        protected void Start()
        {
            //Localization
            LocalizationManager.LoadLocalizedText(Path.Combine(settings.LocalizationFolderName, settings.LocalizationEnFileName));

            //Sound
            PlayUIMusic();

            //Event
            uiManager.OnLoadFinish += UIManager_OnLoadFinish;

            LevelSelector.Instance.OnPlay           += LevelSelector_OnPlay;
            LevelSelector.Instance.OnDailyQuestPlay += LevelSelector_OnDailyQuestPlay;

            PauseScreen lPauseScreen = PauseScreen.Instance;

            lPauseScreen.OnResume     += PauseSreen_OnResume;
            lPauseScreen.OnLeaveLevel += PauseScreen_OnLeaveLevel;

            Hud lHud = Hud.Instance;

            lHud.OnPause += Hud_OnPause;

            WinScreen.Instance.OnNext += WinScreen_Next;

            GameOverScreen lGameOverScreen = GameOverScreen.Instance;

            lGameOverScreen.OnNext   += GameOver_Next;
            lGameOverScreen.OnReplay += GameOver_OnReplay;

            Options lOptions = Options.Instance;

            lOptions.OnMusicVolume += Options_OnMusicVolume;
            lOptions.OnSFXVolume   += Options_OnSFXVolume;

            SelectionSquad selectionSquad = SelectionSquad.Instance;

            selectionSquad.OnPlay += SelectionSquad_OnPlay;
            selectionSquad.OnBack += SelectionSquad_OnBack;

            //Loading
            loader.LoadSceneAsync(settings.MainSceneName, true);
            loader.OnPreloadDone += StartMain;

            KPIManager.InitKPI();
        }
Beispiel #3
0
 private void PurchaseSucced(string id)
 {
     currentOffer.PurchaseConfirm();
     KPIManager.SendTransactionEvent(currentOffer.productName, 1, currentOffer.currency, (int)currentOffer.price);
     ConfirmPurchasedPanel.SetActive(false);
 }
 public KPICategoryApplications()
 {
     mgr = new KPIManager(ObjectFactory.GetInstance <IKPICategoryRepository>());
 }