Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / WinForms / Managed / System / WinForms / NumericUpDownAcceleration.cs / 1 / NumericUpDownAcceleration.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System; ////// Comprises the information specifying how acceleration should be performed /// on a Windows up-down control when the up/down button is pressed for certain /// amount of time. /// public class NumericUpDownAcceleration { private Int32 seconds; // Ideally we would use UInt32 but it is not CLS-compliant. private Decimal increment; // Ideally we would use UInt32 but NumericUpDown uses Decimal values. public NumericUpDownAcceleration(Int32 seconds, Decimal increment) { if (seconds < 0) { throw new ArgumentOutOfRangeException("seconds", seconds, SR.GetString(SR.NumericUpDownLessThanZeroError)); } if (increment < Decimal.Zero) { throw new ArgumentOutOfRangeException("increment", increment, SR.GetString(SR.NumericUpDownLessThanZeroError)); } this.seconds = seconds; this.increment = increment; } ////// Determines the amount of time for the UpDown control to wait to set the increment /// step when holding the up/down button. /// public Int32 Seconds { get { return this.seconds; } set { if (value < 0) { throw new ArgumentOutOfRangeException("seconds", value, SR.GetString(SR.NumericUpDownLessThanZeroError)); } this.seconds = value; } } ////// Determines the amount to increment by. /// public Decimal Increment { get { return this.increment; } set { if (value < Decimal.Zero) { throw new ArgumentOutOfRangeException("increment", value, SR.GetString(SR.NumericUpDownLessThanZeroError)); } this.increment = value; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System; ////// Comprises the information specifying how acceleration should be performed /// on a Windows up-down control when the up/down button is pressed for certain /// amount of time. /// public class NumericUpDownAcceleration { private Int32 seconds; // Ideally we would use UInt32 but it is not CLS-compliant. private Decimal increment; // Ideally we would use UInt32 but NumericUpDown uses Decimal values. public NumericUpDownAcceleration(Int32 seconds, Decimal increment) { if (seconds < 0) { throw new ArgumentOutOfRangeException("seconds", seconds, SR.GetString(SR.NumericUpDownLessThanZeroError)); } if (increment < Decimal.Zero) { throw new ArgumentOutOfRangeException("increment", increment, SR.GetString(SR.NumericUpDownLessThanZeroError)); } this.seconds = seconds; this.increment = increment; } ////// Determines the amount of time for the UpDown control to wait to set the increment /// step when holding the up/down button. /// public Int32 Seconds { get { return this.seconds; } set { if (value < 0) { throw new ArgumentOutOfRangeException("seconds", value, SR.GetString(SR.NumericUpDownLessThanZeroError)); } this.seconds = value; } } ////// Determines the amount to increment by. /// public Decimal Increment { get { return this.increment; } set { if (value < Decimal.Zero) { throw new ArgumentOutOfRangeException("increment", value, SR.GetString(SR.NumericUpDownLessThanZeroError)); } this.increment = value; } } } } // 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
- ValidatorCollection.cs
- TextBox.cs
- TypeLibConverter.cs
- SqlNodeAnnotation.cs
- NameValueSectionHandler.cs
- FixedPageAutomationPeer.cs
- SelectionListDesigner.cs
- RepeatBehaviorConverter.cs
- MsmqIntegrationReceiveParameters.cs
- Configuration.cs
- EncryptedReference.cs
- FileDataSourceCache.cs
- InputManager.cs
- XPathPatternParser.cs
- MemberRelationshipService.cs
- ScrollItemPattern.cs
- ObjectQuery_EntitySqlExtensions.cs
- PDBReader.cs
- IndependentlyAnimatedPropertyMetadata.cs
- ControlDesigner.cs
- SqlUDTStorage.cs
- ThrowHelper.cs
- CommandHelper.cs
- FileEnumerator.cs
- ReplyChannelAcceptor.cs
- ThicknessKeyFrameCollection.cs
- XhtmlBasicPanelAdapter.cs
- IntSecurity.cs
- xml.cs
- BidPrivateBase.cs
- DynamicDocumentPaginator.cs
- processwaithandle.cs
- DeferredElementTreeState.cs
- TextTreeInsertElementUndoUnit.cs
- DbProviderFactories.cs
- ScriptingProfileServiceSection.cs
- DataServiceStreamResponse.cs
- ClaimComparer.cs
- ApplicationTrust.cs
- FunctionOverloadResolver.cs
- SmtpSection.cs
- ConfigurationSettings.cs
- AbandonedMutexException.cs
- HtmlTitle.cs
- WindowsListViewSubItem.cs
- SizeF.cs
- ToolStripOverflow.cs
- ConvertTextFrag.cs
- BitmapPalette.cs
- RowBinding.cs
- XmlUtilWriter.cs
- ReadOnlyAttribute.cs
- ScrollBar.cs
- SpecularMaterial.cs
- XNameTypeConverter.cs
- TextServicesProperty.cs
- TranslateTransform3D.cs
- CryptoConfig.cs
- DbProviderManifest.cs
- ImportContext.cs
- EventLogInformation.cs
- EnumerationRangeValidationUtil.cs
- DesignTimeDataBinding.cs
- odbcmetadatacollectionnames.cs
- CompressStream.cs
- DataExpression.cs
- COM2PropertyDescriptor.cs
- DataGridViewColumnHeaderCell.cs
- InputLanguageEventArgs.cs
- InvalidComObjectException.cs
- IconBitmapDecoder.cs
- ByteFacetDescriptionElement.cs
- FontStyles.cs
- SmiRequestExecutor.cs
- FixedSOMElement.cs
- LinkGrep.cs
- UnsafeNativeMethods.cs
- FirstMatchCodeGroup.cs
- SHA1CryptoServiceProvider.cs
- SessionStateItemCollection.cs
- TextEditorLists.cs
- Visual3D.cs
- AuthenticationManager.cs
- CheckedPointers.cs
- UriExt.cs
- METAHEADER.cs
- translator.cs
- HitTestWithGeometryDrawingContextWalker.cs
- TypeSystem.cs
- VersionPair.cs
- Int32RectConverter.cs
- StrongNameHelpers.cs
- DesignerCategoryAttribute.cs
- DataRelation.cs
- RegexWorker.cs
- RunWorkerCompletedEventArgs.cs
- indexingfiltermarshaler.cs
- LayoutInformation.cs
- DispatcherTimer.cs
- PixelFormat.cs