private void button11_Click(object sender, EventArgs e)
        {
            if (currentContentFolder.Equals(""))
            {
                MessageBox.Show("Please, first select the soundpool engine file (the '.cgbgi' file).");
                OpenFileDialog openBG = new OpenFileDialog();
                openBG.InitialDirectory = currentContentFolder;
                if (TBAGW.Game1.bIsDebug)
                {
                    openBG.Filter = "Sound engine file|*.cgbgic";
                }
                else
                {
                    openBG.Filter = "Sound engine file|*.cgbgi";
                }
                openBG.Title = "Load Sound File";

                if (TBAGW.Game1.bIsDebug)
                {
                    DialogResult dia = openBG.ShowDialog();
                    if (DialogResult.OK == dia && openBG.FileName.Contains(TBAGW.Game1.rootContent))
                    {
                        selectedBGI = EditorFileWriter.BGReader(openBG.FileName);
                    }
                    else if (DialogResult.Cancel == dia)
                    {
                    }
                    else
                    {
                        Console.WriteLine("Cheater");
                    }
                }
                else
                {
                    DialogResult dia = openBG.ShowDialog();
                    if (DialogResult.OK == dia && openBG.FileName.Contains(TBAGW.Game1.rootContentExtra) && !openBG.FileName.Contains(TBAGW.Game1.rootContent + @"Sounds"))
                    {
                        selectedBGI = EditorFileWriter.BGReader(openBG.FileName);
                    }
                    else if (DialogResult.Cancel == dia)
                    {
                    }
                }
            }
            else
            {
                MessageBox.Show("Please, first select the soundpool engine file (the '.cgbgi' file).");
                OpenFileDialog openBG = new OpenFileDialog();
                openBG.InitialDirectory = currentContentFolder;
                if (TBAGW.Game1.bIsDebug)
                {
                    openBG.Filter = "Sound engine file|*.cgbgic";
                }
                else
                {
                    openBG.Filter = "Sound engine file|*.cgbgi";
                }
                openBG.Title = "Load Sound File";

                if (TBAGW.Game1.bIsDebug)
                {
                    DialogResult dia = openBG.ShowDialog();
                    if (DialogResult.OK == dia && openBG.FileName.Contains(TBAGW.Game1.rootContent))
                    {
                        selectedBGI = EditorFileWriter.BGReader(openBG.FileName);
                    }
                    else if (DialogResult.Cancel == dia)
                    {
                    }
                    else
                    {
                        Console.WriteLine("Cheater");
                    }
                }
                else
                {
                    DialogResult dia = openBG.ShowDialog();
                    if (DialogResult.OK == dia && openBG.FileName.Contains(TBAGW.Game1.rootContentExtra) && !openBG.FileName.Contains(TBAGW.Game1.rootContent + @"Sounds"))
                    {
                        selectedBGI = EditorFileWriter.BGReader(openBG.FileName);
                    }
                    else if (DialogResult.Cancel == dia)
                    {
                    }
                }
            }


            if (!MapBuilder.parentMap.soundPools.Contains(selectedBGI))
            {
                MapBuilder.parentMap.soundPools.Add(selectedBGI);
                listBox3.Items.Add(selectedBGI);
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (currentContentFolder.Equals(""))
            {
                MessageBox.Show("Please, first select the soundpool engine file (the '.cgbgi' file).");
                OpenFileDialog openBG = new OpenFileDialog();
                openBG.InitialDirectory = currentContentFolder;
                if (TBAGW.Game1.bIsDebug)
                {
                    openBG.Filter = "Sound engine file|*.cgbgic";
                }
                else
                {
                    openBG.Filter = "Sound engine file|*.cgbgi";
                }
                openBG.Title = "Load Sound File";

                if (TBAGW.Game1.bIsDebug)
                {
                    DialogResult dia = openBG.ShowDialog();
                    if (DialogResult.OK == dia && openBG.FileName.Contains(TBAGW.Game1.rootContent))
                    {
                        selectedBGI = EditorFileWriter.BGReader(openBG.FileName);
                    }
                    else if (DialogResult.Cancel == dia)
                    {
                    }
                    else
                    {
                        Console.WriteLine("Cheater");
                    }
                }
                else
                {
                    DialogResult dia = openBG.ShowDialog();
                    if (DialogResult.OK == dia && openBG.FileName.Contains(TBAGW.Game1.rootContentExtra) && !openBG.FileName.Contains(TBAGW.Game1.rootContent + @"Sounds"))
                    {
                        selectedBGI = EditorFileWriter.BGReader(openBG.FileName);
                    }
                    else if (DialogResult.Cancel == dia)
                    {
                    }
                }
            }
            else
            {
                MessageBox.Show("Please, first select the soundpool engine file (the '.cgbgi' file).");
                OpenFileDialog openBG = new OpenFileDialog();
                openBG.InitialDirectory = currentContentFolder;
                if (TBAGW.Game1.bIsDebug)
                {
                    openBG.Filter = "Sound engine file|*.cgbgic";
                }
                else
                {
                    openBG.Filter = "Sound engine file|*.cgbgi";
                }
                openBG.Title = "Load Sound File";

                if (TBAGW.Game1.bIsDebug)
                {
                    DialogResult dia = openBG.ShowDialog();
                    if (DialogResult.OK == dia && openBG.FileName.Contains(TBAGW.Game1.rootContent))
                    {
                        selectedBGI = EditorFileWriter.BGReader(openBG.FileName);
                    }
                    else if (DialogResult.Cancel == dia)
                    {
                    }
                    else
                    {
                        Console.WriteLine("Cheater");
                    }
                }
                else
                {
                    DialogResult dia = openBG.ShowDialog();
                    if (DialogResult.OK == dia && openBG.FileName.Contains(TBAGW.Game1.rootContentExtra) && !openBG.FileName.Contains(TBAGW.Game1.rootContent + @"Sounds"))
                    {
                        selectedBGI = EditorFileWriter.BGReader(openBG.FileName);
                    }
                    else if (DialogResult.Cancel == dia)
                    {
                    }
                }
            }

            textBox1.Text        = selectedBGI.songCollectionName;
            numericUpDown1.Value = selectedBGI.songCollectionID;
            listBox1.Items.Clear();
            listBox1.SelectedIndex = -1;
            foreach (var item in selectedBGI.songNames)
            {
                listBox1.Items.Add(item);
            }
        }