private void btnGifConfig_Click(object sender, EventArgs e)
{
Control ctrlParent = panelTransparent; //Defines the parent
if (_stage == Stage.Editing)
{
if (!btnInfo.Checked)
{
panelEdit.Visible = !panelEdit.Visible;
}
}
if (!btnGifConfig.Checked)
{
ctrlParent.Controls.Clear(); //Removes all pages
this.TransparencyKey = Color.LimeGreen;
panelTransparent.BackColor = Color.LimeGreen;
}
else
{
//Need this line, because there is a pictureBox with color, so if the user select the same color
//as this.TransparencyKey, the color won't be showed. This needs to be re-set after closing the gif config page.
panelTransparent.BackColor = Color.FromArgb(239, 239, 242);
panelTransparent.Visible = false;
ctrlParent.Controls.Clear(); //Removes all pages
ctrlParent.Controls.Add(_gifSettings);
panelTransparent.Visible = true;
_gifSettings.Dock = DockStyle.Fill;
btnConfig.Checked = false;
btnInfo.Checked = false;
this.TransparencyKey = Color.Empty;
}
}