Exemplo n.º 1
0
        protected override void OnDisposing()
        {
            if (Handle != IntPtr.Zero)
            {
                if (ecf != null)
                {
                    if (this.Ativo)
                    {
                        Desativar();
                    }

                    if (ecf.Ativo)
                    {
                        ecf.Desativar();
                    }

                    var oecf = ecf;
                    ecf = null;
                    if (oecf.RFD != null)
                    {
                        oecf.RFD = null;
                    }
                }

                CallDestroy(ACBrRFDInterop.RFD_Destroy);
            }
        }
Exemplo n.º 2
0
 public void Desativar()
 {
     try
     {
         acbrECF.Desativar();
         messageToolStripStatusLabel.Text     = "OK";
         descriptionToolStripStatusLabel.Text = string.Empty;
     }
     catch (NullReferenceException)
     {
         messageToolStripStatusLabel.Text     = "Não inicializado.";
         descriptionToolStripStatusLabel.Text = string.Empty;
     }
     catch (Exception exception)
     {
         messageToolStripStatusLabel.Text     = "Exception";
         descriptionToolStripStatusLabel.Text = exception.Message;
     }
 }