private void UpdateDisabilitaServizioButton() { if (Properties.Settings.Default.Disabled) { Disabilita.Content = "Abilita il servizio"; Risultato.Text = "Servizio disabilitato.".Dateify(); } else { Disabilita.Content = "Disabilita il servizio"; AutoConnector.Connect(); } }
private void Button_Click(object sender, RoutedEventArgs e) { Properties.Settings.Default.Username = Username.Text; Properties.Settings.Default.Password = Password.Password; Properties.Settings.Default.Save(); if (string.IsNullOrEmpty(Username.Text) || string.IsNullOrEmpty(Password.Password)) { SaveButton.Content = "Salva e abilita"; return; } SaveButton.Content = "Salvato!"; SaveButton.FontWeight = FontWeights.Normal; AutoConnector.Connect(); }
private void dispatcherTimer_Tick(object sender, EventArgs e) { AutoConnector.Connect(); }