Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Tile : UserControl
- {
- public Tile()
- {
- InitializeComponent();
- }
- private Color _TopTextcolor = Color.Black;//the default color
- public Color TopTextColor
- {
- get { return _TopTextcolor; }
- set { _TopTextcolor = value; CustomLabel1.ForeColor = _TopTextcolor; }
- }
- private Color _BottomTextcolor = Color.Black;
- public Color BottomTextColor
- {
- get { return _BottomTextcolor; }
- set { _BottomTextcolor = value; CustomLabel2.ForeColor = _BottomTextcolor; }
- }
- private string _top_text= "Mylabel";
- [Editor("System.ComponentModel.Design.MultilineStringEditor," +
- " System.Design, " +
- "Version=2.0.0.0, " +
- "Culture=neutral, " +
- "PublicKeyToken=b03f5f7f11d50a3a",
- "System.Drawing.Design.UITypeEditor," +
- " System.Drawing, Version=2.0.0.0, " +
- "Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]//standard code to enable a multiline view
- public string TopText
- {
- get { return _top_text; }
- set { _top_text = value; CustomLabel1.Text = _top_text; }
- }
- private string _bottom_text= "Mylabel";
- [Editor("System.ComponentModel.Design.MultilineStringEditor," +
- " System.Design, " +
- "Version=2.0.0.0, " +
- "Culture=neutral, " +
- "PublicKeyToken=b03f5f7f11d50a3a",
- "System.Drawing.Design.UITypeEditor," +
- " System.Drawing, Version=2.0.0.0, " +
- "Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]//standard code to enable a multiline view
- public string BottomText
- {
- get { return _bottom_text; }
- set { _bottom_text = value; CustomLabel2.Text = _bottom_text; }
- }
- private Image _photo;
- public Image StatePhoto
- {
- get { return _photo; }
- set { _photo = value;pictureBox2.Image = _photo; }
- }
- private Image _mypicturebox;
- public Image MyPictureBox
- {
- get { return _mypicturebox; }
- set { _mypicturebox = value; pictureBox1.Image = _mypicturebox; }
- }
- private Font _bottomTextFont;
- public Font BottomTextFont
- {
- get { return _bottomTextFont; }
- set { _bottomTextFont = value; CustomLabel2.Font = _bottomTextFont; }
- }
- private Font _topTextFont;
- public Font TopTextFont
- {
- get { return _topTextFont; }
- set { _topTextFont = value; CustomLabel1.Font = _topTextFont; }
- }
- private Boolean _visibility=true;
- public Boolean SetStatePhotoVisibilty
- {
- get { return _visibility; }
- set { _visibility = value;
- if (_visibility == true)
- { pictureBox2.Visible = true; }
- else
- pictureBox2.Visible = false ;
- }
- }
- }
Add Comment
Please, Sign In to add comment