Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ControlPropertyNameConverter.cs
- XmlSerializerAssemblyAttribute.cs
- Win32SafeHandles.cs
- IisNotInstalledException.cs
- EntityContainerEmitter.cs
- ImageMetadata.cs
- RowUpdatingEventArgs.cs
- DbDeleteCommandTree.cs
- FormViewUpdateEventArgs.cs
- XamlToRtfWriter.cs
- TargetInvocationException.cs
- XamlValidatingReader.cs
- XPathDocumentIterator.cs
- URI.cs
- DiffuseMaterial.cs
- DSACryptoServiceProvider.cs
- LogStore.cs
- UnsafeNativeMethods.cs
- TraceSource.cs
- EllipticalNodeOperations.cs
- FontStretchConverter.cs
- Axis.cs
- SystemNetHelpers.cs
- StringValueSerializer.cs
- xsdvalidator.cs
- FlowDocumentPaginator.cs
- ProcessModelInfo.cs
- CDSCollectionETWBCLProvider.cs
- HostProtectionPermission.cs
- WindowsUpDown.cs
- PerfService.cs
- ImageButton.cs
- OperationCanceledException.cs
- CalendarDateRange.cs
- WorkflowDataContext.cs
- StylusSystemGestureEventArgs.cs
- UseManagedPresentationBindingElementImporter.cs
- CheckBox.cs
- TemplateColumn.cs
- BroadcastEventHelper.cs
- Utils.cs
- MessageQueuePermission.cs
- ConsumerConnectionPoint.cs
- BinaryReader.cs
- filewebresponse.cs
- ListBoxAutomationPeer.cs
- DataGridViewColumn.cs
- HttpListenerException.cs
- TextCharacters.cs
- HtmlEmptyTagControlBuilder.cs
- TdsRecordBufferSetter.cs
- AlignmentYValidation.cs
- PolyQuadraticBezierSegment.cs
- FontFamilyConverter.cs
- IdentityHolder.cs
- RuntimeWrappedException.cs
- PinnedBufferMemoryStream.cs
- TextSelectionHelper.cs
- ConfigXmlWhitespace.cs
- CustomErrorCollection.cs
- Random.cs
- BindingMAnagerBase.cs
- XmlSerializer.cs
- HttpResponseHeader.cs
- _NativeSSPI.cs
- MessageQueuePermissionEntryCollection.cs
- CompoundFileIOPermission.cs
- MaskDesignerDialog.cs
- TypeToTreeConverter.cs
- DeclaredTypeValidator.cs
- OptionUsage.cs
- EntityDataSourceViewSchema.cs
- FontSizeConverter.cs
- RawUIStateInputReport.cs
- OleDbFactory.cs
- DrawingGroup.cs
- BufferModeSettings.cs
- MimeObjectFactory.cs
- SerializationSectionGroup.cs
- AutoSizeToolBoxItem.cs
- StringFormat.cs
- JpegBitmapEncoder.cs
- PermissionSetEnumerator.cs
- GlobalizationSection.cs
- PackageRelationshipCollection.cs
- SettingsBase.cs
- RightsManagementEncryptionTransform.cs
- ConstraintManager.cs
- ToolboxBitmapAttribute.cs
- PageAdapter.cs
- InkCanvasInnerCanvas.cs
- EntityDataSourceWrapperCollection.cs
- URLIdentityPermission.cs
- StatusBar.cs
- DataGridViewColumnDesigner.cs
- TracePayload.cs
- GridViewRowPresenterBase.cs
- webbrowsersite.cs
- AttributeCollection.cs
- TableLayout.cs