public PreviewPane(string fsId, QueryMode mode, ClassDefinition cls, IEditorService edSvc, IFdoProviderCapabilities caps)
            : this()
        {
            _fsId    = fsId;
            _mode    = mode;
            _cls     = cls;
            _featSvc = edSvc.CurrentConnection.FeatureService;

            IQueryControl ctrl = null;

            switch (_mode)
            {
            case QueryMode.SQL:
                ctrl   = new SqlQueryCtrl(fsId, edSvc);
                _inner = ctrl;
                break;

            case QueryMode.Standard:
                ctrl   = new StandardQueryCtrl(fsId, edSvc, cls, caps);
                _inner = ctrl;
                break;
            }

            if (ctrl == null)
            {
                throw new ArgumentException(Strings.UnknownQueryMode);
            }

            ctrl.Content.Dock = DockStyle.Fill;
            queryPane.Controls.Add(ctrl.Content);
        }
示例#2
0
        public PreviewPane(string fsId, QueryMode mode, ClassDefinition cls, IFeatureService featSvc, FdoProviderCapabilities caps)
            : this()
        {
            _fsId = fsId;
            _mode = mode;
            _cls = cls;
            _featSvc = featSvc;

            IQueryControl ctrl = null;
            switch (_mode)
            {
                case QueryMode.SQL:
                    ctrl = new SqlQueryCtrl(fsId, featSvc);
                    _inner = ctrl;
                    break;
                case QueryMode.Standard:
                    ctrl = new StandardQueryCtrl(fsId, featSvc, cls, caps);
                    _inner = ctrl;
                    break;
            }

            if (ctrl == null)
            {
                throw new ArgumentException(Strings.UnknownQueryMode);
            }

            ctrl.Content.Dock = DockStyle.Fill;
            queryPane.Controls.Add(ctrl.Content);
        }