private void ColorButton_Click(object sender, EventArgs e)
 {
     if (colorChooser.ShowDialog() == DialogResult.OK)
     {
         colorPreview.BackColor = colorChooser.Color;
         Color bg  = me.GetTheme(true);
         Color fg  = me.GetTheme(false);
         Color hbg = me.GetTheme(true, true);
         Color hfg = me.GetTheme(false, true);
         if (theme_bg && theme_hl)
         {
             hbg = colorChooser.Color;
         }
         else if (theme_bg && !theme_hl)
         {
             bg = colorChooser.Color;
         }
         else if (!theme_bg && theme_hl)
         {
             hfg = colorChooser.Color;
         }
         else if (!theme_bg && !theme_hl)
         {
             fg = colorChooser.Color;
         }
         me.SetTheme(bg, fg);
         me.SetTheme(hbg, hfg, true);
         MessageView.Clear();
         UpdateMessageView();
     }
 }
 private void StringEdit_Load(object sender, EventArgs e)
 {
     HideAllProps();
     MessageView.Clear();
     UpdateMessageView();
     if (Program.f1.nightThemeToolStripMenuItem.Checked)
     {
         this.BackColor                 = Color.Black;
         this.ForeColor                 = Color.Gray;
         MessageView.BackColor          = Color.Black;
         MessageView.ForeColor          = Color.Gray;
         MessageView.GridLines          = false;
         MessageView.BorderStyle        = BorderStyle.None;
         qrProps.BackColor              = Color.Black;
         qrProps.ForeColor              = Color.Gray;
         timeoutProps.BackColor         = Color.Black;
         timeoutProps.ForeColor         = Color.Gray;
         timeoutBox.BackColor           = Color.Black;
         timeoutBox.ForeColor           = Color.Gray;
         timeoutBox.BorderStyle         = BorderStyle.FixedSingle;
         radioFlowLayoutPanel.BackColor = Color.Black;
         radioFlowLayoutPanel.ForeColor = Color.Gray;
         fontProps.BackColor            = Color.Black;
         fontProps.ForeColor            = Color.Gray;
         blinkProps.BackColor           = Color.Black;
         blinkProps.ForeColor           = Color.Gray;
         stringEditor.BackColor         = Color.Black;
         stringEditor.ForeColor         = Color.Gray;
         stringEditor.BorderStyle       = BorderStyle.FixedSingle;
     }
 }
 private void DefaultRadioBtn_CheckedChanged(object sender, EventArgs e)
 {
     if (qrProps.Visible && defaultRadioBtn.Checked)
     {
         me.SetString("qr_file", "local:0");
         filenameLabel.Text = "";
         MessageView.Clear();
         UpdateMessageView();
     }
 }
 private void BrowseButton_Click(object sender, EventArgs e)
 {
     if (customQRBrowser.ShowDialog() == DialogResult.OK)
     {
         me.SetString("qr_file", customQRBrowser.FileName);
         filenameLabel.Text = "Filename: " + customQRBrowser.FileName;
         MessageView.Clear();
         UpdateMessageView();
     }
 }
 private void FontChangeButton_Click(object sender, EventArgs e)
 {
     if (fontChooser.ShowDialog() == DialogResult.OK)
     {
         me.SetFont(fontChooser.Font.FontFamily.Name, fontChooser.Font.Size, fontChooser.Font.Style);
         fontPreview.Font = me.GetFont();
         MessageView.Clear();
         UpdateMessageView();
     }
 }
 private void TrackBar1_Scroll(object sender, EventArgs e)
 {
     if (blinkingDash.Text == "_")
     {
         me.SetInt("blink_speed", speedTrackbar.Value);
         blinkywinky.Interval = speedTrackbar.Value;
     }
     else
     {
         me.SetInt("qr_size", speedTrackbar.Value);
         blinkingDash.Text = me.GetInt("qr_size").ToString();
     }
     MessageView.Clear();
     UpdateMessageView();
 }
 private void TimeoutBox_TextChanged(object sender, EventArgs e)
 {
     if (timeoutProps.Visible)
     {
         try
         {
             me.SetInt(type, Convert.ToInt32(timeoutBox.Text));
             MessageView.Clear();
             UpdateMessageView();
         }
         catch
         {
             System.Media.SystemSounds.Asterisk.Play();
         }
     }
 }
 private void TextBox1_TextChanged(object sender, EventArgs e)
 {
     if (stringProps.Visible)
     {
         if (this.type == "title")
         {
             me.SetTitle(editable, stringEditor.Text);
             MessageView.Clear();
             UpdateMessageView();
         }
         else if (this.type == "text")
         {
             me.SetText(editable, stringEditor.Text);
             MessageView.Clear();
             UpdateMessageView();
         }
         else if (this.type == "string")
         {
             me.SetString(editable, stringEditor.Text);
             MessageView.Clear();
             UpdateMessageView();
         }
     }
 }
 private void WinVers_SelectedIndexChanged(object sender, EventArgs e)
 {
     HideAllProps();
     MessageView.Clear();
     UpdateMessageView();
 }