Пример #1
0
 public TrapBuilderForm(Masterplan.Data.Trap trap)
 {
     this.InitializeComponent();
     Application.Idle += new EventHandler(this.Application_Idle);
     this.fTrap        = trap.Copy();
     this.update_statblock();
 }
Пример #2
0
        /// <summary>
        /// Creates a copy of the TrapElement.
        /// </summary>
        /// <returns>Returns the copy.</returns>
        public IElement Copy()
        {
            TrapElement te = new TrapElement();

            te.Trap      = fTrap.Copy();
            te.MapID     = fMapID;
            te.MapAreaID = fMapAreaID;

            return(te);
        }
Пример #3
0
 public TrapProfileForm(Masterplan.Data.Trap trap)
 {
     this.InitializeComponent();
     foreach (TrapType value in Enum.GetValues(typeof(TrapType)))
     {
         this.TypeBox.Items.Add(value);
     }
     Application.Idle         += new EventHandler(this.Application_Idle);
     this.fTrap                = trap.Copy();
     this.NameBox.Text         = this.fTrap.Name;
     this.TypeBox.SelectedItem = this.fTrap.Type;
     this.LevelBox.Value       = this.fTrap.Level;
     this.RoleBtn.Text         = this.fTrap.Role.ToString();
     if (this.fTrap.Initiative == -2147483648)
     {
         this.HasInitBox.Checked = false;
         this.InitBox.Value      = new decimal(0);
         return;
     }
     this.HasInitBox.Checked = true;
     this.InitBox.Value      = this.fTrap.Initiative;
 }