Inheritance: System.Windows.Forms.UserControl
Example #1
0
        public EventFlag(EventControl control, Int64 flag_value, string[] items, int type/*0=event_flag, 1=spell_hit, 2=cast_flag */, int action)
        {
            InitializeComponent();

            flagType = type;
            this.action = action;
            parent = control;

            LoadFlags(items, flag_value);
        }
Example #2
0
        // Load Creature AI form
        public void Redraw(uint creature_id)
        {
            if (creatures.npcList[this.id].line.Count != 0 || splitContainer1.Panel2.Controls.Count != 0)
            {
                uint index = 0;
                EventsList.Clear();

                this.splitContainer1.Panel2.Controls.Clear();
                foreach (Event_dataset item in creatures.npcList[this.id].line)
                {
                    EventsList.Add(index.ToString());
                    index++;
                }

                foreach (string item in EventsList)
                {
                    EventControl newControl = new EventControl(creatures.npcList[this.id].line[Convert.ToInt32(item)], Convert.ToInt32(item), this.id);
                    this.splitContainer1.Panel2.Controls.Add(newControl);
                    newControl.Dock = DockStyle.Top;
                    newControl.Show();
                }
            }
            creatures.npcList[creature_id].changed = true;
        }
Example #3
0
 private void AddNewEvent(object sender, EventArgs e)
 {
     if (bIsCreature)
     {
         creatures.GetCreature(this.id).AddEvent();
         EventControl bla = new EventControl(creatures.GetCreature(this.id).line[creatures.GetCreature(this.id).line.Count - 1], (creatures.GetCreature(this.id).line.Count - 1), this.id);
         this.splitContainer1.Panel2.Controls.Add(bla);
         bla.Dock = DockStyle.Top;
         //(this.MdiParent as Hauptfenster).UpdateNPCListBox();
         EventsList.Add((creatures.GetCreature(this.id).line.Count - 1).ToString());
     }
     else
     {
         db_scripts.GetDbScript(this.id).AddScriptLine();
         DbScriptControl bla = new DbScriptControl(db_scripts.GetDbScript(this.id).line[db_scripts.GetDbScript(this.id).line.Count - 1], (db_scripts.GetDbScript(this.id).line.Count - 1), this.id);
         this.splitContainer1.Panel2.Controls.Add(bla);
         bla.Dock = DockStyle.Top;
         //(this.MdiParent as Hauptfenster).UpdateNPCListBox();
         EventsList.Add((db_scripts.GetDbScript(this.id).line.Count - 1).ToString());
     }
 }