AdCreatedEventArgs.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /**
  2. * Namespace: System.Web.UI.WebControls
  3. * Class: AdCreatedEventArgs
  4. *
  5. * Author: Gaurav Vaish
  6. * Contact: <[email protected]>
  7. * Status: 100%
  8. *
  9. * (C) Gaurav Vaish (2001)
  10. */
  11. using System;
  12. using System.Collections;
  13. using System.Web;
  14. using System.Web.UI;
  15. namespace System.Web.UI.WebControls
  16. {
  17. public sealed class AdCreatedEventArgs: EventArgs
  18. {
  19. private IDictionary adProperties;
  20. private string alternateText;
  21. private string imageUrl;
  22. private string navigateUrl;
  23. public AdCreatedEventArgs(IDictionary adProperties)
  24. {
  25. super();
  26. Initialize();
  27. this.adProperties = adProperties;
  28. if(adProperties!=null)
  29. {
  30. imageUrl = (string)adProperties.Item["ImageUrl"];
  31. navigateUrl = (string)adProperties.Item["NavigateUrl"];
  32. alternateText = (string)adProperties.Item["AlternateText"];
  33. }
  34. }
  35. private void Initialize()
  36. {
  37. alternateText = string.Empty;
  38. imageUrl = string.Empty;
  39. navigateUrl = string.Empty;
  40. }
  41. public IDictionary AdProperties
  42. {
  43. get
  44. {
  45. return adProperties;
  46. }
  47. }
  48. public string AlternateText
  49. {
  50. get
  51. {
  52. return alternateText;
  53. }
  54. set
  55. {
  56. alternateText = value;
  57. }
  58. }
  59. public string ImageUrl
  60. {
  61. get
  62. {
  63. return imageUrl;
  64. }
  65. set
  66. {
  67. imageUrl = value;
  68. }
  69. }
  70. public string NavigateUrl
  71. {
  72. get
  73. {
  74. return navigateUrl;
  75. }
  76. set
  77. {
  78. navigateUrl = value;
  79. }
  80. }
  81. }
  82. }