Пример #1
0
 protected override void HandlePropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (sender == TimedButtonVM && (
             TimedButtonVM.NeedsSync(e, nameof(TimedButtonVM.ButtonTime)) ||
             TimedButtonVM.NeedsSync(e, nameof(ButtonVM.BackgroundColor)) ||
             TimedButtonVM.NeedsSync(e, nameof(ButtonVM.TextColor)) ||
             TimedButtonVM.NeedsSync(e, nameof(ButtonVM.Name)) ||
             TimedButtonVM.NeedsSync(e, nameof(ButtonVM.HotKey))))
     {
         ReDraw();
     }
 }
Пример #2
0
 protected override void HandlePropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     base.HandlePropertyChanged(sender, e);
     if (ViewModel.NeedsSync(e.PropertyName, nameof(ViewModel.ButtonTime), sender, ViewModel))
     {
         if (ViewModel.ButtonTime == null)
         {
             Clear();
         }
     }
     if (sender == ViewModel && (
             TimedButtonVM.NeedsSync(e, nameof(ViewModel.TagsPerRow)) ||
             TimedButtonVM.NeedsSync(e, nameof(ViewModel.ShowSubcategories))))
     {
         ReDraw();
     }
 }