public EntityDataSourceWizardForm(IServiceProvider serviceProvider, EntityDataSourceState entityDataSourceState, EntityDataSourceDesigner entityDataSourceDesigner)
            : base(serviceProvider)
        {
            _entityDataSourceState = entityDataSourceState;
            this.SetGlyph(new Bitmap(BitmapSelector.GetResourceStream(typeof(EntityDataSourceWizardForm), "EntityDataSourceWizard.bmp")));
            this.Text = String.Format(CultureInfo.InvariantCulture, Strings.Wizard_Caption(((EntityDataSource)entityDataSourceDesigner.Component).ID));

            _helper = entityDataSourceDesigner.Helper;

            EntityDataSourceConfigureObjectContextPanel contextPanel = new EntityDataSourceConfigureObjectContextPanel();
            _configureContext = new EntityDataSourceConfigureObjectContext(contextPanel, this, entityDataSourceDesigner.Helper, _entityDataSourceState);

            EntityDataSourceDataSelectionPanel dataPanel = new EntityDataSourceDataSelectionPanel();
            _configureDataSelection = new EntityDataSourceDataSelection(dataPanel, this, entityDataSourceDesigner.Helper, _entityDataSourceState);

            _configureContext.ContainerNameChanged += _configureDataSelection.ContainerNameChangedHandler;

            _configureContext.LoadState();
            _configureDataSelection.LoadState();

            // Adds the panels to the wizard
            SetPanels(new WizardPanel[] {
                contextPanel,
                dataPanel});
        }
Exemple #2
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;
            }
        }