Beispiel #1
0
        public AttackPlanFromControl AddAttacker(AttackPlanFrom attackFrom)
        {
            var ctl = new AttackPlanFromControl(_unitImageList, attackFrom);

            DistanceContainer.Controls.Add(ctl);
            return(ctl);
        }
Beispiel #2
0
        public void RemoveAttacker(AttackPlanFrom attacker)
        {
            AttackPlanFromControl attackerControl = GetControlForAttackPlan(attacker);

            if (attackerControl != null)
            {
                DistanceContainer.Controls.Remove(attackerControl);
            }
        }
Beispiel #3
0
        /// <summary>
        /// Visual indication of currently selected attacker in the plan
        /// </summary>
        public void SetActiveAttacker(AttackPlanFrom activeAttacker)
        {
            if (_activeAttacker != null)
            {
                _activeAttacker.BackColor = SystemColors.Control;
            }

            AttackPlanFromControl attackerControl = GetControlForAttackPlan(activeAttacker);
            if (attackerControl != null)
            {
                attackerControl.BackColor = SystemColors.ControlDark;
                _activeAttacker = attackerControl;
                DistanceContainer.ScrollControlIntoView(_activeAttacker);
            }
        }
Beispiel #4
0
        /// <summary>
        /// Visual indication of currently selected attacker in the plan
        /// </summary>
        public void SetActiveAttacker(AttackPlanFrom activeAttacker)
        {
            if (_activeAttacker != null)
            {
                _activeAttacker.BackColor = SystemColors.Control;
            }

            AttackPlanFromControl attackerControl = GetControlForAttackPlan(activeAttacker);

            if (attackerControl != null)
            {
                attackerControl.BackColor = SystemColors.ControlDark;
                _activeAttacker           = attackerControl;
                DistanceContainer.ScrollControlIntoView(_activeAttacker);
            }
        }
Beispiel #5
0
 public AttackPlanFromControl AddAttacker(AttackPlanFrom attackFrom)
 {
     var ctl = new AttackPlanFromControl(_unitImageList, attackFrom);
     DistanceContainer.Controls.Add(ctl);
     return ctl;
 }