コード例 #1
0
        public HyperlinkDialog()
        {
            InitializeComponent();

            Model = new HyperlinkObject
            {
                URL = "http://"
            };
            OkayButton.Click += new RoutedEventHandler(OkayButton_Click);
            CancelButton.Click += new RoutedEventHandler(CancelButton_Click);
        }
コード例 #2
0
        public HyperlinkDialog()
        {
            InitializeComponent();

            Model = new HyperlinkObject
            {
                URL = "http://"
            };
            OkayButton.Click   += new RoutedEventHandler(OkayButton_Click);
            CancelButton.Click += new RoutedEventHandler(CancelButton_Click);
        }
コード例 #3
0
        /// <summary>
        /// 执行插入超链接命令
        /// </summary>
        public static void InsertHyperlick(this HtmlDocument document, HyperlinkObject hyperlink)
        {
            var url = hyperlink.URL.HtmlEncoding();
            var txt = hyperlink.Text.HtmlEncoding();

            if (string.IsNullOrEmpty(txt))
            {
                txt = url;
            }
            string tx = string.Format("<a href=\"{0}\">{1}</a>", url, txt);

            document.InsertHTML(tx);
        }
コード例 #4
0
 /// <summary>
 /// 执行插入超链接命令
 /// </summary>
 public static void InsertHyperlick(this HtmlDocument document, HyperlinkObject hyperlink)
 {
     var url = hyperlink.URL.HtmlEncoding();
     var txt = hyperlink.Text.HtmlEncoding();
     if (string.IsNullOrEmpty(txt)) txt = url;
     string tx = string.Format("<a href=\"{0}\">{1}</a>", url, txt);
     document.InsertHTML(tx);
 }