You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
@@ -53,7 +53,7 @@ namespace System.Web.UI.WebControls
|
||||
base.OnInit(e);
|
||||
}
|
||||
|
||||
protected internal override void OnPreRender (EventArgs eee)
|
||||
protected internal override void OnPreRender (EventArgs e)
|
||||
{
|
||||
Hashtable ht = null;
|
||||
|
||||
@@ -62,9 +62,9 @@ namespace System.Web.UI.WebControls
|
||||
ht = ChooseAd ();
|
||||
}
|
||||
|
||||
AdCreatedEventArgs e = new AdCreatedEventArgs (ht);
|
||||
OnAdCreated (e);
|
||||
createdargs = e;
|
||||
AdCreatedEventArgs ev = new AdCreatedEventArgs (ht);
|
||||
OnAdCreated (ev);
|
||||
createdargs = ev;
|
||||
|
||||
}
|
||||
|
||||
@@ -80,27 +80,27 @@ namespace System.Web.UI.WebControls
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
||||
protected internal override void Render (HtmlTextWriter w)
|
||||
protected internal override void Render (HtmlTextWriter writer)
|
||||
{
|
||||
AdCreatedEventArgs e = createdargs;
|
||||
|
||||
base.AddAttributesToRender (w);
|
||||
base.AddAttributesToRender (writer);
|
||||
|
||||
if (e.NavigateUrl != null && e.NavigateUrl.Length > 0)
|
||||
w.AddAttribute (HtmlTextWriterAttribute.Href, ResolveAdUrl (e.NavigateUrl));
|
||||
writer.AddAttribute (HtmlTextWriterAttribute.Href, ResolveAdUrl (e.NavigateUrl));
|
||||
if (Target != null && Target.Length > 0)
|
||||
w.AddAttribute (HtmlTextWriterAttribute.Target, Target);
|
||||
writer.AddAttribute (HtmlTextWriterAttribute.Target, Target);
|
||||
|
||||
w.RenderBeginTag (HtmlTextWriterTag.A);
|
||||
writer.RenderBeginTag (HtmlTextWriterTag.A);
|
||||
|
||||
if (e.ImageUrl != null && e.ImageUrl.Length > 0)
|
||||
w.AddAttribute (HtmlTextWriterAttribute.Src, ResolveAdUrl (e.ImageUrl));
|
||||
writer.AddAttribute (HtmlTextWriterAttribute.Src, ResolveAdUrl (e.ImageUrl));
|
||||
|
||||
w.AddAttribute (HtmlTextWriterAttribute.Alt, e.AlternateText == null ? String.Empty : e.AlternateText);
|
||||
w.AddAttribute (HtmlTextWriterAttribute.Border, "0", false);
|
||||
w.RenderBeginTag (HtmlTextWriterTag.Img);
|
||||
w.RenderEndTag (); // img
|
||||
w.RenderEndTag (); // a
|
||||
writer.AddAttribute (HtmlTextWriterAttribute.Alt, e.AlternateText == null ? String.Empty : e.AlternateText);
|
||||
writer.AddAttribute (HtmlTextWriterAttribute.Border, "0", false);
|
||||
writer.RenderBeginTag (HtmlTextWriterTag.Img);
|
||||
writer.RenderEndTag (); // img
|
||||
writer.RenderEndTag (); // a
|
||||
}
|
||||
|
||||
string ResolveAdUrl (string url)
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace System.Web.UI.WebControls
|
||||
{
|
||||
}
|
||||
|
||||
protected override void AddAttributesToRender (HtmlTextWriter w)
|
||||
protected override void AddAttributesToRender (HtmlTextWriter writer)
|
||||
{
|
||||
if (RenderUplevel) {
|
||||
if (Page != null) {
|
||||
@@ -69,7 +69,7 @@ namespace System.Web.UI.WebControls
|
||||
}
|
||||
}
|
||||
|
||||
base.AddAttributesToRender (w);
|
||||
base.AddAttributesToRender (writer);
|
||||
}
|
||||
|
||||
public static bool CanConvert (string text,
|
||||
@@ -87,9 +87,9 @@ namespace System.Web.UI.WebControls
|
||||
return BaseCompareValidator.Convert(text, type, false, out value);
|
||||
}
|
||||
|
||||
protected static bool Compare (string left, string right, ValidationCompareOperator op, ValidationDataType type)
|
||||
protected static bool Compare (string leftText, string rightText, ValidationCompareOperator op, ValidationDataType type)
|
||||
{
|
||||
return BaseCompareValidator.Compare(left, false, right, false, op, type);
|
||||
return BaseCompareValidator.Compare(leftText, false, rightText, false, op, type);
|
||||
}
|
||||
|
||||
protected override bool DetermineRenderUplevel ()
|
||||
@@ -134,7 +134,7 @@ namespace System.Web.UI.WebControls
|
||||
return order.ToString ();
|
||||
}
|
||||
|
||||
protected static int GetFullYear (int two_digit_year)
|
||||
protected static int GetFullYear (int shortYear)
|
||||
{
|
||||
/* This is an implementation that matches the
|
||||
* docs on msdn, but MS doesn't seem to go by
|
||||
@@ -142,10 +142,10 @@ namespace System.Web.UI.WebControls
|
||||
int cutoff = CutoffYear;
|
||||
int twodigitcutoff = cutoff % 100;
|
||||
|
||||
if (two_digit_year <= twodigitcutoff)
|
||||
return cutoff - twodigitcutoff + two_digit_year;
|
||||
if (shortYear <= twodigitcutoff)
|
||||
return cutoff - twodigitcutoff + shortYear;
|
||||
else
|
||||
return cutoff - twodigitcutoff - 100 + two_digit_year;
|
||||
return cutoff - twodigitcutoff - 100 + shortYear;
|
||||
}
|
||||
|
||||
[DefaultValue (false)]
|
||||
@@ -175,16 +175,16 @@ namespace System.Web.UI.WebControls
|
||||
return Convert(text, type, cultureInvariant, out value);
|
||||
}
|
||||
|
||||
protected static bool Compare (string left,
|
||||
protected static bool Compare (string leftText,
|
||||
bool cultureInvariantLeftText,
|
||||
string right,
|
||||
string rightText,
|
||||
bool cultureInvariantRightText,
|
||||
ValidationCompareOperator op,
|
||||
ValidationDataType type)
|
||||
{
|
||||
object lo, ro;
|
||||
|
||||
if (!Convert(left, type, cultureInvariantLeftText, out lo))
|
||||
if (!Convert(leftText, type, cultureInvariantLeftText, out lo))
|
||||
return false;
|
||||
|
||||
/* DataTypeCheck is a unary operator that only
|
||||
@@ -195,7 +195,7 @@ namespace System.Web.UI.WebControls
|
||||
/* pretty crackladen, but if we're unable to
|
||||
* convert the rhs to @type, the comparison
|
||||
* succeeds */
|
||||
if (!Convert(right, type, cultureInvariantRightText, out ro))
|
||||
if (!Convert(rightText, type, cultureInvariantRightText, out ro))
|
||||
return true;
|
||||
|
||||
int comp = ((IComparable)lo).CompareTo((IComparable)ro);
|
||||
|
||||
@@ -287,13 +287,13 @@ namespace System.Web.UI.WebControls
|
||||
return o.ToString ();
|
||||
}
|
||||
|
||||
public static PropertyDescriptor GetValidationProperty (object o)
|
||||
public static PropertyDescriptor GetValidationProperty (object component)
|
||||
{
|
||||
PropertyDescriptorCollection props;
|
||||
System.ComponentModel.AttributeCollection col;
|
||||
|
||||
props = TypeDescriptor.GetProperties (o);
|
||||
col = TypeDescriptor.GetAttributes (o);
|
||||
props = TypeDescriptor.GetProperties (component);
|
||||
col = TypeDescriptor.GetAttributes (component);
|
||||
|
||||
foreach (Attribute at in col) {
|
||||
ValidationPropertyAttribute vpa = at as ValidationPropertyAttribute;
|
||||
|
||||
@@ -186,12 +186,12 @@ namespace System.Web.UI.WebControls
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
protected virtual string FormatDataValue (object value, bool encode)
|
||||
protected virtual string FormatDataValue (object dataValue, bool encode)
|
||||
{
|
||||
string res;
|
||||
bool htmlEncodeFormatString = HtmlEncodeFormatString;
|
||||
string stringValue = (value != null) ? value.ToString () : String.Empty;
|
||||
if (value == null || (stringValue.Length == 0 && ConvertEmptyStringToNull)) {
|
||||
string stringValue = (dataValue != null) ? dataValue.ToString () : String.Empty;
|
||||
if (dataValue == null || (stringValue.Length == 0 && ConvertEmptyStringToNull)) {
|
||||
if (NullDisplayText.Length == 0) {
|
||||
encode = false;
|
||||
res = " ";
|
||||
@@ -201,7 +201,7 @@ namespace System.Web.UI.WebControls
|
||||
string format = DataFormatString;
|
||||
if (!String.IsNullOrEmpty (format)) {
|
||||
if (!encode || htmlEncodeFormatString)
|
||||
res = String.Format (format, value);
|
||||
res = String.Format (format, dataValue);
|
||||
else
|
||||
res = String.Format (format, encode ? HttpUtility.HtmlEncode (stringValue) : stringValue);
|
||||
} else
|
||||
|
||||
@@ -107,14 +107,14 @@ namespace System.Web.UI.WebControls
|
||||
return base.Initialize (sortingEnabled, control);
|
||||
}
|
||||
|
||||
protected virtual string FormatDataTextValue (object value)
|
||||
protected virtual string FormatDataTextValue (object dataTextValue)
|
||||
{
|
||||
if (DataTextFormatString.Length > 0)
|
||||
return String.Format (DataTextFormatString, value);
|
||||
else if (value == null)
|
||||
return String.Format (DataTextFormatString, dataTextValue);
|
||||
else if (dataTextValue == null)
|
||||
return String.Empty;
|
||||
else
|
||||
return value.ToString ();
|
||||
return dataTextValue.ToString ();
|
||||
}
|
||||
|
||||
public override void InitializeCell (DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
|
||||
|
||||
@@ -542,24 +542,24 @@ namespace System.Web.UI.WebControls
|
||||
RaisePostBackEvent (eventArgument);
|
||||
}
|
||||
|
||||
protected virtual void RaisePostBackEvent (string arg)
|
||||
protected virtual void RaisePostBackEvent (string eventArgument)
|
||||
{
|
||||
ValidateEvent (UniqueID, arg);
|
||||
if (arg.Length < 1)
|
||||
ValidateEvent (UniqueID, eventArgument);
|
||||
if (eventArgument.Length < 1)
|
||||
return;
|
||||
|
||||
if (arg[0] == 'V') { // Goes to Next or Previous month
|
||||
if (eventArgument[0] == 'V') { // Goes to Next or Previous month
|
||||
DateTime prev = VisibleDate;
|
||||
int days = Int32.Parse (arg.Substring (1));
|
||||
int days = Int32.Parse (eventArgument.Substring (1));
|
||||
DateTime dt = GetGlobalCalendar().AddDays (dateZenith, days);
|
||||
VisibleDate = dt;
|
||||
OnVisibleMonthChanged (VisibleDate, prev);
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg[0] == 'R') { // Selects a range of dates
|
||||
if (eventArgument[0] == 'R') { // Selects a range of dates
|
||||
string num, date, days;
|
||||
num = arg.Substring (1);
|
||||
num = eventArgument.Substring (1);
|
||||
days = num.Substring (num.Length - 2, 2);
|
||||
date = num.Substring (0, num.Length - 2);
|
||||
DateTime d = GetGlobalCalendar().AddDays (dateZenith, Int32.Parse (date));
|
||||
@@ -569,7 +569,7 @@ namespace System.Web.UI.WebControls
|
||||
}
|
||||
|
||||
// Selects a single day
|
||||
int daysFromZenith = Int32.Parse (arg);
|
||||
int daysFromZenith = Int32.Parse (eventArgument);
|
||||
DateTime day = GetGlobalCalendar().AddDays (dateZenith, daysFromZenith);
|
||||
SelectedDates.SelectRange (day, day);
|
||||
OnSelectionChanged ();
|
||||
|
||||
@@ -304,7 +304,7 @@ namespace System.Web.UI.WebControls
|
||||
return false;
|
||||
}
|
||||
|
||||
protected internal override void Render (HtmlTextWriter w)
|
||||
protected internal override void Render (HtmlTextWriter writer)
|
||||
{
|
||||
Page page = Page;
|
||||
if (page != null) {
|
||||
@@ -318,38 +318,38 @@ namespace System.Web.UI.WebControls
|
||||
if (!RenderingCompatibilityLessThan40)
|
||||
ControlStyle.PrependCssClass (DisabledCssClass);
|
||||
else
|
||||
w.AddAttribute (HtmlTextWriterAttribute.Disabled, "disabled", false);
|
||||
writer.AddAttribute (HtmlTextWriterAttribute.Disabled, "disabled", false);
|
||||
need_span = true;
|
||||
}
|
||||
|
||||
if (need_span) {
|
||||
AddDisplayStyleAttribute (w);
|
||||
ControlStyle.AddAttributesToRender (w, this);
|
||||
AddDisplayStyleAttribute (writer);
|
||||
ControlStyle.AddAttributesToRender (writer, this);
|
||||
}
|
||||
|
||||
string tt = ToolTip;
|
||||
if (tt != null && tt.Length > 0){
|
||||
w.AddAttribute ("title", tt);
|
||||
writer.AddAttribute ("title", tt);
|
||||
need_span = true;
|
||||
}
|
||||
|
||||
if (HasAttributes && AddAttributesForSpan (w))
|
||||
if (HasAttributes && AddAttributesForSpan (writer))
|
||||
need_span = true;
|
||||
|
||||
if (need_span)
|
||||
w.RenderBeginTag (HtmlTextWriterTag.Span);
|
||||
writer.RenderBeginTag (HtmlTextWriterTag.Span);
|
||||
|
||||
TextAlign align = TextAlign;
|
||||
if (align == TextAlign.Right) {
|
||||
RenderInput (w, enabled);
|
||||
RenderLabel (w);
|
||||
RenderInput (writer, enabled);
|
||||
RenderLabel (writer);
|
||||
} else {
|
||||
RenderLabel (w);
|
||||
RenderInput (w, enabled);
|
||||
RenderLabel (writer);
|
||||
RenderInput (writer, enabled);
|
||||
}
|
||||
|
||||
if (need_span)
|
||||
w.RenderEndTag ();
|
||||
writer.RenderEndTag ();
|
||||
}
|
||||
|
||||
void RenderInput (HtmlTextWriter w, bool enabled)
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace System.Web.UI.WebControls
|
||||
{
|
||||
}
|
||||
|
||||
protected override void AddAttributesToRender (HtmlTextWriter w)
|
||||
protected override void AddAttributesToRender (HtmlTextWriter writer)
|
||||
{
|
||||
if (RenderUplevel) {
|
||||
RegisterExpandoAttribute (ClientID, "evaluationfunction", "CompareValidatorEvaluateIsValid");
|
||||
@@ -54,7 +54,7 @@ namespace System.Web.UI.WebControls
|
||||
RegisterExpandoAttribute (ClientID, "operator", Operator.ToString ());
|
||||
}
|
||||
|
||||
base.AddAttributesToRender (w);
|
||||
base.AddAttributesToRender (writer);
|
||||
}
|
||||
|
||||
protected override bool ControlPropertiesValid ()
|
||||
|
||||
@@ -53,12 +53,12 @@ namespace System.Web.UI.WebControls
|
||||
base.DataBind();
|
||||
}
|
||||
|
||||
protected internal override void Render (HtmlTextWriter w)
|
||||
protected internal override void Render (HtmlTextWriter writer)
|
||||
{
|
||||
/* make sure all the child controls have been created */
|
||||
EnsureChildControls ();
|
||||
/* and then... */
|
||||
base.Render (w);
|
||||
base.Render (writer);
|
||||
}
|
||||
|
||||
void ICompositeControlDesignerAccessor.RecreateChildControls ()
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace System.Web.UI.WebControls
|
||||
return new ControlParameter (this);
|
||||
}
|
||||
protected internal
|
||||
override object Evaluate (HttpContext ctx, Control control)
|
||||
override object Evaluate (HttpContext context, Control control)
|
||||
{
|
||||
if (control == null)
|
||||
return null;
|
||||
|
||||
@@ -68,12 +68,12 @@ namespace System.Web.UI.WebControls
|
||||
return new CookieParameter (this);
|
||||
}
|
||||
protected internal
|
||||
override object Evaluate (HttpContext ctx, Control control)
|
||||
override object Evaluate (HttpContext context, Control control)
|
||||
{
|
||||
if (ctx == null || ctx.Request == null)
|
||||
if (context == null || context.Request == null)
|
||||
return null;
|
||||
|
||||
HttpCookie c = ctx.Request.Cookies [CookieName];
|
||||
HttpCookie c = context.Request.Cookies [CookieName];
|
||||
if (c == null)
|
||||
return null;
|
||||
|
||||
|
||||
@@ -36,13 +36,13 @@ namespace System.Web.UI.WebControls
|
||||
{
|
||||
DataControlField containerField;
|
||||
|
||||
public DataControlFieldCell (DataControlField containerField) : this (HtmlTextWriterTag.Td, containerField)
|
||||
public DataControlFieldCell (DataControlField containingField) : this (HtmlTextWriterTag.Td, containingField)
|
||||
{
|
||||
}
|
||||
|
||||
protected DataControlFieldCell (HtmlTextWriterTag tagKey, DataControlField containerField) : base (tagKey)
|
||||
protected DataControlFieldCell (HtmlTextWriterTag tagKey, DataControlField containingField) : base (tagKey)
|
||||
{
|
||||
this.containerField = containerField;
|
||||
this.containerField = containingField;
|
||||
}
|
||||
|
||||
public DataControlField ContainingField {
|
||||
|
||||
@@ -94,8 +94,8 @@ namespace System.Web.UI.WebControls
|
||||
}
|
||||
|
||||
[Browsable (false)]
|
||||
public DataControlField this [int i] {
|
||||
get { return (DataControlField) ((IList)this) [i]; }
|
||||
public DataControlField this [int index] {
|
||||
get { return (DataControlField) ((IList)this) [index]; }
|
||||
}
|
||||
|
||||
protected override void OnInsertComplete (int index, object value)
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace System.Web.UI.WebControls
|
||||
{
|
||||
TableHeaderScope scope;
|
||||
|
||||
public DataControlFieldHeaderCell (DataControlField containerField): base (HtmlTextWriterTag.Th, containerField)
|
||||
public DataControlFieldHeaderCell (DataControlField containingField): base (HtmlTextWriterTag.Th, containingField)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -83,15 +83,15 @@ namespace System.Web.UI.WebControls
|
||||
#endregion // IDataItemContainer Properties
|
||||
|
||||
#region Public Instance Methods
|
||||
protected override bool OnBubbleEvent(object source, EventArgs args)
|
||||
protected override bool OnBubbleEvent(object source, EventArgs e)
|
||||
{
|
||||
// Nikhil Kothari, pg 312-313:
|
||||
if (args is CommandEventArgs) {
|
||||
RaiseBubbleEvent(this, new DataGridCommandEventArgs(this, source, (CommandEventArgs)args));
|
||||
if (e is CommandEventArgs) {
|
||||
RaiseBubbleEvent(this, new DataGridCommandEventArgs(this, source, (CommandEventArgs)e));
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnBubbleEvent (source, args);
|
||||
return base.OnBubbleEvent (source, e);
|
||||
}
|
||||
|
||||
protected internal virtual void SetItemType(ListItemType itemType)
|
||||
|
||||
@@ -120,17 +120,17 @@ namespace System.Web.UI.WebControls
|
||||
|
||||
return true;
|
||||
}
|
||||
protected virtual void LoadViewState (object savedState)
|
||||
protected virtual void LoadViewState (object state)
|
||||
{
|
||||
if (savedState is Pair) {
|
||||
Pair p = (Pair) savedState;
|
||||
if (state is Pair) {
|
||||
Pair p = (Pair) state;
|
||||
object[] akeys = (object[]) p.First;
|
||||
object[] avals = (object[]) p.Second;
|
||||
for (int n=0; n<akeys.Length; n++) {
|
||||
keyTable [akeys[n]] = avals [n];
|
||||
}
|
||||
} else if (savedState is object[]) {
|
||||
object[] avals = (object[]) savedState;
|
||||
} else if (state is object[]) {
|
||||
object[] avals = (object[]) state;
|
||||
for (int n=0; n<avals.Length; n++)
|
||||
keyTable [keyNames[n]] = avals [n];
|
||||
}
|
||||
|
||||
@@ -1109,24 +1109,24 @@ namespace System.Web.UI.WebControls
|
||||
return style;
|
||||
}
|
||||
|
||||
protected override int CreateChildControls (IEnumerable data, bool dataBinding)
|
||||
protected override int CreateChildControls (IEnumerable dataSource, bool dataBinding)
|
||||
{
|
||||
PagedDataSource dataSource = new PagedDataSource ();
|
||||
dataSource.DataSource = CurrentMode != DetailsViewMode.Insert ? data : null;
|
||||
dataSource.AllowPaging = AllowPaging;
|
||||
dataSource.PageSize = 1;
|
||||
dataSource.CurrentPageIndex = PageIndex;
|
||||
PagedDataSource pagedDataSource = new PagedDataSource ();
|
||||
pagedDataSource.DataSource = CurrentMode != DetailsViewMode.Insert ? dataSource : null;
|
||||
pagedDataSource.AllowPaging = AllowPaging;
|
||||
pagedDataSource.PageSize = 1;
|
||||
pagedDataSource.CurrentPageIndex = PageIndex;
|
||||
|
||||
if (dataBinding && CurrentMode != DetailsViewMode.Insert) {
|
||||
DataSourceView view = GetData ();
|
||||
if (view != null && view.CanPage) {
|
||||
dataSource.AllowServerPaging = true;
|
||||
pagedDataSource.AllowServerPaging = true;
|
||||
if (SelectArguments.RetrieveTotalRowCount)
|
||||
dataSource.VirtualCount = SelectArguments.TotalRowCount;
|
||||
pagedDataSource.VirtualCount = SelectArguments.TotalRowCount;
|
||||
}
|
||||
}
|
||||
|
||||
bool showPager = AllowPaging && (dataSource.PageCount > 1);
|
||||
bool showPager = AllowPaging && (pagedDataSource.PageCount > 1);
|
||||
|
||||
Controls.Clear ();
|
||||
table = CreateTable ();
|
||||
@@ -1140,19 +1140,19 @@ namespace System.Web.UI.WebControls
|
||||
// Gets the current data item
|
||||
|
||||
if (AllowPaging) {
|
||||
PageCount = dataSource.DataSourceCount;
|
||||
PageCount = pagedDataSource.DataSourceCount;
|
||||
if (PageIndex >= PageCount && PageCount > 0)
|
||||
pageIndex = dataSource.CurrentPageIndex = PageCount - 1;
|
||||
if (dataSource.DataSource != null) {
|
||||
IEnumerator e = dataSource.GetEnumerator ();
|
||||
pageIndex = pagedDataSource.CurrentPageIndex = PageCount - 1;
|
||||
if (pagedDataSource.DataSource != null) {
|
||||
IEnumerator e = pagedDataSource.GetEnumerator ();
|
||||
if (e.MoveNext ())
|
||||
dataItem = e.Current;
|
||||
}
|
||||
} else {
|
||||
int page = 0;
|
||||
object lastItem = null;
|
||||
if (dataSource.DataSource != null) {
|
||||
IEnumerator e = dataSource.GetEnumerator ();
|
||||
if (pagedDataSource.DataSource != null) {
|
||||
IEnumerator e = pagedDataSource.GetEnumerator ();
|
||||
for (; e.MoveNext (); page++) {
|
||||
lastItem = e.Current;
|
||||
if (page == PageIndex)
|
||||
@@ -1202,7 +1202,7 @@ namespace System.Web.UI.WebControls
|
||||
if (showPager && PagerSettings.Position == PagerPosition.Top ||
|
||||
PagerSettings.Position == PagerPosition.TopAndBottom) {
|
||||
topPagerRow = CreateRow (-1, DataControlRowType.Pager, DataControlRowState.Normal);
|
||||
InitializePager (topPagerRow, dataSource);
|
||||
InitializePager (topPagerRow, pagedDataSource);
|
||||
table.Rows.Add (topPagerRow);
|
||||
}
|
||||
|
||||
@@ -1229,7 +1229,7 @@ namespace System.Web.UI.WebControls
|
||||
if (showPager && PagerSettings.Position == PagerPosition.Bottom ||
|
||||
PagerSettings.Position == PagerPosition.TopAndBottom) {
|
||||
bottomPagerRow = CreateRow (-1, DataControlRowType.Pager, DataControlRowState.Normal);
|
||||
InitializePager (bottomPagerRow, dataSource);
|
||||
InitializePager (bottomPagerRow, pagedDataSource);
|
||||
table.Rows.Add (bottomPagerRow);
|
||||
}
|
||||
}
|
||||
@@ -1268,7 +1268,7 @@ namespace System.Web.UI.WebControls
|
||||
return rstate;
|
||||
}
|
||||
|
||||
protected virtual void InitializePager (DetailsViewRow row, PagedDataSource dataSource)
|
||||
protected virtual void InitializePager (DetailsViewRow row, PagedDataSource pagedDataSource)
|
||||
{
|
||||
TableCell cell = new TableCell ();
|
||||
cell.ColumnSpan = 2;
|
||||
@@ -1276,7 +1276,7 @@ namespace System.Web.UI.WebControls
|
||||
if (pagerTemplate != null)
|
||||
pagerTemplate.InstantiateIn (cell);
|
||||
else
|
||||
cell.Controls.Add (PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, dataSource.PageCount));
|
||||
cell.Controls.Add (PagerSettings.CreatePagerControl (pagedDataSource.CurrentPageIndex, pagedDataSource.PageCount));
|
||||
|
||||
row.Cells.Add (cell);
|
||||
}
|
||||
@@ -1349,7 +1349,7 @@ namespace System.Web.UI.WebControls
|
||||
return dic;
|
||||
}
|
||||
|
||||
protected virtual void ExtractRowValues (IOrderedDictionary fieldValues, bool includeReadOnlyFields, bool includePrimaryKey)
|
||||
protected virtual void ExtractRowValues (IOrderedDictionary fieldValues, bool includeReadOnlyFields, bool includeKeys)
|
||||
{
|
||||
foreach (DetailsViewRow row in Rows) {
|
||||
if (row.Cells.Count < 1)
|
||||
@@ -1358,7 +1358,7 @@ namespace System.Web.UI.WebControls
|
||||
if (c != null)
|
||||
c.ContainingField.ExtractValuesFromCell (fieldValues, c, row.RowState, includeReadOnlyFields);
|
||||
}
|
||||
if (!includePrimaryKey && DataKeyNames != null)
|
||||
if (!includeKeys && DataKeyNames != null)
|
||||
foreach (string key in DataKeyNames)
|
||||
fieldValues.Remove (key);
|
||||
}
|
||||
@@ -1595,9 +1595,9 @@ namespace System.Web.UI.WebControls
|
||||
}
|
||||
}
|
||||
public
|
||||
void SetPageIndex (int newIndex)
|
||||
void SetPageIndex (int index)
|
||||
{
|
||||
DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (newIndex);
|
||||
DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (index);
|
||||
OnPageIndexChanging (args);
|
||||
|
||||
if (args.Cancel || !IsBoundUsingDataSourceID)
|
||||
@@ -1764,11 +1764,11 @@ namespace System.Web.UI.WebControls
|
||||
RequireBinding ();
|
||||
}
|
||||
|
||||
protected internal override void LoadControlState (object ob)
|
||||
protected internal override void LoadControlState (object savedState)
|
||||
{
|
||||
if (ob == null)
|
||||
if (savedState == null)
|
||||
return;
|
||||
object[] state = (object[]) ob;
|
||||
object[] state = (object[]) savedState;
|
||||
base.LoadControlState (state[0]);
|
||||
pageIndex = (int) state[1];
|
||||
pageCount = (int) state[2];
|
||||
@@ -1900,14 +1900,14 @@ namespace System.Web.UI.WebControls
|
||||
ControlStyle.LoadViewState (states [12]);
|
||||
}
|
||||
|
||||
void ICallbackEventHandler.RaiseCallbackEvent (string eventArgs)
|
||||
void ICallbackEventHandler.RaiseCallbackEvent (string eventArgument)
|
||||
{
|
||||
RaiseCallbackEvent (eventArgs);
|
||||
RaiseCallbackEvent (eventArgument);
|
||||
}
|
||||
|
||||
protected virtual void RaiseCallbackEvent (string eventArgs)
|
||||
protected virtual void RaiseCallbackEvent (string eventArgument)
|
||||
{
|
||||
string[] clientData = eventArgs.Split ('|');
|
||||
string[] clientData = eventArgument.Split ('|');
|
||||
PageIndex = int.Parse (clientData[0]);
|
||||
|
||||
RaisePostBackEvent (clientData[1]);
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace System.Web.UI.WebControls
|
||||
IOrderedDictionary keys;
|
||||
IOrderedDictionary values;
|
||||
|
||||
public DetailsViewDeleteEventArgs (int index)
|
||||
public DetailsViewDeleteEventArgs (int rowIndex)
|
||||
{
|
||||
this.rowIndex = index;
|
||||
this.rowIndex = rowIndex;
|
||||
}
|
||||
|
||||
internal DetailsViewDeleteEventArgs (int index, IOrderedDictionary keys, IOrderedDictionary values)
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace System.Web.UI.WebControls
|
||||
object argument;
|
||||
IOrderedDictionary values;
|
||||
|
||||
public DetailsViewInsertEventArgs (object argument)
|
||||
public DetailsViewInsertEventArgs (object commandArgument)
|
||||
{
|
||||
this.argument = argument;
|
||||
this.argument = commandArgument;
|
||||
}
|
||||
|
||||
internal DetailsViewInsertEventArgs (object argument, IOrderedDictionary values)
|
||||
|
||||
@@ -42,8 +42,8 @@ namespace System.Web.UI.WebControls
|
||||
this.rows = rows;
|
||||
}
|
||||
|
||||
public DetailsViewRow this [int i] {
|
||||
get { return (DetailsViewRow) rows [i]; }
|
||||
public DetailsViewRow this [int index] {
|
||||
get { return (DetailsViewRow) rows [index]; }
|
||||
}
|
||||
|
||||
public void CopyTo (DetailsViewRow[] array, int index)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user