Пример #1
0
        private void ChangeBackgroundColor_Click(object sender, EventArgs e)
        {
Redo:
            try
            {
                BackgroundColor.AllowFullOpen = true;
                if (BackgroundColor.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        PreviewBox.BackColor = BackgroundColor.Color;
                        PushFrame(true);
                    }
                    catch
                    {
                        MessageBox.Show("Error.");
                        goto Redo;
                    }
                }
            }
            catch
            {
                MessageBox.Show("Unknown error, try again!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                goto Redo;
            }
        }
Пример #2
0
 /**
  *  Click handler for the top level menu item: Preferences -> Colors
  */
 private void colorsToolStripMenuItem1_Click(object sender, EventArgs e)
 {
     if (BackgroundColor.ShowDialog() == DialogResult.OK)
     {
         this.BackColor = BackgroundColor.Color;
     }
 }
Пример #3
0
 private void BackColorBtn_Click(object sender, EventArgs e)
 {
     BackgroundColor.ShowDialog();
     BackColorBtn.BackColor = BackgroundColor.Color;
     BackColorBtn.ForeColor = lyricsForm.AutoChooseWB(BackgroundColor.Color);
     ini.Write("BackgroundColor", "Red", BackgroundColor.Color.R.ToString());
     ini.Write("BackgroundColor", "Green", BackgroundColor.Color.G.ToString());
     ini.Write("BackgroundColor", "Blue", BackgroundColor.Color.B.ToString());
 }