private void _bCreatePatch_Click(object sender, EventArgs e) { string patch; DynamicObject D = pg_Spell.SelectedObject as DynamicObject; if (D != null) { SpellEntry S = D.Spell; patch = SpellDBC.CreateSpellSql(S).ToString(); if (!patch.IsEmpty()) { _rbDBCSQL.AppendLine("-- Spell SQL for spell_dbc---------------"); _rbDBCSQL.AppendLine(patch); } _rbDBCSQL.ColorizeCode(); } }
public static void SelectSpellSql() { try { using (_conn = new MySqlConnection(ConnectionString)) { _command = new MySqlCommand(Settings.Default.SpellDBC_Query, _conn); _conn.Open(); using (MySqlDataReader reader = _command.ExecuteReader()) { SpellDBC.FillSpellDbc(reader); } _conn.Close(); } } catch { } }