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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Exceptions.cs
- LocatorManager.cs
- EntityParameterCollection.cs
- ClientApiGenerator.cs
- serverconfig.cs
- StatusBarAutomationPeer.cs
- ExpanderAutomationPeer.cs
- AspNetSynchronizationContext.cs
- TextPointer.cs
- StrongNameIdentityPermission.cs
- EntitySqlQueryState.cs
- Int64KeyFrameCollection.cs
- WebBrowserNavigatedEventHandler.cs
- PermissionToken.cs
- Reference.cs
- HexParser.cs
- BitmapCodecInfo.cs
- AppModelKnownContentFactory.cs
- TypeSystemHelpers.cs
- RadioButtonList.cs
- KnownColorTable.cs
- StylusDevice.cs
- SecurityTokenRequirement.cs
- DateTimeValueSerializer.cs
- DotExpr.cs
- WebPartManager.cs
- Point3DCollection.cs
- CodeArrayIndexerExpression.cs
- DBCommand.cs
- TailPinnedEventArgs.cs
- LongValidatorAttribute.cs
- DefaultValueConverter.cs
- Maps.cs
- Completion.cs
- HandleDictionary.cs
- SetterBase.cs
- ActivityCodeGenerator.cs
- EntryPointNotFoundException.cs
- AnnotationResource.cs
- userdatakeys.cs
- DesignerVerb.cs
- RadioButtonFlatAdapter.cs
- ExpressionVisitor.cs
- QilInvoke.cs
- CircleHotSpot.cs
- DataViewListener.cs
- SqlNotificationRequest.cs
- PagePropertiesChangingEventArgs.cs
- OAVariantLib.cs
- AutomationPropertyInfo.cs
- _SslState.cs
- DesignTimeTemplateParser.cs
- EntityDataSourceState.cs
- DBNull.cs
- ObjectView.cs
- log.cs
- TextFormatterContext.cs
- KnownTypes.cs
- Error.cs
- ServiceOperationListItemList.cs
- EntitySetBaseCollection.cs
- XslUrlEditor.cs
- RuleSetCollection.cs
- codemethodreferenceexpression.cs
- TreeNode.cs
- PrinterResolution.cs
- CompModSwitches.cs
- InvalidEnumArgumentException.cs
- TextWriter.cs
- StringDictionary.cs
- EntitySet.cs
- TabControlCancelEvent.cs
- ReadOnlyNameValueCollection.cs
- LocatorManager.cs
- ProviderSettings.cs
- StringFreezingAttribute.cs
- ChannelManager.cs
- MetadataExchangeBindings.cs
- SecurityCredentialsManager.cs
- Guid.cs
- ResourcePart.cs
- FontSourceCollection.cs
- HeaderUtility.cs
- GlyphingCache.cs
- DataGridViewHitTestInfo.cs
- PrePrepareMethodAttribute.cs
- SafeViewOfFileHandle.cs
- TransactionTraceIdentifier.cs
- TypeInitializationException.cs
- ReadOnlyObservableCollection.cs
- SiteMapNodeItemEventArgs.cs
- TcpAppDomainProtocolHandler.cs
- TypeExtension.cs
- SortExpressionBuilder.cs
- Merger.cs
- WindowsPen.cs
- TextEditorDragDrop.cs
- DiscardableAttribute.cs
- StatusBarItemAutomationPeer.cs
- GlobalEventManager.cs