Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            var ed = FdoExpressionEditorFactory.Create();// new ExpressionEditor();

            ed.Initialize(_edSvc, _caps, _cls, _fsId, ExpressionEditorMode.Expression, false);
            if (ed.ShowDialog() == DialogResult.OK)
            {
                grdExpressions.Rows.Add(GenerateAlias(), ed.Expression);
            }
        }
Пример #2
0
        private void txtFilter_Click(object sender, EventArgs e)
        {
            var ed = FdoExpressionEditorFactory.Create(); //new ExpressionEditor();

            ed.Initialize(_edSvc, _caps, _cls, _fsId, ExpressionEditorMode.Filter, false);
            ed.Expression = txtFilter.Text;
            if (ed.ShowDialog() == DialogResult.OK)
            {
                txtFilter.Text = ed.Expression;
            }
        }
Пример #3
0
        internal string EditExpression(string expr)
        {
            var editor = FdoExpressionEditorFactory.Create();

            editor.Initialize(_conn, GetClass(), _source.FeatureSource, ExpressionEditorMode.Expression);
            if (editor.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                return(editor.Expression);
            }
            return(null);
        }
Пример #4
0
        /// <summary>
        /// Edits the expression.
        /// </summary>
        /// <param name="currentExpr">The current expr.</param>
        /// <param name="classDef">The class def.</param>
        /// <param name="providerName">Name of the provider.</param>
        /// <param name="featureSourceId">The feature source id.</param>
        /// <param name="mode">The editor mode</param>
        /// <param name="attachStylizationFunctions">If true, FDO stylization functions are also included in the function list</param>
        /// <returns></returns>
        public string EditExpression(string currentExpr, ClassDefinition classDef, string providerName, string featureSourceId, ExpressionEditorMode mode, bool attachStylizationFunctions)
        {
            var ed   = FdoExpressionEditorFactory.Create();
            var caps = _conn.FeatureService.GetProviderCapabilities(providerName);

            ed.Initialize(this, caps, classDef, featureSourceId, mode, attachStylizationFunctions);
            ed.Expression = currentExpr;
            if (ed.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                return(ed.Expression);
            }
            return(null);
        }