예제 #1
0
 private 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;
             sex               = creature.sex;
             buttonSex.Text    = Utils.SexSymbol(sex);
             creatureStatus    = creature.status;
             buttonStatus.Text = Utils.StatusSymbol(creatureStatus);
             textBoxName.SelectAll();
             textBoxName.Focus();
             panel1.Visible = true;
         }
     }
     ResumeLayout();
 }
예제 #2
0
 private void SetStatusButton(CreatureStatus status)
 {
     buttonStatus.Text = Utils.StatusSymbol(status);
     tt.SetToolTip(buttonStatus, $"Status: {Utils.StatusText(status)}");
 }
예제 #3
0
 private void buttonStatus_Click(object sender, EventArgs e)
 {
     creatureStatus    = Utils.NextStatus(creatureStatus);
     buttonStatus.Text = Utils.StatusSymbol(creatureStatus);
 }