Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- PanelStyle.cs
- ColorConverter.cs
- PocoEntityKeyStrategy.cs
- MailAddress.cs
- BasicKeyConstraint.cs
- Formatter.cs
- DbProviderFactories.cs
- WebPartHelpVerb.cs
- CodeDOMUtility.cs
- RSAOAEPKeyExchangeFormatter.cs
- CalendarButton.cs
- WebPartManager.cs
- Int32Rect.cs
- DbConnectionInternal.cs
- WebPartConnectionsConnectVerb.cs
- PropertyConverter.cs
- QuaternionAnimationBase.cs
- TypeExtension.cs
- Bitmap.cs
- BufferModeSettings.cs
- ActiveXSite.cs
- HttpDictionary.cs
- BitmapEffectInputData.cs
- HMACSHA256.cs
- IndexedEnumerable.cs
- COAUTHINFO.cs
- ObjectQueryExecutionPlan.cs
- DecodeHelper.cs
- StylusEventArgs.cs
- EncoderReplacementFallback.cs
- DataTableExtensions.cs
- NestedContainer.cs
- WebPartAddingEventArgs.cs
- Separator.cs
- UserControlParser.cs
- FigureParaClient.cs
- DesignerActionTextItem.cs
- PageContent.cs
- PixelFormats.cs
- RubberbandSelector.cs
- TraceHandlerErrorFormatter.cs
- CustomSignedXml.cs
- CompilerResults.cs
- FileChangesMonitor.cs
- BaseAsyncResult.cs
- MDIControlStrip.cs
- MouseEvent.cs
- InputScopeConverter.cs
- CodeFieldReferenceExpression.cs
- Highlights.cs
- MessageQueuePermissionAttribute.cs
- ByteStreamMessageEncodingElement.cs
- PolicyStatement.cs
- LineServices.cs
- UmAlQuraCalendar.cs
- _AcceptOverlappedAsyncResult.cs
- ResourceSet.cs
- StylusPointCollection.cs
- XPathNavigator.cs
- PackageRelationship.cs
- AssociationSetEnd.cs
- Point3DCollection.cs
- LicenseProviderAttribute.cs
- UnknownWrapper.cs
- UmAlQuraCalendar.cs
- SingleTagSectionHandler.cs
- SapiRecoContext.cs
- FixedFindEngine.cs
- CatalogZone.cs
- TransformerInfo.cs
- VariableReference.cs
- CursorConverter.cs
- ResourceDescriptionAttribute.cs
- RequiredFieldValidator.cs
- FloatUtil.cs
- BitmapScalingModeValidation.cs
- SafeRightsManagementQueryHandle.cs
- ServiceCredentialsSecurityTokenManager.cs
- DebuggerAttributes.cs
- PropertyGeneratedEventArgs.cs
- SecurityIdentifierConverter.cs
- DataDocumentXPathNavigator.cs
- ServiceModelExtensionElement.cs
- StringHelper.cs
- BrowsableAttribute.cs
- _FtpDataStream.cs
- Operators.cs
- PropertyEmitterBase.cs
- TypeValidationEventArgs.cs
- PermissionSetEnumerator.cs
- ListViewItem.cs
- EntitySqlQueryState.cs
- TypeBuilder.cs
- SafeNativeMethodsOther.cs
- BrowserDefinition.cs
- HttpWriter.cs
- MenuTracker.cs
- XPathException.cs
- ParseNumbers.cs
- RichTextBoxAutomationPeer.cs