Example #1
0
 /// <summary>
 /// This method is called by TAF when the control goes from the active state to the passive state,
 /// and is no longer visible in the client view. This happens when the user presses another application button
 /// on the task bar, or closes the application. Normally, any subscriptions to controller events are removed here.
 /// </summary>
 void ITpsViewActivation.Deactivate()
 {
     try
     {
         if (_activeView == ActiveView.PipeGrooveModel)
         {
             // this._viewPipeGrooveModel.UnSubscribe();
         }
         else if (_activeView == ActiveView.Setting)
         {
             // this._viewPipeGrooveModel.UnSubscribe();
         }
         else if (_activeView == ActiveView.WeldingParameter)
         {
             // this._viewWeldingParameter.UnSubscribe();
         }
         else if (_activeView == ActiveView.WobjCurrent)
         {
             // this._viewWobjCurrent.UnSubscribe();
         }
         else if (_activeView == ActiveView.LayerParameter)
         {
             // this._viewWobjCurrent.UnSubscribe();
         }
         _appInFocus = false;
     }
     catch (Exception ex)
     {
         // Add error message to "ProdScr.log" file
         ErrorHandler.AddErrorMessage(CURRENT_MODULE_NAME, ex.ToString());
     }
 }
Example #2
0
        /// <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);
            }
        }
Example #3
0
 /// <summary>
 /// This method is called by TAF when the control is closed down (before Dispose is called).
 /// </summary>
 void ITpsViewSetup.Uninstall()
 {
     try
     {
         // Do uninstall
     }
     catch (Exception ex)
     {
         // Add error message to "ProdScr.log" file
         ErrorHandler.AddErrorMessage(CURRENT_MODULE_NAME, ex.ToString());
     }
 }
Example #4
0
        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();
        }
Example #5
0
        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();
        }
Example #6
0
        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();
        }
Example #7
0
        /// <summary>
        /// This method is called by TAF when the control goes from the passive state to the active state,
        /// i.e. becomes visible in the client view. Normally, this is where subscriptions to controller events are set up.
        /// </summary>
        void ITpsViewActivation.Activate()
        {
            try
            {
                if (_activeView == ActiveView.Desktop) // If first view is active
                {
                    //this.pictureBox_Logo.Image = Properties.Resources.Logo;
                }
                else if (_activeView == ActiveView.PipeGrooveModel)
                {
                    _viewPipeGrooveModel.Activate();
                }
                else if (_activeView == ActiveView.Setting)
                {
                    _viewSetting.Activate();
                }
                else if (_activeView == ActiveView.WeldingParameter)
                {
                    _viewWeldingParameter.Activate();
                }
                else if (_activeView == ActiveView.WobjCurrent)
                {
                    _viewWobjCurrent.Activate();
                }
                else if (_activeView == ActiveView.LayerParameter)
                {
                    _viewLayerParameter.Activate();
                }

                _appInFocus = true;
            }
            catch (Exception ex)
            {
                // Add error message to "ProdScr.log" file
                ErrorHandler.AddErrorMessage(CURRENT_MODULE_NAME, ex.ToString());
                ExceptionHandler.ReThrowException("TpsViewEbara", "ITpsViewActivation.Activate", ex);
            }
        }