Ejemplo n.º 1
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openFileDialog1.ShowDialog() == DialogResult.Cancel)
            {
                return;
            }
            FileName = openFileDialog1.FileName;
            Data data = DataXmlSerilization.read_from_xml(FileName);

            SetData(data);
        }
Ejemplo n.º 2
0
        void Save()
        {
            Data data = new Data();

            data.lstPT = new List <PowerTool>();
            for (int i = 0; i < lstPT.Count; i++)
            {
                data.lstPT.Add(new PowerTool(lstPT[i]));
            }

            data.lstT = lstT;

            DataXmlSerilization.save_to_xml(data, FileName);
        }