private void bannerHeightControl_ValueChanged(object sender, EventArgs e) { if (_bannerConfguration != null) { _bannerConfguration.Height = bannerHeightControl.Value; } else { _bannerConfguration = new BannerConfigruation { Height = bannerHeightControl.Value }; } lblBannerheight.Text = "Height (" + bannerHeightControl.Value + ")"; }
private void txtBannerCloseTimeOut_TextChanged(object sender, EventArgs e) { if (double.TryParse(txtBannerCloseTimeOut.Text, out var val)) { if (_bannerConfguration != null) { _bannerConfguration.BannerCloseTimeOut = Convert.ToInt32(val * 1000); } else { _bannerConfguration = new BannerConfigruation { BannerCloseTimeOut = Convert.ToInt32(val * 1000) }; } } }
private void btnStyleConfigure_Click(object sender, EventArgs e) { if (fontDlg.ShowDialog(this) != DialogResult.Cancel) { if (_bannerConfguration != null) { _bannerConfguration.Font = fontDlg.Font; _bannerConfguration.ForegroundColor = fontDlg.Color; } else { _bannerConfguration = new BannerConfigruation { Font = fontDlg.Font, ForegroundColor = fontDlg.Color }; } } }
private void btnColorChooser_MouseDown(object sender, MouseEventArgs e) { if (colorDialog1.ShowDialog(this) != DialogResult.Cancel) { if (_bannerConfguration != null) { _bannerConfguration.BackgroundColor = colorDialog1.Color; } else { _bannerConfguration = new BannerConfigruation { BackgroundColor = colorDialog1.Color }; } btnColorChooser.BackColor = _bannerConfguration.BackgroundColor; } }
public Banner(KeyPressEventArgs args, BannerConfigruation bannerConfigruation) { _args = args; _bannerConfigruation = bannerConfigruation; InitializeComponent(); }