/// <summary> /// Occurs when the owner keyword has been clicked. /// </summary> private void OwnerButton_Click(object sender, RoutedEventArgs e) { ContentControl button = (ContentControl)sender; BackStageControl backStage = Util.GetParentOfType <BackStageControl>(this); backStage.DoSearch("owner:" + (string)button.Content, SearchType.Maps); }
/// <summary> /// Raised when a tag hyperlink button has been clicked - performs a search for /// other groups with this tag. /// </summary> private void TagButton_Click(object sender) { ContentControl button = (ContentControl)sender; BackStageControl backStage = Util.GetParentOfType <BackStageControl>(this); backStage.DoSearch((string)button.Content, SearchType.Groups); }
internal void Clear() { TypeOfGroups = GroupType.None; if (MyGroupsListBox != null) { ObservableCollection <BindingWrapper <Group> > wrappers = MyGroupsListBox.ItemsSource as ObservableCollection <BindingWrapper <Group> >; if (wrappers != null) { BackStageControl backStage = Util.GetParentOfType <BackStageControl>(this); if (backStage != null) { foreach (BindingWrapper <Group> item in wrappers) { backStage.CloseGroup(item.Content, false); } } } MyGroupsListBox.ItemsSource = null; MyGroupsListBox.Visibility = Visibility.Collapsed; } if (ProgressIndicator != null) { ProgressIndicator.Visibility = Visibility.Visible; } if (SearchResultsTextBlock != null) { SearchResultsTextBlock.Text = ""; } }
/// <summary> /// Occurs when the group owner hyperlink button is clicked - performs a search /// for other groups from that owner. /// </summary> private void GroupOwnerButton_Click(object sender, RoutedEventArgs e) { string owner = ((HyperlinkButton)sender).Content.ToString(); BackStageControl backStage = Util.GetParentOfType <BackStageControl>(this); // DO NOT LOCALIZE "owner" - THIS IS A QUERY PARAMETER backStage.DoSearch(string.Format("owner: {0}", owner), SearchType.Groups); }
/// <summary> /// Occurs when the OpenThisGroupButton is clicked. /// </summary> void OpenThisGroupButton_Click(object sender) { ListBoxItem lbi = Util.GetParentOfType <ListBoxItem>((DependencyObject)sender); BackStageControl backStage = Util.GetParentOfType <BackStageControl>(this); backStage.AddGroup(((BindingWrapper <Group>)lbi.DataContext).Content); }
private void openGroup(object commandParameter) { if (commandParameter is DependencyObject) { ListBoxItem lbi = Util.GetParentOfType <ListBoxItem>((DependencyObject)commandParameter); BackStageControl backStage = Util.GetParentOfType <BackStageControl>(this); backStage.AddGroup((Group)lbi.DataContext); } }
/// <summary> /// Occurs when an owner hyperlink button is clicked - performs a search /// for other maps from that owner. /// </summary> private void owner(object commandParameter) { string owner = null; if (commandParameter is HyperlinkButton) { owner = ((HyperlinkButton)commandParameter).Content.ToString(); } else if (commandParameter is string) { owner = (string)commandParameter; } else { return; } BackStageControl backStage = Util.GetParentOfType <BackStageControl>(this); // DO NOT LOCALIZE "owner" - THIS IS A QUERY PARAMETER backStage.DoSearch(string.Format("owner: {0}", owner), SearchType.Maps); }
/// <summary> /// Occurs when the owner hyperlink button of a group is clicked - searches for other groups of that owner. /// </summary> void OwnerHyperlinkButton_Click(object sender) { string owner = null; if (sender is ContentControl) { owner = ((ContentControl)sender).Content.ToString(); } else if (sender is string) { owner = (string)sender; } else { return; } BackStageControl backStage = Util.GetParentOfType <BackStageControl>(this); // DO NOT LOCALIZE "owner" - THIS IS A QUERY PARAMETER backStage.DoSearch(string.Format("owner: {0}", owner), SearchType.Groups); }
/// <summary> /// Occurs when the close button is clicked. /// </summary> internal void CloseGroupButton_Click(object sender, RoutedEventArgs e) { BackStageControl backStage = Util.GetParentOfType <BackStageControl>(this); backStage.CloseGroup(((GroupBindingWrapper)DataContext).Content, true); }