| | |
| | | using Bro.Common.Interface; |
| | | using Bro.Common.Model; |
| | | using System; |
| | | using System.Linq; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Bro.UI.Device.Winform |
| | |
| | | InitializeComponent(); |
| | | |
| | | Device = device; |
| | | MotionCardOperationConfig = new MotionCardOperationConfigBase(); |
| | | |
| | | InitialLayout(); |
| | | } |
| | | |
| | | MovingOption movingConfig = null; |
| | | |
| | | #region ILogoutput |
| | | public Action<LogMsg> OnLogMsgOutput { get; set; } |
| | | |
| | | public void LogDisplay(LogMsg msg) |
| | | private void InitialLayout() |
| | | { |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | private void RadioButton_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | | //加载对应运动的 movingConfig |
| | | //if (radioP2P.Checked) |
| | | //{ |
| | | // movingConfig = MotionCardOperationConfig.MovingOps.FirstOrDefault(u => u.MoveMode == EnumHelper.MotorMoveMode.Normal); |
| | | //} |
| | | //else if (radioJog.Checked) |
| | | //{ |
| | | // movingConfig = MotionCardOperationConfig.MovingOps.FirstOrDefault(u => u.MoveMode == EnumHelper.MotorMoveMode.Jog); |
| | | //} |
| | | //else if (radioGoHome.Checked) |
| | | //{ |
| | | // movingConfig = MotionCardOperationConfig.MovingOps.FirstOrDefault(u => u.MoveMode == EnumHelper.MotorMoveMode.FindOri); |
| | | //} |
| | | |
| | | propGrid.SelectedObject = movingConfig; |
| | | foreach (var axisConfig in MotionCard.IConfig.AxisSettings.FindAll(u => u.IsAxisEnabled)) |
| | | { |
| | | var axisMovingStatus = MotionCard.AxisMovingOptionValues.FirstOrDefault(u => u.AxisIndex == axisConfig.AxisIndex); |
| | | if (axisMovingStatus != null) |
| | | { |
| | | CtrlMotionCardAxisOperation axisOperation = new CtrlMotionCardAxisOperation(axisMovingStatus.AxisIndex, axisMovingStatus.AxisName); |
| | | axisOperation.Dock = DockStyle.Fill; |
| | | flowLayoutPanel1.Controls.Add(axisOperation); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void buttonClearStatus_Click(object sender, EventArgs e) |