Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / MIT / System / Web / UI / MobileControls / PagerStyle.cs / 1305376 / PagerStyle.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Security.Permissions;
namespace System.Web.UI.MobileControls
{
/*
* Pager Style class. Style properties used to render a form pagination UI.
*
* Copyright (c) 2000 Microsoft Corporation
*/
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
public class PagerStyle : Style
{
///
public static readonly Object
NextPageTextKey = RegisterStyle("NextPageText", typeof(String), String.Empty, false),
PreviousPageTextKey = RegisterStyle("PreviousPageText", typeof(String), String.Empty, false),
PageLabelKey = RegisterStyle("PageLabel", typeof(String), String.Empty, false);
///
[
Bindable(true),
DefaultValue(""),
MobileCategory(SR.Category_Appearance),
MobileSysDescription(SR.PagerStyle_NextPageText),
NotifyParentProperty(true),
]
public String NextPageText
{
get
{
return (String)this[NextPageTextKey];
}
set
{
this[NextPageTextKey] = value;
}
}
///
[
Bindable(true),
DefaultValue(""),
MobileCategory(SR.Category_Appearance),
MobileSysDescription(SR.PagerStyle_PreviousPageText),
NotifyParentProperty(true),
]
public String PreviousPageText
{
get
{
return (String)this[PreviousPageTextKey];
}
set
{
this[PreviousPageTextKey] = value;
}
}
///
[
Bindable(true),
DefaultValue(""),
MobileCategory(SR.Category_Appearance),
MobileSysDescription(SR.PagerStyle_PageLabel),
NotifyParentProperty(true),
]
public String PageLabel
{
get
{
return (String)this[PageLabelKey];
}
set
{
this[PageLabelKey] = value;
}
}
///
public String GetNextPageText(int currentPageIndex)
{
String s = (String)this[NextPageTextKey, true];
if (!String.IsNullOrEmpty(s))
{
return String.Format(CultureInfo.CurrentCulture, s, currentPageIndex + 1);
}
else
{
return SR.GetString(SR.PagerStyle_NextPageText_DefaultValue);
}
}
///
public String GetPreviousPageText(int currentPageIndex)
{
String s = (String)this[PreviousPageTextKey, true];
if (!String.IsNullOrEmpty(s))
{
return String.Format(CultureInfo.CurrentCulture, s, currentPageIndex - 1);
}
else
{
return SR.GetString(SR.PagerStyle_PreviousPageText_DefaultValue);
}
}
///
public String GetPageLabelText(int currentPageIndex, int pageCount)
{
String s = (String)this[PageLabelKey, true];
if (s == null)
{
s = String.Empty;
}
if (s.Length > 0)
{
s = String.Format(CultureInfo.CurrentCulture, s, currentPageIndex, pageCount);
}
return s;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
using System;
using System.Collections;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Security.Permissions;
namespace System.Web.UI.MobileControls
{
/*
* Pager Style class. Style properties used to render a form pagination UI.
*
* Copyright (c) 2000 Microsoft Corporation
*/
///
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")]
public class PagerStyle : Style
{
///
public static readonly Object
NextPageTextKey = RegisterStyle("NextPageText", typeof(String), String.Empty, false),
PreviousPageTextKey = RegisterStyle("PreviousPageText", typeof(String), String.Empty, false),
PageLabelKey = RegisterStyle("PageLabel", typeof(String), String.Empty, false);
///
[
Bindable(true),
DefaultValue(""),
MobileCategory(SR.Category_Appearance),
MobileSysDescription(SR.PagerStyle_NextPageText),
NotifyParentProperty(true),
]
public String NextPageText
{
get
{
return (String)this[NextPageTextKey];
}
set
{
this[NextPageTextKey] = value;
}
}
///
[
Bindable(true),
DefaultValue(""),
MobileCategory(SR.Category_Appearance),
MobileSysDescription(SR.PagerStyle_PreviousPageText),
NotifyParentProperty(true),
]
public String PreviousPageText
{
get
{
return (String)this[PreviousPageTextKey];
}
set
{
this[PreviousPageTextKey] = value;
}
}
///
[
Bindable(true),
DefaultValue(""),
MobileCategory(SR.Category_Appearance),
MobileSysDescription(SR.PagerStyle_PageLabel),
NotifyParentProperty(true),
]
public String PageLabel
{
get
{
return (String)this[PageLabelKey];
}
set
{
this[PageLabelKey] = value;
}
}
///
public String GetNextPageText(int currentPageIndex)
{
String s = (String)this[NextPageTextKey, true];
if (!String.IsNullOrEmpty(s))
{
return String.Format(CultureInfo.CurrentCulture, s, currentPageIndex + 1);
}
else
{
return SR.GetString(SR.PagerStyle_NextPageText_DefaultValue);
}
}
///
public String GetPreviousPageText(int currentPageIndex)
{
String s = (String)this[PreviousPageTextKey, true];
if (!String.IsNullOrEmpty(s))
{
return String.Format(CultureInfo.CurrentCulture, s, currentPageIndex - 1);
}
else
{
return SR.GetString(SR.PagerStyle_PreviousPageText_DefaultValue);
}
}
///
public String GetPageLabelText(int currentPageIndex, int pageCount)
{
String s = (String)this[PageLabelKey, true];
if (s == null)
{
s = String.Empty;
}
if (s.Length > 0)
{
s = String.Format(CultureInfo.CurrentCulture, s, currentPageIndex, pageCount);
}
return s;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WriteStateInfoBase.cs
- LayoutSettings.cs
- PtsHost.cs
- PathFigure.cs
- JsonWriter.cs
- BamlLocalizableResourceKey.cs
- ValueConversionAttribute.cs
- TemplateBuilder.cs
- WriteableOnDemandPackagePart.cs
- SimpleRecyclingCache.cs
- ActivityTypeResolver.xaml.cs
- CodeAttachEventStatement.cs
- HTTPNotFoundHandler.cs
- OdbcDataReader.cs
- KnownTypeHelper.cs
- ResourceContainerWrapper.cs
- ComponentConverter.cs
- XmlTextEncoder.cs
- securitycriticaldataformultiplegetandset.cs
- FontUnit.cs
- PropertyStore.cs
- StringToken.cs
- AddInStore.cs
- ImpersonationContext.cs
- SafeIUnknown.cs
- TextParagraphProperties.cs
- SmtpReplyReader.cs
- RuntimeResourceSet.cs
- XmlLoader.cs
- InvokeMethodActivityDesigner.cs
- DisplayNameAttribute.cs
- StringKeyFrameCollection.cs
- ShapeTypeface.cs
- EventToken.cs
- HitTestResult.cs
- ObjectParameterCollection.cs
- MenuRendererStandards.cs
- CurrencyWrapper.cs
- HttpProfileBase.cs
- GetUserPreferenceRequest.cs
- DiscoveryClientProtocol.cs
- ArrayWithOffset.cs
- VectorValueSerializer.cs
- UrlAuthFailedErrorFormatter.cs
- ObsoleteAttribute.cs
- OleDbStruct.cs
- BitmapData.cs
- CompModSwitches.cs
- SqlRecordBuffer.cs
- InterleavedZipPartStream.cs
- InvokeWebService.cs
- TemplateColumn.cs
- SoapServerMessage.cs
- DataGridViewCellParsingEventArgs.cs
- InputBuffer.cs
- XmlSchemaInferenceException.cs
- ManagedIStream.cs
- CssClassPropertyAttribute.cs
- CodeExporter.cs
- Script.cs
- Walker.cs
- DropTarget.cs
- Int16Converter.cs
- NegatedConstant.cs
- NamespaceList.cs
- Preprocessor.cs
- WorkflowTimerService.cs
- ListViewGroupConverter.cs
- XmlEncoding.cs
- GrammarBuilderWildcard.cs
- SafeLibraryHandle.cs
- Object.cs
- ProfileGroupSettings.cs
- PageContentAsyncResult.cs
- PackageDigitalSignature.cs
- TextParaLineResult.cs
- Options.cs
- ExpressionBuilder.cs
- XsltInput.cs
- ObservableCollection.cs
- BaseDataListDesigner.cs
- PenCursorManager.cs
- XmlEncodedRawTextWriter.cs
- DynamicILGenerator.cs
- BaseUriHelper.cs
- ReferenceService.cs
- XmlSchemaDocumentation.cs
- RequestBringIntoViewEventArgs.cs
- DataRecord.cs
- Assembly.cs
- PeerApplicationLaunchInfo.cs
- SoundPlayer.cs
- OleDbDataAdapter.cs
- DependencyObjectType.cs
- SystemDiagnosticsSection.cs
- securitycriticaldataformultiplegetandset.cs
- OleAutBinder.cs
- DatePicker.cs
- ApplicationServiceManager.cs
- OneOfElement.cs