Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AsyncCodeActivityContext.cs
- TextWriter.cs
- PlatformNotSupportedException.cs
- GenericWebPart.cs
- UrlRoutingModule.cs
- SByteStorage.cs
- WhitespaceRule.cs
- WebPartConnectionsCancelVerb.cs
- PEFileEvidenceFactory.cs
- EncodingTable.cs
- EdmType.cs
- Camera.cs
- EastAsianLunisolarCalendar.cs
- SignalGate.cs
- ReferencedCollectionType.cs
- NegationPusher.cs
- CopyOnWriteList.cs
- Validator.cs
- CommonGetThemePartSize.cs
- JsonFormatGeneratorStatics.cs
- XmlNullResolver.cs
- MessageDesigner.cs
- QueueProcessor.cs
- ObjectDisposedException.cs
- FixUp.cs
- BuilderElements.cs
- ConfigurationLocationCollection.cs
- TextServicesManager.cs
- PrinterSettings.cs
- AssemblyBuilder.cs
- ListViewPagedDataSource.cs
- CommandID.cs
- SequentialOutput.cs
- MULTI_QI.cs
- SerialReceived.cs
- ToolStripMenuItemCodeDomSerializer.cs
- SqlGenerator.cs
- PropertyManager.cs
- Rect3D.cs
- WindowsListViewGroup.cs
- Activity.cs
- TextRunCacheImp.cs
- SpecialFolderEnumConverter.cs
- XmlDownloadManager.cs
- DialogResultConverter.cs
- StrokeIntersection.cs
- UITypeEditors.cs
- RawStylusInputReport.cs
- DriveNotFoundException.cs
- MorphHelper.cs
- SemanticBasicElement.cs
- XmlnsPrefixAttribute.cs
- HTTPAPI_VERSION.cs
- X509Utils.cs
- PeerApplicationLaunchInfo.cs
- _AutoWebProxyScriptWrapper.cs
- ClassicBorderDecorator.cs
- SelectedDatesCollection.cs
- XmlSignatureProperties.cs
- TypedReference.cs
- BoundColumn.cs
- PixelFormats.cs
- KeyEvent.cs
- BaseContextMenu.cs
- InsufficientMemoryException.cs
- PointHitTestParameters.cs
- WebException.cs
- SqlMethodCallConverter.cs
- ContextMenuService.cs
- BindToObject.cs
- InputLanguageEventArgs.cs
- SqlCacheDependencyDatabase.cs
- BindToObject.cs
- VerificationAttribute.cs
- FixedFindEngine.cs
- ResXResourceReader.cs
- SchemaDeclBase.cs
- TypeLibConverter.cs
- ArrayList.cs
- CustomErrorCollection.cs
- ZipFileInfoCollection.cs
- GrabHandleGlyph.cs
- AdvancedBindingEditor.cs
- TextLineBreak.cs
- Listbox.cs
- CapabilitiesState.cs
- GridViewColumnHeader.cs
- WorkflowServiceOperationListItem.cs
- DataBoundControlAdapter.cs
- documentation.cs
- CorrelationToken.cs
- DoubleLinkList.cs
- EventLogLink.cs
- ScriptBehaviorDescriptor.cs
- BaseUriHelper.cs
- ScrollItemPattern.cs
- ThrowOnMultipleAssignment.cs
- ComPlusSynchronizationContext.cs
- GPPOINTF.cs
- CodeGenerator.cs