private void EffectSearch_Load(object sender, EventArgs e)
        {
            m_Conn = DB.GetConnection();

            // Pull down data
            DataTable        dataTable        = new DataTable();
            String           query            = "SELECT `EffectID`,`item_effect_base`.`Description`,`item_effect_base`.`Tooltip` FROM `item_effect_base`";
            MySqlDataAdapter mySqlDataAdapter = new MySqlDataAdapter(query, m_Conn);

            mySqlDataAdapter.Fill(dataTable);

            EffectList.DataSource = dataTable;
        }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();

            ItemEditor = new EditItem();

            DB.Connect();
            m_conn     = DB.GetConnection();
            m_EffectID = 0;

            // Buffs
            EffectBuff.Items.AddRange(GetBuffList());

            // Stats
            VarStat1.Items.AddRange(GetStatsList());
            VarStat2.Items.AddRange(GetStatsList());
            VarStat3.Items.AddRange(GetStatsList());
            ConstStat1.Items.AddRange(GetStatsList());
            ConstStat2.Items.AddRange(GetStatsList());

            // Types
            VarType1.Items.AddRange(GetVarableType());
            VarType2.Items.AddRange(GetVarableType());
            VarType3.Items.AddRange(GetVarableType());
            ConstType1.Items.AddRange(GetVarableType());
            ConstType2.Items.AddRange(GetVarableType());

            // Set defaults
            EffectType.SelectedIndex = 0;
            VarStat1.SelectedIndex   = 0;
            VarStat2.SelectedIndex   = 0;
            VarStat3.SelectedIndex   = 0;
            VarType1.SelectedIndex   = 0;
            VarType2.SelectedIndex   = 0;
            VarType3.SelectedIndex   = 0;
            ConstType1.SelectedIndex = 0;
            ConstType2.SelectedIndex = 0;
            ConstStat1.SelectedIndex = 0;
            ConstStat2.SelectedIndex = 0;
        }