Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            List <int> data = new List <int>();

            seznam.Add(new Produkt("tramvaj", 2000));
            seznam.Add(new Produkt("helikoptéra", 5819));



            string ctu = File.ReadAllText("text.json");

            //Produkt produkt = JsonConvert.DeserializeObject<Produkt>(ctu);

            foreach (var Auta in seznam)
            {
                string cusxml        = Auta.ToString();
                var    xmlwriter     = new System.IO.StringWriter();
                var    xmlserializer = new XmlSerializer(cusxml.GetType());
                xmlserializer.Serialize(xmlwriter, cusxml);
                System.IO.File.AppendAllText("text.xml", xmlwriter.ToString());
            }


            //fileHelper.FormatCollectionToString(data);
            //fileHelper.FormatStringToCollection("string ve spravnem formatu");
        }
Ejemplo n.º 2
0
        private void towaryToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Auta ope = new Auta();

            ope.MdiParent = this;
            ope.Show();
        }