private static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if (e.Category == UserPreferenceCategory.Color)
     {
         for (int i = 0; i < count; i++)
         {
             ISystemColorTracker target = (ISystemColorTracker)list[i].Target;
             if (target != null)
             {
                 target.OnSystemColorChanged();
             }
         }
     }
 }
예제 #2
0
 private static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     if (e.Category != UserPreferenceCategory.Color)
     {
         return;
     }
     for (int index = 0; index < SystemColorTracker.count; ++index)
     {
         ISystemColorTracker systemColorTracker = (ISystemColorTracker)SystemColorTracker.list[index].Target;
         if (systemColorTracker != null)
         {
             systemColorTracker.OnSystemColorChanged();
         }
     }
 }
예제 #3
0
 private static void OnUserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e)
 {
     // Update pens and brushes
     if (e.Category == UserPreferenceCategory.Color)
     {
         for (int i = 0; i < count; i++)
         {
             Debug.Assert(list[i] != null, "null value in active part of list");
             ISystemColorTracker tracker = (ISystemColorTracker)list[i].Target;
             if (tracker != null)
             {
                 // If object still around
                 tracker.OnSystemColorChanged();
             }
         }
     }
 }