public override object GroupNameFromItem(object item, int level, CultureInfo culture)
        {
            editer.DataSource = item;
            editer.Expression = Expression;

            if (editer.IsValid)
            {
                return(editer.Evaluate());
            }
            return("");
        }
        private bool Contains(object obj)
        {
            _editor.Expression = editor.Expression;
            _editor.DataSource = obj as Product;
            var value = _editor.Evaluate();
            var ret   = true;

            if (value != null)
            {
                Boolean.TryParse(value.ToString(), out ret);
            }
            return(ret);
        }
        private void ExpressionEditor_ExpressionChanged(object sender, EventArgs e)
        {
            C1ExpressionEditor editer = sender as C1ExpressionEditor;

            if (!editer.IsValid)
            {
                Result.Text = "";
                Errors.Text = "";
                editer.GetErrors().ForEach(x => { Errors.Text += x.Message + "\n"; });
            }
            else
            {
                Result.Text = editer.Evaluate().ToString();
                Errors.Text = "";
            }
        }
Beispiel #4
0
        private bool Contains(object obj)
        {
            if (!Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
            {
                _editor.Expression = editor.Expression;
            }
            else
            {
                _editor.Expression = c1editor.Expression;
            }
            _editor.DataSource = obj as Product;
            var value = _editor.Evaluate();
            var ret   = true;

            if (value != null)
            {
                Boolean.TryParse(value.ToString(), out ret);
            }
            return(ret);
        }