Пример #1
0
        /// <summary>
        /// Selects the material color for this residue based on the coloring method.
        /// </summary>
        private void UpdateColorView()
        {
            if (this.colorScheme == ColorScheme.Structure)
            {
                this.color = this.structureColor;
            }
            else if (this.colorScheme == ColorScheme.Atom && this.residueIdentifier == "O")
            {
                this.color = Colors.Red;
            }
            else if (this.colorScheme == ColorScheme.Atom)
            {
                this.color = Colors.LightGray;
            }
            else if (this.colorScheme == ColorScheme.Residue)
            {
                this.color = this.residueColor;
            }
            else if (this.colorScheme == ColorScheme.Chain && this.chain != null)
            {
                this.color = this.chain.ChainColor;
            }
            else if (this.colorScheme == ColorScheme.Temperature)
            {
                this.color = Atom.GetAverageTemperateColor(this.atoms);
            }
            else
            {
                this.color = Colors.LightGray;
            }

            this.UpdateView();
        }