UIAutomation.Banner.Banner C# (CSharp) Method

Banner() public method

public Banner ( double left, double top, double width, double height, string message ) : System
left double
top double
width double
height double
message string
return System
        public Banner(
            double left, 
            double top, 
            double width, 
            double height,
            string message)
        {
            
            if (string.Empty == message || 0 == message.Length) {
                Dispose();
                return;
            }
            
            this.left = (int)left;
            this.top = (int)top;
            this.width = (int)width;
            this.height = (int)height;
            
            lblMessage = new Label();
            SuspendLayout();
            // 
            // lblMessage
            // 
            lblMessage.BackColor = BackColor;
            lblMessage.Font = new Font("Microsoft Sans Serif", (float)Preferences.BannerFontSize, FontStyle.Bold, GraphicsUnit.Point, ((byte)(0)));
            lblMessage.Location = new Point(0, 0);
            lblMessage.Name = "lblMessage";
            lblMessage.Size = new Size(this.width, this.height);
            lblMessage.TabIndex = 0;
            // replace "&" with "&&"
            message = message.Replace("&", "&&");
            lblMessage.Text = message;
            // 
            // MainForm
            // 
            AutoScaleDimensions = new SizeF(6F, 13F);
            AutoScaleMode = AutoScaleMode.Font;
            ClientSize = new Size(this.width, this.height);
            Controls.Add(lblMessage);
            Name = "MainForm";
            Opacity = 0.7D;
            TopMost = true;
            ControlBox = false;
            FormBorderStyle = FormBorderStyle.None;
            Left = this.left;
            Top = this.top;
            Width = this.width;
            Height = this.height;
            Location = new Point(this.left, this.top);
            Text = "UiaBanner";
            Load += new EventHandler(MainFormLoad);
            ResumeLayout(false);
            
            Show();
        }