Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- BypassElementCollection.cs
- ScriptRegistrationManager.cs
- WebPartPersonalization.cs
- DataFormat.cs
- ForceCopyBuildProvider.cs
- XamlWriter.cs
- TextMarkerSource.cs
- PropertyDescriptorComparer.cs
- SafeRightsManagementEnvironmentHandle.cs
- SqlCacheDependency.cs
- XsdBuildProvider.cs
- CharacterMetrics.cs
- counter.cs
- EntityDesignerUtils.cs
- GenericsInstances.cs
- Completion.cs
- NullableConverter.cs
- CqlParser.cs
- RegexNode.cs
- embossbitmapeffect.cs
- PageAsyncTask.cs
- TableSectionStyle.cs
- WorkflowInstanceQuery.cs
- NavigationWindow.cs
- SapiRecognizer.cs
- MethodBuilder.cs
- StorageConditionPropertyMapping.cs
- ManagedWndProcTracker.cs
- SetIndexBinder.cs
- AQNBuilder.cs
- CodeSubDirectoriesCollection.cs
- IxmlLineInfo.cs
- TreeView.cs
- CircleHotSpot.cs
- BrowserCapabilitiesCodeGenerator.cs
- IgnoreFileBuildProvider.cs
- HttpGetClientProtocol.cs
- GcHandle.cs
- TraceSource.cs
- LayoutDump.cs
- SecurityChannelFactory.cs
- ConnectionConsumerAttribute.cs
- XsdValidatingReader.cs
- StrokeNodeOperations2.cs
- InternalBufferManager.cs
- EdmFunction.cs
- XhtmlMobileTextWriter.cs
- XamlClipboardData.cs
- RpcResponse.cs
- SaveFileDialog.cs
- VisualTreeUtils.cs
- InternalConfigHost.cs
- PolicyException.cs
- ControllableStoryboardAction.cs
- ConfigurationValidatorAttribute.cs
- ConfigurationLocationCollection.cs
- SafeViewOfFileHandle.cs
- Point4D.cs
- SmtpMail.cs
- Root.cs
- SmtpTransport.cs
- DataGridViewLayoutData.cs
- SafeWaitHandle.cs
- M3DUtil.cs
- EntityConnectionStringBuilder.cs
- namescope.cs
- AspNetCacheProfileAttribute.cs
- WebServiceBindingAttribute.cs
- ValueUtilsSmi.cs
- RSAPKCS1SignatureFormatter.cs
- IteratorDescriptor.cs
- NumberAction.cs
- ActivityCodeDomReferenceService.cs
- ClientTargetCollection.cs
- ExtenderControl.cs
- Section.cs
- GlyphingCache.cs
- ControlBuilderAttribute.cs
- ViewGenerator.cs
- ManipulationDeltaEventArgs.cs
- AutomationEvent.cs
- DbConnectionInternal.cs
- DPTypeDescriptorContext.cs
- WebPartConnectionsCloseVerb.cs
- EntityDataSourceEntitySetNameItem.cs
- path.cs
- ScrollChangedEventArgs.cs
- OraclePermissionAttribute.cs
- DataKeyArray.cs
- ToolZoneDesigner.cs
- DependencyPropertyConverter.cs
- ExpressionEvaluator.cs
- FileDialogCustomPlace.cs
- HandledMouseEvent.cs
- UIElementCollection.cs
- SafeNativeMethods.cs
- ResolveNameEventArgs.cs
- DragAssistanceManager.cs
- DetailsViewInsertEventArgs.cs
- TextSelectionHelper.cs