Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / SqlDataSourceWizardForm.cs / 1 / SqlDataSourceWizardForm.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.ComponentModel.Design.Data; using System.Design; using System.Diagnostics; using System.Drawing; using System.Windows.Forms; using System.Web.UI.Design.Util; using System.Web.UI.WebControls; ////// The SqlDataSource configuration wizard. This guides the user through /// the connection string chooser panel and the command chooser panel. /// internal class SqlDataSourceWizardForm : WizardForm { private SqlDataSourceConnectionPanel _connectionPanel; private SqlDataSource _sqlDataSource; private SqlDataSourceDesigner _sqlDataSourceDesigner; private IDataEnvironment _dataEnvironment; private DesignerDataConnection _designerDataConnection; private SqlDataSourceSaveConfiguredConnectionPanel _saveConfiguredConnectionPanel; private SqlDataSourceConfigureParametersPanel _configureParametersPanel; private SqlDataSourceConfigureSelectPanel _configureSelectPanel; private SqlDataSourceCustomCommandPanel _customCommandPanel; private SqlDataSourceSummaryPanel _summaryPanel; ////// Creates a new SqlDataSourceWizardForm. /// public SqlDataSourceWizardForm(IServiceProvider serviceProvider, SqlDataSourceDesigner sqlDataSourceDesigner, IDataEnvironment dataEnvironment) : base(serviceProvider) { //Icon = new Icon(typeof(LibraryBuilderForm), "LibraryBuilder.ico"); Glyph = new Bitmap(typeof(SqlDataSourceWizardForm), "datasourcewizard.bmp"); Debug.Assert(dataEnvironment != null); _dataEnvironment = dataEnvironment; _sqlDataSource = (SqlDataSource)sqlDataSourceDesigner.Component; _sqlDataSourceDesigner = sqlDataSourceDesigner; Debug.Assert(_sqlDataSource != null); Text = SR.GetString(SR.ConfigureDataSource_Title, _sqlDataSource.ID); // Set up the connection panel _connectionPanel = CreateConnectionPanel(); // Adds the panel to the wizard SetPanels(new WizardPanel[] { _connectionPanel, }); // Create and register all child panels _saveConfiguredConnectionPanel = new SqlDataSourceSaveConfiguredConnectionPanel(_sqlDataSourceDesigner, _dataEnvironment); RegisterPanel(_saveConfiguredConnectionPanel); _configureParametersPanel = new SqlDataSourceConfigureParametersPanel(_sqlDataSourceDesigner); RegisterPanel(_configureParametersPanel); _configureSelectPanel = new SqlDataSourceConfigureSelectPanel(_sqlDataSourceDesigner); RegisterPanel(_configureSelectPanel); _customCommandPanel = new SqlDataSourceCustomCommandPanel(_sqlDataSourceDesigner); RegisterPanel(_customCommandPanel); _summaryPanel = new SqlDataSourceSummaryPanel(_sqlDataSourceDesigner); RegisterPanel(_summaryPanel); } ////// Gets the current data connection associated with this wizard. /// internal DesignerDataConnection DesignerDataConnection { get { return _designerDataConnection; } } ////// Gets the DataEnvironment service. /// internal IDataEnvironment DataEnvironment { get { return _dataEnvironment; } } protected override string HelpTopic { get { return "net.Asp.SqlDataSource.ConfigureDataSource"; } } ////// Gets the SqlDatasourceDesigner associated with this wizard /// internal SqlDataSourceDesigner SqlDataSourceDesigner { get { return _sqlDataSourceDesigner; } } ////// Creates the appropriate connection panel for the wizard. /// protected virtual SqlDataSourceConnectionPanel CreateConnectionPanel() { // Set up the connection panel return new SqlDataSourceDataConnectionChooserPanel(SqlDataSourceDesigner, DataEnvironment); } internal SqlDataSourceConfigureParametersPanel GetConfigureParametersPanel() { _configureParametersPanel.ResetUI(); return _configureParametersPanel; } internal SqlDataSourceConfigureSelectPanel GetConfigureSelectPanel() { _configureSelectPanel.ResetUI(); return _configureSelectPanel; } internal SqlDataSourceCustomCommandPanel GetCustomCommandPanel() { _customCommandPanel.ResetUI(); return _customCommandPanel; } internal SqlDataSourceSaveConfiguredConnectionPanel GetSaveConfiguredConnectionPanel() { _saveConfiguredConnectionPanel.ResetUI(); return _saveConfiguredConnectionPanel; } internal SqlDataSourceSummaryPanel GetSummaryPanel() { _summaryPanel.ResetUI(); return _summaryPanel; } ////// Called when a panel is about to change. /// protected override void OnPanelChanging(WizardPanelChangingEventArgs e) { base.OnPanelChanging(e); // If the panel that was just shown was the connection panel, we // keep track of what the connection is so that other panels can // use it. if (e.CurrentPanel == _connectionPanel) { _designerDataConnection = _connectionPanel.DataConnection; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- _SpnDictionary.cs
- MaskInputRejectedEventArgs.cs
- ListBoxChrome.cs
- XPathCompileException.cs
- FtpWebResponse.cs
- TouchesCapturedWithinProperty.cs
- QfeChecker.cs
- WebFormsRootDesigner.cs
- DBSchemaRow.cs
- SmiEventSink_Default.cs
- TimeoutException.cs
- ColorTransform.cs
- HtmlTableRow.cs
- PropertyItem.cs
- MemberListBinding.cs
- HandleCollector.cs
- QilFactory.cs
- ToolStripSeparatorRenderEventArgs.cs
- EngineSiteSapi.cs
- InternalSafeNativeMethods.cs
- propertytag.cs
- IdleTimeoutMonitor.cs
- VerticalAlignConverter.cs
- PlatformNotSupportedException.cs
- SafeCoTaskMem.cs
- AttributeCollection.cs
- RectAnimationUsingKeyFrames.cs
- ExpressionBindings.cs
- Quaternion.cs
- Renderer.cs
- SizeIndependentAnimationStorage.cs
- ZipIOExtraFieldElement.cs
- StrokeFIndices.cs
- PerformanceCounterPermissionEntryCollection.cs
- CatalogZoneAutoFormat.cs
- CreateParams.cs
- SqlDataSourceSelectingEventArgs.cs
- CopyCodeAction.cs
- WebSysDefaultValueAttribute.cs
- FixedDocumentPaginator.cs
- SqlGatherConsumedAliases.cs
- XslException.cs
- ScrollItemPatternIdentifiers.cs
- Stopwatch.cs
- DbConnectionFactory.cs
- RegisteredDisposeScript.cs
- StrokeNode.cs
- SecurityManager.cs
- ResourceDisplayNameAttribute.cs
- CircleHotSpot.cs
- ConfigurationConverterBase.cs
- WebSysDefaultValueAttribute.cs
- ControlParameter.cs
- SessionPageStatePersister.cs
- hresults.cs
- MetadataArtifactLoaderComposite.cs
- CheckBoxStandardAdapter.cs
- GroupQuery.cs
- TextTreeUndoUnit.cs
- LineInfo.cs
- ControlCachePolicy.cs
- SqlDataSourceQueryEditorForm.cs
- IsolatedStorage.cs
- SqlUtils.cs
- ToolStripDropDownMenu.cs
- IdentityReference.cs
- RequestSecurityTokenResponse.cs
- XmlElement.cs
- FontWeight.cs
- Crc32.cs
- DataGridViewRowPrePaintEventArgs.cs
- TypeViewSchema.cs
- XmlCharType.cs
- UnsafeNativeMethods.cs
- DefaultValueAttribute.cs
- EndpointAddressElementBase.cs
- MdImport.cs
- LZCodec.cs
- COM2ExtendedBrowsingHandler.cs
- HtmlCalendarAdapter.cs
- SqlInternalConnectionSmi.cs
- FormatPage.cs
- HostingEnvironment.cs
- Bits.cs
- XmlDigitalSignatureProcessor.cs
- BufferedWebEventProvider.cs
- dataobject.cs
- SweepDirectionValidation.cs
- GridViewRowPresenter.cs
- ScriptResourceHandler.cs
- ReturnEventArgs.cs
- HttpConfigurationSystem.cs
- Cloud.cs
- StringKeyFrameCollection.cs
- ApplicationDirectory.cs
- JsonEncodingStreamWrapper.cs
- RangeBase.cs
- XmlSchemaRedefine.cs
- Signature.cs
- ImmutableCommunicationTimeouts.cs