Esempio n. 1
0
        public bool Disconnection()
        {
            try
            {
                if (DLL != null)
                {
                    if (DLL.IsConnected)
                    {
                        try
                        {
                            DLL.Disconnect();
                        }
                        catch
                        {
                        }
                    }

                    DLL.Dispose();
                    fact.Dispose();
                }


                IsConnected = false;
            }
            catch (Exception ex)
            {
                EventscadaException?.Invoke(GetType().Name, "ConnectedFailed");

                throw ex;
            }
            return(IsConnected);
        }