src/Misc/EFTools/EntityDesign/VisualStudio/ModelWizard/gui/WizardPageUpdateFromDatabase.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")]
        private void ShowStatus(string message)
        {
            var currentTreeView = CurrentTreeView;
            if (null != currentTreeView)
            {
                if (_statusLabel == null)
                {
                    _statusLabel = new Label
                        {
                            BackColor = currentTreeView.TreeViewControl.BackColor,
                            Size = currentTreeView.ClientSize,
                            Location = new Point(
                                currentTreeView.Left + SystemInformation.Border3DSize.Width,
                                currentTreeView.Top + SystemInformation.Border3DSize.Height),
                            TextAlign = ContentAlignment.MiddleCenter,
                            Anchor = currentTreeView.Anchor
                        };
                }
                _statusLabel.Text = message;
                var tabPage = AddUpdateDeleteTabControl.SelectedTab;
                tabPage.Controls.Add(_statusLabel);
                tabPage.Controls.SetChildIndex(_statusLabel, 0);
            }
        }
[ SuppressMessage ( " " , " " ) ] private void ShowStatus ( string message ) { var currentTreeView = CurrentTreeView ; if ( null != currentTreeView ) { if ( _statusLabel == null ) { _statusLabel = new Label { BackColor = currentTreeView . TreeViewControl . BackColor , Size = currentTreeView . ClientSize , Location = new Point ( currentTreeView . Left + SystemInformation . Border3DSize . Width , currentTreeView . Top + SystemInformation . Border3DSize . Height ) , TextAlign = ContentAlignment . MiddleCenter , Anchor = currentTreeView . Anchor } ; } _statusLabel . Text = message ; var tabPage = AddUpdateDeleteTabControl . SelectedTab ; tabPage . Controls . Add ( _statusLabel ) ; tabPage . 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