Example #1
0
        public CharacterBar(Character c, MainForm contextForm, TeamManagement context)
        {
            _c           = c;
            _contextForm = contextForm;
            _context     = context;

            InitializeComponent();

            ToolTip toolTip = new ToolTip();

            toolTip.InitialDelay = 250;
            toolTip.ReshowDelay  = 500;
            toolTip.ShowAlways   = true;
            toolTip.AutoPopDelay = 32000;
            string infoItem = c.HealthPoint + "/" + c.MaxHealthPoint;

            toolTip.SetToolTip(PBHealth, infoItem);
            infoItem = c.StaminaPoint + "/" + c.MaxStaminaPoint;
            toolTip.SetToolTip(PBStamina, infoItem);

            LName.Text        = c.Name;
            LLevel.Text       = "Niveau " + c.Level;
            PBHealth.Maximum  = c.MaxHealthPoint;
            PBHealth.Value    = c.HealthPoint;
            PBStamina.Maximum = c.MaxStaminaPoint;
            PBStamina.Value   = c.StaminaPoint;
            BInfos.Tag        = c;
            BPosition.Tag     = c;

            ModifyProgressBarColor.SetState(PBHealth, 2);  // 1 = green, 2 = yellow, 3 = red
            ModifyProgressBarColor.SetState(PBStamina, 3); // 1 = green, 2 = yellow, 3 = red

            if (c.FrontPosition)
            {
                BPosition.Text = "CaC";
            }
            else
            {
                BPosition.Text = "PO";
            }
        }
        private void Retour_Click(object sender, EventArgs e)
        {
            TeamManagement uc = new TeamManagement(t, _contextForm);

            _contextForm.ChangeUC(uc, false, true);
        }
Example #3
0
        private void equipe_Click(object sender, EventArgs e)
        {
            TeamManagement uc = new TeamManagement(_contextWorld.Team, _contextForm);

            _contextForm.ToMenu(uc, false);
        }