Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Input / RawUIStateInputReport.cs / 1 / RawUIStateInputReport.cs
using System; using System.Security; using System.Security.Permissions; using MS.Internal; using MS.Win32; using System.Windows; namespace System.Windows.Input { ////// The RawUIStateInputReport class encapsulates the raw input /// provided from WM_*UISTATE* messages. /// internal class RawUIStateInputReport : InputReport { ////// Constructs an instance of the RawUIStateInputReport class. /// /// /// The input source that provided this input. /// /// /// The mode in which the input is being provided. /// /// /// The time when the input occured. /// /// /// The action being reported. /// /// /// The targets being reported. /// ////// Critical:This handles critical data in the form of PresentationSource /// TreatAsSafe:The data has demands on the property when someone tries to access it. /// [SecurityCritical,SecurityTreatAsSafe] public RawUIStateInputReport( PresentationSource inputSource, InputMode mode, int timestamp, RawUIStateActions action, RawUIStateTargets targets) : base(inputSource, InputType.Keyboard, mode, timestamp) { if (!IsValidRawUIStateAction(action)) throw new System.ComponentModel.InvalidEnumArgumentException("action", (int)action, typeof(RawUIStateActions)); if (!IsValidRawUIStateTargets(targets)) throw new System.ComponentModel.InvalidEnumArgumentException("targets", (int)targets, typeof(RawUIStateTargets)); _action = action; _targets = targets; } ////// Read-only access to the action that was reported. /// public RawUIStateActions Action {get {return _action;}} ////// Read-only access to the targets that were reported. /// public RawUIStateTargets Targets {get {return _targets;}} // IsValid Method for RawUIStateActions. internal static bool IsValidRawUIStateAction(RawUIStateActions action) { return (action == RawUIStateActions.Set || action == RawUIStateActions.Clear || action == RawUIStateActions.Initialize); } // IsValid Method for RawUIStateTargets. Relies on the enum being [Flags]. internal static bool IsValidRawUIStateTargets(RawUIStateTargets targets) { return ((targets & (RawUIStateTargets.HideFocus | RawUIStateTargets.HideAccelerators | RawUIStateTargets.Active)) == targets); } private RawUIStateActions _action; private RawUIStateTargets _targets; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Security; using System.Security.Permissions; using MS.Internal; using MS.Win32; using System.Windows; namespace System.Windows.Input { ////// The RawUIStateInputReport class encapsulates the raw input /// provided from WM_*UISTATE* messages. /// internal class RawUIStateInputReport : InputReport { ////// Constructs an instance of the RawUIStateInputReport class. /// /// /// The input source that provided this input. /// /// /// The mode in which the input is being provided. /// /// /// The time when the input occured. /// /// /// The action being reported. /// /// /// The targets being reported. /// ////// Critical:This handles critical data in the form of PresentationSource /// TreatAsSafe:The data has demands on the property when someone tries to access it. /// [SecurityCritical,SecurityTreatAsSafe] public RawUIStateInputReport( PresentationSource inputSource, InputMode mode, int timestamp, RawUIStateActions action, RawUIStateTargets targets) : base(inputSource, InputType.Keyboard, mode, timestamp) { if (!IsValidRawUIStateAction(action)) throw new System.ComponentModel.InvalidEnumArgumentException("action", (int)action, typeof(RawUIStateActions)); if (!IsValidRawUIStateTargets(targets)) throw new System.ComponentModel.InvalidEnumArgumentException("targets", (int)targets, typeof(RawUIStateTargets)); _action = action; _targets = targets; } ////// Read-only access to the action that was reported. /// public RawUIStateActions Action {get {return _action;}} ////// Read-only access to the targets that were reported. /// public RawUIStateTargets Targets {get {return _targets;}} // IsValid Method for RawUIStateActions. internal static bool IsValidRawUIStateAction(RawUIStateActions action) { return (action == RawUIStateActions.Set || action == RawUIStateActions.Clear || action == RawUIStateActions.Initialize); } // IsValid Method for RawUIStateTargets. Relies on the enum being [Flags]. internal static bool IsValidRawUIStateTargets(RawUIStateTargets targets) { return ((targets & (RawUIStateTargets.HideFocus | RawUIStateTargets.HideAccelerators | RawUIStateTargets.Active)) == targets); } private RawUIStateActions _action; private RawUIStateTargets _targets; } } // 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
- BindingNavigator.cs
- SlipBehavior.cs
- ListBindingHelper.cs
- ExeConfigurationFileMap.cs
- DnsPermission.cs
- RegexCode.cs
- XmlChildNodes.cs
- Emitter.cs
- JumpPath.cs
- StrokeIntersection.cs
- IntSumAggregationOperator.cs
- SolidColorBrush.cs
- RelatedImageListAttribute.cs
- DbMetaDataColumnNames.cs
- Converter.cs
- Transform.cs
- MulticastOption.cs
- FastEncoderWindow.cs
- IgnoreSectionHandler.cs
- TraceLevelStore.cs
- ListenerConfig.cs
- ToolStripSeparatorRenderEventArgs.cs
- StaticTextPointer.cs
- ThaiBuddhistCalendar.cs
- VirtualPath.cs
- DbDataSourceEnumerator.cs
- InfocardExtendedInformationEntry.cs
- Point3D.cs
- ReadWriteSpinLock.cs
- DictionarySectionHandler.cs
- SamlSubject.cs
- RSAPKCS1SignatureDeformatter.cs
- EntryIndex.cs
- StatusBarPanelClickEvent.cs
- GCHandleCookieTable.cs
- SmiSettersStream.cs
- PeerTransportListenAddressValidatorAttribute.cs
- ObsoleteAttribute.cs
- ConnectionStringEditor.cs
- SrgsElement.cs
- GestureRecognizer.cs
- ColumnHeaderConverter.cs
- LinqDataSourceContextData.cs
- LineBreak.cs
- X509CertificateInitiatorClientCredential.cs
- NextPreviousPagerField.cs
- ImageSourceValueSerializer.cs
- OleDbCommand.cs
- RenderingBiasValidation.cs
- CounterCreationData.cs
- UndoManager.cs
- BlockCollection.cs
- CurrentTimeZone.cs
- Brush.cs
- OleDbErrorCollection.cs
- SettingsPropertyWrongTypeException.cs
- XmlSerializerNamespaces.cs
- SessionEndingEventArgs.cs
- DataBindEngine.cs
- ScriptControlDescriptor.cs
- TdsParserStaticMethods.cs
- ValueUtilsSmi.cs
- TableStyle.cs
- CompositeDesignerAccessibleObject.cs
- ItemCheckEvent.cs
- CodeDomLocalizationProvider.cs
- PrtCap_Reader.cs
- Rotation3D.cs
- StrokeNode.cs
- XmlAttributeProperties.cs
- TargetControlTypeCache.cs
- PersianCalendar.cs
- BuildProvider.cs
- LogRecordSequence.cs
- DataKeyArray.cs
- ApplicationDirectory.cs
- OleDbCommandBuilder.cs
- ScriptResourceHandler.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- AlignmentYValidation.cs
- Schedule.cs
- CompensateDesigner.cs
- UpdateTracker.cs
- VersionUtil.cs
- UIServiceHelper.cs
- ContainerParaClient.cs
- ListParagraph.cs
- AppSecurityManager.cs
- FileLogRecord.cs
- SecurityDescriptor.cs
- TableLayoutPanel.cs
- DataObjectMethodAttribute.cs
- DbSetClause.cs
- DecoderFallback.cs
- GestureRecognitionResult.cs
- DateTimeOffsetConverter.cs
- BrowserDefinitionCollection.cs
- TransformConverter.cs
- RandomNumberGenerator.cs
- FilteredAttributeCollection.cs