[NotifyParentPropertyAttribute (true)]\r
[UrlPropertyAttribute]\r
[DefaultValueAttribute ("")]\r
- [EditorAttribute ("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]\r
+ [EditorAttribute ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]\r
public string FirstPageImageUrl {\r
get {\r
object ob = ViewState ["FirstPageImageUrl"];\r
}\r
set {\r
ViewState ["FirstPageImageUrl"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
}\r
set {\r
ViewState ["FirstPageText"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
[NotifyParentPropertyAttribute (true)]\r
[UrlPropertyAttribute]\r
[DefaultValueAttribute ("")]\r
- [EditorAttribute ("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]\r
+ [EditorAttribute ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]\r
public string LastPageImageUrl {\r
get {\r
object ob = ViewState ["LastPageImageUrl"];\r
}\r
set {\r
ViewState ["LastPageImageUrl"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
}\r
set {\r
ViewState ["LastPageText"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
}\r
set {\r
ViewState ["Mode"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
[NotifyParentPropertyAttribute (true)]\r
[UrlPropertyAttribute]\r
[DefaultValueAttribute ("")]\r
- [EditorAttribute ("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]\r
+ [EditorAttribute ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]\r
public string NextPageImageUrl {\r
get {\r
object ob = ViewState ["NextPageImageUrl"];\r
}\r
set {\r
ViewState ["NextPageImageUrl"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
}\r
set {\r
ViewState ["NextPageText"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
}\r
set {\r
ViewState ["PageButtonCount"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
[NotifyParentPropertyAttribute (true)]\r
[UrlPropertyAttribute]\r
[DefaultValueAttribute ("")]\r
- [EditorAttribute ("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]\r
+ [EditorAttribute ("System.Web.UI.Design.ImageUrlEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]\r
public string PreviousPageImageUrl {\r
get {\r
object ob = ViewState ["PreviousPageImageUrl"];\r
}\r
set {\r
ViewState ["PreviousPageImageUrl"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
}\r
set {\r
ViewState ["PreviousPageText"] = value;\r
+ RaisePropertyChanged ();\r
}\r
}\r
\r
ViewState ["Visible"] = value;\r
}\r
}\r
- \r
+\r
+ public event EventHandler PropertyChanged;\r
+\r
+ void RaisePropertyChanged ()\r
+ {\r
+ if (PropertyChanged != null)\r
+ PropertyChanged (this, EventArgs.Empty);\r
+ }\r
+\r
public override string ToString ()\r
{\r
return string.Empty;\r
}\r
else if (Mode == PagerButtons.Numeric || Mode == PagerButtons.NumericFirstLast)\r
{\r
- int first = currentPage / PageButtonCount;\r
- int last = first + PageButtonCount;\r
+ int pbc = PageButtonCount;
+ int cp = currentPage + 1;
+ int pbp = pbc <= cp ? cp / pbc : 0;
+ int first = cp < pbc ? 0 : (cp + (pbp % pbc) - (pbc + pbp)) + 1;
+ int last = first + pbc;\r
if (last >= pageCount) last = pageCount;\r
\r
if (first > 0) {\r