Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / WinForms / Managed / System / WinForms / HtmlElementEventArgs.cs / 1 / HtmlElementEventArgs.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Drawing; using System.Drawing.Printing; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Net; namespace System.Windows.Forms { ////// /// public sealed class HtmlElementEventArgs : EventArgs { private UnsafeNativeMethods.IHTMLEventObj htmlEventObj; private HtmlShimManager shimManager; internal HtmlElementEventArgs(HtmlShimManager shimManager, UnsafeNativeMethods.IHTMLEventObj eventObj) { this.htmlEventObj = eventObj; Debug.Assert(this.NativeHTMLEventObj != null, "The event object should implement IHTMLEventObj"); this.shimManager = shimManager; } private UnsafeNativeMethods.IHTMLEventObj NativeHTMLEventObj { get { return this.htmlEventObj; } } ///[To be supplied.] ////// /// public MouseButtons MouseButtonsPressed { get { MouseButtons buttons = MouseButtons.None; int nButtons = this.NativeHTMLEventObj.GetButton(); if ((nButtons & 1) != 0) { buttons |= MouseButtons.Left; } if ((nButtons & 2) != 0) { buttons |= MouseButtons.Right; } if ((nButtons & 4) != 0) { buttons |= MouseButtons.Middle; } return buttons; } } ///[To be supplied.] ////// /// public Point ClientMousePosition { get { return new Point(this.NativeHTMLEventObj.GetClientX(), this.NativeHTMLEventObj.GetClientY()); } } ///[To be supplied.] ////// /// public Point OffsetMousePosition { get { return new Point(this.NativeHTMLEventObj.GetOffsetX(), this.NativeHTMLEventObj.GetOffsetY()); } } ///[To be supplied.] ////// /// public Point MousePosition { get { return new Point(this.NativeHTMLEventObj.GetX(), this.NativeHTMLEventObj.GetY()); } } ///[To be supplied.] ////// /// public bool BubbleEvent { get { return !this.NativeHTMLEventObj.GetCancelBubble(); } set { this.NativeHTMLEventObj.SetCancelBubble(!value); } } ///[To be supplied.] ////// /// public int KeyPressedCode { get { return this.NativeHTMLEventObj.GetKeyCode(); } } ///[To be supplied.] ////// /// public bool AltKeyPressed { get { return this.NativeHTMLEventObj.GetAltKey(); } } ///Indicates whether the Alt key was pressed, if this information is /// provided to the IHtmlEventObj ////// /// public bool CtrlKeyPressed { get { return this.NativeHTMLEventObj.GetCtrlKey(); } } ///Indicates whether the Ctrl key was pressed, if this information is /// provided to the IHtmlEventObj ////// /// public bool ShiftKeyPressed { get { return this.NativeHTMLEventObj.GetShiftKey(); } } ///Indicates whether the Shift key was pressed, if this information is /// provided to the IHtmlEventObj ////// /// public string EventType { get { return this.NativeHTMLEventObj.GetEventType(); } } ///[To be supplied.] ////// /// public bool ReturnValue { get { object obj = this.NativeHTMLEventObj.GetReturnValue(); return obj == null ? true : (bool)obj; } set { object objValue = value; this.NativeHTMLEventObj.SetReturnValue(objValue); } } ///[To be supplied.] ////// /// [Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced)] public HtmlElement FromElement { get { UnsafeNativeMethods.IHTMLElement htmlElement = this.NativeHTMLEventObj.GetFromElement(); return htmlElement == null ? null : new HtmlElement(shimManager, htmlElement); } } ///[To be supplied.] ////// /// [Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced)] public HtmlElement ToElement { get { UnsafeNativeMethods.IHTMLElement htmlElement = this.NativeHTMLEventObj.GetToElement(); return htmlElement == null ? null : new HtmlElement(shimManager, htmlElement); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //[To be supplied.] ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Drawing; using System.Drawing.Printing; using System.Windows.Forms; using System.Runtime.InteropServices; using System.Net; namespace System.Windows.Forms { ////// /// public sealed class HtmlElementEventArgs : EventArgs { private UnsafeNativeMethods.IHTMLEventObj htmlEventObj; private HtmlShimManager shimManager; internal HtmlElementEventArgs(HtmlShimManager shimManager, UnsafeNativeMethods.IHTMLEventObj eventObj) { this.htmlEventObj = eventObj; Debug.Assert(this.NativeHTMLEventObj != null, "The event object should implement IHTMLEventObj"); this.shimManager = shimManager; } private UnsafeNativeMethods.IHTMLEventObj NativeHTMLEventObj { get { return this.htmlEventObj; } } ///[To be supplied.] ////// /// public MouseButtons MouseButtonsPressed { get { MouseButtons buttons = MouseButtons.None; int nButtons = this.NativeHTMLEventObj.GetButton(); if ((nButtons & 1) != 0) { buttons |= MouseButtons.Left; } if ((nButtons & 2) != 0) { buttons |= MouseButtons.Right; } if ((nButtons & 4) != 0) { buttons |= MouseButtons.Middle; } return buttons; } } ///[To be supplied.] ////// /// public Point ClientMousePosition { get { return new Point(this.NativeHTMLEventObj.GetClientX(), this.NativeHTMLEventObj.GetClientY()); } } ///[To be supplied.] ////// /// public Point OffsetMousePosition { get { return new Point(this.NativeHTMLEventObj.GetOffsetX(), this.NativeHTMLEventObj.GetOffsetY()); } } ///[To be supplied.] ////// /// public Point MousePosition { get { return new Point(this.NativeHTMLEventObj.GetX(), this.NativeHTMLEventObj.GetY()); } } ///[To be supplied.] ////// /// public bool BubbleEvent { get { return !this.NativeHTMLEventObj.GetCancelBubble(); } set { this.NativeHTMLEventObj.SetCancelBubble(!value); } } ///[To be supplied.] ////// /// public int KeyPressedCode { get { return this.NativeHTMLEventObj.GetKeyCode(); } } ///[To be supplied.] ////// /// public bool AltKeyPressed { get { return this.NativeHTMLEventObj.GetAltKey(); } } ///Indicates whether the Alt key was pressed, if this information is /// provided to the IHtmlEventObj ////// /// public bool CtrlKeyPressed { get { return this.NativeHTMLEventObj.GetCtrlKey(); } } ///Indicates whether the Ctrl key was pressed, if this information is /// provided to the IHtmlEventObj ////// /// public bool ShiftKeyPressed { get { return this.NativeHTMLEventObj.GetShiftKey(); } } ///Indicates whether the Shift key was pressed, if this information is /// provided to the IHtmlEventObj ////// /// public string EventType { get { return this.NativeHTMLEventObj.GetEventType(); } } ///[To be supplied.] ////// /// public bool ReturnValue { get { object obj = this.NativeHTMLEventObj.GetReturnValue(); return obj == null ? true : (bool)obj; } set { object objValue = value; this.NativeHTMLEventObj.SetReturnValue(objValue); } } ///[To be supplied.] ////// /// [Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced)] public HtmlElement FromElement { get { UnsafeNativeMethods.IHTMLElement htmlElement = this.NativeHTMLEventObj.GetFromElement(); return htmlElement == null ? null : new HtmlElement(shimManager, htmlElement); } } ///[To be supplied.] ////// /// [Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced)] public HtmlElement ToElement { get { UnsafeNativeMethods.IHTMLElement htmlElement = this.NativeHTMLEventObj.GetToElement(); return htmlElement == null ? null : new HtmlElement(shimManager, htmlElement); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ComplexTypeEmitter.cs
- PasswordBoxAutomationPeer.cs
- HttpCachePolicyBase.cs
- SqlUnionizer.cs
- ArgumentReference.cs
- FormViewRow.cs
- BindingSource.cs
- TreeNodeCollectionEditor.cs
- SourceItem.cs
- ConfigUtil.cs
- ComponentChangingEvent.cs
- DSGeneratorProblem.cs
- ControlAdapter.cs
- Route.cs
- Matrix.cs
- RadioButtonFlatAdapter.cs
- Update.cs
- DirectoryNotFoundException.cs
- PropertyToken.cs
- TrackBarRenderer.cs
- AttachmentCollection.cs
- TypeToStringValueConverter.cs
- DataServiceRequestOfT.cs
- NaturalLanguageHyphenator.cs
- TypedMessageConverter.cs
- UnmanagedMemoryStreamWrapper.cs
- InputScopeManager.cs
- WhiteSpaceTrimStringConverter.cs
- CompilationRelaxations.cs
- Command.cs
- DataServiceRequest.cs
- VerticalAlignConverter.cs
- UnitySerializationHolder.cs
- XmlDataProvider.cs
- EntityDataSourceChangingEventArgs.cs
- VisualCollection.cs
- DescendantQuery.cs
- DateTimeFormatInfo.cs
- Utils.cs
- SqlGenericUtil.cs
- Html32TextWriter.cs
- HostingEnvironmentException.cs
- SqlReferenceCollection.cs
- DataBoundControlAdapter.cs
- DesignColumnCollection.cs
- GroupStyle.cs
- UpdateException.cs
- SymLanguageType.cs
- PermissionRequestEvidence.cs
- UIElement.cs
- ImportFileRequest.cs
- EmulateRecognizeCompletedEventArgs.cs
- NetworkInformationException.cs
- WebSysDisplayNameAttribute.cs
- StylusEventArgs.cs
- BitmapFrame.cs
- XmlSchemaComplexContentRestriction.cs
- SQLDoubleStorage.cs
- ValueUtilsSmi.cs
- COM2ComponentEditor.cs
- PublisherIdentityPermission.cs
- DataGridViewCellStyleChangedEventArgs.cs
- XmlSchemaType.cs
- WindowsTab.cs
- DrawingImage.cs
- ConfigXmlAttribute.cs
- SelectingProviderEventArgs.cs
- RegionIterator.cs
- NamespaceInfo.cs
- MailAddressParser.cs
- WindowsGrip.cs
- RequestCacheEntry.cs
- DbConnectionPoolGroupProviderInfo.cs
- LassoSelectionBehavior.cs
- CacheOutputQuery.cs
- PathBox.cs
- IndexExpression.cs
- RSACryptoServiceProvider.cs
- XPathCompileException.cs
- ApplicationGesture.cs
- CacheModeValueSerializer.cs
- TypeSystemHelpers.cs
- JavaScriptString.cs
- ToolZone.cs
- OnOperation.cs
- BaseAsyncResult.cs
- ArraySet.cs
- XmlnsCompatibleWithAttribute.cs
- UnmanagedBitmapWrapper.cs
- SQLBoolean.cs
- SafeNativeMethodsOther.cs
- QuaternionValueSerializer.cs
- ExeContext.cs
- Utils.cs
- EntityKeyElement.cs
- OperationGenerator.cs
- MetadataItemEmitter.cs
- EastAsianLunisolarCalendar.cs
- ListViewSortEventArgs.cs
- MenuEventArgs.cs