void editDirectoryButton_Click(object sender, EventArgs e)
        {
            if (directoryList.SelectedItem != null)
            {
                Debug.Assert(directoryList.SelectedItem is GamesDirectory);
                GamesDirectory    selectedDirectory = (GamesDirectory)directoryList.SelectedItem;
                GameDirectoryForm gameDirectoryForm = new GameDirectoryForm(DirectoryFormIntent.Edit, selectedDirectory);
                gameDirectoryForm.FormClosing += (s, args) =>
                {
                    if (gameDirectoryForm.ResultID == DirectoryFormResult.Edited)
                    {
                        Config.Update();

                        var temp = directoryList.DataSource;
                        directoryList.DataSource = null;
                        directoryList.DataSource = temp;
                    }

                    Enabled = true;
                };

                Enabled = false;
                gameDirectoryForm.Show();
            }
        }
        void addDirectoryButton_Click(object sender, EventArgs e)
        {
            // TODO(SpectatorQL): Check if the directory has already been added.
            GameDirectoryForm gameDirectoryForm = new GameDirectoryForm(DirectoryFormIntent.Add, null);

            gameDirectoryForm.FormClosing += (s, args) =>
            {
                if (gameDirectoryForm.ResultID == DirectoryFormResult.Added)
                {
                    directoryList.DataSource = null;
                    directoryList.DataSource = Config.AddGamesDirectory(gameDirectoryForm.Directory);
                }

                Enabled = true;
            };

            Enabled = false;
            gameDirectoryForm.Show();
        }