// Global Type Handler private void GlobalButtonTypeClick(NWButton btnTypeButton, G__MathType _mathType) { // Turn off the old button NWButton tmpBtnViewOld = this.View.ViewWithTag(intTypeHoldState) as NWButton; if (tmpBtnViewOld != null) { tmpBtnViewOld.ApplyUIUnHeld(); } // Handle toggle functionality if (this.intTypeHoldState == btnTypeButton.Tag) { this.intTypeHoldState = 0; _mathType = G__MathType.All; } else { this.intTypeHoldState = btnTypeButton.Tag; btnTypeButton.HoldState = true; } // Set the viewmodel/repo filter this._vmLesson.FilterMathType = _mathType; // Refresh/re-query the view this.LoadLessonsFilteredAsync(); }
public static string GetType(G__MathType x) { // Try to get the result in the static Dictionary string result; if (_dict.TryGetValue(x, out result)) { return(result); } else { return(null); } }