1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Drawing;
- using System.Data;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using MeasureData;
- namespace HOZProject
- {
- public partial class UControl_ParaInfo : UserControl
- {
- /// <summary>
- /// 开始时间
- /// </summary>
- private string startTime;
- /// <summary>
- /// 结束时间
- /// </summary>
- private string endTime;
- /// <summary>
- /// 状态
- /// </summary>
- private string state;
- /// <summary>
- /// 位置
- /// </summary>
- private SemPosition position;
- private bool isSwitch;
- private string cutHoleName;
- private FormHOZMain formHOZMain;
- public FormHOZMain FormHOZMainObject { get => formHOZMain; set => formHOZMain = value; }
- public string StartTime { get => startTime; set => startTime = value; }
- public string EndTime { get => endTime; set => endTime = value; }
- public string State { get => state; set => state = value; }
- public SemPosition Position { get => position; set => position = value; }
- public string CutHoleName { get => cutHoleName; set => cutHoleName = value; }
- public bool IsSwitch { get => isSwitch; set => isSwitch = value; }
- public UControl_ParaInfo(FormHOZMain formHOZ)
- {
- InitializeComponent();
- FormHOZMainObject = formHOZ;
- }
- private void btnClose_Click(object sender, EventArgs e)
- {
- foreach (Control item in FormHOZMainObject.plFill.Controls)
- {
- if (item is Panel)
- {
- foreach (Control itemControl in item.Controls)
- {
- if (itemControl.Name == this.Name)
- {
- item.Controls.Remove(this);
- this.Dispose();
- item.Visible = false;
- break;
- }
- }
- }
- }
- }
- /// <summary>
- /// 显示切孔参数信息
- /// </summary>
- public void ShowParaInfo()
- {
- int multiple = 1000;
- //设置Position参数
- lblX.Text = (Position.X * multiple).ToString("f3");
- lblY.Text = (Position.Y * multiple).ToString("f3");
- lblZ.Text = (Position.Z * multiple).ToString("f3");
- lblR.Text = Position.R.ToString();
- lblT.Text = Position.T.ToString();
- lblM.Text = Position.M.ToString();
- lblShowStartTime.Text = StartTime;
- lblShowEndTime.Text = EndTime;
- lblShowState.Text = State;
- lblCutHoleName.Text = CutHoleName;
- CkIsSwitch.Checked = IsSwitch;
- }
- }
- }
|