RightLabelControl.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Text;
  7. using System.Linq;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using DevExpress.XtraEditors;
  11. namespace Uninpho.Railway.Waveform
  12. {
  13. public partial class RightLabelControl : DevExpress.XtraEditors.XtraUserControl
  14. {
  15. public PanelControl move_Panel;
  16. DrawCrl frmm;
  17. MessageFrm messfrm;
  18. CoorListClass mess;
  19. public RightLabelControl()
  20. {
  21. InitializeComponent();
  22. }
  23. public RightLabelControl(CoorListClass mess, DrawCrl frm)
  24. {
  25. InitializeComponent();
  26. this.frmm = frm;
  27. this.mess = mess;
  28. move_Panel = movePanel;
  29. simpleButton1.Text = mess.ListName;
  30. separatorControl1.LineColor = Color.FromArgb(mess.RGBA[3], mess.RGBA[0], mess.RGBA[1], mess.RGBA[2]);
  31. }
  32. /// <summary>
  33. /// 双击修改信息
  34. /// </summary>
  35. private void simpleButton1_DoubleClick(object sender, EventArgs e)
  36. {
  37. messfrm = new MessageFrm(mess, frmm, this);
  38. messfrm.StartPosition = FormStartPosition.CenterParent;
  39. messfrm.ShowDialog();
  40. }
  41. public void changeRGBLine(int r, int g, int b, int a)
  42. {
  43. separatorControl1.LineColor = Color.FromArgb(a, r, g, b);
  44. }
  45. public void changeLabelValue(string str)
  46. {
  47. labelControl1.Text = str;
  48. }
  49. }
  50. }