示例#1
0
 private void Start_btn_Click(object sender, RoutedEventArgs e)
 {
     mqttconnection              = new MqttConnection(this);
     mqttconnection.Host         = URL_Box.Text;
     mqttconnection.Port         = Convert.ToInt32(Port_Box.Text);
     mqttconnection.Topic        = TopicBox.Text;
     mqttconnection.MessageText  = MessageBox.Text;
     mqttconnection.Intervaltime = (float)IntervalNr.Value;
     mqttconnection.Device_Nr    = Convert.ToUInt32(DeviceNr.Value);
     StartSpinner.Visibility     = Visibility.Visible;
     Start_btn.IsEnabled         = false;
     Stop_btn.IsEnabled          = true;
     Label_error.Content         = "";
     Label_Status.Content        = "Connecting    ";
     mqttconnection.MQTTConnection_start();
 }