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
- CodeTypeMemberCollection.cs
- VisualBrush.cs
- DataGridViewCellPaintingEventArgs.cs
- ContentType.cs
- CommandDesigner.cs
- VirtualPath.cs
- XsdDateTime.cs
- _ProxyChain.cs
- TemplateBamlRecordReader.cs
- PropertyCondition.cs
- ConversionContext.cs
- TrackBar.cs
- RootBrowserWindow.cs
- ChtmlTextBoxAdapter.cs
- PrefixQName.cs
- CompilerLocalReference.cs
- SocketInformation.cs
- AmbientProperties.cs
- Vector3D.cs
- RightsManagementPermission.cs
- SqlTriggerAttribute.cs
- EndpointConfigContainer.cs
- DataGridHeaderBorder.cs
- AlternationConverter.cs
- ReflectTypeDescriptionProvider.cs
- AccessDataSource.cs
- BinarySerializer.cs
- HttpModuleActionCollection.cs
- DictionaryEntry.cs
- DynamicValidatorEventArgs.cs
- XmlCharacterData.cs
- AnnouncementDispatcherAsyncResult.cs
- EntityDescriptor.cs
- XmlIlVisitor.cs
- StaticSiteMapProvider.cs
- StaticFileHandler.cs
- Int64KeyFrameCollection.cs
- XmlAttributeCache.cs
- LinqDataSourceDisposeEventArgs.cs
- ProgressBar.cs
- Crypto.cs
- PrivateFontCollection.cs
- HttpResponse.cs
- _CookieModule.cs
- LeaseManager.cs
- ADConnectionHelper.cs
- AxHost.cs
- ValidatingReaderNodeData.cs
- TypeExtension.cs
- CapabilitiesAssignment.cs
- Int32KeyFrameCollection.cs
- ImageIndexConverter.cs
- ImageMap.cs
- ListControlActionList.cs
- MediaPlayerState.cs
- InputLangChangeEvent.cs
- SelectedDatesCollection.cs
- CustomValidator.cs
- Publisher.cs
- XPathMultyIterator.cs
- AsyncContentLoadedEventArgs.cs
- HwndHostAutomationPeer.cs
- GridViewDesigner.cs
- MiniMapControl.xaml.cs
- FullTrustAssemblyCollection.cs
- SocketElement.cs
- TextTreePropertyUndoUnit.cs
- XmlWriterTraceListener.cs
- LinearQuaternionKeyFrame.cs
- BmpBitmapDecoder.cs
- TemplateControlCodeDomTreeGenerator.cs
- EntityCommandCompilationException.cs
- CheckedListBox.cs
- StorageEndPropertyMapping.cs
- CheckedListBox.cs
- Duration.cs
- FileNotFoundException.cs
- OleDbPropertySetGuid.cs
- EditorZoneBase.cs
- QilScopedVisitor.cs
- DrawingContextWalker.cs
- CachingHintValidation.cs
- HttpProfileGroupBase.cs
- NamespaceQuery.cs
- HttpConfigurationSystem.cs
- MetadataPropertyAttribute.cs
- QueryCacheManager.cs
- DataServiceEntityAttribute.cs
- BaseProcessProtocolHandler.cs
- ItemDragEvent.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- RawUIStateInputReport.cs
- Baml2006ReaderContext.cs
- DataGridRowClipboardEventArgs.cs
- GenericAuthenticationEventArgs.cs
- ActiveXSite.cs
- Span.cs
- StreamUpdate.cs
- HttpInputStream.cs
- UnsafeNativeMethodsCLR.cs