Guest User

Untitled

a guest
Feb 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. public partial class Tile : UserControl
  2. {
  3. public Tile()
  4. {
  5. InitializeComponent();
  6. }
  7.  
  8. private Color _TopTextcolor = Color.Black;//the default color
  9. public Color TopTextColor
  10. {
  11. get { return _TopTextcolor; }
  12. set { _TopTextcolor = value; CustomLabel1.ForeColor = _TopTextcolor; }
  13. }
  14. private Color _BottomTextcolor = Color.Black;
  15. public Color BottomTextColor
  16. {
  17. get { return _BottomTextcolor; }
  18. set { _BottomTextcolor = value; CustomLabel2.ForeColor = _BottomTextcolor; }
  19. }
  20. private string _top_text= "Mylabel";
  21. [Editor("System.ComponentModel.Design.MultilineStringEditor," +
  22. " System.Design, " +
  23. "Version=2.0.0.0, " +
  24. "Culture=neutral, " +
  25. "PublicKeyToken=b03f5f7f11d50a3a",
  26. "System.Drawing.Design.UITypeEditor," +
  27. " System.Drawing, Version=2.0.0.0, " +
  28. "Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]//standard code to enable a multiline view
  29. public string TopText
  30. {
  31. get { return _top_text; }
  32. set { _top_text = value; CustomLabel1.Text = _top_text; }
  33. }
  34.  
  35. private string _bottom_text= "Mylabel";
  36. [Editor("System.ComponentModel.Design.MultilineStringEditor," +
  37. " System.Design, " +
  38. "Version=2.0.0.0, " +
  39. "Culture=neutral, " +
  40. "PublicKeyToken=b03f5f7f11d50a3a",
  41. "System.Drawing.Design.UITypeEditor," +
  42. " System.Drawing, Version=2.0.0.0, " +
  43. "Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]//standard code to enable a multiline view
  44. public string BottomText
  45. {
  46. get { return _bottom_text; }
  47. set { _bottom_text = value; CustomLabel2.Text = _bottom_text; }
  48. }
  49. private Image _photo;
  50.  
  51. public Image StatePhoto
  52. {
  53. get { return _photo; }
  54. set { _photo = value;pictureBox2.Image = _photo; }
  55. }
  56. private Image _mypicturebox;
  57.  
  58. public Image MyPictureBox
  59. {
  60. get { return _mypicturebox; }
  61. set { _mypicturebox = value; pictureBox1.Image = _mypicturebox; }
  62. }
  63. private Font _bottomTextFont;
  64.  
  65. public Font BottomTextFont
  66. {
  67. get { return _bottomTextFont; }
  68. set { _bottomTextFont = value; CustomLabel2.Font = _bottomTextFont; }
  69. }
  70. private Font _topTextFont;
  71.  
  72. public Font TopTextFont
  73. {
  74. get { return _topTextFont; }
  75. set { _topTextFont = value; CustomLabel1.Font = _topTextFont; }
  76. }
  77. private Boolean _visibility=true;
  78.  
  79. public Boolean SetStatePhotoVisibilty
  80. {
  81. get { return _visibility; }
  82. set { _visibility = value;
  83. if (_visibility == true)
  84. { pictureBox2.Visible = true; }
  85. else
  86. pictureBox2.Visible = false ;
  87. }
  88. }
  89. }
Add Comment
Please, Sign In to add comment