Exemplo n.º 1
0
        public override bool Initialize()
        {
            if (Settings.InfluxOutput.Enabled)
            {
                _influxConnection = new InfluxDbConnection(Settings.InfluxOutput, this);
                _influxConnection.CheckCreateDatabase();
            }

            // Temporary here
            Manager = new NetworkConnectionManager(this);

            _isThreadsActive = true;
            return(true);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Updates an InfluxDB connection instance using values from the dialog.
        /// </summary>
        /// <param name="connection">The connection to update.</param>
        public void UpdateConnectionFromDialog(InfluxDbConnection connection)
        {
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }

            connection.Id       = ConnectionId;
            connection.Name     = ConnectionName;
            connection.Host     = Host;
            connection.Port     = (ushort)Port;
            connection.Database = Database;
            connection.Username = Username;
            connection.Password = Password;
            connection.UseSsl   = UseSsl;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Binds the dialog to an InfluxDB connection instance.
        /// </summary>
        /// <param name="connection">The connection to bind to.</param>
        public void BindToConnection(InfluxDbConnection connection)
        {
            if (connection == null)
            {
                throw new ArgumentNullException("connection");
            }

            // Pass the connection values to the dialog
            ConnectionId   = connection.Id;
            ConnectionName = connection.Name;
            Host           = connection.Host;
            Port           = connection.Port;
            Database       = connection.Database;
            Username       = connection.Username;
            Password       = connection.Password;
            UseSsl         = connection.UseSsl;
        }