ATMLCommonLibrary.controls.ATMLControl.SetTextBoxDelegate C# (CSharp) Method

SetTextBoxDelegate() private method

private SetTextBoxDelegate ( Control ctrl ) : void
ctrl System.Windows.Forms.Control
return void
        private void SetTextBoxDelegate( Control ctrl )
        {
            ctrl.Enter += delegate( object sender, EventArgs e )
                          {
                              foreach (Control control in Controls)
                              {
                                  ResetTextBoxBackColor( control );
                              }
                              ResetTextBoxBackColor( FormManager.LastActiveControl );
                              FormManager.LastActiveControl = (Control) sender;
                              if (ParentForm is ATMLForm)
                              {
                                  ( (ATMLForm) ParentForm ).LastActiveControl = (Control) sender;
                              }
                          };
        }