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
- LinkConverter.cs
- ForwardPositionQuery.cs
- OdbcInfoMessageEvent.cs
- EntityDataSourceColumn.cs
- XmlUtil.cs
- AssociationSetEnd.cs
- GregorianCalendar.cs
- Rectangle.cs
- SqlCrossApplyToCrossJoin.cs
- UIHelper.cs
- ActiveXHelper.cs
- DefaultWorkflowSchedulerService.cs
- BuilderElements.cs
- ToolStripItem.cs
- ConfigXmlElement.cs
- PropertyDescriptorGridEntry.cs
- CodeTypeReferenceCollection.cs
- WebPartDisplayModeEventArgs.cs
- ObjectDataProvider.cs
- ProtocolElement.cs
- HwndSourceParameters.cs
- ButtonChrome.cs
- TabControl.cs
- ToolStripSplitButton.cs
- ConfigPathUtility.cs
- odbcmetadatacolumnnames.cs
- PointAnimationBase.cs
- AssemblyAttributesGoHere.cs
- lengthconverter.cs
- RemoteWebConfigurationHost.cs
- CodeVariableDeclarationStatement.cs
- XamlValidatingReader.cs
- RequestBringIntoViewEventArgs.cs
- OverflowException.cs
- Grammar.cs
- DataGridItem.cs
- StatusBarAutomationPeer.cs
- VisualStyleRenderer.cs
- XmlComplianceUtil.cs
- StackOverflowException.cs
- DataGridDesigner.cs
- WsrmFault.cs
- WebPartRestoreVerb.cs
- CodeDOMProvider.cs
- HTMLTagNameToTypeMapper.cs
- StringFormat.cs
- EventMap.cs
- DragAssistanceManager.cs
- XMLUtil.cs
- InheritanceService.cs
- CompressedStack.cs
- TreeBuilderXamlTranslator.cs
- ApplicationSettingsBase.cs
- ApplicationInterop.cs
- CheckBoxAutomationPeer.cs
- DesignerSelectionListAdapter.cs
- NativeMethods.cs
- PreviewPageInfo.cs
- ContentValidator.cs
- StandardCommands.cs
- BaseProcessor.cs
- StaticExtension.cs
- MultiDataTrigger.cs
- ReliableMessagingVersion.cs
- DateTimeOffset.cs
- DistinctQueryOperator.cs
- SinglePageViewer.cs
- ListDictionaryInternal.cs
- Psha1DerivedKeyGenerator.cs
- QuestionEventArgs.cs
- AdornedElementPlaceholder.cs
- EntityDataSource.cs
- SemaphoreFullException.cs
- QilPatternVisitor.cs
- InspectionWorker.cs
- ResourceContainer.cs
- ControlIdConverter.cs
- Viewport3DVisual.cs
- EventMappingSettings.cs
- FaultFormatter.cs
- SourceFileBuildProvider.cs
- MimeFormImporter.cs
- RuleRef.cs
- ContentDesigner.cs
- WindowAutomationPeer.cs
- SystemEvents.cs
- BindingEntityInfo.cs
- HostingEnvironmentException.cs
- Utils.cs
- ZipIOExtraFieldPaddingElement.cs
- SqlCacheDependencyDatabase.cs
- SqlBuffer.cs
- PassportAuthenticationModule.cs
- DomNameTable.cs
- ModelItemDictionary.cs
- NoResizeHandleGlyph.cs
- DataServiceKeyAttribute.cs
- DataGridViewCellStyleConverter.cs
- WinEventWrap.cs
- SelectorAutomationPeer.cs