void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.FileLink = ((System.Windows.Documents.Hyperlink)(target)); #line 26 "..\..\clickFileShowMeeting.xaml" this.FileLink.RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(this.Hyperlink_RequestNavigate); #line default #line hidden return; case 2: this.FileName = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.MeetingList = ((System.Windows.Controls.ListView)(target)); #line 35 "..\..\clickFileShowMeeting.xaml" this.MeetingList.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listView_SelectionChanged); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.image3 = ((System.Windows.Controls.Image)(target)); return; case 2: this.login = ((Vistas.UserControls.UserControlLogin)(target)); return; case 3: this.btnIngresar = ((System.Windows.Controls.Button)(target)); #line 14 "..\..\..\Login.xaml" this.btnIngresar.Click += new System.Windows.RoutedEventHandler(this.btnIngresar_Click); #line default #line hidden return; case 4: this.passRecu = ((System.Windows.Documents.Hyperlink)(target)); #line 21 "..\..\..\Login.xaml" this.passRecu.Click += new System.Windows.RoutedEventHandler(this.passRecu_Click); #line default #line hidden return; } this._contentLoaded = true; }
void CompilePalLogger_OnError(string errorText, Error e) { Dispatcher.Invoke(() => { Hyperlink errorLink = new Hyperlink(); Run text = new Run(errorText); text.Foreground = e.ErrorColor; errorLink.Inlines.Add(text); errorLink.TargetName = e.ID.ToString(); errorLink.Click += errorLink_Click; if (CompileOutputTextbox.Document.Blocks.Any()) { var lastPara = (Paragraph)CompileOutputTextbox.Document.Blocks.LastBlock; lastPara.Inlines.Add(errorLink); } else { var newPara = new Paragraph(errorLink); CompileOutputTextbox.Document.Blocks.Add(newPara); } CompileOutputTextbox.ScrollToEnd(); }); }
/// <summary> /// Converts text containing hyperlinks in markdown syntax [text](url) /// to a collection of Run and Hyperlink inlines. /// </summary> public static IEnumerable<Inline> TextToInlines(this string text) { var inlines = new List<Inline>(); while (!string.IsNullOrEmpty(text)) { var match = regex.Match(text); Uri uri; if (match.Success && match.Groups.Count == 3 && Uri.TryCreate(match.Groups[2].Value, UriKind.Absolute, out uri)) { inlines.Add(new Run { Text = text.Substring(0, match.Index) }); text = text.Substring(match.Index + match.Length); var link = new Hyperlink { NavigateUri = uri }; link.Inlines.Add(new Run { Text = match.Groups[1].Value }); #if SILVERLIGHT link.TargetName = "_blank"; #elif !NETFX_CORE link.ToolTip = uri.ToString(); link.RequestNavigate += (s, e) => System.Diagnostics.Process.Start(e.Uri.ToString()); #endif inlines.Add(link); } else { inlines.Add(new Run { Text = text }); text = null; } } return inlines; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MessageTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 2: this.TellMeMore = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.TellMeMoreLink = ((System.Windows.Documents.Hyperlink)(target)); #line 34 "..\..\..\KinectSensorChooser.xaml" this.TellMeMoreLink.RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(this.TellMeMoreLinkRequestNavigate); #line default #line hidden return; case 4: this.RetryButton = ((System.Windows.Controls.Button)(target)); #line 38 "..\..\..\KinectSensorChooser.xaml" this.RetryButton.Click += new System.Windows.RoutedEventHandler(this.RetryButtonClick); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> /// Constructor /// </summary> public HelpPage() { this.InitializeComponent(); var version = XDocument.Load("WMAppManifest.xml").Root.Element("App").Attribute("Version").Value; var versionRun = new Run() { Text = String.Format(AppResources.AboutPage_VersionRun, version) + "\n" }; VersionParagraph.Inlines.Add(versionRun); // Application about text var aboutRun = new Run() { Text = AppResources.HelpPage_AboutRun + "\n" }; AboutParagraph.Inlines.Add(aboutRun); // Link to project homepage var projectRunText = AppResources.AboutPage_ProjectRun; var projectRunTextSpans = projectRunText.Split(new string[] { "{0}" }, StringSplitOptions.None); var projectRunSpan1 = new Run { Text = projectRunTextSpans[0] }; var projectsLink = new Hyperlink(); projectsLink.Inlines.Add(AppResources.AboutPage_Hyperlink_Project); projectsLink.Click += ProjectsLink_Click; projectsLink.Foreground = new SolidColorBrush((Color)Application.Current.Resources["PhoneForegroundColor"]); projectsLink.MouseOverForeground = new SolidColorBrush((Color)Application.Current.Resources["PhoneAccentColor"]); var projectRunSpan2 = new Run { Text = projectRunTextSpans[1] + "\n" }; ProjectParagraph.Inlines.Add(projectRunSpan1); ProjectParagraph.Inlines.Add(projectsLink); ProjectParagraph.Inlines.Add(projectRunSpan2); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.dpBegin = ((System.Windows.Controls.DatePicker)(target)); return; case 2: this.dpEnd = ((System.Windows.Controls.DatePicker)(target)); return; case 3: this.btnOk = ((System.Windows.Documents.Hyperlink)(target)); #line 21 "..\..\..\Report\THNXNgay.xaml" this.btnOk.Click += new System.Windows.RoutedEventHandler(this.btnOk_Click); #line default #line hidden return; case 4: this._reportViewer = ((Microsoft.Reporting.WinForms.ReportViewer)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.author_profile = ((System.Windows.Controls.Grid)(target)); return; case 2: this.journal_name = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.profile = ((System.Windows.Documents.Hyperlink)(target)); #line 15 "..\..\Journal.xaml" this.profile.Click += new System.Windows.RoutedEventHandler(this.showProfile); #line default #line hidden return; case 4: this.stats = ((System.Windows.Documents.Hyperlink)(target)); #line 16 "..\..\Journal.xaml" this.stats.Click += new System.Windows.RoutedEventHandler(this.showStats); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\MainMenu.xaml" ((IAS.MainMenu)(target)).Loaded += new System.Windows.RoutedEventHandler(this.PageFunction_Loaded); #line default #line hidden return; case 2: this.lineManageMentLink = ((System.Windows.Documents.Hyperlink)(target)); #line 44 "..\..\MainMenu.xaml" this.lineManageMentLink.Click += new System.Windows.RoutedEventHandler(this.lineManageMentLink_Click); #line default #line hidden return; } this._contentLoaded = true; }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/MyLocalPharmacy;component/View/YourDetailswithTC.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel"))); this.tbkNominationStatus = ((System.Windows.Controls.TextBlock)(this.FindName("tbkNominationStatus"))); this.tbkNominationStatusResult = ((System.Windows.Controls.TextBlock)(this.FindName("tbkNominationStatusResult"))); this.tbxFirstName = ((System.Windows.Controls.TextBlock)(this.FindName("tbxFirstName"))); this.tbxLastName = ((System.Windows.Controls.TextBlock)(this.FindName("tbxLastName"))); this.tbxAdd1 = ((System.Windows.Controls.TextBox)(this.FindName("tbxAdd1"))); this.tbkValidateAddressLine1 = ((System.Windows.Controls.TextBlock)(this.FindName("tbkValidateAddressLine1"))); this.tbxAdd2 = ((System.Windows.Controls.TextBox)(this.FindName("tbxAdd2"))); this.tbkValidateAddressLine2 = ((System.Windows.Controls.TextBlock)(this.FindName("tbkValidateAddressLine2"))); this.tbxAdd3 = ((System.Windows.Controls.TextBox)(this.FindName("tbxAdd3"))); this.tbkValidateAddressLine3 = ((System.Windows.Controls.TextBlock)(this.FindName("tbkValidateAddressLine3"))); this.tbxPinCode = ((System.Windows.Controls.TextBox)(this.FindName("tbxPinCode"))); this.tbkValidatePostCode = ((System.Windows.Controls.TextBlock)(this.FindName("tbkValidatePostCode"))); this.tbxDOB = ((System.Windows.Controls.TextBlock)(this.FindName("tbxDOB"))); this.tbxNHS = ((System.Windows.Controls.TextBox)(this.FindName("tbxNHS"))); this.rdFemale = ((System.Windows.Controls.RadioButton)(this.FindName("rdFemale"))); this.rdMale = ((System.Windows.Controls.RadioButton)(this.FindName("rdMale"))); this.tbxPhNo = ((System.Windows.Controls.TextBox)(this.FindName("tbxPhNo"))); this.tbkValidateMobilePhone = ((System.Windows.Controls.TextBlock)(this.FindName("tbkValidateMobilePhone"))); this.tbxEmail = ((System.Windows.Controls.TextBox)(this.FindName("tbxEmail"))); this.chkbxTC = ((System.Windows.Controls.CheckBox)(this.FindName("chkbxTC"))); this.hyprlnkTermsCond = ((System.Windows.Documents.Hyperlink)(this.FindName("hyprlnkTermsCond"))); this.tbkValidateTC = ((System.Windows.Controls.TextBlock)(this.FindName("tbkValidateTC"))); this.btnTCUpdate = ((System.Windows.Controls.Button)(this.FindName("btnTCUpdate"))); }
/// <summary> /// Constructor from Article.Section /// </summary> /// <param name="section">Section to be displayed.</param> public IndexArticleSection(Article.Section section) { InitializeComponent(); this.SectionTitle.Text = section.Heading; string[] chunks = section.Text.Split('[', ']'); foreach (string chunk in chunks) { Run contents = new Run(chunk); if (chunk.StartsWith(Article.ArticleIdTag)) { Match m = RegexArticle.Match(chunk); if (m.Success) { contents.Text = m.Groups[ArticleTitleGroup].Value; Hyperlink link = new Hyperlink(contents); link.CommandParameter = uint.Parse(m.Groups[ArticleIdGroup].Value); this.SectionContents.Inlines.Add(link); } else { this.SectionContents.Inlines.Add(contents); } } else { this.SectionContents.Inlines.Add(contents); } } }
private InlineCollection GetConvertedText(object value) { if (value == null) { return null; } TextBlock tb = new TextBlock(); TextBlock tbUserName = new TextBlock(); string statusContent = string.Empty; Binding bind = new Binding(); TweetsTemplate tweetTemplate = new TweetsTemplate(); Hyperlink hyperLinkUser = new Hyperlink(); Style usernameStyle = (Style)tweetTemplate.FindResource("UsernameLinkStyle"); hyperLinkUser.Style = usernameStyle; hyperLinkUser.Command = TOBCommands.ShowUserProfile; switch (value.GetType().Name) { case "Status": { statusContent = StatusText(value, tb, tbUserName, statusContent, bind, hyperLinkUser); break; } case "TwitterSearchStatus": { statusContent = SearchText(value, tb, tbUserName, statusContent, bind, hyperLinkUser); break; } case "TwitterStatus": { statusContent = TwitterStatusText(value, tb, tbUserName, statusContent, bind, hyperLinkUser); break; } } return GetInlineCollections(tb, statusContent, bind, tweetTemplate, hyperLinkUser); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Info = ((System.Windows.Controls.TextBlock)(target)); return; case 2: this.Author = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.Mail = ((System.Windows.Controls.TextBlock)(target)); return; case 4: this.GitHub = ((System.Windows.Controls.TextBlock)(target)); return; case 5: this.linkHelp = ((System.Windows.Documents.Hyperlink)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.sourceCodeLink = ((System.Windows.Documents.Hyperlink)(target)); #line 23 "..\..\HelpDialog.xaml" this.sourceCodeLink.MouseEnter += new System.Windows.Input.MouseEventHandler(this.OnMouseEnter); #line default #line hidden #line 24 "..\..\HelpDialog.xaml" this.sourceCodeLink.MouseLeave += new System.Windows.Input.MouseEventHandler(this.OnMouseLeave); #line default #line hidden #line 25 "..\..\HelpDialog.xaml" this.sourceCodeLink.RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(this.sourceCodeHL_RequestNavigate); #line default #line hidden return; } this._contentLoaded = true; }
//creates the link for a news link private Hyperlink getNewsLink(string text) { string linkType = text.Substring(3).Split('=')[0]; string linkObject = text.Split('=')[1]; object o = null; string objectText = ""; switch (linkType) { case "airline": o = Airlines.GetAirline(linkObject); objectText = ((Airline)o).Profile.Name; break; case "airport": o = Airports.GetAirport(linkObject); objectText = ((Airport)o).Profile.Name; break; case "airliner": o = Airlines.GetAllAirlines().SelectMany(a => a.Fleet).ToList().Find(f=>f.Airliner.TailNumber== linkObject); objectText = ((FleetAirliner)o).Name; break; } Run run = new Run(objectText); Hyperlink hyperLink = new Hyperlink(run); hyperLink.Tag = o; hyperLink.TextDecorations = TextDecorations.Underline; hyperLink.TargetName = linkType; hyperLink.Click += new RoutedEventHandler(hyperLink_Click); return hyperLink; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 23 "..\..\ConnexionWindow.xaml" ((System.Windows.Documents.Hyperlink)(target)).Click += new System.Windows.RoutedEventHandler(this.CloseButton_Click); #line default #line hidden return; case 2: this.Login_TextBox = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.Password_TextBox = ((System.Windows.Controls.PasswordBox)(target)); return; case 4: this.Connexion_Button = ((System.Windows.Documents.Hyperlink)(target)); #line 55 "..\..\ConnexionWindow.xaml" this.Connexion_Button.Click += new System.Windows.RoutedEventHandler(this.Connexion_Button_OnClick); #line default #line hidden return; } this._contentLoaded = true; }
//===================================================================== /// <inheritdoc /> public override void Initialize(XElement configuration) { Hyperlink hyperLink; // Load the What's New link information foreach(var wn in configuration.Elements("whatsNew")) { hyperLink = new Hyperlink(new Run(wn.Attribute("description").Value)); hyperLink.Tag = wn.Attribute("url").Value; hyperLink.Click += LaunchLink; pnlLinks.Children.Add(new Label { Margin = new Thickness(20, 0, 0, 0), Content = hyperLink }); } if(pnlLinks.Children.Count == 0) pnlLinks.Children.Add(new Label { Margin = new Thickness(20, 0, 0, 0), Content = "(No new information to report)" }); base.Initialize(configuration); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 4 "..\..\About.xaml" ((WpfStackerLibrary.About)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded); #line default #line hidden return; case 2: this.ref_texnokon = ((System.Windows.Documents.Hyperlink)(target)); #line 7 "..\..\About.xaml" this.ref_texnokon.Click += new System.Windows.RoutedEventHandler(this.Hyperlink_Click); #line default #line hidden return; case 3: #line 9 "..\..\About.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click); #line default #line hidden return; } this._contentLoaded = true; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var htmlText = value as string; if (string.IsNullOrWhiteSpace(htmlText)) return value; var splits = Regex.Split(htmlText, "<a "); var result = new List<Inline>(); foreach (var split in splits) { if (!split.StartsWith("href=\"")) { result.AddRange(FormatText(split)); continue; } var match = Regex.Match(split, "^href=\"(?<url>(.+?))\" class=\".+?\">(?<text>(.*?))</a>(?<content>(.*?))$", RegexOptions.Singleline); if (!match.Success) { result.Add(new Run(split)); continue; } var hyperlink = new Hyperlink(new Run(match.Groups["text"].Value)) { NavigateUri = new Uri(match.Groups["url"].Value) }; hyperlink.RequestNavigate += Hyperlink_RequestNavigate; result.Add(hyperlink); result.AddRange(FormatText(match.Groups["content"].Value)); } return result; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.HyperLinkList = ((System.Windows.Documents.Hyperlink)(target)); #line 14 "..\..\..\..\Forms\FormRequest\Actions.xaml" this.HyperLinkList.Click += new System.Windows.RoutedEventHandler(this.HyperLinkList_Click); #line default #line hidden return; case 2: this.HyperLinlObject = ((System.Windows.Documents.Hyperlink)(target)); #line 20 "..\..\..\..\Forms\FormRequest\Actions.xaml" this.HyperLinlObject.Click += new System.Windows.RoutedEventHandler(this.HyperLinlObject_Click); #line default #line hidden return; } this._contentLoaded = true; }
public static void Format(string message, InlineCollection collection) { UrlMatch urlMatch; int cur = 0; while (UrlMatcher.TryGetMatch(message, cur, out urlMatch)) { string before = message.Substring(cur, urlMatch.Offset - cur); if (before.Length > 0) collection.Add(new Run(before)); var matchRun = new Run(urlMatch.Text); try { Hyperlink link = new Hyperlink(matchRun); link.NavigateUri = new Uri(urlMatch.Text); link.RequestNavigate += hlink_RequestNavigate; collection.Add(link); } catch { collection.Add(matchRun); } cur = urlMatch.Offset + urlMatch.Text.Length; } string ending = message.Substring(cur); if (ending.Length > 0) collection.Add(new Run(ending)); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.Login = ((System.Windows.Controls.Button)(target)); #line 11 "..\..\MainWindow.xaml" this.Login.Click += new System.Windows.RoutedEventHandler(this.Login_Click); #line default #line hidden return; case 2: this.tblck = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.ForGotPwd = ((System.Windows.Documents.Hyperlink)(target)); #line 13 "..\..\MainWindow.xaml" this.ForGotPwd.Click += new System.Windows.RoutedEventHandler(this.OnClick); #line default #line hidden return; } this._contentLoaded = true; }
public static Inline DecorateAsHyperlink(string text) { var hyperlink = new Hyperlink(new Run(text)) { NavigateUri = new Uri(text) }; hyperlink.Click += HyperlinkClickHandler; hyperlink.SetResourceReference(FrameworkContentElement.StyleProperty, "hyperlinkStyle"); return hyperlink; }
public about() { InitializeComponent(); aboutBox.AddHandler(Hyperlink.RequestNavigateEvent, new RequestNavigateEventHandler(RequestNavigateHandler)); // Create a FlowDocument to contain content for the RichTextBox. FlowDocument myFlowDoc = new FlowDocument(); // Add paragraphs to the FlowDocument. Hyperlink oskarGithub = new Hyperlink(); oskarGithub.Inlines.Add("github"); oskarGithub.NavigateUri = new Uri("https://github.com/oskarp/redminetimetask"); Hyperlink redmineLib = new Hyperlink(); redmineLib.Inlines.Add("Redmine-net-api"); redmineLib.NavigateUri = new Uri("https://github.com/zapadi/redmine-net-api"); // Create a paragraph and add the Run and hyperlink to it. Paragraph mePa = new Paragraph(); mePa.Inlines.Add("This project is open source and hosted at "); mePa.Inlines.Add(oskarGithub); myFlowDoc.Blocks.Add(mePa); Paragraph redminePa = new Paragraph(); redminePa.Inlines.Add("We use "); redminePa.Inlines.Add(redmineLib); redminePa.Inlines.Add(" for the redmine communication."); myFlowDoc.Blocks.Add(redminePa); // Add initial content to the RichTextBox. aboutBox.Document = myFlowDoc; }
public void Populate(IEnumerable<ILayer> layers) { Children.Clear(); foreach (var layer in layers) { if (string.IsNullOrEmpty(layer.Attribution.Text)) continue; var attribution = new StackPanel {Orientation = Orientation.Horizontal}; var textBlock = new TextBlock(); if (string.IsNullOrEmpty(layer.Attribution.Url)) { textBlock.Text = layer.Attribution.Text; } else { var hyperlink = new Hyperlink(); hyperlink.Inlines.Add(layer.Attribution.Text); hyperlink.NavigateUri = new Uri(layer.Attribution.Url); hyperlink.RequestNavigate += (sender, args) => Process.Start(args.Uri.ToString()); textBlock.Inlines.Add(hyperlink); textBlock.Padding = new Thickness(6,2,6,2); attribution.Children.Add(textBlock); } Children.Add(attribution); } }
public void ShowNotifier(string feedtitle, IEnumerable<Tuple<string, string>> newitemlist) { if (Opacity > 0) { holdWindowOpenTimer.Stop(); } else { titlebox.Inlines.Clear(); Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action(FadeInWindowThingieLikeAnEpicAwesomeToaster)); } titlebox.Inlines.Add(string.Format("New items in {0}", feedtitle)); foreach (var link in newitemlist) { titlebox.Inlines.Add(new LineBreak()); Uri linkuri; Uri.TryCreate(link.Item2, UriKind.Absolute, out linkuri); var hyperlink = new Hyperlink { NavigateUri = linkuri }; hyperlink.RequestNavigate += HyperlinkRequestNavigate; hyperlink.Inlines.Add(link.Item1); titlebox.Inlines.Add(hyperlink); } PositionWindow(); holdWindowOpenTimer.Start(); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.languageTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 2: this.navigateTextBlock = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.hyperlink = ((System.Windows.Documents.Hyperlink)(target)); #line 31 "..\..\CustomLanguageDisplay.xaml" this.hyperlink.Click += new System.Windows.RoutedEventHandler(this.Hyperlink_OnClick); #line default #line hidden return; case 4: this.descriptionTextBlock = ((System.Windows.Controls.TextBox)(target)); return; } this._contentLoaded = true; }
public LinkButtonHandler() { Hyperlink = new swd.Hyperlink(); Control = new swc.TextBlock { Inlines = { Hyperlink }, TextWrapping = sw.TextWrapping.Wrap }; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.tblNotification = ((System.Windows.Controls.TextBlock)(target)); return; case 2: this.txbUsername = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.pwbPassword = ((System.Windows.Controls.PasswordBox)(target)); return; case 4: this.hplForgotPassword = ((System.Windows.Documents.Hyperlink)(target)); return; case 5: this.mpr = ((FirstFloor.ModernUI.Windows.Controls.ModernProgressRing)(target)); return; case 6: this.btnLogin = ((System.Windows.Controls.Button)(target)); return; case 7: this.btnCancel = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
private static void PropertyChangedCallback(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs) { if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(dependencyObject)) return; var contentControl = dependencyObject as ContentControl; if (contentControl == null) return; var textBlock = new TextBlock(); var values = GetFormatValues(contentControl); int counter = 0; foreach (var item in Regex.Split(dependencyPropertyChangedEventArgs.NewValue.ToString(), @"\{.\}")) { textBlock.Inlines.Add(new Run(item)); if (values.Length - 1 < counter) continue; string[] sSplit = values[counter].Split('$'); string text = sSplit[0]; string url = sSplit[1]; var hyperlink = new Hyperlink(new Run(text)) { NavigateUri = new Uri(url) }; hyperlink.RequestNavigate += (s, e) => { Process.Start(e.Uri.AbsoluteUri); }; textBlock.Inlines.Add(hyperlink); counter++; } contentControl.Content = textBlock; }
private void copyLink(object sender, RoutedEventArgs e) { Run testLink = new Run("Test Hyperlink"); Hyperlink myLink = new Hyperlink(testLink); myLink.NavigateUri = new Uri("http://search.msn.com"); Clipboard.SetDataObject(myLink); }
private static void OpenBrowser(Hyperlink link) { Process proc = new Process(); proc.StartInfo.UseShellExecute = true; proc.StartInfo.FileName = link.NavigateUri.ToString(); proc.Start(); }
public static TweetTextBlock FormatName(TweetTextBlock textblock, string word) { string userName = String.Empty; string firstLetter = word.Substring(0, 1); Match foundUsername = Regex.Match(word, @"@(\w+)(?<suffix>.*)"); if (foundUsername.Success) { userName = foundUsername.Groups[1].Captures[0].Value; Hyperlink name = new Hyperlink(); name.Inlines.Add(userName); name.NavigateUri = new Uri("http://twitter.com/" + userName); name.ToolTip = "View @" + userName + "'s recent tweets"; name.Tag = userName; name.Click += new RoutedEventHandler(name_Click); if (firstLetter != "@") textblock.Inlines.Add(firstLetter); textblock.Inlines.Add("@"); textblock.Inlines.Add(name); textblock.Inlines.Add(foundUsername.Groups["suffix"].Captures[0].Value); } return textblock; }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var text = value as string; if (text == null) throw new ArgumentException("Value must be of type string."); var fd = new FlowDocument(); var paragraph = new Paragraph(); var splitText = text.Split(' '); foreach (var word in splitText) { Uri uri; bool result = Uri.TryCreate(word, UriKind.Absolute, out uri) && uri.Scheme == Uri.UriSchemeHttp; if (result) { var hl = new Hyperlink(); hl.Inlines.Add(uri.AbsoluteUri); hl.NavigateUri = uri; paragraph.Inlines.Add(hl); paragraph.Inlines.Add(" "); } else { paragraph.Inlines.Add(word); paragraph.Inlines.Add(" "); } } fd.Blocks.Add(paragraph); return fd; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.muiBtnBrowse = ((System.Windows.Controls.Button)(target)); return; case 2: this.hplForgotPassword = ((System.Windows.Documents.Hyperlink)(target)); return; case 3: this.mpr = ((FirstFloor.ModernUI.Windows.Controls.ModernProgressRing)(target)); return; case 4: this.muiBtnOK = ((System.Windows.Controls.Button)(target)); return; case 5: this.muiBtnCancel = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 9 "..\..\..\..\Pages\Home\Logout.xaml" ((System.Windows.Controls.Grid)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Grid_Loaded); #line default #line hidden return; case 2: this.hplYes = ((System.Windows.Documents.Hyperlink)(target)); #line 15 "..\..\..\..\Pages\Home\Logout.xaml" this.hplYes.Click += new System.Windows.RoutedEventHandler(this.hplYes_Click); #line default #line hidden return; case 3: this.hplNo = ((System.Windows.Documents.Hyperlink)(target)); #line 16 "..\..\..\..\Pages\Home\Logout.xaml" this.hplNo.Click += new System.Windows.RoutedEventHandler(this.hplNo_Click); #line default #line hidden return; } this._contentLoaded = true; }
private void btnCreate_Click(object sender, RoutedEventArgs e) { int ind = cmbStandard.SelectedIndex+6; if (profile.StandardExists(ind)) { StackPanel stack = new StackPanel(); txtLog.Inlines.Clear(); txtLog.Inlines.Add(cmbStandard.SelectedItem+ " standard already exists."); txtLog.Inlines.Add(new LineBreak()); txtLog.Inlines.Add("Click "); Hyperlink link = new Hyperlink(new Run("here")); link.Click += link_Click; link.Tag = ind; txtLog.Inlines.Add(link); txtLog.Inlines.Add(" to go to the "+cmbStandard.SelectedItem+" standard tab."); stack.Orientation = Orientation.Horizontal; stack.Children.Add( new TextBlock() { Text = "Standard already exists." }); stack.Children.Add(new TextBlock() { }); } else { txtLog.Inlines.Clear(); Classes.Standard standard=profile.AddStandard(ind); AddTab(standard); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.tabHome = ((System.Windows.Controls.TabItem)(target)); return; case 2: this.Register = ((System.Windows.Controls.Label)(target)); return; case 3: this.hypReg = ((System.Windows.Documents.Hyperlink)(target)); #line 50 "..\..\MainWindow.xaml" this.hypReg.Click += new System.Windows.RoutedEventHandler(this.hupReg_Click); #line default #line hidden return; case 4: this.Login = ((System.Windows.Controls.Button)(target)); return; case 5: this.txtFrom = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.txtTo = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.btnSearch = ((System.Windows.Controls.Button)(target)); return; case 8: this.txtStart = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.txtEnd = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.txtSpaces = ((System.Windows.Controls.TextBox)(target)); return; case 11: this.txtPrices = ((System.Windows.Controls.TextBox)(target)); return; case 12: this.btnSubmitRoute = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Constructor /// </summary> public AboutPage() { InitializeComponent(); // Application version number var ver = Windows.ApplicationModel.Package.Current.Id.Version; var versionRun = string.Format("{0}.{1}.{2}.{3}", ver.Major, ver.Minor, ver.Build, ver.Revision); VersionParagraph.Inlines.Add(versionRun); // Application about text var aboutRun = new Run() { Text = AppResources.AboutPage_AboutRun + "\n" }; AboutParagraph.Inlines.Add(aboutRun); // Link to project homepage var projectRunText = AppResources.AboutPage_ProjectRun; var projectRunTextSpans = projectRunText.Split(new string[] { "{0}" }, StringSplitOptions.None); var projectRunSpan1 = new Run { Text = projectRunTextSpans[0] }; var projectsLink = new Hyperlink(); projectsLink.Inlines.Add(AppResources.AboutPage_Hyperlink_Project); projectsLink.Click += ProjectsLink_Click; projectsLink.Foreground = new SolidColorBrush((Color)Application.Current.Resources["PhoneForegroundColor"]); projectsLink.MouseOverForeground = new SolidColorBrush((Color)Application.Current.Resources["PhoneAccentColor"]); var projectRunSpan2 = new Run { Text = projectRunTextSpans[1] + "\n" }; ProjectParagraph.Inlines.Add(projectRunSpan1); ProjectParagraph.Inlines.Add(projectsLink); ProjectParagraph.Inlines.Add(projectRunSpan2); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 7 "..\..\..\..\Pages\Setting\Logs.xaml" ((CashierRegister.Pages.Setting.Logs)(target)).Loaded += new System.Windows.RoutedEventHandler(this.ModernWindow_Loaded); #line default #line hidden return; case 2: this.hplClear = ((System.Windows.Documents.Hyperlink)(target)); #line 17 "..\..\..\..\Pages\Setting\Logs.xaml" this.hplClear.Click += new System.Windows.RoutedEventHandler(this.hplClear_Click); #line default #line hidden return; case 3: this.tblLogs = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.link_ori = ((System.Windows.Documents.Hyperlink)(target)); #line 23 "..\..\MainWindow.xaml" this.link_ori.Click += new System.Windows.RoutedEventHandler(this.Link_ori_Click); #line default #line hidden return; case 2: this.ls_view = ((System.Windows.Controls.ListView)(target)); return; case 3: this.btn_clear = ((System.Windows.Controls.Button)(target)); return; case 4: this.btn_find = ((System.Windows.Controls.Button)(target)); return; case 5: this.btn_cvt = ((System.Windows.Controls.Button)(target)); return; } this._contentLoaded = true; }
/// <summary> /// Renders the specified chat node to the client. /// </summary> /// <param name="node">The node to append.</param> /// <remarks> /// <para>The return value of this function is a reference to the outermost <see cref="HtmlElement">HtmlElement</see> constructed /// by this function. It may create additional inner elements as needed.</para> /// </remarks> /// <returns> /// Returns an object instance of <see cref="HtmlElement">HtmlElement</see> that can be appended to the HTML document. /// </returns> public override Inline Render(ChatNode node) { IIconProvider provider = ProfileResourceProvider.GetForClient(null).Icons; ImageChatNode icn = node as ImageChatNode; if (icn != null) { InlineUIContainer result = new InlineUIContainer(); Image img = new Image(); img.Source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap((icn.Image as System.Drawing.Bitmap).GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); img.ToolTip = icn.Text; img.Width = provider.IconSize.Width; img.Height = provider.IconSize.Height; result.Child = img; if (icn.LinkUri != null) { Hyperlink container = new Hyperlink(result); container.NavigateUri = node.LinkUri; container.ToolTip = string.Format(CultureInfo.CurrentUICulture, "Link to {0}", node.LinkUri); return container; } return result; } else { return base.Render(node); } }
public void DisplayDiff(string filename, string fullpath, string author, string old, string updated) { grid.RowDefinitions.Clear(); var rd = new RowDefinition { Height = new GridLength(1, GridUnitType.Star) }; grid.RowDefinitions.Add(rd); // Remove the line number blocks and such. actionsThem is the last item in the XAML int x = grid.Children.IndexOf(message); grid.Children.RemoveRange(x + 1, grid.Children.Count - x); message.Visibility = Visibility.Collapsed; if (filename.EndsWith(".docx") || filename.EndsWith(".doc")) { // Word document. So let the user open the doc in Word message.Visibility = Visibility.Visible; message.Text = "This is a Word document. Please save it to view its contents."; message.Inlines.Add(" You can also "); var fakeUri = new Uri("http://asdf.com"); var link = new Hyperlink(new Run("view the changes")) { NavigateUri = fakeUri }; link.RequestNavigate += (s, e) => CompareInWord(old, updated, filename, Path.GetDirectoryName(fullpath), author); message.Inlines.Add(link); message.Inlines.Add(" in Word."); } else if (SentenceFilter.IsBinary(old) || SentenceFilter.IsBinary(updated)) { message.Visibility = Visibility.Visible; message.Text = "This file is in binary. Please save it to view its contents."; } else { // Compute the diff, break it into blocks if (old == null) old = ""; if (updated == null) updated = ""; var d = new Differ(); var dr = d.CreateLineDiffs(old, updated, false); int curBlock = 0, numBlocks = dr.DiffBlocks.Count; List<LineBlock> lineBlocks = new List<LineBlock>(); for (int i = 0; i <= dr.PiecesOld.Length; i++) { while (curBlock < numBlocks && dr.DiffBlocks[curBlock].DeleteStartA < i) { curBlock++; } if (curBlock < numBlocks && dr.DiffBlocks[curBlock].DeleteStartA == i) { var db = dr.DiffBlocks[curBlock]; if (db.DeleteCountA > 0) { lineBlocks.Add(new LineBlock(Util.ArraySlice(dr.PiecesOld, db.DeleteStartA, db.DeleteCountA), BlockType.ChangeDelete)); } if (db.InsertCountB > 0) { lineBlocks.Add(new LineBlock(Util.ArraySlice(dr.PiecesNew, db.InsertStartB, db.InsertCountB), BlockType.ChangeAdd)); } i += db.DeleteCountA; curBlock++; } if (i < dr.PiecesOld.Length) { lineBlocks.Add(new LineBlock(Util.ArraySlice(dr.PiecesOld, i, 1))); } } // Draw the actual blocks. DrawLineBlocks(lineBlocks); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ProfileImage = ((System.Windows.Controls.Image)(target)); return; case 2: #line 53 "..\..\SignUpPage.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ChooseFileButton_Click); #line default #line hidden return; case 3: this.txtName = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.txtEmail = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.txtPreNumber = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.txtPhoneNumber = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.txtPassword = ((System.Windows.Controls.PasswordBox)(target)); return; case 8: this.signup = ((System.Windows.Controls.Button)(target)); #line 99 "..\..\SignUpPage.xaml" this.signup.Click += new System.Windows.RoutedEventHandler(this.sigh_up_btn); #line default #line hidden return; case 9: this.account = ((System.Windows.Documents.Hyperlink)(target)); #line 105 "..\..\SignUpPage.xaml" this.account.Click += new System.Windows.RoutedEventHandler(this.account_btn); #line default #line hidden return; } this._contentLoaded = true; }
/// <summary> Create a WPF Hyperlink class </summary> public static Hyperlink CreateHyperLink(string sURI, string sDescription, EventHandler<System.Windows.RoutedEventArgs> ClickMethod) { Hyperlink hyper = new Hyperlink(); hyper.Inlines.Add(sDescription); hyper.NavigateUri = new System.Uri(sURI); hyper.Click += new System.Windows.RoutedEventHandler(ClickMethod); return hyper; }
private static Hyperlink ConvertToHyperlink(ProductInfo next, ICommand command) { var h = new Hyperlink {Command = command}; h.Inlines.Add(new Run(next.Name + "(" + next.Version.ToString() + ")")); return h; }
private static Hyperlink ConvertToHyperlink(string next, ICommand command) { Hyperlink h = new Hyperlink { Command = command }; h.Inlines.Add(new Run(next)); return h; }
// Methods public static void AddLinkText(InlineCollection inlines, string text, HyperLinkObj obj) { Hyperlink item = new Hyperlink(new Run(text)) { Tag = obj }; inlines.Add(item); }
// Helper that returns true if passed caretPosition and backspacePosition cross a hyperlink end boundary // (under the assumption that caretPosition and backSpacePosition are adjacent insertion positions). private static bool IsHyperlinkBoundaryCrossed(TextPointer caretPosition, TextPointer backspacePosition, out Hyperlink backspacePositionHyperlink) { Hyperlink caretPositionHyperlink = GetHyperlinkAncestor(caretPosition); backspacePositionHyperlink = GetHyperlinkAncestor(backspacePosition); return (caretPositionHyperlink == null && backspacePositionHyperlink != null) || (caretPositionHyperlink != null && backspacePositionHyperlink != null && caretPositionHyperlink != backspacePositionHyperlink); }
/// <summary>Creates the UI elements for the given HTML node and HTML view.</summary> /// <param name="node">The HTML node.</param> /// <param name="htmlView">The HTML view.</param> /// <returns>The UI elements.</returns> public DependencyObject[] CreateControls(HtmlNode node, IHtmlView htmlView) { try { var link = node.Attributes["href"]; var hyperlink = new Hyperlink(); if (Foreground != null) hyperlink.Foreground = Foreground; #if !WINRT hyperlink.MouseOverForeground = htmlView.Foreground; hyperlink.TextDecorations = TextDecorations.Underline; #endif foreach (var child in node.Children) { var leaves = child.GetControls(htmlView).ToArray(); if (leaves.Length > 0) { foreach (var item in leaves) { if (item is Inline) hyperlink.Inlines.Add((Inline)item); else hyperlink.Inlines.Add(new InlineUIContainer { Child = (UIElement) item }); } } else if (child is HtmlTextNode && !string.IsNullOrEmpty(((HtmlTextNode)child).Text)) hyperlink.Inlines.Add(new Run { Text = ((HtmlTextNode)child).Text }); } #if WINRT var action = CreateLinkAction(hyperlink, link, htmlView); hyperlink.Click += (sender, e) => { action(); ((Control)htmlView).Focus(FocusState.Programmatic); }; #else var action = CreateLinkAction(hyperlink, link, htmlView); hyperlink.Command = new RelayCommand(delegate { if (!PhoneApplication.IsNavigating) action(); }); #endif return new DependencyObject[] { hyperlink }; } catch { return node.GetChildControls(htmlView); // suppress link } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.ZH_btn = ((System.Windows.Controls.Button)(target)); #line 22 "..\..\MainWindow.xaml" this.ZH_btn.Click += new System.Windows.RoutedEventHandler(this.ZH_btn_Click); #line default #line hidden return; case 2: this.input_txtbox = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.User_Facebook_link = ((System.Windows.Documents.Hyperlink)(target)); #line 55 "..\..\MainWindow.xaml" this.User_Facebook_link.Click += new System.Windows.RoutedEventHandler(this.User_Facebook_link_Click); #line default #line hidden return; case 4: this.User_Twitter_link = ((System.Windows.Documents.Hyperlink)(target)); #line 67 "..\..\MainWindow.xaml" this.User_Twitter_link.Click += new System.Windows.RoutedEventHandler(this.User_Twitter_link_Click); #line default #line hidden return; case 5: this.User_Shadertoy_link = ((System.Windows.Documents.Hyperlink)(target)); #line 79 "..\..\MainWindow.xaml" this.User_Shadertoy_link.Click += new System.Windows.RoutedEventHandler(this.User_Shadertoy_link_Click); #line default #line hidden return; case 6: this.winform_picture_box = ((System.Windows.Forms.PictureBox)(target)); return; case 7: this.out_result_block = ((System.Windows.Controls.TextBox)(target)); return; } this._contentLoaded = true; }
public void SetContent(string explainContent) { title.Text = " " + explainContent+" 数据来源:"; Run run1 = new Run("www.baidu.com"); Hyperlink hl = new Hyperlink(run1); hl.NavigateUri = new Uri("http://www.baidu.com"); hl.RequestNavigate += new RequestNavigateEventHandler(hl_RequestNavigate); title.Inlines.Add(hl); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: #line 7 "..\..\AboutControlView.xaml" ((Gat.Controls.AboutControlView)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.UserControl_MouseLeftButtonDown); #line default #line hidden return; case 2: this.ApplicationLogo = ((System.Windows.Controls.Image)(target)); return; case 3: this.Title = ((System.Windows.Controls.Label)(target)); return; case 4: this.Description = ((System.Windows.Controls.TextBlock)(target)); return; case 5: this.Version = ((System.Windows.Controls.Label)(target)); return; case 6: this.PublisherLogo = ((System.Windows.Controls.Image)(target)); return; case 7: this.Copyright = ((System.Windows.Controls.TextBlock)(target)); return; case 8: this.Hyperlink = ((System.Windows.Documents.Hyperlink)(target)); #line 104 "..\..\AboutControlView.xaml" this.Hyperlink.RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(this.Link_RequestNavigate); #line default #line hidden return; case 9: this.HyperlinkText = ((System.Windows.Controls.TextBlock)(target)); return; case 10: this.AdditionalNotes = ((System.Windows.Controls.TextBlock)(target)); return; } this._contentLoaded = true; }
private static void AddHyperLinkToRTF(FlowDocument myFlowDoc, string hyperlink) { var para = new Paragraph(); var run = new Run(hyperlink); var link = new Hyperlink(); link.Inlines.Add(run); para.Inlines.Add(link); myFlowDoc.Blocks.Add(para); }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.auth = ((System.Windows.Documents.Hyperlink)(target)); return; case 2: this.reg = ((System.Windows.Documents.Hyperlink)(target)); return; case 3: this.textINN = ((System.Windows.Controls.TextBox)(target)); return; case 4: this.textname = ((System.Windows.Controls.TextBox)(target)); return; case 5: this.textmail = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.textlogin = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.textphone = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.textpassword = ((System.Windows.Controls.PasswordBox)(target)); return; case 9: this.btnlogin = ((System.Windows.Controls.Button)(target)); #line 75 "..\..\..\Pages\RegPage.xaml" this.btnlogin.Click += new System.Windows.RoutedEventHandler(this.Btnlogin_Click); #line default #line hidden return; case 10: this.errortext = ((System.Windows.Controls.TextBlock)(target)); return; case 11: this.textrole = ((System.Windows.Controls.ComboBox)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.TitleText = ((System.Windows.Controls.TextBox)(target)); return; case 2: this.OwnerText = ((System.Windows.Controls.TextBox)(target)); return; case 3: this.LinkHyper = ((System.Windows.Documents.Hyperlink)(target)); #line 22 "..\..\QuestionDetails.xaml" this.LinkHyper.RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(this.Hyperlink_RequestNavigate); #line default #line hidden return; case 4: this.LinkText = ((System.Windows.Controls.TextBlock)(target)); return; case 5: this.CreationDateText = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.LastActivityDateText = ((System.Windows.Controls.TextBox)(target)); return; case 7: this.TagsText = ((System.Windows.Controls.TextBox)(target)); return; case 8: this.ScoreText = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.ViewCountText = ((System.Windows.Controls.TextBox)(target)); return; case 10: this.AnswerCountText = ((System.Windows.Controls.TextBox)(target)); return; case 11: this.IsAnsweredCheckBox = ((System.Windows.Controls.CheckBox)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.win_About = ((天蘩工具箱.winAbout)(target)); return; case 2: this.txtblExplain = ((System.Windows.Controls.TextBlock)(target)); return; case 3: this.hlinkGitUri = ((System.Windows.Documents.Hyperlink)(target)); #line 23 "..\..\winAbout.xaml" this.hlinkGitUri.Click += new System.Windows.RoutedEventHandler(this.hlinkGitUri_Click); #line default #line hidden return; case 4: this.runR = ((System.Windows.Documents.Run)(target)); return; case 5: this.runG = ((System.Windows.Documents.Run)(target)); return; case 6: this.runB = ((System.Windows.Documents.Run)(target)); return; case 7: this.btnSourceCode = ((System.Windows.Controls.Button)(target)); #line 43 "..\..\winAbout.xaml" this.btnSourceCode.Click += new System.Windows.RoutedEventHandler(this.btnSourceCode_Click); #line default #line hidden return; case 8: this.btnExit = ((System.Windows.Controls.Button)(target)); #line 44 "..\..\winAbout.xaml" this.btnExit.Click += new System.Windows.RoutedEventHandler(this.btnExit_Click); #line default #line hidden return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.grid1 = ((System.Windows.Controls.Grid)(target)); return; case 2: this.roomName = ((System.Windows.Controls.Label)(target)); return; case 3: this.label2 = ((System.Windows.Controls.Label)(target)); return; case 4: this.label3 = ((System.Windows.Controls.Label)(target)); return; case 5: this.textBox2 = ((System.Windows.Controls.TextBox)(target)); return; case 6: this.button1 = ((System.Windows.Controls.Button)(target)); return; case 7: this.comboBox1 = ((System.Windows.Controls.ComboBox)(target)); return; case 8: this.textBlock1 = ((System.Windows.Controls.TextBlock)(target)); return; case 9: this.edit = ((System.Windows.Documents.Hyperlink)(target)); #line 42 "..\..\..\..\DeviceMigrations\EquipmentDelivery.xaml" this.edit.Click += new System.Windows.RoutedEventHandler(this.Out_Click); #line default #line hidden return; case 10: this.outGird = ((System.Windows.Controls.DataGrid)(target)); return; case 11: this.page = ((GloryView.RFID.PageControl.Pager)(target)); return; } this._contentLoaded = true; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.productName = ((System.Windows.Controls.Label)(target)); return; case 2: this.versionLabel = ((System.Windows.Controls.Label)(target)); return; case 3: this.version = ((System.Windows.Controls.Label)(target)); return; case 4: this.copyright = ((System.Windows.Controls.Label)(target)); return; case 5: this.company = ((System.Windows.Controls.Label)(target)); return; case 6: this.reserved = ((System.Windows.Controls.Label)(target)); return; case 7: this.info = ((System.Windows.Controls.Label)(target)); return; case 8: this.description = ((System.Windows.Controls.TextBox)(target)); return; case 9: this.okButton = ((System.Windows.Controls.Button)(target)); return; case 10: this.productLink = ((System.Windows.Controls.Label)(target)); return; case 11: this.hyperlink = ((System.Windows.Documents.Hyperlink)(target)); #line 85 "..\..\..\AboutBox.xaml" this.hyperlink.RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(this.hyperlink_RequestNavigate); #line default #line hidden return; } this._contentLoaded = true; }
public virtual DependencyObject Visit(DocLink docLink) { var result = new System.Windows.Documents.Hyperlink() { NavigateUri = new Uri($"#StartItem={docLink.Type}:{docLink.Id ?? docLink.Name}", UriKind.Relative) }; result.Inlines.Add(new Run(docLink.Name)); return(result); }