private void UpdateGUI(object sender, EventArgs e) { try { ABB.Robotics.Controllers.RapidDomain.RapidData boolBlocksiFr1ArcStable = rwSystem.Controller.Rapid.GetRapidData("T_ROB1", "GlobalDataModule", "boolBlocksiFr1ArcStable"); ABB.Robotics.Controllers.RapidDomain.Bool bBlocksiFr1ArcStable = new ABB.Robotics.Controllers.RapidDomain.Bool(); bBlocksiFr1ArcStable.FillFromString(boolBlocksiFr1ArcStable.Value.ToString()); this.checkBox_boolBlocksiFr1ArcStable.Checked = bBlocksiFr1ArcStable; boolBlocksiFr1ArcStable.Dispose(); ABB.Robotics.Controllers.RapidDomain.RapidData numBlocksiArcStableLength = rwSystem.Controller.Rapid.GetRapidData("T_ROB1", "GlobalDataModule", "numBlocksiArcStableLength"); ABB.Robotics.Controllers.RapidDomain.Num nBlocksiArcStableLength = new ABB.Robotics.Controllers.RapidDomain.Num(); nBlocksiArcStableLength.FillFromString(numBlocksiArcStableLength.Value.ToString()); this.numEditor_numBlocksiArcStableLength.Value = Convert.ToDecimal(nBlocksiArcStableLength); numBlocksiArcStableLength.Dispose(); this.rwSystem.RefreshTpsControl("T_ROB1", "GlobalDataModule", "numIsometricalSaddleCoefficient", this.numEditor_numIsometricalSaddleCoefficient); this.rwSystem.RefreshTpsControl("T_ROB1", "GlobalDataModule", "numShoulderGrooveCoefficient", this.numEditor_numShoulderGrooveCoefficient); this.rwSystem.RefreshTpsControl("T_ROB1", "GlobalDataModule", "numTorchCleanIntervalCount", this.numEditor_numTorchCleanIntervalCount); this.menuItem_Apply.Enabled = false; } catch (Exception ex) { GTPUMessageBox.Show(this.Parent.Parent, null , string.Format("An unexpected error occurred when reading RAPID data 'rPipeGrooveModel'. Message {0}", ex.ToString()) , "System Error" , System.Windows.Forms.MessageBoxIcon.Hand , System.Windows.Forms.MessageBoxButtons.OK); } }
public void RefreshTpsControl(string strTaskName, string strModuleName, string strDataName, TpsControl tpsControl) { if (tpsControl is NumEditor) { ABB.Robotics.Controllers.RapidDomain.RapidData rapidData = this.controller.Rapid.GetRapidData(strTaskName, strModuleName, strDataName); ABB.Robotics.Controllers.RapidDomain.Num number = new ABB.Robotics.Controllers.RapidDomain.Num(); number.FillFromString(rapidData.Value.ToString()); ((NumEditor)tpsControl).Value = Convert.ToDecimal(number); rapidData.Dispose(); } }