Пример #1
0
        private bool ConfigureDataSourceChangeCallback(object context)
        {
            try
            {
                SuppressDataSourceEvents();

                IServiceProvider           serviceProvider = Component.Site as IServiceProvider;
                EntityDataSourceWizardForm form            = new EntityDataSourceWizardForm(serviceProvider, _helper.LoadEntityDataSourceState(), this);
                DialogResult result = UIHelper.ShowDialog(serviceProvider, form);
                if (result == DialogResult.OK)
                {
                    _helper.SaveEntityDataSourceProperties(form.EntityDataSourceState);

                    OnDataSourceChanged(EventArgs.Empty);
                    RefreshSchema(true);
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            finally
            {
                ResumeDataSourceEvents();
            }
        }
        private bool ConfigureDataSourceChangeCallback(object context)
        {
            try
            {
                SuppressDataSourceEvents();

                IServiceProvider serviceProvider = Component.Site as IServiceProvider;
                EntityDataSourceWizardForm form = new EntityDataSourceWizardForm(serviceProvider, _helper.LoadEntityDataSourceState(), this);
                DialogResult result = UIHelper.ShowDialog(serviceProvider, form);
                if (result == DialogResult.OK)
                {
                    _helper.SaveEntityDataSourceProperties(form.EntityDataSourceState);

                    OnDataSourceChanged(EventArgs.Empty);
                    RefreshSchema(true);
                    return true;
                }
                else
                {
                    return false;
                }
            }
            finally
            {
                ResumeDataSourceEvents();
            }
        }
        internal EntityDataSourceDataSelection(EntityDataSourceDataSelectionPanel panel, EntityDataSourceWizardForm wizard, EntityDataSourceDesignerHelper designerHelper, EntityDataSourceState entityDataSourceState)
        {
            _panel = panel;
            _panel.Register(this);
            _helper = designerHelper;

            _entityDataSourceState = entityDataSourceState;
            _wizardForm = wizard;
        }
Пример #4
0
        internal EntityDataSourceDataSelection(EntityDataSourceDataSelectionPanel panel, EntityDataSourceWizardForm wizard, EntityDataSourceDesignerHelper designerHelper, EntityDataSourceState entityDataSourceState)
        {
            _panel = panel;
            _panel.Register(this);
            _helper = designerHelper;

            _entityDataSourceState = entityDataSourceState;
            _wizardForm            = wizard;
        }
Пример #5
0
        internal EntityDataSourceConfigureObjectContext(EntityDataSourceConfigureObjectContextPanel panel, EntityDataSourceWizardForm wizardForm, EntityDataSourceDesignerHelper helper, EntityDataSourceState entityDataSourceState)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                _panel         = panel;
                _helper        = helper;

                // Explicitly load metadata here to ensure that we get the latest changes in the project
                _helper.ReloadResources();

                _panel.Register(this);

                _wizardForm            = wizardForm;
                _entityDataSourceState = entityDataSourceState;
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }
        internal EntityDataSourceConfigureObjectContext(EntityDataSourceConfigureObjectContextPanel panel, EntityDataSourceWizardForm wizardForm, EntityDataSourceDesignerHelper helper, EntityDataSourceState entityDataSourceState)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                _panel = panel;
                _helper = helper;

                // Explicitly load metadata here to ensure that we get the latest changes in the project
                _helper.ReloadResources();

                _panel.Register(this);

                _wizardForm = wizardForm;
                _entityDataSourceState = entityDataSourceState;
            }
            finally
            {
                Cursor.Current = Cursors.Default;
            }
        }