using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;
using System.IO;
using System.Xml;
using System.Xml.Serialization;
using pms_modal;


class MainProgram
{
    static void Main(string[] args)
    {
        Item k = new Item("123aab",17,18.50,"");
        Item k2 = new Item("FFFFF", 17, 18.50, "");
        Item k3 = new Item("CCCCC", 17, 18.50, "");
        ItemList g = new ItemList();

        g.add(k);
        g.add(k2);
        g.add(k3);

        //g.delete_item(2);

        /*
        // Serialization
        XmlSerializer ser = new XmlSerializer(typeof(Item));
        TextWriter xml_write = new StreamWriter(@"../../ProgramData/ProductData.xml");
        //Item item = (Item)itemlist[0];
        ser.Serialize(xml_write, k);
        ser.Serialize(xml_write, k2);
        //xml_write.Write( (Item)itemlist[0]);
        xml_write.Close();
        */
        Console.WriteLine(g.get_item(0).name);
        Console.WriteLine(g.get_item(1).name);
        Console.WriteLine(g.item_count);
        g.save();
        //Console.WriteLine(k.name());
        Console.Read();
    }
}


