Esempio n. 1
0
 public OptionPowerForm(PlayerPower power)
 {
     this.InitializeComponent();
     foreach (PlayerPowerType value in Enum.GetValues(typeof(PlayerPowerType)))
     {
         this.TypeBox.Items.Add(value);
     }
     foreach (ActionType actionType in Enum.GetValues(typeof(ActionType)))
     {
         this.ActionBox.Items.Add(actionType);
     }
     this.RangeBox.Items.Add("Personal");
     this.RangeBox.Items.Add("Melee touch");
     this.RangeBox.Items.Add("Melee 1");
     this.RangeBox.Items.Add("Melee weapon");
     this.RangeBox.Items.Add("Ranged 10");
     this.RangeBox.Items.Add("Ranged weapon");
     this.RangeBox.Items.Add("Ranged sight");
     this.RangeBox.Items.Add("Close burst 1");
     this.RangeBox.Items.Add("Close blast 3");
     this.RangeBox.Items.Add("Area burst 3 within 10");
     this.RangeBox.Items.Add("Area wall 3 within 10");
     Application.Idle           += new EventHandler(this.Application_Idle);
     this.fPower                 = power.Copy();
     this.NameBox.Text           = this.fPower.Name;
     this.TypeBox.SelectedItem   = this.fPower.Type;
     this.ActionBox.SelectedItem = this.fPower.Action;
     this.KeywordBox.Text        = this.fPower.Keywords;
     this.RangeBox.Text          = this.fPower.Range;
     this.ReadAloudBox.Text      = this.fPower.ReadAloud;
     this.update_sections();
 }
Esempio n. 2
0
        public OptionPowerForm(PlayerPower power)
        {
            InitializeComponent();

            Array types = Enum.GetValues(typeof(PlayerPowerType));

            foreach (PlayerPowerType type in types)
            {
                TypeBox.Items.Add(type);
            }

            Array actions = Enum.GetValues(typeof(ActionType));

            foreach (ActionType action in actions)
            {
                ActionBox.Items.Add(action);
            }

            RangeBox.Items.Add("Personal");
            RangeBox.Items.Add("Melee touch");
            RangeBox.Items.Add("Melee 1");
            RangeBox.Items.Add("Melee weapon");
            RangeBox.Items.Add("Ranged 10");
            RangeBox.Items.Add("Ranged weapon");
            RangeBox.Items.Add("Ranged sight");
            RangeBox.Items.Add("Close burst 1");
            RangeBox.Items.Add("Close blast 3");
            RangeBox.Items.Add("Area burst 3 within 10");
            RangeBox.Items.Add("Area wall 3 within 10");

            Application.Idle += new EventHandler(Application_Idle);

            fPower = power.Copy();

            NameBox.Text           = fPower.Name;
            TypeBox.SelectedItem   = fPower.Type;
            ActionBox.SelectedItem = fPower.Action;
            KeywordBox.Text        = fPower.Keywords;
            RangeBox.Text          = fPower.Range;
            ReadAloudBox.Text      = fPower.ReadAloud;

            update_sections();
        }