Esempio n. 1
0
 private void Btn_Test_Click(object sender, System.EventArgs e)
 {
     if (string.IsNullOrEmpty(Txt_Address.Text) || string.IsNullOrEmpty(Txt_Port.Text) ||
         string.IsNullOrEmpty(Txt_Password.Text))
     {
         MessageBox.Show(string.Format(MessageDefault.TestConnectionFail, "requeired fields"));
         return;
     }
     _iCacheConnection.ConnectionString     = Txt_Address.Text;
     _iCacheConnection.ConnectionStringPort = int.Parse(Txt_Port.Text);
     _iCacheConnection.User     = Txt_User.Text;
     _iCacheConnection.Password = Txt_Password.Text;
     _iCacheConnection.CacheConnection();
     if (_iCacheConnection.Connection.IsConnected)
     {
         MessageBox.Show(string.Format(MessageDefault.TestConnectionOk, Txt_Name.Text));
     }
 }
 public void Connection_Test_Ok()
 {
     CacheSettings();
     _iCacheConnection.CacheConnection();
     Assert.IsTrue(_iCacheConnection.Connection.IsConnected);
 }