private void buttonRelease_Click(object sender, EventArgs e)
{
    if (main != null)
    {
        main.Dispose();
        main = null;
    }
}