Exemplo n.º 1
0
        /// <summary>
        /// Copy ExportParms members to ResultsFormat
        /// </summary>
        /// <param name="ep"></param>

        public void CopyFromExportParms(ExportParms ep)
        {
            QueryId           = ep.QueryId;
            OutputDestination = ep.OutputDestination;
            RunInBackground   = ep.RunInBackground;

            ExportFileFormat        = ep.ExportFileFormat;
            OutputFileName          = ep.OutputFileName;
            OutputFileName2         = ep.OutputFileName2;
            DuplicateKeyTableValues = ep.DuplicateKeyValues;

            if (ep.QualifiedNumberSplit != QnfEnum.Undefined)
            {
                QualifiedNumberSplit = ep.QualifiedNumberSplit;
            }

            ExportStructureFormat = ep.ExportStructureFormat;
            StructureFlags        = ep.StructureFlags;
            FixedHeightStructures = ep.FixedHeightStructures;
            ColumnNameFormat      = ep.ColumnNameFormat;
            IncludeDataTypes      = ep.IncludeDataTypes;
            OpenMode       = ep.OpenMode;
            ViewStructures = ep.ViewStructures;

            return;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Get molecule string in correct format
        /// </summary>
        /// <param name="vo"></param>
        /// <param name="structureExportFormat"></param>
        /// <returns></returns>

        string GetMoleculeString(
            object vo,
            ExportStructureFormat structureExportFormat)
        {
            string     molString = "";
            MoleculeMx cs        = (MoleculeMx)vo;

            if (structureExportFormat == ExportStructureFormat.Chime)
            {
                molString = cs.GetChimeString();                 // save structure as Chime
            }
            else if (structureExportFormat == ExportStructureFormat.Smiles)
            {
                molString = cs.GetSmilesString();                 // save structure as Smiles
            }
            else if (structureExportFormat == ExportStructureFormat.Molfile)
            {
                molString = cs.GetMolfileString(); // save structure as molfile
            }
            else                                   // save structure as molfile as default
            {
                molString = cs.GetMolfileString();
            }

            return(molString);
        }