Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / WinForms / Managed / System / WinForms / HtmlHistory.cs / 1 / HtmlHistory.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Drawing; using System.Drawing.Printing; using System.Windows.Forms; using System.Security.Permissions; using System.Security; using System.Runtime.InteropServices; using System.Net; using System.Globalization; namespace System.Windows.Forms { ////// /// [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")] public sealed class HtmlHistory : IDisposable { private UnsafeNativeMethods.IOmHistory htmlHistory; private bool disposed; [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] internal HtmlHistory(UnsafeNativeMethods.IOmHistory history) { this.htmlHistory = history; Debug.Assert(this.NativeOmHistory != null, "The history object should implement IOmHistory"); } private UnsafeNativeMethods.IOmHistory NativeOmHistory { get { if (this.disposed) { throw new System.ObjectDisposedException(GetType().Name); } return this.htmlHistory; } } ///[To be supplied.] ///public void Dispose() { this.htmlHistory = null; this.disposed = true; GC.SuppressFinalize(this); } /// /// /// public int Length { get { return (int)this.NativeOmHistory.GetLength(); } } ///[To be supplied.] ////// /// public void Back(int numberBack) { if (numberBack < 0) { throw new ArgumentOutOfRangeException("numberBack", SR.GetString(SR.InvalidLowBoundArgumentEx, "numberBack", numberBack.ToString(CultureInfo.CurrentCulture), (0).ToString(CultureInfo.CurrentCulture))); } else if (numberBack > 0) { object oNumForward = (object)(-numberBack); this.NativeOmHistory.Go(ref oNumForward); } } ///[To be supplied.] ////// /// public void Forward(int numberForward) { if (numberForward < 0) { throw new ArgumentOutOfRangeException("numberForward", SR.GetString(SR.InvalidLowBoundArgumentEx, "numberForward", numberForward.ToString(CultureInfo.CurrentCulture), (0).ToString(CultureInfo.CurrentCulture))); } else if (numberForward > 0) { object oNumForward = (object)numberForward; this.NativeOmHistory.Go(ref oNumForward); } } ///[To be supplied.] ////// /// [SuppressMessage("Microsoft.Usage", "CA2234:PassSystemUriObjectsInsteadOfStrings")] public void Go(Uri url) { Go(url.ToString()); } ///Go to a specific Uri in the history ////// /// /// Note: We intentionally have a string overload (apparently Mort wants one). We don't have /// string overloads call Uri overloads because that breaks Uris that aren't fully qualified /// (things like "www.microsoft.com") that the underlying objects support and we don't want to /// break. [SuppressMessage("Microsoft.Design", "CA1057:StringUriOverloadsCallSystemUriOverloads")] public void Go(string urlString) { object loc = (object)urlString; this.NativeOmHistory.Go(ref loc); } ///Go to a specific url(string) in the history ////// /// public void Go(int relativePosition) { object loc = (object)relativePosition; this.NativeOmHistory.Go(ref loc); } ///Go to the specified position in the history list ////// /// public object DomHistory { get { return this.NativeOmHistory; } } } } // 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.Diagnostics.CodeAnalysis; using System.IO; using System.Drawing; using System.Drawing.Printing; using System.Windows.Forms; using System.Security.Permissions; using System.Security; using System.Runtime.InteropServices; using System.Net; using System.Globalization; namespace System.Windows.Forms { ////// /// [PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")] public sealed class HtmlHistory : IDisposable { private UnsafeNativeMethods.IOmHistory htmlHistory; private bool disposed; [PermissionSet(SecurityAction.Demand, Name = "FullTrust")] internal HtmlHistory(UnsafeNativeMethods.IOmHistory history) { this.htmlHistory = history; Debug.Assert(this.NativeOmHistory != null, "The history object should implement IOmHistory"); } private UnsafeNativeMethods.IOmHistory NativeOmHistory { get { if (this.disposed) { throw new System.ObjectDisposedException(GetType().Name); } return this.htmlHistory; } } ///[To be supplied.] ///public void Dispose() { this.htmlHistory = null; this.disposed = true; GC.SuppressFinalize(this); } /// /// /// public int Length { get { return (int)this.NativeOmHistory.GetLength(); } } ///[To be supplied.] ////// /// public void Back(int numberBack) { if (numberBack < 0) { throw new ArgumentOutOfRangeException("numberBack", SR.GetString(SR.InvalidLowBoundArgumentEx, "numberBack", numberBack.ToString(CultureInfo.CurrentCulture), (0).ToString(CultureInfo.CurrentCulture))); } else if (numberBack > 0) { object oNumForward = (object)(-numberBack); this.NativeOmHistory.Go(ref oNumForward); } } ///[To be supplied.] ////// /// public void Forward(int numberForward) { if (numberForward < 0) { throw new ArgumentOutOfRangeException("numberForward", SR.GetString(SR.InvalidLowBoundArgumentEx, "numberForward", numberForward.ToString(CultureInfo.CurrentCulture), (0).ToString(CultureInfo.CurrentCulture))); } else if (numberForward > 0) { object oNumForward = (object)numberForward; this.NativeOmHistory.Go(ref oNumForward); } } ///[To be supplied.] ////// /// [SuppressMessage("Microsoft.Usage", "CA2234:PassSystemUriObjectsInsteadOfStrings")] public void Go(Uri url) { Go(url.ToString()); } ///Go to a specific Uri in the history ////// /// /// Note: We intentionally have a string overload (apparently Mort wants one). We don't have /// string overloads call Uri overloads because that breaks Uris that aren't fully qualified /// (things like "www.microsoft.com") that the underlying objects support and we don't want to /// break. [SuppressMessage("Microsoft.Design", "CA1057:StringUriOverloadsCallSystemUriOverloads")] public void Go(string urlString) { object loc = (object)urlString; this.NativeOmHistory.Go(ref loc); } ///Go to a specific url(string) in the history ////// /// public void Go(int relativePosition) { object loc = (object)relativePosition; this.NativeOmHistory.Go(ref loc); } ///Go to the specified position in the history list ////// /// public object DomHistory { get { return this.NativeOmHistory; } } } } // 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
- BaseComponentEditor.cs
- ToolBarButtonClickEvent.cs
- TreeView.cs
- AuthorizationRuleCollection.cs
- LocalizableResourceBuilder.cs
- SchemaElementLookUpTable.cs
- Command.cs
- NativeRecognizer.cs
- MulticastOption.cs
- Localizer.cs
- DbParameterCollectionHelper.cs
- PageAdapter.cs
- ServiceParser.cs
- configsystem.cs
- LocalBuilder.cs
- ProfileManager.cs
- HostTimeoutsElement.cs
- ClientScriptManager.cs
- ConfigurationHandlersInstallComponent.cs
- LinkedDataMemberFieldEditor.cs
- _KerberosClient.cs
- QilIterator.cs
- SecurityPermission.cs
- TreeViewItem.cs
- TextFormatterHost.cs
- WebHeaderCollection.cs
- LayoutEvent.cs
- ResourceReferenceExpression.cs
- Size3D.cs
- CodePropertyReferenceExpression.cs
- BindingValueChangedEventArgs.cs
- XXXOnTypeBuilderInstantiation.cs
- FontInfo.cs
- EffectiveValueEntry.cs
- ParameterBuilder.cs
- Hashtable.cs
- ToolStripSplitButton.cs
- BitmapInitialize.cs
- HtmlForm.cs
- TreeViewImageGenerator.cs
- TypeInformation.cs
- SystemIPv4InterfaceProperties.cs
- CompilerInfo.cs
- SplineKeyFrames.cs
- DropDownList.cs
- PackWebRequest.cs
- MailMessageEventArgs.cs
- HebrewNumber.cs
- PropertyGridEditorPart.cs
- TextDecorationUnitValidation.cs
- ObjectConverter.cs
- XamlValidatingReader.cs
- InkCollectionBehavior.cs
- Wizard.cs
- VectorValueSerializer.cs
- SqlDataSource.cs
- TreePrinter.cs
- FileDialog_Vista_Interop.cs
- DesignerRegionCollection.cs
- LinqDataSourceUpdateEventArgs.cs
- documentsequencetextpointer.cs
- TextCollapsingProperties.cs
- ResourceProviderFactory.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- RuleSetDialog.Designer.cs
- HttpHandlerAction.cs
- EditorZoneBase.cs
- DiagnosticsConfigurationHandler.cs
- AppDomainAttributes.cs
- translator.cs
- InternalMappingException.cs
- DocumentGrid.cs
- ItemType.cs
- HttpResponseHeader.cs
- Baml6ConstructorInfo.cs
- ColorInterpolationModeValidation.cs
- RequestCachePolicyConverter.cs
- KeyboardNavigation.cs
- TemplatePropertyEntry.cs
- WpfXamlMember.cs
- DataPagerField.cs
- Transform3DGroup.cs
- HttpServerUtilityBase.cs
- CodeNamespaceImportCollection.cs
- ProviderCommandInfoUtils.cs
- PreservationFileWriter.cs
- StringUtil.cs
- SqlDataRecord.cs
- TypeAccessException.cs
- TrackingProfileDeserializationException.cs
- StorageMappingFragment.cs
- CellTreeNodeVisitors.cs
- SpStreamWrapper.cs
- EllipticalNodeOperations.cs
- MembershipValidatePasswordEventArgs.cs
- SoapIncludeAttribute.cs
- PropertyStore.cs
- CultureSpecificCharacterBufferRange.cs
- FormCollection.cs
- LogRecordSequence.cs