Beispiel #1
0
        private void toolStripLabel2_Click(object sender, EventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();

            if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                TextReader    reader     = new StreamReader(dialog.FileName);
                XmlSerializer serializer = new XmlSerializer(Cabinet.GetType());
                Cabinet = (CabinetGenerator)serializer.Deserialize(reader);
                reader.Close();
            }
        }
Beispiel #2
0
 private void toolStripLabel2_Click(object sender, EventArgs e)
 {
     OpenFileDialog dialog = new OpenFileDialog();
     if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         TextReader reader = new StreamReader(dialog.FileName);
         XmlSerializer serializer = new XmlSerializer(Cabinet.GetType());
         Cabinet = (CabinetGenerator)serializer.Deserialize(reader);
         reader.Close();
     }
 }