public static void InsertConquestGateInfo(ConquestGateInfo conquestGateInfo, int conquestIndex)
        {
            try
            {
                conn.Open();
                cmd = new MySqlCommand("InsertConquestGateInfo", conn)
                {
                    CommandType = CommandType.StoredProcedure
                };

                cmd.Parameters.AddWithValue("GateIndex", conquestGateInfo.Index);
                cmd.Parameters.AddWithValue("ConquestIndex", conquestIndex);
                cmd.Parameters.AddWithValue("Location_X", conquestGateInfo.Location.X);
                cmd.Parameters.AddWithValue("Location_Y", conquestGateInfo.Location.Y);
                cmd.Parameters.AddWithValue("MobIndex", conquestGateInfo.MobIndex);
                cmd.Parameters.AddWithValue("GateName", conquestGateInfo.Name);
                cmd.Parameters.AddWithValue("RepairCost", conquestGateInfo.RepairCost);

                cmd.ExecuteNonQuery();
            }
            catch (MySqlException ex)
            { }
            finally
            {
                conn.Close();
            }
        }
Example #2
0
 private void Gates_listbox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (selectedConquest == null) return;
     if (ActiveControl != sender) return;
     if (Gates_listbox.SelectedIndex != -1)
     {
         selectedGate = (ConquestGateInfo)Gates_listbox.SelectedItem;
         UpdateGates();
     }
     else
         selectedGate = null;
 }