UControl_ParaInfo.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using MeasureData;
  11. namespace HOZProject
  12. {
  13. public partial class UControl_ParaInfo : UserControl
  14. {
  15. /// <summary>
  16. /// 开始时间
  17. /// </summary>
  18. private string startTime;
  19. /// <summary>
  20. /// 结束时间
  21. /// </summary>
  22. private string endTime;
  23. /// <summary>
  24. /// 状态
  25. /// </summary>
  26. private string state;
  27. /// <summary>
  28. /// 位置
  29. /// </summary>
  30. private SemPosition position;
  31. private bool isSwitch;
  32. private string cutHoleName;
  33. private FormHOZMain formHOZMain;
  34. public FormHOZMain FormHOZMainObject { get => formHOZMain; set => formHOZMain = value; }
  35. public string StartTime { get => startTime; set => startTime = value; }
  36. public string EndTime { get => endTime; set => endTime = value; }
  37. public string State { get => state; set => state = value; }
  38. public SemPosition Position { get => position; set => position = value; }
  39. public string CutHoleName { get => cutHoleName; set => cutHoleName = value; }
  40. public bool IsSwitch { get => isSwitch; set => isSwitch = value; }
  41. public UControl_ParaInfo(FormHOZMain formHOZ)
  42. {
  43. InitializeComponent();
  44. FormHOZMainObject = formHOZ;
  45. }
  46. private void btnClose_Click(object sender, EventArgs e)
  47. {
  48. foreach (Control item in FormHOZMainObject.plFill.Controls)
  49. {
  50. if (item is Panel)
  51. {
  52. foreach (Control itemControl in item.Controls)
  53. {
  54. if (itemControl.Name == this.Name)
  55. {
  56. item.Controls.Remove(this);
  57. this.Dispose();
  58. item.Visible = false;
  59. break;
  60. }
  61. }
  62. }
  63. }
  64. }
  65. public void ShowUCTimeLine()
  66. {
  67. UCTimeLine uControl_ParaInfo = new UCTimeLine();
  68. uControl_ParaInfo.Dock = DockStyle.Fill;
  69. plMeasureFlow.Controls.Add(uControl_ParaInfo);
  70. }
  71. /// <summary>
  72. /// 显示切孔参数信息
  73. /// </summary>
  74. public void ShowParaInfo()
  75. {
  76. int multiple = 1000;
  77. //设置Position参数
  78. lblX.Text = (Position.X * multiple).ToString("f3");
  79. lblY.Text = (Position.Y * multiple).ToString("f3");
  80. lblZ.Text = (Position.Z * multiple).ToString("f3");
  81. lblR.Text = Position.R.ToString();
  82. lblT.Text = Position.T.ToString();
  83. lblM.Text = Position.M.ToString();
  84. lblShowStartTime.Text = StartTime;
  85. lblShowEndTime.Text = EndTime;
  86. lblShowState.Text = State;
  87. lblCutHoleName.Text = CutHoleName;
  88. CkIsSwitch.Checked = IsSwitch;
  89. }
  90. /// <summary>
  91. /// 绑定流程信息
  92. /// </summary>
  93. /// <param name="flowCode"></param>
  94. private void ShowMeasureFlow(string flowCode)
  95. {
  96. }
  97. }
  98. }