private F3WorkerPoolStatus GetStatus() { string _statusText = string.Empty; F3WorkerPoolStatus _status = null; F3PlatformInterface _interfaceInstance = InitializeInterface(); try { _statusText = _interfaceInstance.GetStatus(); _status = JsonConvert.DeserializeObject <F3WorkerPoolStatus>(_statusText); } catch (Exception ex) { _logger.Error("error getting status", ex); } return(_status); }
private void btnConnect_Click(object sender, EventArgs e) { _logger.Info("Connected Clicked"); F3WorkerPoolStatus _status = null; bool _hasError = false; _status = this.GetStatus(); _hasError = _status.HasError(); if (!_hasError) { this.btnConnect.Image = global::FincadMonitor.Properties.Resources.check; this.dgvWorkers.DataSource = _status.ToDataTable(); } else { this.btnConnect.Image = global::FincadMonitor.Properties.Resources.error; } sslServerConnection.Text = _interface.g_uri; }