private void Dispose(bool disposing)
            {
                if (disposing)
                {
                    Win32.SendMessage(Handle, Win32.TTM_TRACKACTIVATE, 0, ref _toolInfo);
                    Win32.SendMessage(Handle, Win32.TTM_DELTOOL, 0, ref _toolInfo);

                    if (null != _contentPanel)
                    {
                        _contentPanel.Controls.Clear();
                        _contentPanel.Dispose();
                    }

                    DestroyHandle();
                }
            }
Esempio n. 2
0
        void ReleaseDesignerOutlets()
        {
            if (AutoRefreshButton != null)
            {
                AutoRefreshButton.Dispose();
                AutoRefreshButton = null;
            }

            if (ContentPanel != null)
            {
                ContentPanel.Dispose();
                ContentPanel = null;
            }

            if (CurrentStatusTextField != null)
            {
                CurrentStatusTextField.Dispose();
                CurrentStatusTextField = null;
            }

            if (DomainControllerTextField != null)
            {
                DomainControllerTextField.Dispose();
                DomainControllerTextField = null;
            }

            if (HealthtextField != null)
            {
                HealthtextField.Dispose();
                HealthtextField = null;
            }

            if (HostnameHeader != null)
            {
                HostnameHeader.Dispose();
                HostnameHeader = null;
            }

            if (HostnameServiceHeaderTextField != null)
            {
                HostnameServiceHeaderTextField.Dispose();
                HostnameServiceHeaderTextField = null;
            }

            if (IntervalComboBox != null)
            {
                IntervalComboBox.Dispose();
                IntervalComboBox = null;
            }

            if (IpAddressTextField != null)
            {
                IpAddressTextField.Dispose();
                IpAddressTextField = null;
            }

            if (LastRefreshTextField != null)
            {
                LastRefreshTextField.Dispose();
                LastRefreshTextField = null;
            }

            if (LegacyModeWarning != null)
            {
                LegacyModeWarning.Dispose();
                LegacyModeWarning = null;
            }

            if (PscTableView != null)
            {
                PscTableView.Dispose();
                PscTableView = null;
            }

            if (RefreshButton != null)
            {
                RefreshButton.Dispose();
                RefreshButton = null;
            }

            if (ServicesheaderTextField != null)
            {
                ServicesheaderTextField.Dispose();
                ServicesheaderTextField = null;
            }

            if (ServicesTableView != null)
            {
                ServicesTableView.Dispose();
                ServicesTableView = null;
            }

            if (SiteAffinityButton != null)
            {
                SiteAffinityButton.Dispose();
                SiteAffinityButton = null;
            }

            if (SitenameTextField != null)
            {
                SitenameTextField.Dispose();
                SitenameTextField = null;
            }

            if (StatusTextField != null)
            {
                StatusTextField.Dispose();
                StatusTextField = null;
            }
        }