Esempio n. 1
0
        void ReleaseDesignerOutlets()
        {
            if (BackForwardToolBarItem != null)
            {
                BackForwardToolBarItem.Dispose();
                BackForwardToolBarItem = null;
            }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if (ShowServerInfoToolBarItem != null)
            {
                ShowServerInfoToolBarItem.Dispose();
                ShowServerInfoToolBarItem = null;
            }
        }
Esempio n. 3
0
        public CustomSearchField()
        {
            TranslatesAutoresizingMaskIntoConstraints = false;

            Cell       = cell = new SearchFieldCell(this);
            WantsLayer = true;

            var internalLayer = new CoreAnimation.CALayer();

            internalLayer.BorderWidth  = 1;
            internalLayer.BorderColor  = NSColor.FromRgba(red: 0.75f, green: 0.75f, blue: 0.75f, 0.45f).CGColor;
            internalLayer.Frame        = new CGRect(1, 0, DefaultWidth + 2, DefaultHeight);
            internalLayer.CornerRadius = 2;
            Layer.AddSublayer(internalLayer);

            Font = NSFont.SystemFontOfSize(SearchFontSize, NSFontWeight.Thin);

            //default size needs to be changed before change cell
            WidthAnchor.ConstraintEqualToConstant(DefaultWidth).Active   = true;
            HeightAnchor.ConstraintEqualToConstant(DefaultHeight).Active = true;
        }