genderSymbol() public static method

public static genderSymbol ( Gender g ) : string
g Gender
return string
示例#1
0
 public void buttonEdit_Click(object sender, EventArgs e)
 {
     SuspendLayout();
     if (creature != null)
     {
         if (panel1.Visible)
         {
             closeSettings(false);
         }
         else
         {
             checkBoxIsBred.Checked = creature.isBred;
             panelParents.Visible   = creature.isBred;
             if (creature.isBred)
             {
                 populateParentsList();
             }
             textBoxName.Text  = creature.name;
             textBoxOwner.Text = creature.owner;
             textBoxNote.Text  = creature.note;
             gender            = creature.gender;
             buttonGender.Text = Utils.genderSymbol(gender);
             status            = creature.status;
             buttonStatus.Text = Utils.statusSymbol(status);
             textBoxName.SelectAll();
             textBoxName.Focus();
             panel1.Visible = true;
             for (int s = 0; s < 7; s++)
             {
                 numUDLevelsDom[s].Value = creature.levelsDom[s];
             }
         }
     }
     ResumeLayout();
 }
示例#2
0
        public void updateLabel()
        {
            if (creature != null)
            {
                labelGender.Text = Utils.genderSymbol(creature.gender);
                groupBox1.Text   = creature.name + " (Lvl " + creature.level + "/" + (creature.levelHatched + maxDomLevel) + ")";
                if (creature.Mother != null || creature.Father != null)
                {
                    labelParents.Text = "";
                    if (creature.Mother != null)
                    {
                        labelParents.Text = "Mo: " + creature.Mother.name;
                    }
                    if (creature.Father != null && creature.Mother != null)
                    {
                        labelParents.Text += "; ";
                    }
                    if (creature.Father != null)
                    {
                        labelParents.Text += "Fa: " + creature.Father.name;
                    }
                }
                else if (creature.isBred)
                {
                    labelParents.Text = "bred, click 'edit' to add parents";
                }
                else
                {
                    labelParents.Text = "found wild " + creature.levelFound + (creature.tamingEff >= 0 ? ", tamed with TE: " + (creature.tamingEff * 100).ToString("N1") + "%" : ", TE unknown.");
                }
                for (int s = 0; s < 8; s++)
                {
                    updateStat(s);
                }
                labelNotes.Text     = creature.note;
                labelSpecies.Text   = creature.species;
                pictureBox1.Image   = CreatureColored.getColoredCreature(creature.colors, creature.species, enabledColorRegions);
                pictureBox1.Visible = true;

                for (int c = 0; c < 6; c++)
                {
                    if (enabledColorRegions[c])
                    {
                        colorButtons[c].Visible = true;
                        setColorButton(colorButtons[c], Utils.creatureColor(creature.colors[c]));
                    }
                    else
                    {
                        colorButtons[c].BackColor = SystemColors.Control;
                        colorButtons[c].Visible   = false;
                    }
                }
            }
        }
        public void setCreature(Creature creature)
        {
            this.creature  = creature;
            groupBox1.Text = (!onlyLevels && creature.status != CreatureStatus.Available ? "(" + Utils.statusSymbol(creature.status) + ") " : "") + creature.name;
            if (!onlyLevels && creature.status == CreatureStatus.Dead)
            {
                groupBox1.ForeColor = SystemColors.GrayText;
                tt.SetToolTip(groupBox1, "Creature has passed away");
            }
            else if (!onlyLevels && creature.status == CreatureStatus.Unavailable)
            {
                groupBox1.ForeColor = SystemColors.GrayText;
                tt.SetToolTip(groupBox1, "Creature is currently not available");
            }

            for (int s = 0; s < 7; s++)
            {
                if (creature.levelsWild[s] < 0)
                {
                    labels[s].Text      = "?";
                    labels[s].BackColor = Color.WhiteSmoke;
                    labels[s].ForeColor = Color.LightGray;
                }
                else
                {
                    labels[s].Text      = creature.levelsWild[s].ToString();
                    labels[s].BackColor = Utils.getColorFromPercent((int)(creature.levelsWild[s] * 2.5), (creature.topBreedingStats[s] ? 0.2 : 0.7));
                    labels[s].ForeColor = SystemColors.ControlText;
                    tt.SetToolTip(labels[s], Utils.statName(s) + ": " + (creature.valuesBreeding[s] * (Utils.precision(s) == 3 ? 100 : 1)).ToString() + (Utils.precision(s) == 3 ? "%" : ""));
                }
                labels[s].Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, (creature.topBreedingStats[s] ? System.Drawing.FontStyle.Bold : System.Drawing.FontStyle.Regular), System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            }
            if (onlyLevels)
            {
                labelGender.Visible = false;
                pictureBox1.Visible = false;
            }
            else
            {
                labelGender.Visible   = true;
                labelGender.Text      = Utils.genderSymbol(creature.gender);
                labelGender.BackColor = Utils.genderColor(creature.gender);
                // creature Colors
                pictureBox1.Image   = CreatureColored.getColoredCreature(creature.colors, "", enabledColorRegions, 24, 22, true);
                labelGender.Visible = true;
                pictureBox1.Visible = true;
            }
        }
示例#4
0
 private void buttonGender_Click(object sender, EventArgs e)
 {
     gender            = Utils.nextGender(gender);
     buttonGender.Text = Utils.genderSymbol(gender);
 }
示例#5
0
 private void buttonGender_Click(object sender, EventArgs e)
 {
     c.gender               = Utils.nextGender(c.gender);
     buttonGender.Text      = Utils.genderSymbol(c.gender);
     checkBoxGender.Checked = true;
 }