Exemplo n.º 1
0
        /// <summary>
        /// Makes the editor window with a blank map
        /// </summary>
        private void CreateMap_Click(object sender, EventArgs e)
        {
            //Makes a new editor
            window editor = new window(this);

            Hide();
            editor.ShowDialog();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Loads the requested window
        /// </summary>
        private void LoadMap_Click(object sender, EventArgs e)
        {
            OpenFileDialog file = new OpenFileDialog();

            file.Title  = "Open a level file";
            file.Filter = "Level Files|*.level";
            DialogResult result = file.ShowDialog();

            if (result == DialogResult.OK)
            {
                window editor = new window(file.FileName, this);
                editor.Text = "Level Editor - " + file.FileName.Substring(file.FileName.LastIndexOf('\\') + 1);
                Hide();
                editor.ShowDialog();
            }
        }