コード例 #1
0
 // Tries to connect without opening a dialog
 public static boolean tryConnect(Frame parent, RpcConnection rpcConn) {
   DbConnectDialog cd = new DbConnectDialog(parent, rpcConn, true);
   try {
     return cd.tryConnect();
   } catch (MsfException mex) { // on error connecting, show dialog
   }
   return false;
 }
コード例 #2
0
 // Opens dialog to get options
 public static boolean connect(Frame parent, RpcConnection rpcConn) {
   DbConnectDialog cd = new DbConnectDialog(parent, rpcConn, true);
   try {
     if (cd.tryConnect()) return true;
   } catch (MsfException mex) { // on error connecting, show dialog
   }
   cd.setVisible(true);
   return cd.success;
 }