예제 #1
0
        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 + ")";
        }
예제 #2
0
 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)
             };
         }
     }
 }
예제 #3
0
 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
             };
         }
     }
 }
예제 #4
0
        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;
            }
        }
예제 #5
0
 public Banner(KeyPressEventArgs args, BannerConfigruation bannerConfigruation)
 {
     _args = args;
     _bannerConfigruation = bannerConfigruation;
     InitializeComponent();
 }