AdCreatedEventArgs.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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): base()
  26. {
  27. Initialize();
  28. this.adProperties = adProperties;
  29. if(adProperties!=null)
  30. {
  31. imageUrl = (string)adProperties["ImageUrl"];
  32. navigateUrl = (string)adProperties["NavigateUrl"];
  33. alternateText = (string)adProperties["AlternateText"];
  34. }
  35. }
  36. private void Initialize()
  37. {
  38. alternateText = string.Empty;
  39. imageUrl = string.Empty;
  40. navigateUrl = string.Empty;
  41. }
  42. public IDictionary AdProperties
  43. {
  44. get
  45. {
  46. return adProperties;
  47. }
  48. }
  49. public string AlternateText
  50. {
  51. get
  52. {
  53. return alternateText;
  54. }
  55. set
  56. {
  57. alternateText = value;
  58. }
  59. }
  60. public string ImageUrl
  61. {
  62. get
  63. {
  64. return imageUrl;
  65. }
  66. set
  67. {
  68. imageUrl = value;
  69. }
  70. }
  71. public string NavigateUrl
  72. {
  73. get
  74. {
  75. return navigateUrl;
  76. }
  77. set
  78. {
  79. navigateUrl = value;
  80. }
  81. }
  82. }
  83. }