AdCreatedEventArgs.cs 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. //
  2. // Permission is hereby granted, free of charge, to any person obtaining
  3. // a copy of this software and associated documentation files (the
  4. // "Software"), to deal in the Software without restriction, including
  5. // without limitation the rights to use, copy, modify, merge, publish,
  6. // distribute, sublicense, and/or sell copies of the Software, and to
  7. // permit persons to whom the Software is furnished to do so, subject to
  8. // the following conditions:
  9. //
  10. // The above copyright notice and this permission notice shall be
  11. // included in all copies or substantial portions of the Software.
  12. //
  13. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  14. // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  15. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  16. // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  17. // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  18. // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  19. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  20. //
  21. /**
  22. * Namespace: System.Web.UI.WebControls
  23. * Class: AdCreatedEventArgs
  24. *
  25. * Author: Gaurav Vaish
  26. * Maintainer: [email protected]
  27. * Implementation: yes
  28. * Contact: <[email protected]>
  29. * Status: 100%
  30. *
  31. * (C) Gaurav Vaish (2001)
  32. */
  33. using System;
  34. using System.Collections;
  35. using System.Web;
  36. using System.Web.UI;
  37. namespace System.Web.UI.WebControls
  38. {
  39. public sealed class AdCreatedEventArgs: EventArgs
  40. {
  41. private IDictionary adProperties;
  42. private string alternateText;
  43. private string imageUrl;
  44. private string navigateUrl;
  45. public AdCreatedEventArgs(IDictionary adProperties): base()
  46. {
  47. Initialize();
  48. this.adProperties = adProperties;
  49. if(adProperties!=null)
  50. {
  51. imageUrl = (string)adProperties["ImageUrl"];
  52. navigateUrl = (string)adProperties["NavigateUrl"];
  53. alternateText = (string)adProperties["AlternateText"];
  54. }
  55. }
  56. private void Initialize()
  57. {
  58. alternateText = string.Empty;
  59. imageUrl = string.Empty;
  60. navigateUrl = string.Empty;
  61. }
  62. public IDictionary AdProperties
  63. {
  64. get
  65. {
  66. return adProperties;
  67. }
  68. }
  69. public string AlternateText
  70. {
  71. get
  72. {
  73. return alternateText;
  74. }
  75. set
  76. {
  77. alternateText = value;
  78. }
  79. }
  80. public string ImageUrl
  81. {
  82. get
  83. {
  84. return imageUrl;
  85. }
  86. set
  87. {
  88. imageUrl = value;
  89. }
  90. }
  91. public string NavigateUrl
  92. {
  93. get
  94. {
  95. return navigateUrl;
  96. }
  97. set
  98. {
  99. navigateUrl = value;
  100. }
  101. }
  102. }
  103. }