private void FrmMqttMain_Shown(object sender, EventArgs e) { try { if (MqttSettings.MqttServer.Length > 3) { ReconnectMqtt(); if (_mqtt.IsConnected == true) { toolStripStatusLabel1.Text = "connected to " + MqttSettings.MqttServer; } else { toolStripStatusLabel1.Text = "not connected"; } } else { toolStripStatusLabel1.Text = "not connected"; var frmSettingsFrom = new FrmOptions(this); frmSettingsFrom.Show(); } } catch (Exception) { throw; } SetupTimer(); }
private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { var frmSettingsFrom = new FrmOptions(); frmSettingsFrom.Show(); }