/// <summary> /// This method is called by TAF when the control is installed in the framework (after the constructor is called). /// </summary> bool ITpsViewSetup.Install(object sender, object data) { try { // Do install this.rwSystem = new RWSystem(); this.pipeGrooveModel = new PipeGrooveModel(); this.weldProcedure = new WeldProcedure(); this.layerParameter = new LayerParameter(); if (sender is ITpsViewLaunchServices) { this._iTpsSite = sender as ITpsViewLaunchServices; return(true); } return(true); } catch (Exception ex) { // Add error message to "ProdScr.log" file ErrorHandler.AddErrorMessage(CURRENT_MODULE_NAME, ex.ToString()); ExceptionHandler.ReThrowException("TpsViewEbaraV2", "ITpsViewActivation.Install", ex); return(false); } }
public void RefreshData(RWSystem rwSystem) { RapidData rPipeGrooveModel = rwSystem.Controller.Rapid.GetRapidData(strTaskName, strDataModuleName, strDataName); RapidDataType rPipeGrooveModelType = rwSystem.Controller.Rapid.GetRapidDataType(strTaskName, strDataTypeModuleName, strDataType); UserDefined rPipeGrooveModelUserDefine = new UserDefined(rPipeGrooveModelType); rPipeGrooveModelUserDefine.FillFromString(rPipeGrooveModel.Value.ToString()); int i = 0; this.numIndex = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numPipeGrooveType = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numSeamCenterX = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numSeamNormalAngle = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numHeaderDiameter = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numHeaderThickness = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numHeaderMaterial = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numBranchDiameter = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numBranchThickness = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numBranchMaterial = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numMultiPassTotal = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numCooperativeRobots = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numPathSource = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numReviseScanBranchType = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numReviseScanHeaderType = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numWeldLegWidth = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numGrooveGap = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numBranchGrooveRoot = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numBranchGrooveAngle = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numBranchGrooveAngle90 = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numTopHeight90 = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numBottomHeight90 = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numProfCosine = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numLayerHeight = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numLayerPassTotalRoundType = decimal.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.numAlgorithmType = int.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.boolContinuous = bool.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.boolUseAlignedSTNbyFixedValue = bool.Parse(rPipeGrooveModelUserDefine.Components[i++].ToString()); this.strID = rPipeGrooveModelUserDefine.Components[i++].ToString(); this.strRemark = rPipeGrooveModelUserDefine.Components[i++].ToString(); rPipeGrooveModelUserDefine.Dispose(); rPipeGrooveModelType.Dispose(); rPipeGrooveModel.Dispose(); }
public void RefreshData(RWSystem rwSystem, int intGroupIndex, int intIndex) { this.intGroupIndex = intGroupIndex; this.intIndex = intIndex; RapidData rWeldProcedureArray = rwSystem.Controller.Rapid.GetRapidData(strTaskName, strDataModuleName, strDataName + this.intGroupIndex); //RapidDataType rWeldProcedureType = rwSystem.Controller.Rapid.GetRapidDataType(strTaskName, strDataTypeModuleName, strDataType); UserDefined rWeldProcedure = (UserDefined)rWeldProcedureArray.ReadItem(this.intIndex); int i = 0; this.strWeldProcedureID = rWeldProcedure.Components[i++].ToString(); this.strWeldProcedureID = this.strWeldProcedureID.Substring(1, this.strWeldProcedureID.Length - 2); this.numWeldSpeed = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numPreFlow = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numSche = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numTrackCurrent = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numPostFlow = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveShape = int.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveType = int.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveLength = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveWidth = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveHeigth = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numDwellLeft = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numDwellCenter = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numDwellRight = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveDir = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveTilt = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveOri = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveBias = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numTrackType = int.Parse(rWeldProcedure.Components[i++].ToString()); this.numGainY = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numGainZ = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numPenetration = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numTrackBias = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.numWeaveWidth90 = decimal.Parse(rWeldProcedure.Components[i++].ToString()); this.strRemark = rWeldProcedure.Components[i++].ToString(); this.strRemark = this.strRemark.Substring(1, this.strRemark.Length - 2); //rWeldProcedureType.Dispose(); rWeldProcedure.Dispose(); rWeldProcedureArray.Dispose(); }
public void ApplyData(RWSystem rwSystem) { RapidData rLayerParameter = rwSystem.Controller.Rapid.GetRapidData(strTaskName, strDataModuleName, string.Format("{0}{1:00}", strDataName, this.intLayerNo)); RapidDataType rLayerParameterType = rwSystem.Controller.Rapid.GetRapidDataType(strTaskName, strDataTypeModuleName, strDataType); UserDefined rLayerParameterUserDefine = new UserDefined(rLayerParameterType); rLayerParameterUserDefine.FillFromString(this.ToString()); ErrorHandler.AddErrorMessage("MichaelLog", this.ToString()); rLayerParameter.Value = rLayerParameterUserDefine; rLayerParameterUserDefine.Dispose(); rLayerParameterType.Dispose(); rLayerParameter.Dispose(); }
public void ApplyData(RWSystem rwSystem) { RapidData rPipeGrooveModel = rwSystem.Controller.Rapid.GetRapidData(strTaskName, strDataModuleName, strDataName); RapidDataType rPipeGrooveModelType = rwSystem.Controller.Rapid.GetRapidDataType(strTaskName, strDataTypeModuleName, strDataType); UserDefined rPipeGrooveModelUserDefine = new UserDefined(rPipeGrooveModelType); rPipeGrooveModelUserDefine.FillFromString(this.ToString()); ErrorHandler.AddErrorMessage("MichaelLog", this.ToString()); rPipeGrooveModel.Value = rPipeGrooveModelUserDefine; rPipeGrooveModelUserDefine.Dispose(); rPipeGrooveModelType.Dispose(); rPipeGrooveModel.Dispose(); }
public void ApplyData(RWSystem rwSystem) { RapidData rWeldProcedureArray = rwSystem.Controller.Rapid.GetRapidData(strTaskName, strDataModuleName, strDataName + this.intGroupIndex); //RapidDataType rWeldProcedureType = rwSystem.Controller.Rapid.GetRapidDataType(strTaskName, strDataTypeModuleName, strDataType); UserDefined rWeldProcedure = (UserDefined)rWeldProcedureArray.ReadItem(this.intIndex); rWeldProcedure.FillFromString(this.ToString()); ErrorHandler.AddErrorMessage("MichaelLog", this.ToString()); rWeldProcedureArray.WriteItem(rWeldProcedure, this.intIndex); //rWeldProcedureType.Dispose(); rWeldProcedure.Dispose(); rWeldProcedureArray.Dispose(); }
public TpsFormSetting(TpsResourceManager rM, RWSystem rwSystem) { try { InitializeComponent(); this._tpsRm = rM; this.rwSystem = rwSystem; InitializeTexts(); } catch (System.Exception ex) { // If initialization of application fails a message box is shown GTPUMessageBox.Show(this.Parent , null , string.Format("An unexpected error occurred while starting up Sample Application. \n\n{0}", ex.Message) , "Sample Application Start-up Error" , MessageBoxIcon.Hand, MessageBoxButtons.OK); } }
public void RefreshData(RWSystem rwSystem, string strCircle) { RapidDataType rCircleType = rwSystem.Controller.Rapid.GetRapidDataType(strTaskName, strDataTypeModuleName, strDataType); UserDefined rCircleUserDefine = new UserDefined(rCircleType); rCircleUserDefine.FillFromString(strCircle); int i = 0; this.numDegree0 = decimal.Parse(rCircleUserDefine.Components[i++].ToString()); //ErrorHandler.AddErrorMessage("MichaelLog", rCircleUserDefine.Components[i].ToString()); this.numDegree90 = decimal.Parse(rCircleUserDefine.Components[i++].ToString()); this.numDegree180 = decimal.Parse(rCircleUserDefine.Components[i++].ToString()); this.numDegree270 = decimal.Parse(rCircleUserDefine.Components[i++].ToString()); this.numCurveType = int.Parse(rCircleUserDefine.Components[i++].ToString()); rCircleUserDefine.Dispose(); rCircleType.Dispose(); }
public void RefreshData(RWSystem rwSystem, int intLayerNo) { this.intLayerNo = intLayerNo; RapidData rLayerParameter = rwSystem.Controller.Rapid.GetRapidData(strTaskName, strDataModuleName, string.Format("{0}{1:00}", strDataName, this.intLayerNo)); RapidDataType rLayerParameterType = rwSystem.Controller.Rapid.GetRapidDataType(strTaskName, strDataTypeModuleName, strDataType); UserDefined rLayerParameterUserDefine = new UserDefined(rLayerParameterType); rLayerParameterUserDefine.FillFromString(rLayerParameter.Value.ToString()); int i = 0; this.numWorkAngleDeclination = int.Parse(rLayerParameterUserDefine.Components[i++].ToString()); //ErrorHandler.AddErrorMessage("MichaelLog", rLayerParameterUserDefine.Components[i].ToString()); this.rCircleOffsetX.RefreshData(rwSystem, rLayerParameterUserDefine.Components[i++].ToString()); this.rCircleOffsetZ.RefreshData(rwSystem, rLayerParameterUserDefine.Components[i++].ToString()); this.rCircleRotationX.RefreshData(rwSystem, rLayerParameterUserDefine.Components[i++].ToString()); this.rCircleRotationY.RefreshData(rwSystem, rLayerParameterUserDefine.Components[i++].ToString()); this.rCircleRotationZ.RefreshData(rwSystem, rLayerParameterUserDefine.Components[i++].ToString()); this.strLayerParameterID = rLayerParameterUserDefine.Components[i++].ToString(); this.strLayerParameterID = this.strLayerParameterID.Substring(1, this.strLayerParameterID.Length - 2); rLayerParameterUserDefine.Dispose(); rLayerParameterType.Dispose(); rLayerParameter.Dispose(); //DataRow row = this.CircleTable.Rows.Find("OffsetX"); //row[1] = this.circleOffsetX.numDegree0; //row[2] = this.circleOffsetX.numDegree90; //row[3] = this.circleOffsetX.numDegree180; //row[4] = this.circleOffsetX.numDegree270; //row[5] = this.circleOffsetX.numCurveType; //row = this.CircleTable.Rows.Find("OffsetZ"); //row[1] = this.circleOffsetZ.numDegree0; //row[2] = this.circleOffsetZ.numDegree90; //row[3] = this.circleOffsetZ.numDegree180; //row[4] = this.circleOffsetZ.numDegree270; //row[5] = this.circleOffsetZ.numCurveType; //row = this.CircleTable.Rows.Find("RotationX"); //row[1] = this.circleRotationX.numDegree0; //row[2] = this.circleRotationX.numDegree90; //row[3] = this.circleRotationX.numDegree180; //row[4] = this.circleRotationX.numDegree270; //row[5] = this.circleRotationX.numCurveType; //row = this.CircleTable.Rows.Find("RotationY"); //row[1] = this.circleRotationY.numDegree0; //row[2] = this.circleRotationY.numDegree90; //row[3] = this.circleRotationY.numDegree180; //row[4] = this.circleRotationY.numDegree270; //row[5] = this.circleRotationY.numCurveType; //row = this.CircleTable.Rows.Find("RotationZ"); //row[1] = this.circleRotationZ.numDegree0; //row[2] = this.circleRotationZ.numDegree90; //row[3] = this.circleRotationZ.numDegree180; //row[4] = this.circleRotationZ.numDegree270; //row[5] = this.circleRotationZ.numCurveType; }
/// <summary> /// This is where you clean up any remaining resources used by your application before /// the application itself is disposed of by the host (TAF - TeachPendant Application Framework). /// The method is called by the host when the application is closed down. /// </summary> protected override void Dispose(bool disposing) { if (!IsDisposed) { try { if (disposing) { //ToDo: Call the Dispose method of all FP SDK instances that may otherwise cause memory leak if (this.rwSystem != null) { this.rwSystem.Dispose(); this.rwSystem = null; } if (this._viewPipeGrooveModel != null) { this._viewPipeGrooveModel.Dispose(); this._viewPipeGrooveModel = null; } if (this._viewSetting != null) { this._viewSetting.Dispose(); this._viewSetting = null; } if (this._viewWeldingParameter != null) { this._viewWeldingParameter.Dispose(); this._viewWeldingParameter = null; } if (this._viewWobjCurrent != null) { this._viewWobjCurrent.Dispose(); this._viewWobjCurrent = null; } if (this._viewLayerParameter != null) { this._viewLayerParameter.Dispose(); this._viewLayerParameter = null; } if (this.pipeGrooveModel != null) { this.pipeGrooveModel.Dispose(); this.pipeGrooveModel = null; } if (this.weldProcedure != null) { this.weldProcedure.Dispose(); this.weldProcedure = null; } if (this.layerParameter != null) { this.layerParameter.Dispose(); this.layerParameter = null; } if (this._tpsRm != null) { this._tpsRm = null; } } } catch (System.Exception ex) { GTPUMessageBox.Show(this.Parent.Parent, null , "An unexpected error occurred while closing down the application.\n\nError message: " + ex.Message , "Application Error" , MessageBoxIcon.Hand, MessageBoxButtons.OK); } finally { base.Dispose(disposing); } } }