private void bOkay_Click(object sender, EventArgs e)
        {
            // This button will make a new txt file with the name from textNewLevel
            // Write a new file
            StreamWriter write = null;
            try
            {
                write = new StreamWriter(textNewLevel.Text);
            }
            catch (Exception ert)
            {
                MessageBox.Show("Error making new file", "Error");
            }
            finally
            {
                if (write != null)
                    write.Close();
            }

            // Now bring the edit screen up with the file loaded
            if (ed.IsDisposed == true)
            {
                ed = new EditStage(textNewLevel.Text, main);
            }
            else
            {
                ed.File = textNewLevel.Text;
            }
            ed.Show();
            this.Close();
        }
        // Gets the level text name and then pulls up the editor window
        private void bLoad_Click(object sender, EventArgs e)
        {
            // Check to see if the name entered is valid
            StreamReader input = null;
            try
            {
                input = new StreamReader(textLoad.Text);
                // At this point, this is a valid file

                // Open the edit form
                ed = new EditStage(textLoad.Text, this);

                ed.Show();
                this.Visible = false;
            }
            catch (Exception er)
            {
                MessageBox.Show("Error! File does not exist", "Error");
            }
            finally
            {
                if(input != null)
                    input.Close();
            }
        }
 public Form1()
 {
     InitializeComponent();
     ed = new EditStage(this);
     nel = new NewLevel();
     nel.Main = this;
     ed.Main = this;
 }
 public NewLevel()
 {
     InitializeComponent();
     ed = new EditStage(main);
 }