Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / ndp / fx / src / DataWebControlsDesign / System / Data / WebControls / Design / Util / WizardPanel.cs / 3 / WizardPanel.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Diagnostics; using System.Drawing; using System.Windows.Forms; namespace System.Web.UI.Design.WebControls.Util { ////// Represents a single step in a wizard. /// WizardPanels are contained within a single WizardForm. /// internal class WizardPanel : System.Windows.Forms.UserControl { private WizardForm _parentWizard; private string _caption; private WizardPanel _nextPanel; private bool _needsToInvalidate; ////// Creates a new WizardPanel. /// public WizardPanel() { } ////// The caption to be shown on the WizardForm /// public string Caption { get { if (_caption == null) { return String.Empty; } return _caption; } set { _caption = value; if (_parentWizard != null) { _parentWizard.Invalidate(); } else { _needsToInvalidate = true; } } } ////// The panel to go to when the Next button is clicked. This can be set dynamically in /// the OnNext() event to customize the order in which panels are used. /// public WizardPanel NextPanel { get { return _nextPanel; } set { _nextPanel = value; Debug.Assert(_parentWizard != null); if (_parentWizard != null) { _parentWizard.RegisterPanel(_nextPanel); } } } ////// This method is called when the wizard's Finish button is clicked. /// It is called once for each wizard panel on the panel stack, in the order from the first panel to the last (current) panel. /// protected internal virtual void OnComplete() { } ////// Runs when the next button is clicked while this panel is showing. /// Returns true if the wizard should proceed to the next panel. /// public virtual bool OnNext() { return true; } ////// Runs when the previous button of the parent wizard form is clicked while this panel is active /// public virtual void OnPrevious() { } ////// internal void SetParentWizard(WizardForm parent) { _parentWizard = parent; if ((_parentWizard != null) && _needsToInvalidate) { _parentWizard.Invalidate(); _needsToInvalidate = false; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] // @backupOwner [....] //----------------------------------------------------------------------------- using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Diagnostics; using System.Drawing; using System.Windows.Forms; namespace System.Web.UI.Design.WebControls.Util { ////// Represents a single step in a wizard. /// WizardPanels are contained within a single WizardForm. /// internal class WizardPanel : System.Windows.Forms.UserControl { private WizardForm _parentWizard; private string _caption; private WizardPanel _nextPanel; private bool _needsToInvalidate; ////// Creates a new WizardPanel. /// public WizardPanel() { } ////// The caption to be shown on the WizardForm /// public string Caption { get { if (_caption == null) { return String.Empty; } return _caption; } set { _caption = value; if (_parentWizard != null) { _parentWizard.Invalidate(); } else { _needsToInvalidate = true; } } } ////// The panel to go to when the Next button is clicked. This can be set dynamically in /// the OnNext() event to customize the order in which panels are used. /// public WizardPanel NextPanel { get { return _nextPanel; } set { _nextPanel = value; Debug.Assert(_parentWizard != null); if (_parentWizard != null) { _parentWizard.RegisterPanel(_nextPanel); } } } ////// This method is called when the wizard's Finish button is clicked. /// It is called once for each wizard panel on the panel stack, in the order from the first panel to the last (current) panel. /// protected internal virtual void OnComplete() { } ////// Runs when the next button is clicked while this panel is showing. /// Returns true if the wizard should proceed to the next panel. /// public virtual bool OnNext() { return true; } ////// Runs when the previous button of the parent wizard form is clicked while this panel is active /// public virtual void OnPrevious() { } ////// internal void SetParentWizard(WizardForm parent) { _parentWizard = parent; if ((_parentWizard != null) && _needsToInvalidate) { _parentWizard.Invalidate(); _needsToInvalidate = false; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ChangePasswordDesigner.cs
- SecurityContextSecurityTokenAuthenticator.cs
- StylusPlugin.cs
- ScrollableControl.cs
- BamlVersionHeader.cs
- ColorConvertedBitmapExtension.cs
- SiteMapProvider.cs
- ThreadExceptionEvent.cs
- AssemblyHash.cs
- OleDbEnumerator.cs
- EnumDataContract.cs
- RequestResizeEvent.cs
- Vector3dCollection.cs
- ClientSponsor.cs
- UserNamePasswordClientCredential.cs
- SqlCacheDependency.cs
- ButtonChrome.cs
- RouteItem.cs
- DataException.cs
- XPathNodeHelper.cs
- BatchServiceHost.cs
- DecoratedNameAttribute.cs
- PersonalizationProviderHelper.cs
- BufferedGraphics.cs
- ScalarType.cs
- EngineSiteSapi.cs
- PathSegment.cs
- TextLine.cs
- SqlAliaser.cs
- BeginEvent.cs
- FontStyles.cs
- GridViewRowPresenterBase.cs
- ByteConverter.cs
- Membership.cs
- ToolStripDropTargetManager.cs
- DynamicRendererThreadManager.cs
- PopupControlService.cs
- SerializationEventsCache.cs
- XmlNamespaceMappingCollection.cs
- WebDisplayNameAttribute.cs
- XhtmlMobileTextWriter.cs
- BoolLiteral.cs
- PrintDialog.cs
- DataFormats.cs
- HMACSHA1.cs
- SourceElementsCollection.cs
- SystemSounds.cs
- Roles.cs
- MdImport.cs
- DbMetaDataCollectionNames.cs
- ScriptMethodAttribute.cs
- X509CertificateClaimSet.cs
- HtmlSelect.cs
- ObjectDisposedException.cs
- Point3DAnimation.cs
- TypeToken.cs
- RadioButtonList.cs
- PKCS1MaskGenerationMethod.cs
- ToolStripDropDownClosedEventArgs.cs
- NetworkStream.cs
- LocationSectionRecord.cs
- HandlerBase.cs
- BaseTemplateParser.cs
- InstalledFontCollection.cs
- NativeCppClassAttribute.cs
- DatePickerDateValidationErrorEventArgs.cs
- LinqDataSourceInsertEventArgs.cs
- XmlLanguage.cs
- WebPartConnectionsEventArgs.cs
- VoiceObjectToken.cs
- CounterSampleCalculator.cs
- JpegBitmapEncoder.cs
- Context.cs
- IndexOutOfRangeException.cs
- FormViewUpdatedEventArgs.cs
- ELinqQueryState.cs
- NullReferenceException.cs
- AssertSection.cs
- wpf-etw.cs
- NavigationEventArgs.cs
- FrugalMap.cs
- ParserExtension.cs
- SingleSelectRootGridEntry.cs
- Clipboard.cs
- ButtonStandardAdapter.cs
- Span.cs
- PolicyUnit.cs
- XmlDataSourceView.cs
- GeneralTransformCollection.cs
- LinkedResource.cs
- Block.cs
- CounterSample.cs
- TrackingStringDictionary.cs
- ReaderWriterLock.cs
- VariableBinder.cs
- MenuCommandsChangedEventArgs.cs
- DESCryptoServiceProvider.cs
- Light.cs
- StateDesigner.cs
- Polyline.cs