UIAutomation.LabelForm.LabelForm C# (CSharp) Method

LabelForm() public method

public LabelForm ( double left, double top, double width, double height, int highlighterNumber, Color foreColor, string tooltipText ) : System
left double
top double
width double
height double
highlighterNumber int
foreColor Color
tooltipText string
return System
        public LabelForm(
            double left, 
            double top, 
            double width, 
            double height,
            // 20140713            
            // int highlighterNumber,
            int? highlighterNumber,
            Color foreColor,
            string tooltipText)
        {
            TopMost = true;
            FormBorderStyle = FormBorderStyle.None;
            Visible = false;
            Opacity = 0.5;
            AllowTransparency = true;
            ControlBox = false;
            ShowIcon = false;
            ShowInTaskbar = false;
            TopLevel = true;
            UseWaitCursor = false;
            WindowState = FormWindowState.Normal;
            Show();
            Hide();
            Left = (int)left;
            Top = (int)top;
            Width = (int)width;
            Height = (int)height;
            AutoSize = true;
            Enabled = false;
            var labelNumber =
                new Label {AutoSize = true};
            /*
            Label labelNumber =
                new Label {AutoSize = true};
            */
            if (null == highlighterNumber || 0 == highlighterNumber) {
                highlighterNumber = 1;
            }
            labelNumber.Text = highlighterNumber.ToString();
            labelNumber.BackColor = Color.FromKnownColor(KnownColor.DarkGray);
            labelNumber.ForeColor = foreColor;
            labelNumber.Dock = DockStyle.Fill;
            labelNumber.MouseMove += 
                new MouseEventHandler(labelNumberMouseMove);
            Controls.Add(labelNumber);
            FormBorderStyle = FormBorderStyle.None;
            ShowInTaskbar = false;
            UseWaitCursor = false;
            Visible = true;
            
            if (Preferences.ShowInfoToolTip) {
                // tooltip
                var tooltip = new ToolTip {Active = true, ShowAlways = true, IsBalloon = true};
                tooltip.Show(tooltipText, this);
            }
            
            Show();
        }