Ejemplo n.º 1
0
        private void onConfirmLoadTransformsFromSettings(bool confirmed, object data = null)
        {
            MoleculeSettings molecule = molecules.GetSelected();

            if (molecule == null || data == null)
            {
                return;
            }

            try {
                UserInterfaceEvents.RaiseLoadMoleculeSettings(molecule.ID, (string)data, false, true, true, true, confirmed, loadRenderSettings);
            }
            catch (InvalidCastException) {
                // do nothing
            }
        }
Ejemplo n.º 2
0
        private void onLoadMoleculeFileSubmitted(string filePath)
        {
            MoleculeSettings molecule = molecules.Add(filePath);

            if (interactionsPanel.MonitoringEnabled)
            {
                interactionsPanel.StopInteractions();
                console.ShowError("Stopped monitoring molecular interactions, loading molecule");
            }

            if (filePath.EndsWith(Settings.SettingsFileExtension))
            {
                UserInterfaceEvents.RaiseLoadMoleculeSettings(molecule.ID, filePath, true, true, true, true, true, loadRenderSettings);
            }
            else
            {
                UserInterfaceEvents.RaiseLoadMolecule(molecule.ID, filePath, molecule.RenderSettings);
            }
        }