Esempio n. 1
0
        public void SetupControl(
            MoleculeMx molecule)
        {
            InSetup = true;

            MoleculeControl.SetupAndRenderMolecule(molecule);

            MolDisplayFormatEdit.Text =
                molecule.PrimaryDisplayFormat == MoleculeRendererType.Helm ? "Biopolymer" : "Structure";

            InSetup = false;
            return;
        }
Esempio n. 2
0
        /// <summary>
        /// Retrieve a saved molecule and store in Renditor
        /// </summary>
        /// <param name="ctl"></param>

        public static void RetrieveSavedMolecule(MoleculeControl molCtl)
        {
            MoleculeMx cs;
            string     fileName = null;

            if (!UIMisc.ReadMoleculeFileDialog(out cs, out fileName))
            {
                return;
            }

            molCtl.SetupAndRenderMolecule(cs);
            molCtl.SetTemporaryMoleculeTag(Path.GetFileNameWithoutExtension(fileName));             // associate the file name in case saved as history/favorite
            return;
        }