Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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. // Copyright (c) Microsoft Corporation. All rights reserved.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ClientTargetSection.cs
- AmbientLight.cs
- XPathDocumentNavigator.cs
- ParenthesizePropertyNameAttribute.cs
- ExtensionWindowHeader.cs
- CircleHotSpot.cs
- SqlBinder.cs
- WorkflowMessageEventArgs.cs
- ActivationServices.cs
- InfoCardAsymmetricCrypto.cs
- MenuItemBindingCollection.cs
- DataGridItemAttachedStorage.cs
- DataPagerField.cs
- control.ime.cs
- SchemeSettingElement.cs
- IndicCharClassifier.cs
- SchemaMapping.cs
- DataGridTextBox.cs
- XmlObjectSerializerReadContext.cs
- XmlFormatExtensionAttribute.cs
- FormViewUpdateEventArgs.cs
- ControlPropertyNameConverter.cs
- _SecureChannel.cs
- DetailsViewRowCollection.cs
- XNodeNavigator.cs
- __ConsoleStream.cs
- _Win32.cs
- WebHeaderCollection.cs
- StateDesigner.LayoutSelectionGlyph.cs
- FontStyleConverter.cs
- XamlBrushSerializer.cs
- DiagnosticsConfiguration.cs
- ListViewInsertionMark.cs
- SafeNativeMethodsMilCoreApi.cs
- TextServicesLoader.cs
- DbDataRecord.cs
- CommandConverter.cs
- Highlights.cs
- KeyConstraint.cs
- HttpPostLocalhostServerProtocol.cs
- DataObjectPastingEventArgs.cs
- ToolboxItemFilterAttribute.cs
- ValueCollectionParameterReader.cs
- LinqDataSourceEditData.cs
- TextEffectCollection.cs
- ConstraintConverter.cs
- DateTimeFormat.cs
- EditingCommands.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- TTSVoice.cs
- DocumentOrderComparer.cs
- ConfigXmlReader.cs
- _Connection.cs
- DetailsViewUpdatedEventArgs.cs
- ProtocolProfile.cs
- ErrorStyle.cs
- TaskScheduler.cs
- QilInvokeEarlyBound.cs
- ViewStateException.cs
- Errors.cs
- TreeNodeClickEventArgs.cs
- SchemaMerger.cs
- WebContentFormatHelper.cs
- Visual3D.cs
- BinHexEncoder.cs
- DefaultHttpHandler.cs
- SHA1CryptoServiceProvider.cs
- BitmapDecoder.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- MessageHeaderException.cs
- ToolStripContentPanel.cs
- HandledEventArgs.cs
- AbstractExpressions.cs
- OleDbStruct.cs
- XPathDocumentIterator.cs
- XmlBinaryWriter.cs
- ResolveRequestResponseAsyncResult.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs
- PersistenceTypeAttribute.cs
- GroupBox.cs
- WindowAutomationPeer.cs
- LoadedOrUnloadedOperation.cs
- Variable.cs
- BitmapEffectGeneralTransform.cs
- IsolatedStoragePermission.cs
- ContainerSelectorBehavior.cs
- Light.cs
- UpdateExpressionVisitor.cs
- ClockGroup.cs
- InternalBase.cs
- WS2007HttpBindingElement.cs
- RichTextBoxContextMenu.cs
- TemplateBindingExtension.cs
- HttpFileCollection.cs
- HttpServerVarsCollection.cs
- DynamicMethod.cs
- LicenseProviderAttribute.cs
- MenuItem.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- SetStateDesigner.cs