PictureEditWithText.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using DevExpress.XtraEditors;
  10. namespace UAS_PLCDataReader.CustomerControl.PictureEditWithText
  11. {
  12. public partial class PictureEditWithText : XtraUserControl
  13. {
  14. public PictureEdit Picedit
  15. {
  16. get
  17. {
  18. return UserPictureEdit;
  19. }
  20. set
  21. {
  22. UserPictureEdit = value;
  23. }
  24. }
  25. public override string Text
  26. {
  27. get
  28. {
  29. return UserLabelControl.Text;
  30. }
  31. set
  32. {
  33. UserLabelControl.Text = value;
  34. }
  35. }
  36. public string DeviceName
  37. {
  38. get
  39. {
  40. return UserLabelControl1.Text;
  41. }
  42. set
  43. {
  44. UserLabelControl1.Text = value;
  45. }
  46. }
  47. public PictureEditWithText()
  48. {
  49. InitializeComponent();
  50. }
  51. private void PictureEditWithText_Load(object sender, EventArgs e)
  52. {
  53. UserLabelControl.Location = new Point((Width - UserLabelControl.Width) / 2, UserLabelControl.Location.Y);
  54. UserLabelControl1.Location = new Point((Width - UserLabelControl.Width) / 2, UserLabelControl1.Location.Y);
  55. }
  56. }
  57. }