// Global Level Handler private void GlobalButtonOpClick(NWButton btnOpButton, G__MathOperator _mathOperator) { // Turn off the old button NWButton tmpBtnViewOld = this.View.ViewWithTag(intOpHoldState) 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.intOpHoldState == btnOpButton.Tag) { this.intOpHoldState = 0; _mathOperator = G__MathOperator.All; } else { this.intOpHoldState = btnOpButton.Tag; btnOpButton.HoldState = true; } this._vmLesson.FilterMathOperator = _mathOperator; // Refresh/re-query the view this.LoadLessonsFilteredAsync(); }
public static string GetOp(G__MathOperator x) { // Try to get the result in the static Dictionary string result; if (_dict.TryGetValue(x, out result)) { return(result); } else { return(null); } }
public object UICreateOperator(G__MathOperator mathOperator, string strChar) { // Create an operator var x = new vcOperatorText(mathOperator, strChar); x.IsAnswer = this.IsAnswer; x.IsFreeFrom = this.IsFreeForm; x.IsReadOnly = !this.IsAnswer; this.IsAnswer = false; this.IsFreeForm = false; // Add to output return(x as object); }
public vcOperatorText(G__MathOperator operatortype, string strOperator) { this._operatorType = operatortype; this._strOperator = strOperator; Initialize(); }