Example #1
0
        private void saveFileDialog1_FileOk(object sender, System.ComponentModel.CancelEventArgs e)
        {
            // Get m_PcbFileDescription name.
            string name = saveFileDialog1.FileName;

            PCBSettings pcb = new PCBSettings();

            SaveParams(pcb);

            XMLInterface.SerializeToXML(pcb, name);
        }
Example #2
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // Get the XML settings file
            DialogResult result = openFileDialog1.ShowDialog();

            if (result == DialogResult.OK) // Test result.
            {
                string file = openFileDialog1.FileName;
                try
                {
                    PCBSettings pcb = XMLInterface.DeserializeFromXML(file);
                    OpenParams(pcb);
                }
                catch (IOException)
                {
                    MessageBox.Show("Invalid PCB Documenter file");
                }
            }
        }