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
- ProviderIncompatibleException.cs
- ToolStripManager.cs
- PenThreadWorker.cs
- _HeaderInfoTable.cs
- SimpleMailWebEventProvider.cs
- QilScopedVisitor.cs
- ResourcePermissionBaseEntry.cs
- DictionaryGlobals.cs
- ContextProperty.cs
- Config.cs
- AssemblyCollection.cs
- EdmProviderManifest.cs
- AssemblyGen.cs
- ComplexPropertyEntry.cs
- QilInvokeLateBound.cs
- SiteMapNodeItem.cs
- UTF32Encoding.cs
- BitmapEffectCollection.cs
- DbTransaction.cs
- TextSpanModifier.cs
- DrawingAttributes.cs
- SecureUICommand.cs
- Transaction.cs
- CodeBlockBuilder.cs
- XNodeSchemaApplier.cs
- EdmSchemaAttribute.cs
- DataServiceQueryProvider.cs
- DataTemplateKey.cs
- CustomTypeDescriptor.cs
- Timer.cs
- PrivacyNoticeBindingElementImporter.cs
- DataGridViewComboBoxCell.cs
- SerializationInfoEnumerator.cs
- SessionPageStatePersister.cs
- CodeMethodInvokeExpression.cs
- XmlSchemaObjectTable.cs
- QueryAccessibilityHelpEvent.cs
- EventMappingSettingsCollection.cs
- XmlSchemaComplexContentRestriction.cs
- ToolStripSeparatorRenderEventArgs.cs
- ConnectionManagementElementCollection.cs
- ManifestResourceInfo.cs
- AccessDataSourceView.cs
- ToolStripContentPanel.cs
- AttributeUsageAttribute.cs
- PackWebResponse.cs
- EventProxy.cs
- SingleKeyFrameCollection.cs
- _DigestClient.cs
- SerializationBinder.cs
- ListMarkerLine.cs
- JavascriptCallbackBehaviorAttribute.cs
- ModuleConfigurationInfo.cs
- RegexCapture.cs
- StylusSystemGestureEventArgs.cs
- SmtpMail.cs
- WindowHideOrCloseTracker.cs
- CallTemplateAction.cs
- LinqDataSourceContextEventArgs.cs
- ZipIOCentralDirectoryBlock.cs
- VBIdentifierDesigner.xaml.cs
- SystemColorTracker.cs
- ChangeProcessor.cs
- TemplateBaseAction.cs
- WorkflowValidationFailedException.cs
- TraceHandlerErrorFormatter.cs
- MembershipPasswordException.cs
- ServerIdentity.cs
- VirtualPath.cs
- TagMapInfo.cs
- XmlSchemaAnnotated.cs
- NamedObjectList.cs
- TypeContext.cs
- DataGridViewElement.cs
- Site.cs
- XmlSchemaExternal.cs
- CompiledRegexRunner.cs
- HashAlgorithm.cs
- FigureParagraph.cs
- HttpDebugHandler.cs
- StringReader.cs
- FileDialogPermission.cs
- GridLength.cs
- Transactions.cs
- RoutedCommand.cs
- PageCodeDomTreeGenerator.cs
- PropertyGrid.cs
- ToolBar.cs
- _SslSessionsCache.cs
- AmbientEnvironment.cs
- DrawListViewColumnHeaderEventArgs.cs
- PerfCounters.cs
- DataGridViewCellEventArgs.cs
- DefaultValueTypeConverter.cs
- NameSpaceExtractor.cs
- QueryModel.cs
- Table.cs
- SmtpNetworkElement.cs
- XpsException.cs
- GridViewCancelEditEventArgs.cs