Example #1
0
        public TpsViewEbaraV2()
        {
            //
            // Required for Windows Form Designer support
            //

            try
            {
                //_tpsRm = new TpsResourceManager();
                _tpsRm = new ABB.Robotics.Tps.Resources.TpsResourceManager("TpsViewEbaraV2NameSpace.strings", ABB.Robotics.Taf.Base.TafAssembly.Load("TpsViewEbaraV2Texts.dll"));
                InitializeComponent();
                InitializeTexts();

                // The Install method, which runs after the constructor, creates the robot controller instance and
                // starts the controller subscriptions needed in this view.
            }
            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);
            }

            //
            // ToDo: Add any constructor code after InitializeComponent call
            //
        }
Example #2
0
 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);
     }
 }
Example #3
0
        /// <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);
                }
            }
        }