ScriptManager.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424
  1. //
  2. // ScriptManager.cs
  3. //
  4. // Author:
  5. // Igor Zelmanovich <[email protected]>
  6. //
  7. // (C) 2007 Mainsoft, Inc. http://www.mainsoft.com
  8. //
  9. //
  10. // Permission is hereby granted, free of charge, to any person obtaining
  11. // a copy of this software and associated documentation files (the
  12. // "Software"), to deal in the Software without restriction, including
  13. // without limitation the rights to use, copy, modify, merge, publish,
  14. // distribute, sublicense, and/or sell copies of the Software, and to
  15. // permit persons to whom the Software is furnished to do so, subject to
  16. // the following conditions:
  17. //
  18. // The above copyright notice and this permission notice shall be
  19. // included in all copies or substantial portions of the Software.
  20. //
  21. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  22. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  23. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  24. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  25. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  26. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  27. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  28. //
  29. using System;
  30. using System.Collections.Generic;
  31. using System.Text;
  32. using System.ComponentModel;
  33. using System.Security.Permissions;
  34. using System.Collections.Specialized;
  35. namespace System.Web.UI
  36. {
  37. [ParseChildrenAttribute (true)]
  38. [DefaultPropertyAttribute ("Scripts")]
  39. [DesignerAttribute ("System.Web.UI.Design.ScriptManagerDesigner, System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")]
  40. [NonVisualControlAttribute]
  41. [PersistChildrenAttribute (false)]
  42. [AspNetHostingPermissionAttribute (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
  43. [AspNetHostingPermissionAttribute (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
  44. public class ScriptManager : Control, IPostBackDataHandler
  45. {
  46. [DefaultValue (true)]
  47. [Category ("Behavior")]
  48. public bool AllowCustomErrorsRedirect {
  49. get {
  50. throw new NotImplementedException ();
  51. }
  52. set {
  53. throw new NotImplementedException ();
  54. }
  55. }
  56. [Category ("Behavior")]
  57. [DefaultValue ("")]
  58. public string AsyncPostBackErrorMessage {
  59. get {
  60. throw new NotImplementedException ();
  61. }
  62. set {
  63. throw new NotImplementedException ();
  64. }
  65. }
  66. [Browsable (false)]
  67. public string AsyncPostBackSourceElementID {
  68. get {
  69. throw new NotImplementedException ();
  70. }
  71. }
  72. [DefaultValue (90)]
  73. [Category ("Behavior")]
  74. public int AsyncPostBackTimeout {
  75. get {
  76. throw new NotImplementedException ();
  77. }
  78. set {
  79. throw new NotImplementedException ();
  80. }
  81. }
  82. [Category ("Behavior")]
  83. [MergableProperty (false)]
  84. [DefaultValue ("")]
  85. [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
  86. [PersistenceMode (PersistenceMode.InnerProperty)]
  87. public AuthenticationServiceManager AuthenticationService {
  88. get {
  89. throw new NotImplementedException ();
  90. }
  91. }
  92. [Category ("Behavior")]
  93. [DefaultValue (false)]
  94. public bool EnablePageMethods {
  95. get {
  96. throw new NotImplementedException ();
  97. }
  98. set {
  99. throw new NotImplementedException ();
  100. }
  101. }
  102. [DefaultValue (true)]
  103. [Category ("Behavior")]
  104. public bool EnablePartialRendering {
  105. get {
  106. throw new NotImplementedException ();
  107. }
  108. set {
  109. throw new NotImplementedException ();
  110. }
  111. }
  112. [DefaultValue (false)]
  113. [Category ("Behavior")]
  114. public bool EnableScriptGlobalization {
  115. get {
  116. throw new NotImplementedException ();
  117. }
  118. set {
  119. throw new NotImplementedException ();
  120. }
  121. }
  122. [Category ("Behavior")]
  123. [DefaultValue (false)]
  124. public bool EnableScriptLocalization {
  125. get {
  126. throw new NotImplementedException ();
  127. }
  128. set {
  129. throw new NotImplementedException ();
  130. }
  131. }
  132. [Browsable (false)]
  133. public bool IsDebuggingEnabled {
  134. get {
  135. throw new NotImplementedException ();
  136. }
  137. }
  138. [Browsable (false)]
  139. public bool IsInAsyncPostBack {
  140. get {
  141. throw new NotImplementedException ();
  142. }
  143. }
  144. [Category ("Behavior")]
  145. [DefaultValue (true)]
  146. public bool LoadScriptsBeforeUI {
  147. get {
  148. throw new NotImplementedException ();
  149. }
  150. set {
  151. throw new NotImplementedException ();
  152. }
  153. }
  154. [PersistenceMode (PersistenceMode.InnerProperty)]
  155. [DefaultValue ("")]
  156. [DesignerSerializationVisibility (DesignerSerializationVisibility.Content)]
  157. [Category ("Behavior")]
  158. [MergableProperty (false)]
  159. public ProfileServiceManager ProfileService {
  160. get {
  161. throw new NotImplementedException ();
  162. }
  163. }
  164. [Category ("Behavior")]
  165. public ScriptMode ScriptMode {
  166. get {
  167. throw new NotImplementedException ();
  168. }
  169. set {
  170. throw new NotImplementedException ();
  171. }
  172. }
  173. [DefaultValue ("")]
  174. [Category ("Behavior")]
  175. public string ScriptPath {
  176. get {
  177. throw new NotImplementedException ();
  178. }
  179. set {
  180. throw new NotImplementedException ();
  181. }
  182. }
  183. [PersistenceMode (PersistenceMode.InnerProperty)]
  184. [DefaultValue ("")]
  185. [Category ("Behavior")]
  186. [MergableProperty (false)]
  187. public ScriptReferenceCollection Scripts {
  188. get {
  189. throw new NotImplementedException ();
  190. }
  191. }
  192. [PersistenceMode (PersistenceMode.InnerProperty)]
  193. [DefaultValue ("")]
  194. [MergableProperty (false)]
  195. [Category ("Behavior")]
  196. public ServiceReferenceCollection Services {
  197. get {
  198. throw new NotImplementedException ();
  199. }
  200. }
  201. [DefaultValue (true)]
  202. [Browsable (false)]
  203. public bool SupportsPartialRendering {
  204. get {
  205. throw new NotImplementedException ();
  206. }
  207. set {
  208. throw new NotImplementedException ();
  209. }
  210. }
  211. [EditorBrowsable (EditorBrowsableState.Never)]
  212. [Browsable (false)]
  213. [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
  214. public override bool Visible {
  215. get {
  216. return true;
  217. }
  218. set {
  219. throw new NotImplementedException ();
  220. }
  221. }
  222. [Category ("Action")]
  223. public event EventHandler<AsyncPostBackErrorEventArgs> AsyncPostBackError;
  224. [Category ("Action")]
  225. public event EventHandler<ScriptReferenceEventArgs> ResolveScriptReference;
  226. public static ScriptManager GetCurrent (Page page)
  227. {
  228. throw new NotImplementedException ();
  229. }
  230. protected virtual bool LoadPostData (string postDataKey, NameValueCollection postCollection)
  231. {
  232. throw new NotImplementedException ();
  233. }
  234. protected internal virtual void OnAsyncPostBackError (AsyncPostBackErrorEventArgs e)
  235. {
  236. if (AsyncPostBackError != null)
  237. AsyncPostBackError (this, e);
  238. }
  239. protected override void OnInit (EventArgs e)
  240. {
  241. base.OnInit (e);
  242. }
  243. protected override void OnPreRender (EventArgs e)
  244. {
  245. base.OnPreRender (e);
  246. }
  247. protected virtual void OnResolveScriptReference (ScriptReferenceEventArgs e)
  248. {
  249. if (ResolveScriptReference != null)
  250. ResolveScriptReference (this, e);
  251. }
  252. protected virtual void RaisePostDataChangedEvent ()
  253. {
  254. throw new NotImplementedException ();
  255. }
  256. public static void RegisterArrayDeclaration (Control control, string arrayName, string arrayValue)
  257. {
  258. throw new NotImplementedException ();
  259. }
  260. public static void RegisterArrayDeclaration (Page page, string arrayName, string arrayValue)
  261. {
  262. throw new NotImplementedException ();
  263. }
  264. public void RegisterAsyncPostBackControl (Control control)
  265. {
  266. throw new NotImplementedException ();
  267. }
  268. public static void RegisterClientScriptBlock (Control control, Type type, string key, string script, bool addScriptTags)
  269. {
  270. throw new NotImplementedException ();
  271. }
  272. public static void RegisterClientScriptBlock (Page page, Type type, string key, string script, bool addScriptTags)
  273. {
  274. throw new NotImplementedException ();
  275. }
  276. public static void RegisterClientScriptInclude (Control control, Type type, string key, string url)
  277. {
  278. throw new NotImplementedException ();
  279. }
  280. public static void RegisterClientScriptInclude (Page page, Type type, string key, string url)
  281. {
  282. throw new NotImplementedException ();
  283. }
  284. public static void RegisterClientScriptResource (Control control, Type type, string resourceName)
  285. {
  286. throw new NotImplementedException ();
  287. }
  288. public static void RegisterClientScriptResource (Page page, Type type, string resourceName)
  289. {
  290. throw new NotImplementedException ();
  291. }
  292. public void RegisterDataItem (Control control, string dataItem)
  293. {
  294. throw new NotImplementedException ();
  295. }
  296. public void RegisterDataItem (Control control, string dataItem, bool isJsonSerialized)
  297. {
  298. throw new NotImplementedException ();
  299. }
  300. public void RegisterDispose (Control control, string disposeScript)
  301. {
  302. throw new NotImplementedException ();
  303. }
  304. public static void RegisterExpandoAttribute (Control control, string controlId, string attributeName, string attributeValue, bool encode)
  305. {
  306. throw new NotImplementedException ();
  307. }
  308. public static void RegisterHiddenField (Control control, string hiddenFieldName, string hiddenFieldInitialValue)
  309. {
  310. throw new NotImplementedException ();
  311. }
  312. public static void RegisterHiddenField (Page page, string hiddenFieldName, string hiddenFieldInitialValue)
  313. {
  314. throw new NotImplementedException ();
  315. }
  316. public static void RegisterOnSubmitStatement (Control control, Type type, string key, string script)
  317. {
  318. throw new NotImplementedException ();
  319. }
  320. public static void RegisterOnSubmitStatement (Page page, Type type, string key, string script)
  321. {
  322. throw new NotImplementedException ();
  323. }
  324. public void RegisterPostBackControl (Control control)
  325. {
  326. throw new NotImplementedException ();
  327. }
  328. public void RegisterScriptDescriptors (IExtenderControl extenderControl)
  329. {
  330. throw new NotImplementedException ();
  331. }
  332. public void RegisterScriptDescriptors (IScriptControl scriptControl)
  333. {
  334. throw new NotImplementedException ();
  335. }
  336. public static void RegisterStartupScript (Control control, Type type, string key, string script, bool addScriptTags)
  337. {
  338. throw new NotImplementedException ();
  339. }
  340. public static void RegisterStartupScript (Page page, Type type, string key, string script, bool addScriptTags)
  341. {
  342. throw new NotImplementedException ();
  343. }
  344. protected override void Render (HtmlTextWriter writer)
  345. {
  346. throw new NotImplementedException ();
  347. }
  348. public void SetFocus (Control control)
  349. {
  350. throw new NotImplementedException ();
  351. }
  352. public void SetFocus (string clientID)
  353. {
  354. throw new NotImplementedException ();
  355. }
  356. #region IPostBackDataHandler Members
  357. bool IPostBackDataHandler.LoadPostData (string postDataKey, NameValueCollection postCollection)
  358. {
  359. return LoadPostData (postDataKey, postCollection);
  360. }
  361. void IPostBackDataHandler.RaisePostDataChangedEvent ()
  362. {
  363. RaisePostDataChangedEvent ();
  364. }
  365. #endregion
  366. }
  367. }