src/Misc/EFTools/EntityDesign/VisualStudio/ModelWizard/gui/DatabaseObjectTreeView.cs
// <summary>
//     Helper to show a status message Label control on top of the client area of the TreeView control
// </summary>
Helper to show a status message Label control on top of the client area of the TreeView control
Helper to show a status message Label control on top of the client area of the TreeView control
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope")]
        public void ShowStatus(string message)
        {
            if (_statusLabel == null)
            {
                _statusLabel = new Label
                    {
                        BackColor = TreeViewControl.BackColor,
                        Size = ClientSize,
                        Location = new Point(
                            Left + SystemInformation.Border3DSize.Width,
                            Top + SystemInformation.Border3DSize.Height),
                        TextAlign = ContentAlignment.MiddleCenter,
                        Anchor = Anchor
                    };
            }
            _statusLabel.Text = message;
            Controls.Add(_statusLabel);
            Controls.SetChildIndex(_statusLabel, 0);
        }
[ SuppressMessage ( " " , " " ) ] public void ShowStatus ( string message ) { if ( _statusLabel == null ) { _statusLabel = new Label { BackColor = TreeViewControl . BackColor , Size = ClientSize , Location = new Point ( Left + SystemInformation . Border3DSize . Width , Top + SystemInformation . Border3DSize . Height ) , TextAlign = ContentAlignment . MiddleCenter , Anchor = Anchor } ; } _statusLabel . Text = message ; Controls . Add ( _statusLabel ) ; Controls . SetChildIndex ( _statusLabel , 0 ) ; }
Helper to show a status message Label control on top of the client area of the TreeView control
Helper to show a status message Label control on top of the client area of the TreeView control
message
string