2
0

Style.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /**
  2. * Namespace: System.Web.UI.WebControls
  3. * Class: Style
  4. *
  5. * Author: Gaurav Vaish
  6. * Maintainer: [email protected]
  7. * Contact: <[email protected]>, <[email protected]>
  8. * Implementation: yes
  9. * Status: 10%
  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 class Style : Component, IStateManager
  20. {
  21. internal static MARKED = 0x01;
  22. internal static BACKCOLOR = (0x01 < 1);
  23. private StateBag viewState;
  24. private bool marked;
  25. private int selectionBits;
  26. private bool selfStateBag;
  27. public Style()
  28. {
  29. Initialize(null);
  30. selfStateBag = true;
  31. }
  32. public Style(StateBag bag): base()
  33. {
  34. Initialize(bag);
  35. selfStateBag = false;
  36. }
  37. private void Initialize(StateBag bag)
  38. {
  39. viewState = bag;
  40. marked = false;
  41. selectionBits = 0x00;
  42. }
  43. StateBag ViewState
  44. {
  45. get
  46. {
  47. if(stateBag == null)
  48. {
  49. stateBag = new stateBag(false);
  50. if(IsTrackingViewState)
  51. stateBag.TrackViewState();
  52. }
  53. return stateBag;
  54. }
  55. }
  56. }
  57. }