Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / NumericUpDownAcceleration.cs / 1305376 / 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
- SelfIssuedAuthRSAPKCS1SignatureFormatter.cs
- Menu.cs
- ToolStripPanelCell.cs
- WindowsNonControl.cs
- EdmError.cs
- Duration.cs
- StrokeRenderer.cs
- LambdaReference.cs
- HttpListenerRequest.cs
- EnumBuilder.cs
- ClientCredentialsElement.cs
- CursorInteropHelper.cs
- EncryptedReference.cs
- CompilationUnit.cs
- SelectionProviderWrapper.cs
- SrgsRule.cs
- CompleteWizardStep.cs
- RuleSettings.cs
- XmlSchemaComplexContentExtension.cs
- shaperfactoryquerycachekey.cs
- HttpModuleCollection.cs
- DebugHandleTracker.cs
- MimeImporter.cs
- PasswordPropertyTextAttribute.cs
- Highlights.cs
- PagesSection.cs
- RawKeyboardInputReport.cs
- SingleResultAttribute.cs
- SQLInt64.cs
- DockPattern.cs
- EdmToObjectNamespaceMap.cs
- Subset.cs
- BackStopAuthenticationModule.cs
- SchemaConstraints.cs
- ReferentialConstraintRoleElement.cs
- StaticExtensionConverter.cs
- HttpListenerRequestTraceRecord.cs
- ValidatorCollection.cs
- SqlBulkCopyColumnMappingCollection.cs
- StrokeRenderer.cs
- ToolConsole.cs
- PenThreadPool.cs
- XslTransform.cs
- PictureBox.cs
- SoapExtensionReflector.cs
- ObjectRef.cs
- TimelineGroup.cs
- DispatcherExceptionEventArgs.cs
- Registry.cs
- X509CertificateCollection.cs
- SimpleLine.cs
- Vertex.cs
- GenericEnumConverter.cs
- QueryOutputWriter.cs
- AssociationTypeEmitter.cs
- TdsParameterSetter.cs
- JoinTreeNode.cs
- ResourceReferenceKeyNotFoundException.cs
- TextSelectionHighlightLayer.cs
- PropertyChangedEventManager.cs
- GrammarBuilderPhrase.cs
- ConnectivityStatus.cs
- HttpClientChannel.cs
- Multiply.cs
- ActivitySurrogate.cs
- SmiEventSink_Default.cs
- VectorAnimationBase.cs
- Renderer.cs
- DeclarativeCatalogPart.cs
- SeparatorAutomationPeer.cs
- Model3D.cs
- IImplicitResourceProvider.cs
- ImageListImage.cs
- ApplicationException.cs
- UiaCoreProviderApi.cs
- Logging.cs
- XmlArrayItemAttribute.cs
- WebServiceMethodData.cs
- SqlMethods.cs
- MultiByteCodec.cs
- NegatedCellConstant.cs
- XmlEncodedRawTextWriter.cs
- StatusBarPanelClickEvent.cs
- Quad.cs
- SQLChars.cs
- ComplexLine.cs
- RuleSetCollection.cs
- HttpHandler.cs
- MemoryRecordBuffer.cs
- FieldAccessException.cs
- MultipartContentParser.cs
- WebPartEventArgs.cs
- TrackingMemoryStreamFactory.cs
- NativeObjectSecurity.cs
- CommandHelper.cs
- JpegBitmapEncoder.cs
- GetReadStreamResult.cs
- DictionaryEntry.cs
- ControlTemplate.cs
- __ComObject.cs