Esempio n. 1
0
 public void Disconnect()
 {
     try
     {
         //_checkStatusTimer.Enabled = false;
         _data.ConnectedState = ConnectedStatus.Disconnected;
         _eft.Disconnect();
     }
     catch (Exception ex)
     {
         ShowError(ex.HResult.ToString(), ex.Message);
     }
 }
Esempio n. 2
0
        async void BtnVerifyServerUri_Click(object sender, RoutedEventArgs e)
        {
            _settings.EFTClientAddress = txtEFTClientAddress.Text;
            _settings.EnableCloud      = cboEnableCloud.IsChecked.HasValue && cboEnableCloud.IsChecked.Value;
            _settings.Username         = txtUsername.Text;
            _settings.Password         = txtPassword.Text;
            _settings.PairingCode      = txtPairingCode.Text;

            _eft.Disconnect();
            if (await ConnectAsync())
            {
                _settings.Save();
                NavigateToMainPage();
            }
            else
            {
                NavigateToSettingsPage();
            }
        }