Ejemplo n.º 1
0
        // Global Level Handler
        private void GlobalButtonLevelClick(NWButton btnLevelButton, G__MathLevel _mathLevel)
        {
            // Turn off the old button
            NWButton tmpBtnViewOld = this.View.ViewWithTag(intLevelHoldState) as NWButton;

            if (tmpBtnViewOld != null)
            {
                tmpBtnViewOld.ApplyUIUnHeld();
            }

            // If - handle toggle functionality if the button is the same
            // Else - set the new button state
            if (this.intLevelHoldState == btnLevelButton.Tag)
            {
                this.intLevelHoldState = 0;
                _mathLevel             = G__MathLevel.All;
            }
            else
            {
                this.intLevelHoldState = btnLevelButton.Tag;
            }
            // Refresh/re-query the view
            this._vmLesson.FilterMathLevel = _mathLevel;
            this.LoadLessonsFilteredAsync();
        }
Ejemplo n.º 2
0
        public static string GetLevel(G__MathLevel x)
        {
            // Try to get the result in the static Dictionary
            string result;

            if (_dict.TryGetValue(x, out result))
            {
                return(result);
            }
            else
            {
                return(null);
            }
        }