Esempio n. 1
0
 private void cmdOk_Click(object sender, RoutedEventArgs e)
 {
     if (SuplexSecurityDalClient.ValidateServiceConnection(txtWebApiUrl.Text, out string exception))
     {
         WebApiUrl      = txtWebApiUrl.Text;
         txtStatus.Text = $"Connected to {txtWebApiUrl.Text}!";
         DialogResult   = true;
         Close();
     }
     else
     {
         txtStatus.Text = exception;
     }
 }
Esempio n. 2
0
 private void mnuRecentConnection_Click(object sender, RoutedEventArgs e)
 {
     if (GlobalVerifySaveChanges())
     {
         string url = ((MenuItem)e.OriginalSource).Header.ToString();
         if (SuplexSecurityDalClient.ValidateServiceConnection(url, out string exception))
         {
             _dal.InitWebApiConnection(url);
         }
         else
         {
             MessageBox.Show(exception, "Error", MessageBoxButton.OK, MessageBoxImage.Exclamation);
         }
     }
 }