private void Connect()
        {
            if (sc == null)
            {
                sc = new Historian.ServerConnection(new Historian.ConnectionProperties
                {
                    ServerHostName = IHistSrv,
                    OpenTimeout    = new TimeSpan(0, 0, 10),
                    ServerCertificateValidationMode = Historian.CertificateValidationMode.None
                });
            }

            if (!sc.IsConnected())
            {
                try
                {
                    sc.Connect();
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Error at connecting: " + ex.Message);
                    throw;
                }
            }
        }
        public void Connect()
        {
            if (sc == null)
            {
                sc = new Historian.ServerConnection(new Historian.ConnectionProperties
                {
                    ServerHostName = IHistSrv,
                    OpenTimeout    = new TimeSpan(0, 0, 10),
                    ServerCertificateValidationMode = Historian.CertificateValidationMode.None
                });
            }

            if (!IsConnected)
            {
                try
                {
                    sc.Connect();
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error at connecting to Historian server: " + ex.Message);
                }
            }
        }