/// <summary>
 /// </summary>
 public void Dispose()
 {
     if (_id >= 0 && _dllLoader != null && _dllLoader.isValid() && _bingoLib != null && _indigo != null)
     {
         _indigo.setSessionID();
         Bingo.checkResult(_indigo, _bingoLib.bingoEndSearch(_id));
         _id = -1;
     }
 }
 /// <summary>
 /// </summary>
 public void Dispose()
 {
     if (_id >= 0 && _indigo != null)
     {
         _indigo.setSessionID();
         Bingo.checkResult(BingoLib.bingoEndSearch(_id));
         _id = -1;
     }
 }
示例#3
0
        /// <summary>
        /// Creates a chemical storage of a specifed type in a specified location
        /// </summary>
        /// <param name="indigo">Indigo instance</param>
        /// <param name="location">Directory with the files location</param>
        /// <param name="type">"molecule" or "reaction"</param>
        /// <param name="options">Additional options separated with a semicolon. See the Bingo documentation for more details.</param>
        /// <returns>Bingo database instance</returns>
        public static Bingo createDatabaseFile(Indigo indigo, string location, string type, string options)
        {
            indigo.setSessionID();
            if (options == null)
            {
                options = "";
            }
            int databaseID = checkResult(BingoLib.bingoCreateDatabaseFile(location, type, options));

            return(new Bingo(indigo, databaseID));
        }
示例#4
0
        /// <summary>
        /// Loads a chemical storage of a specifed type from a specified location
        /// </summary>
        /// <param name="indigo">Indigo instance</param>
        /// <param name="location">Directory with the files location</param>
        /// <param name="options">Additional options separated with a semicolon. See the Bingo documentation for more details.</param>
        /// <returns>Bingo database instance</returns>
        public static Bingo loadDatabaseFile(Indigo indigo, string location, string options)
        {
            if (options == null)
            {
                options = "";
            }
            BingoLib lib = Bingo.getLib(indigo);

            indigo.setSessionID();
            int databaseID = Bingo.checkResult(indigo, lib.bingoLoadDatabaseFile(location, options));

            return(new Bingo(indigo, databaseID, lib));
        }
示例#5
0
 /// <summary>
 /// Dispose method that closes the database
 /// </summary>
 public void Dispose()
 {
     if (_id >= 0 && _dllLoader != null && _dllLoader.isValid() && _indigo != null && _lib != null)
     {
         _indigo.setSessionID();
         Bingo.checkResult(_indigo, _lib.bingoCloseDatabase(_id));
         _id = -1;
     }
 }
示例#6
0
 public String version()
 {
     _indigo.setSessionID();
     return(new String(_indigo.checkResult(_inchi_lib.indigoInchiVersion())));
 }
示例#7
0
 /// <summary>
 /// Dispose method that closes the database
 /// </summary>
 public void Dispose()
 {
     if (_id >= 0)
     {
         _indigo.setSessionID();
         Bingo.checkResult(BingoLib.bingoCloseDatabase(_id));
         _id = -1;
     }
 }
 public String version()
 {
     _indigo.setSessionID();
     return(_indigo.checkResult(IndigoInchiLib.indigoInchiVersion()));
 }
示例#9
0
文件: Bingo.cs 项目: whztt07/Indigo
 /// <summary>
 /// Loads a chemical storage of a specifed type from a specified location
 /// </summary>
 /// <param name="indigo">Indigo instance</param>
 /// <param name="location">Directory with the files location</param>
 /// <param name="options">Additional options separated with a semicolon. See the Bingo documentation for more details.</param>
 /// <returns>Bingo database instance</returns>
 public static Bingo loadDatabaseFile(Indigo indigo, string location, string options)
 {
     if (options == null)
     {
         options = "";
     }
     BingoLib lib = Bingo.getLib(indigo);
     indigo.setSessionID();
     int databaseID = Bingo.checkResult(indigo, lib.bingoLoadDatabaseFile(location, options));
     return new Bingo(indigo, databaseID, lib);
 }
示例#10
0
 public void renderToFile(IndigoObject obj, string filename)
 {
     _indigo.setSessionID();
     _indigo.checkResult(IndigoRendererLib.indigoRenderToFile(obj.self, filename));
 }