using KanSan.Base.Models; using KanSan.ViewModel; using System; using System.Collections.Generic; using System.Diagnostics; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; namespace KanSan.UI { public static class CalendarCommands { public static RoutedCommand SelectToday = new RoutedCommand("Today", typeof(CalendarCommands)); } /// /// Interaktionslogik für UCTaetigkeitEdit.xaml /// public partial class UCTaetigkeitEdit : UserControl { public event EventHandler SpeichernClicked; protected virtual void OnSpeichernClicked(EventArgs e) { EventHandler handler = SpeichernClicked; if (handler != null) handler(this, e); } public UCTaetigkeitEdit(Taetigkeiten taetigkeit) { InitializeComponent(); this.DataContext = new TaetigkeitEditViewModel(taetigkeit); } private void Speichern_Click(object sender, RoutedEventArgs e) { (DataContext as TaetigkeitEditViewModel).Speichern(); OnSpeichernClicked(EventArgs.Empty); } private void SelectTodayExecuted(object target, ExecutedRoutedEventArgs e) { var calendar = target as Calendar; if(calendar == null) { if (Debugger.IsAttached) Debugger.Break(); return; } Debugger.Break(); } private void SelectTodayCanExecute(object target, CanExecuteRoutedEventArgs e) { e.CanExecute = true; } } }