Ejemplo n.º 1
0
        /// <summary>
        /// Load network state
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void loadNetworkToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult res = openFileDialog2.ShowDialog();

            if (res == DialogResult.OK)
            {
                string filename = openFileDialog2.FileName;

                XmlSerializer ser = new XmlSerializer(typeof(XO.State));

                using (FileStream fs = new FileStream(filename, FileMode.Open))
                {
                    XO.State state = (XO.State)ser.Deserialize(fs);

                    nn = new XO(state);
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Child born
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void createNewNetworkToolStripMenuItem_Click(object sender, EventArgs e)
 {
     nn = new XO();
 }