ApplicativeAlgorithmsPageCS.TranslateTreePropPage.OnPageApply C# (CSharp) Method

OnPageApply() protected method

protected OnPageApply ( ) : void
return void
        protected override void OnPageApply()
        {
            //OnPageApply is launched two times when you click on Apply 
            //and one time if you have more one page and change page
            //So I use a flag to authorize or not the application of algorithm
            //The timer reset the flag, in case of multi-pages
            timApply.Enabled = false;
            base.OnPageApply();

            TranslateTree myAlgo = FindOurAlgo();
            if (myAlgo != null)
            {
                try
                {
                    myAlgo.TranslationFactorX = System.Convert.ToDouble(this.txtXTrans.Text);
                }
                finally { }

                try
                {
                    myAlgo.TranslationFactorY = System.Convert.ToDouble(this.txtYTrans.Text);
                }
                finally { }
            }
            timApply.Enabled = true;

            PageIsDirty = false;
        }