AdCreatedEventArgs.cs 1.5 KB

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