Exemplo n.º 1
0
        public static void InsertConquestWallInfo(ConquestWallInfo conquestWallInfo, int conquestIndex)
        {
            try
            {
                conn.Open();
                cmd = new MySqlCommand("InsertConquestWallInfo", conn)
                {
                    CommandType = CommandType.StoredProcedure
                };

                cmd.Parameters.AddWithValue("WallIndex", conquestWallInfo.Index);
                cmd.Parameters.AddWithValue("WallConquestIndex", conquestIndex);
                cmd.Parameters.AddWithValue("Location_X", conquestWallInfo.Location.X);
                cmd.Parameters.AddWithValue("Location_Y", conquestWallInfo.Location.Y);
                cmd.Parameters.AddWithValue("MobIndex", conquestWallInfo.MobIndex);
                cmd.Parameters.AddWithValue("WallName", conquestWallInfo.Name);
                cmd.Parameters.AddWithValue("RepairCost", conquestWallInfo.RepairCost);

                cmd.ExecuteNonQuery();
            }
            catch (MySqlException ex)
            { }
            finally
            {
                conn.Close();
            }
        }
Exemplo n.º 2
0
 private void Walls_listbox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (selectedConquest == null) return;
     if (ActiveControl != sender) return;
     if (Walls_listbox.SelectedIndex != -1)
     {
         selectedWall = (ConquestWallInfo)Walls_listbox.SelectedItem;
         UpdateWalls();
     }
     else
         selectedWall = null;
 }