Example #1
0
        private void _kcmbAddress_SelectedIndexChanged(object sender, EventArgs e)
        {
            _lastUrlItemLabel?.performMouseLeave(null);
            _lastUrlItemLabel = null;

            _toolbar.Focus();
            _kcmbAddress.Focus();
            _kcmbAddress.PerformClick();
        }
Example #2
0
        private void _kcmbAddress_HoveredSelectionChanged(object sender, HoveredSelectionChangedEventArgs e)
        {
            var pc = _kcmbAddress.KryptonComboBoxControl.PointToScreen(e.Bounds.Location);

            _lastUrlItemLabel?.performMouseLeave(null);
            var label = e.Item as UrlItemLabel;

            if (label == null)
            {
                return;
            }
            label.Location    = new Point(pc.X, pc.Y + label.Height / 2);
            _lastUrlItemLabel = label;

            _lastUrlItemLabel.performMouseEnter(null);
        }
Example #3
0
        public BrowserControl()
        {
            InitializeComponent();

            BackColor = Color.FromArgb(239, 246, 253);
            _centerPanel.BackColor = BackColor;

            #region 测试例子

            UrlItemLabel urlItem = new UrlItemLabel
            {
                Url   = "https://www.bing.com/",
                Title = "必应搜索",
            };

            UrlItemLabel urlItem1 = new UrlItemLabel
            {
                Url   = "https://www.baidu.com/",
                Title = "百度一下,你就知道"
            };

            UrlItemLabel urlItem2 = new UrlItemLabel
            {
                Url   = "https://www.cnblogs.com/qq1223558/p/3651573.html",
                Title = "C#Image和Icon的相互转化"
            };

            UrlItemLabel urlItem3 = new UrlItemLabel
            {
                Url   = null,
                Title = "这是一个空链接"
            };

            #endregion

            _initialToolbar();
            _initialAddressbar();
            _initialWebBrowser();

            loadAddressbar(new List <UrlItemLabel>
            {
                urlItem, urlItem1, urlItem2, urlItem3
            });
        }
Example #4
0
 private void kryptonComboBoxControlOnSelectionChangeCommitted(object sender, EventArgs e)
 {
     _lastUrlItemLabel?.performMouseLeave(null);
     _lastUrlItemLabel = null;
 }
Example #5
0
 private void kryptonComboBoxControlOnDropDownClosed(object sender, EventArgs e)
 {
     _lastUrlItemLabel?.performMouseLeave(null);
     _lastUrlItemLabel = null;
 }