/// <summary>
 /// 测试连接
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmdTest_Click(object sender, EventArgs e)
 {
     CreateConnection();
     try
     {
         MongoServer srv = MongoDBHelper.CreateMongoSetting(ref ModifyConn);
         srv.Connect();
         srv.Disconnect();
         MyMessageBox.ShowMessage("Connect Test", "Connected OK.");
     }
     catch (MongoAuthenticationException ex)
     {
         //需要验证的数据服务器,没有Admin权限无法获得数据库列表
         if (!SystemManager.IsUseDefaultLanguage)
         {
             MyMessageBox.ShowMessage(SystemManager.mStringResource.GetText(StringResource.TextType.Exception_AuthenticationException),
                                      SystemManager.mStringResource.GetText(StringResource.TextType.Exception_AuthenticationException_Note), ex.ToString(), true);
         }
         else
         {
             MyMessageBox.ShowMessage("MongoAuthenticationException:", "Please check UserName and Password", ex.ToString(), true);
         }
     }
     catch (Exception ex)
     {
         //暂时不处理任何异常,简单跳过
         //无法连接的理由:
         //1.服务器没有启动
         //2.认证模式不正确
         if (!SystemManager.IsUseDefaultLanguage)
         {
             MyMessageBox.ShowMessage(SystemManager.mStringResource.GetText(StringResource.TextType.Exception_NotConnected),
                                      SystemManager.mStringResource.GetText(StringResource.TextType.Exception_NotConnected_Note), ex.ToString(), true);
         }
         else
         {
             MyMessageBox.ShowMessage("Exception", "Mongo Server may not Startup or Auth Mode is not correct", ex.ToString(), true);
         }
     }
 }