// Needs to be called each time portrait object is modified
        private void outputDNA()
        {
            logger.Debug(" --Outputting DNA and Property strings.");
            StringBuilder dnaPropOutput = new StringBuilder();

            dnaPropOutput.Append("  dna=\"");
            dnaPropOutput.Append(portrait.GetDNA());
            dnaPropOutput.AppendLine("\"");

            dnaPropOutput.Append("  properties=\"");
            dnaPropOutput.Append(portrait.GetProperties());
            dnaPropOutput.AppendLine("\"");
            tbDNA.Text = dnaPropOutput.ToString();
        }
        private void updateSelectedCharacteristicValues(Portrait portrait)
        {
            foreach (KeyValuePair <Characteristic, ComboBox> pair in dnaComboBoxes)
            {
                if (pair.Value != null)
                {
                    pair.Value.SelectedIndex = Portrait.GetIndex(portrait.GetDNA()[pair.Key.index], pair.Value.Items.Count);
                }
            }

            foreach (KeyValuePair <Characteristic, ComboBox> pair in propertiesComboBoxes)
            {
                if (pair.Value != null)
                {
                    pair.Value.SelectedIndex = Portrait.GetIndex(portrait.GetProperties()[pair.Key.index], pair.Value.Items.Count);
                }
            }
        }