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
{
///
/// 开始时间
///
private string startTime;
///
/// 结束时间
///
private string endTime;
///
/// 状态
///
private string state;
///
/// 位置
///
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;
}
}
}
}
}
///
/// 显示切孔参数信息
///
public void ShowParaInfo()
{
//设置Position参数
lblX.Text = Position.X.ToString();
lblY.Text = Position.Y.ToString();
lblZ.Text = Position.Z.ToString();
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;
}
}
}