private void button1_Click(object sender, EventArgs e)
        {
            foreach (Object o in listBox1.SelectedItems)
            {
                String fileName          = o.ToString() + ".json";
                JavaScriptSerializer jss = new JavaScriptSerializer();
                String json = File.ReadAllText(fileName);

                List <Card> cards = jss.Deserialize <List <Card> >(json);

                DTOCardList dtoCards = new DTOCardList();
                for (int i = 0; i < cards.Count; ++i)  // (Card c in cards) {
                {
                    SendSet(CardToDTOCard(cards[i]));
                }
                //dtoCards.cards.Add(CardToDTOCard(cards[0]));
                //dtoCards.cards.Add(CardToDTOCard(cards[1]));

                SendSet(ref dtoCards);
            }
        }
        private void SendSet(ref DTOCardList _set)
        {
            HttpWebRequest wr = (HttpWebRequest)WebRequest.Create("http://localhost:7230/cards");

            wr.Method      = "POST";
            wr.ContentType = "application/json";
            using (var streamWriter = new StreamWriter(wr.GetRequestStream())) {
                string json = new JavaScriptSerializer().Serialize(_set);

                streamWriter.Write(json);
                streamWriter.Flush();
                streamWriter.Close();
            }
            try {
                HttpWebResponse resp     = (HttpWebResponse)wr.GetResponse();
                StreamReader    sr       = new StreamReader(resp.GetResponseStream());
                String          response = sr.ReadToEnd();
                MessageBox.Show(response);
                int dmg = 0;
            }
            catch (Exception _e) {
                MessageBox.Show(_e.Message);
            }
        }