Esempio n. 1
0
 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();
 }
Esempio n. 2
0
        private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var frmSettingsFrom = new FrmOptions();

            frmSettingsFrom.Show();
        }