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

            fd.InitialDirectory = Game.BaseDirectory;
            fd.Filter           = "Sharplike Maps (*.map)|*.map|All Files (*.*)|*.*";
            fd.RestoreDirectory = true;
            fd.Multiselect      = false;

            if (fd.ShowDialog() == DialogResult.OK)
            {
                currentFile = fd.FileName;
                using (Stream fs = fd.OpenFile())
                {
                    ReplaceMap(AbstractMap.Deserialize <MapStack>(fs));
                }
            }
        }