示例#1
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog fdlg = new OpenFileDialog();

            fdlg.Title            = "Open File";
            fdlg.DefaultExt       = "*.map";
            fdlg.InitialDirectory = Directory.GetCurrentDirectory();
            fdlg.Filter           = "All files (*.*)|*.*|BOOM! Editor files (*.map)|*.map";
            fdlg.FilterIndex      = 2;
            fdlg.RestoreDirectory = true;
            fdlg.AddExtension     = true;
            if (fdlg.ShowDialog() == DialogResult.OK)
            {
                m_GameEngine.OpenWorld(fdlg.FileName);
                UpdateSaveStatus();
                this.filePathKnown = true;
            }
        }