using System.ComponentModel; using System.Windows; using System.Windows.Controls; using System.Windows.Media; using System.Collections.Generic; using System; using System.Linq; using System.Windows.Media.Imaging; using BS.Shared; using BS.Shared.Extensions; using BeWo.View.Navigation.Sorter; using BS.Shared.DataContracts.Compact; using BeWo.ServiceProxy; using BeWo.ViewModel; namespace BeWo.View.Search { public class SupportConceptGroupSearchView : GenericSearchView { private Button mButton; public event EventHandler EditGroupButtonClicked; public SupportConceptGroupSearchView() { if (!DesignerProperties.GetIsInDesignMode(this)) ThemeColor = FindResource("SupportConceptContentBrush") as Brush; CreateButton(); } protected void CreateButton() { if (BeWoApp.LoggedOnUser != null && this.mButton == null) { mButton = new Button(); mButton.Margin = new Thickness(3, 3, 3, 3); mButton.HorizontalAlignment = HorizontalAlignment.Left; StackPanel sp = new StackPanel(); sp.Orientation = Orientation.Horizontal; System.Windows.Controls.Image img = new System.Windows.Controls.Image(); img.Source = new BitmapImage(new Uri("pack://application:,,,/BeWoPlaner;component/Ressources/Icons/UserGroupHome24bw.png")); sp.Children.Add(img); TextBlock tb = new TextBlock(); tb.Margin = new Thickness(3,4,3,0); tb.Text = "Gruppen bearbeiten"; sp.Children.Add(tb); mButton.Content = sp; mButton.ToolTip = "Gruppen bearbeiten"; mButton.Click += mButton_Click; this.AddCustomContentHeaderElement(mButton); } } void mButton_Click(object sender, RoutedEventArgs e) { if (EditGroupButtonClicked != null) EditGroupButtonClicked(sender, e); } public List GroupOfPeoples { get { return _ObjectList; } set { base.UpdateObjectList(value); } } protected override void GetAll(Action> pCallBack) { } } }